/* =========================================================
   Animaciones ligeras: solo transform, opacity y gradientes.
   Todas se desactivan con "reducir movimiento" del sistema.
   ========================================================= */

/* ---------- Portada ---------- */
.hero { position: relative; isolation: isolate; }
.hero-net { position: absolute; inset: -40px calc(-1 * max(16px, env(safe-area-inset-right, 0px))) -20px calc(-1 * max(16px, env(safe-area-inset-left, 0px))); width: auto; height: auto; z-index: -1; pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse at 70% 45%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse at 70% 45%, #000 30%, transparent 75%); }
.hero-net canvas { width: 100%; height: 100%; display: block; }

/* Aura que respira detrás del blob */
.orbit::before {
  content: ""; position: absolute; inset: 8%; border-radius: 50%; z-index: -1;
  background: conic-gradient(from 0deg, color-mix(in srgb, var(--accent) 35%, transparent), transparent 30%, color-mix(in srgb, #38bdf8 25%, transparent) 55%, transparent 80%, color-mix(in srgb, var(--accent) 35%, transparent));
  filter: blur(40px); opacity: .55; animation: girar 22s linear infinite;
}
@keyframes girar { to { transform: rotate(360deg); } }

/* Inclinación 3D suave con el mouse */
.orbit { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .4s cubic-bezier(.2, .8, .2, 1); transform-style: preserve-3d; }

/* Tarjetas y botones flotantes que se mecen */
.stat, .floaty { animation: flotar 7s ease-in-out infinite; }
.stat.s2 { animation-delay: -2.3s; } .stat.s3 { animation-delay: -4.6s; }
.floaty.f1 { animation-delay: -1s; animation-duration: 6s; } .floaty.f2 { animation-delay: -3s; animation-duration: 8s; } .floaty.f3 { animation-delay: -5s; animation-duration: 6.5s; }
@keyframes flotar { 50% { transform: translateY(-10px); } }

/* Título: entrada escalonada y "futuro" con brillo que recorre la palabra */
.hero h1, .hero .lede, .hero-search, .hero .chips, .hero .eyebrow { animation: subir .7s cubic-bezier(.2, .8, .2, 1) both; }
.hero .eyebrow { animation-delay: .02s; } .hero h1 { animation-delay: .08s; } .hero .lede { animation-delay: .16s; }
.hero-search { animation-delay: .24s; } .hero .chips { animation-delay: .32s; }
@keyframes subir { from { transform: translateY(14px); opacity: .001; } }
.hero h1 em {
  background: linear-gradient(100deg, var(--accent) 20%, #38bdf8 40%, #e879f9 50%, var(--accent) 70%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: brillo-texto 6s ease-in-out infinite;
}
@keyframes brillo-texto { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }

/* Chips de categorías: pequeño salto al pasar */
.hero .chip { transition: transform .2s, border-color .15s, color .15s; }
.hero .chip:hover { transform: translateY(-2px); }

/* ---------- Brillo que sigue al mouse ---------- */
.ecard, .nota, .pw-card, .bpost { position: relative; }
.ecard::after, .nota::after, .pw-card::after, .bpost::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%);
}
.ecard:hover::after, .nota:hover::after, .pw-card:hover::after, .bpost:hover::after { opacity: 1; }
.ecard { transition: transform .2s, border-color .15s, box-shadow .2s; }
.ecard:hover { box-shadow: 0 14px 40px color-mix(in srgb, var(--accent) 18%, transparent); }
.ecard .banner .big { transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.ecard:hover .banner .big { transform: rotate(-8deg) scale(1.08); }

/* Botón principal: destello al pasar */
.btn.primary { position: relative; overflow: hidden; }
.btn.primary::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .2s;
  background: radial-gradient(120px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .28), transparent 70%);
}
.btn.primary:hover::after { opacity: 1; }

/* ---------- Cambio de sección suave ---------- */
[data-route]:not([hidden]) { animation: entrar .28s ease-out both; }
@keyframes entrar { from { opacity: .001; transform: translateY(6px); } }

/* ---------- Pasos de la portada ---------- */
.step .step-ico { transition: transform .3s cubic-bezier(.2, .8, .2, 1), background .2s, color .2s; display: inline-grid; }
.step:hover .step-ico { transform: rotate(-10deg) scale(1.12); background: var(--accent-soft); color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .orbit { transform: none !important; }
  .hero h1 em { animation: none; background-position: 50% 0; }
}

/* El aura difuminada y la red no deben crear scroll horizontal */
section[data-route="inicio"] { overflow-x: clip; }
