/* =====================================================================================================
   Alvin Plugins — "más vida": la mascota animada, botones de vidrio, luces de fondo y aparición al bajar.
   Todo lo que se mueve usa transform / opacity (lo dibuja la tarjeta gráfica, sin repintar la página)
   y se apaga con "reducir movimiento" de Windows.
   ===================================================================================================== */
:root {
  --navy: #070D1C; --navy2: #0B1530; --line: rgba(143, 179, 255, .16);
  --blue: #2F6BFF; --blue2: #8FB3FF; --indigo: #7C6CFF; --cyan: #5FE3D3;
  --grad: linear-gradient(100deg, #8FB3FF 0%, #2F6BFF 38%, #7C6CFF 70%, #5FE3D3 100%);
}
body { background: radial-gradient(1200px 700px at 80% -10%, #12224a 0%, transparent 60%), var(--navy); }
.accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.alt { background: linear-gradient(180deg, rgba(11, 21, 48, .7), rgba(11, 21, 48, .35)); }

/* luces de fondo que se mueven despacio (capas fijas: no se repintan al hacer scroll) */
.bg-luces { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-luces i { position: absolute; width: 720px; height: 720px; border-radius: 50%; opacity: .55; will-change: transform; }
.bg-luces i:nth-child(1) { left: -220px; top: 10%; background: radial-gradient(closest-side, rgba(47, 107, 255, .32), transparent); animation: deriva1 26s ease-in-out infinite alternate; }
.bg-luces i:nth-child(2) { right: -260px; top: 35%; background: radial-gradient(closest-side, rgba(124, 108, 255, .26), transparent); animation: deriva2 32s ease-in-out infinite alternate; }
.bg-luces i:nth-child(3) { left: 30%; bottom: -320px; background: radial-gradient(closest-side, rgba(95, 227, 211, .14), transparent); animation: deriva3 38s ease-in-out infinite alternate; }
@keyframes deriva1 { to { transform: translate3d(160px, 120px, 0) scale(1.15); } }
@keyframes deriva2 { to { transform: translate3d(-180px, -90px, 0) scale(.9); } }
@keyframes deriva3 { to { transform: translate3d(120px, -140px, 0) scale(1.2); } }
.hero::before { display: none; }

/* botones de vidrio */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn-main { color: #fff; background: linear-gradient(135deg, rgba(47, 107, 255, .72), rgba(124, 108, 255, .58));
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 0 0 1px rgba(170, 195, 255, .38), 0 10px 32px rgba(47, 107, 255, .32); }
.btn-main:hover { background: linear-gradient(135deg, rgba(64, 122, 255, .85), rgba(140, 124, 255, .7)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 0 0 1px rgba(190, 210, 255, .5), 0 14px 40px rgba(47, 107, 255, .45); }
.btn-ghost { color: var(--cream); background: rgba(255, 255, 255, .055); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 0 0 1px rgba(190, 210, 255, .2); }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 0 0 1px rgba(190, 210, 255, .34); }
/* destello que cruza el botón al pasar el mouse */
.btn::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .22) 50%, transparent 65%); transform: translateX(-120%); transition: transform .7s cubic-bezier(.2, .8, .2, 1); }
.btn:hover::after { transform: translateX(120%); }
.lang { background: rgba(255, 255, 255, .06); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px rgba(190, 210, 255, .2); }
.pills span { background: rgba(255, 255, 255, .04); }

/* Alvin, la mascota */
.dog-stage { justify-self: center; position: relative; width: min(330px, 72vw); aspect-ratio: 1; border: 0; padding: 0; border-radius: 50%; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #4f86ff 0%, #2F6BFF 42%, #2a4fd6 75%, #2340b8 100%);
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, .07), inset 0 -18px 40px rgba(10, 20, 60, .35), 0 30px 80px rgba(47, 107, 255, .32); -webkit-tap-highlight-color: transparent; }
.dog-stage:focus-visible { outline: 3px solid var(--yellow); outline-offset: 8px; }
.dog-stage .dog { position: absolute; inset: 9%; width: 82%; height: 82%; overflow: visible; }
.halo { position: absolute; inset: -18px; border-radius: 50%; background: radial-gradient(closest-side, rgba(95, 140, 255, .45), transparent 70%); z-index: -1; animation: latido 3.6s ease-in-out infinite; will-change: transform, opacity; }
@keyframes latido { 50% { transform: scale(1.08); opacity: .65; } }
.orbit { position: absolute; inset: -16px; border-radius: 50%; border: 1.5px dashed rgba(143, 179, 255, .35); animation: girar 40s linear infinite; }
.orbit::before, .orbit::after { content: ""; position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 12px var(--yellow); top: 12%; left: 12%; }
.orbit::after { background: var(--cyan); box-shadow: 0 0 12px var(--cyan); top: auto; left: auto; bottom: 14%; right: 9%; width: 7px; height: 7px; }
@keyframes girar { to { transform: rotate(360deg); } }
.spark { position: absolute; width: 14px; height: 14px; background: var(--cream); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); opacity: 0; animation: brillo 4s ease-in-out infinite; }
.s1 { top: 4%; right: 10%; }
.s2 { bottom: 10%; left: -2%; animation-delay: 1.2s; width: 10px; height: 10px; }
.s3 { top: 42%; right: -6%; animation-delay: 2.3s; width: 9px; height: 9px; background: var(--yellow); }
.s4 { top: -4%; left: 30%; animation-delay: 3.1s; width: 8px; height: 8px; background: var(--cyan); }
@keyframes brillo { 0%, 100% { opacity: 0; transform: scale(.4) rotate(0); } 15% { opacity: 1; transform: scale(1) rotate(30deg); } 35% { opacity: 0; transform: scale(.5) rotate(60deg); } }
/* las partes del perro (SVG): cada una gira alrededor de su propio punto */
.dog-body { transform-box: view-box; transform-origin: 100px 190px; animation: flotar 4.2s ease-in-out infinite; }
@keyframes flotar { 50% { transform: translateY(-6px); } }
.headwrap { transform-box: view-box; transform-origin: 100px 150px; animation: ladear 7s ease-in-out infinite; }
@keyframes ladear { 0%, 100% { transform: rotate(0); } 28% { transform: rotate(-7deg); } 48% { transform: rotate(-7deg); } 62% { transform: rotate(4deg); } 78% { transform: rotate(0); } }
.ear { transform-box: view-box; }
.ear-l { transform-origin: 63px 62px; animation: orejaI 7s ease-in-out infinite; }
.ear-r { transform-origin: 137px 62px; animation: orejaD 7s ease-in-out infinite; }
@keyframes orejaI { 0%, 26%, 100% { transform: rotate(0); } 30% { transform: rotate(10deg); } 34% { transform: rotate(-3deg); } 38% { transform: rotate(7deg); } 44% { transform: rotate(0); } }
@keyframes orejaD { 0%, 56%, 100% { transform: rotate(0); } 60% { transform: rotate(-10deg); } 64% { transform: rotate(3deg); } 68% { transform: rotate(-7deg); } 74% { transform: rotate(0); } }
.eye { transform-box: fill-box; transform-origin: center; animation: parpadeo 5.5s infinite; }
@keyframes parpadeo { 0%, 93%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.08); } 97% { transform: scaleY(1); } }
.look { transition: transform .25s ease-out; }
.bandana { transform-box: view-box; transform-origin: 100px 148px; animation: mecer 3.4s ease-in-out infinite; }
@keyframes mecer { 50% { transform: rotate(-4deg); } }
/* saludo (clic): salto y orejas felices */
.dog-stage.feliz .dog-body { animation: salto .7s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes salto { 30% { transform: translateY(-22px) scale(1.04); } 60% { transform: translateY(2px) scale(.98, 1.02); } }
.dog-stage.feliz .ear-l { animation: aleteoI .35s ease-in-out 2; }
.dog-stage.feliz .ear-r { animation: aleteoD .35s ease-in-out 2; }
@keyframes aleteoI { 50% { transform: rotate(16deg); } }
@keyframes aleteoD { 50% { transform: rotate(-16deg); } }

/* aparición al bajar (solo con JavaScript activo: sin él todo se ve normal) */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s cubic-bezier(.2, .8, .2, 1), transform .8s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }
.js .catalog > * { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2, .8, .2, 1), transform .7s cubic-bezier(.2, .8, .2, 1); }
.js .catalog.in > * { opacity: 1; transform: none; }
.js .catalog.in > *:nth-child(2) { transition-delay: .1s; }
.js .catalog.in > *:nth-child(3) { transition-delay: .2s; }
.js .catalog.in > *:nth-child(4) { transition-delay: .3s; }
.js .why > div { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .why.in > div { opacity: 1; transform: none; }
.js .why.in > div:nth-child(2) { transition-delay: .07s; }
.js .why.in > div:nth-child(3) { transition-delay: .14s; }
.js .why.in > div:nth-child(4) { transition-delay: .21s; }
.js .why.in > div:nth-child(5) { transition-delay: .28s; }
.js .why.in > div:nth-child(6) { transition-delay: .35s; }
/* la portada entra al cargar */
.hero h1, .hero .lead, .hero .cta, .hero .pills, .hero .eyebrow { animation: entrar .9s cubic-bezier(.2, .8, .2, 1) both; }
.hero .eyebrow { animation-delay: .05s; }
.hero h1 { animation-delay: .12s; }
.hero .lead { animation-delay: .22s; }
.hero .cta { animation-delay: .32s; }
.hero .pills { animation-delay: .42s; }
.dog-stage { animation: entrarPerro 1.1s cubic-bezier(.3, 1.4, .5, 1) .15s both; }
@keyframes entrar { from { opacity: 0; transform: translateY(18px); } }
@keyframes entrarPerro { from { opacity: 0; transform: scale(.7) rotate(-8deg); } }

/* tarjetas: vidrio con borde de luz al pasar el mouse */
.product { position: relative; background: linear-gradient(180deg, rgba(25, 42, 82, .75), rgba(15, 26, 54, .85)); }
.product::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: var(--grad); opacity: 0; transition: opacity .3s;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; z-index: 2; }
.product:hover::before { opacity: 1; }
.product:hover { border-color: transparent; box-shadow: 0 24px 60px rgba(10, 20, 60, .6), 0 0 40px rgba(47, 107, 255, .18); }
.product .cover { transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.product:hover .cover { transform: scale(1.04); }
.product .status { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(7, 13, 28, .78); }
.why div { background: linear-gradient(180deg, rgba(25, 42, 82, .55), rgba(15, 26, 54, .55)); transition: transform .25s, border-color .25s, opacity .6s ease; }
.why div:hover { transform: translateY(-3px); border-color: rgba(143, 179, 255, .35); }
.why svg { padding: 8px; width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, rgba(255, 201, 77, .2), rgba(255, 201, 77, .05)); box-shadow: inset 0 0 0 1px rgba(255, 201, 77, .25); }
.coming { background: rgba(255, 255, 255, .02); }

/* ayuda: degradado de la marca con un brillo que pasa */
.help { position: relative; overflow: hidden; background: linear-gradient(120deg, #2F6BFF 0%, #4f5cff 55%, #7C6CFF 100%); box-shadow: 0 24px 60px rgba(47, 107, 255, .3); }
.help::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -40%; background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .14), transparent); animation: pasar 7s ease-in-out infinite; pointer-events: none; }
@keyframes pasar { 0%, 60% { transform: translateX(0); } 100% { transform: translateX(380%); } }

@media (max-width: 860px) { .dog-stage { grid-row: 1; width: 190px; } .orbit { inset: -10px; } }
/* "Reducir movimiento" (Windows con los efectos de animación apagados): se quitan los movimientos GRANDES
   (luces que viajan, entradas deslizantes, saltos, destellos que cruzan), pero Alvin sigue vivo con gestos
   pequeños y lentos: parpadea, mueve las orejas, ladea la cabeza y flota apenas. */
@media (prefers-reduced-motion: reduce) {
  .bg-luces i, .help::after, .hero h1, .hero .lead, .hero .cta, .hero .pills, .hero .eyebrow, .dog-stage, .halo { animation: none !important; }
  .js .reveal, .js .catalog > *, .js .why > div { opacity: 1; transform: none; transition: none; }
  .btn::after { display: none; }
  .dog-body { animation-name: flotarSuave; }
  @keyframes flotarSuave { 50% { transform: translateY(-3px); } }
  .orbit { animation-duration: 80s; }
  .dog-stage.feliz .dog-body { animation: none; }
}
