/* ============================================================
   Landing de Noctua IA (noctuaia.com)
   - Modo noche: cielo con estrellas, auroras y luna.
   - Modo día: amanecer con nubes y sol.
   - Fraunces para títulos, Inter para texto.
   ============================================================ */

/* ---------- Tipografías ---------- */
@font-face { font-family: "Fraunces"; src: url("/fonts/fraunces-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/fonts/fraunces-latin-600-italic.woff2") format("woff2"); font-weight: 600; font-style: italic; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/fonts/fraunces-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }

/* ---------- Temas ---------- */
:root,
:root[data-theme="dark"] {
  --fondo: #070a18;
  --texto: #f1efff;
  --suave: #aeb1cf;
  --linea: rgba(190, 175, 255, 0.16);
  --linea-fuerte: rgba(190, 175, 255, 0.38);
  --panel: rgba(18, 20, 44, 0.62);
  --panel-solido: #121530;
  --acento: #f2b441;
  --violeta: #9a7dff;
  --violeta-boton: #7b5cff;
  --sobre-boton: #ffffff;
  --rama: #6b4a2e;
  --sombra: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
  --sel: rgba(242, 180, 65, 0.35);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --fondo: #fbf6ee;
  --texto: #1d1640;
  --suave: #5a5476;
  --linea: rgba(70, 45, 150, 0.14);
  --linea-fuerte: rgba(70, 45, 150, 0.32);
  --panel: rgba(255, 255, 255, 0.7);
  --panel-solido: #ffffff;
  --acento: #b8650a;
  --violeta: #5b34e6;
  --violeta-boton: #5b34e6;
  --sobre-boton: #ffffff;
  --rama: #8a5a33;
  --sombra: 0 30px 60px -34px rgba(60, 40, 120, 0.35);
  --sel: rgba(91, 52, 230, 0.2);
  color-scheme: light;
}

/* Transición de colores solo durante el cambio de tema (main.js). */
.cambiando-tema body,
.cambiando-tema body *:not(.cielo):not(.cielo *) {
  transition: background-color 0.8s ease, color 0.8s ease, border-color 0.8s ease, fill 0.8s ease, stroke 0.8s ease !important;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* Que ninguna regla de display anule el atributo hidden. */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--texto);
  background: var(--fondo);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
::selection { background: var(--sel); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--acento); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4 {
  margin: 0 0 0.4em;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.025em;
}
h2 { font-size: clamp(2.4rem, 5.2vw, 4.2rem); }
h3 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
em { font-style: italic; color: var(--acento); }
p { margin: 0 0 1em; }

.contenedor { width: min(100% - 48px, 1180px); margin-inline: auto; }

.saltar {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  padding: 10px 16px; border-radius: 10px;
  background: var(--acento); color: #1a1300; font-weight: 600; text-decoration: none;
}
.saltar:focus { top: 16px; }

/* ============================================================
   CIELO
   ============================================================ */
.cielo { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.cielo__degradado { position: absolute; inset: 0; transition: opacity 1.4s ease; }
.cielo__degradado--noche {
  background:
    radial-gradient(ellipse 80% 60% at 70% 0%, rgba(80, 50, 190, 0.45), transparent 70%),
    radial-gradient(ellipse 60% 50% at 0% 100%, rgba(20, 110, 140, 0.25), transparent 70%),
    #070a18;
}
.cielo__degradado--dia {
  opacity: 0;
  background:
    radial-gradient(ellipse 70% 50% at 80% 0%, rgba(255, 196, 120, 0.55), transparent 70%),
    linear-gradient(180deg, #c8defb 0%, #f6e6d6 55%, #fbf6ee 100%);
}
:root[data-theme="light"] .cielo__degradado--noche { opacity: 0; }
:root[data-theme="light"] .cielo__degradado--dia { opacity: 1; }

.cielo__capa { position: absolute; inset: -40px; transition: transform 0.6s ease-out; }
.cielo__capa--lejos { transform: translate(calc(var(--px, 0) * -14px), calc(var(--py, 0) * -10px)); }
.cielo__capa--cerca { transform: translate(calc(var(--px, 0) * -34px), calc(var(--py, 0) * -24px)); }

/* Estrellas: gradientes repetidos; suben despacio (derivar). */
.estrellas { position: absolute; inset: 0 0 -600px 0; transition: opacity 1.2s ease; }
.estrellas--1 {
  background-image:
    radial-gradient(1.6px 1.6px at 20px 30px, #fff, transparent),
    radial-gradient(1.4px 1.4px at 130px 210px, rgba(255,255,255,0.85), transparent),
    radial-gradient(1.2px 1.2px at 250px 90px, #fff, transparent),
    radial-gradient(1.6px 1.6px at 340px 380px, rgba(255,255,255,0.9), transparent),
    radial-gradient(1.2px 1.2px at 470px 150px, #fff, transparent),
    radial-gradient(1.6px 1.6px at 560px 470px, rgba(255,255,255,0.85), transparent),
    radial-gradient(1.2px 1.2px at 80px 520px, #fff, transparent),
    radial-gradient(1.6px 1.6px at 400px 560px, rgba(255,255,255,0.75), transparent);
  background-size: 600px 600px;
  animation: titilar 6s ease-in-out infinite, derivar 150s linear infinite;
}
.estrellas--2 {
  background-image:
    radial-gradient(2.6px 2.6px at 90px 120px, rgba(220,210,255,0.95), transparent),
    radial-gradient(2.2px 2.2px at 300px 260px, rgba(255,226,170,0.95), transparent),
    radial-gradient(2.6px 2.6px at 520px 40px, #fff, transparent),
    radial-gradient(2.2px 2.2px at 200px 450px, rgba(220,210,255,0.9), transparent);
  background-size: 600px 600px;
  animation: titilar 9s ease-in-out infinite 2s, derivar 95s linear infinite;
}
@keyframes titilar { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes derivar { to { transform: translateY(-600px); } }

.fugaz {
  position: absolute; top: 16%; left: 72%;
  width: 150px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, #fff, transparent);
  opacity: 0; transform: rotate(-24deg);
  animation: fugaz 11s ease-out infinite 3s;
}
@keyframes fugaz {
  0% { opacity: 0; transform: rotate(-24deg) translateX(0); }
  2% { opacity: 1; }
  9%, 100% { opacity: 0; transform: rotate(-24deg) translateX(-460px); }
}
:root[data-theme="light"] .estrellas,
:root[data-theme="light"] .fugaz { opacity: 0 !important; animation-play-state: paused; }

.aurora {
  position: absolute; width: 58vmax; height: 58vmax; border-radius: 50%;
  filter: blur(80px); opacity: 0.55; transition: opacity 1.4s ease;
}
.aurora--1 { top: -26vmax; left: -18vmax; background: radial-gradient(circle, rgba(139,108,255,0.6), transparent 65%); animation: auroraA 16s ease-in-out infinite alternate; }
.aurora--2 { top: 18vmax; right: -28vmax; background: radial-gradient(circle, rgba(242,180,65,0.32), transparent 65%); animation: auroraB 19s ease-in-out infinite alternate; }
.aurora--3 { bottom: -34vmax; left: 16vmax; background: radial-gradient(circle, rgba(76,201,232,0.26), transparent 65%); animation: auroraC 22s ease-in-out infinite alternate; }
@keyframes auroraA { to { transform: translate(26vmax, 16vmax) scale(1.2); } }
@keyframes auroraB { to { transform: translate(-28vmax, 14vmax) scale(0.9); } }
@keyframes auroraC { to { transform: translate(-20vmax, -20vmax) scale(1.15); } }
:root[data-theme="light"] .aurora { opacity: 0.32; }

/* Nubes de día: formas suaves con varios círculos (box-shadow). */
.nube {
  position: absolute; width: 120px; height: 44px; border-radius: 50px;
  background: #fff; opacity: 0; filter: blur(2px);
  box-shadow: 40px -18px 0 6px #fff, 86px -4px 0 0 #fff, 18px 6px 0 2px #fff;
  transition: opacity 1.4s ease;
}
.nube--1 { top: 14%; left: -12%; animation: nube 70s linear infinite; }
.nube--2 { top: 32%; left: -12%; transform: scale(0.7); animation: nube 95s linear infinite -40s; }
.nube--3 { top: 8%; left: -12%; transform: scale(1.25); animation: nube 120s linear infinite -80s; }
@keyframes nube { to { left: 112%; } }
:root[data-theme="light"] .nube { opacity: 0.9; }

/* ============================================================
   CABECERA
   ============================================================ */
.cabecera {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}
.cabecera--fija {
  background: color-mix(in srgb, var(--fondo) 72%, transparent);
  border-bottom-color: var(--linea);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.cabecera__fila { display: flex; align-items: center; gap: 28px; min-height: 74px; }
.marca {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.35rem;
  text-decoration: none; letter-spacing: -0.02em;
}
.marca__ia { margin-left: 4px; font-style: italic; color: var(--acento); }
nav { margin-left: auto; }
nav a { white-space: nowrap; }
.menu { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.menu a {
  position: relative; display: block; padding: 8px 12px;
  color: var(--suave); font-weight: 600; font-size: 0.95rem; text-decoration: none;
}
.menu a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px;
  background: var(--acento); transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s ease;
}
.menu a:hover { color: var(--texto); }
.menu a:hover::after { transform: scaleX(1); }
.cabecera__acciones { display: flex; align-items: center; gap: 14px; }

/* Interruptor de tema */
.tema {
  padding: 0; border: 0; background: none; cursor: pointer; border-radius: 999px;
}
.tema__pista {
  position: relative; display: block; width: 62px; height: 32px; border-radius: 999px;
  background: linear-gradient(135deg, #1b1650, #3b2a8f);
  border: 1px solid var(--linea-fuerte);
  transition: background 0.6s ease;
}
:root[data-theme="light"] .tema__pista { background: linear-gradient(135deg, #9fcbff, #ffd59a); }
.tema__bola {
  position: absolute; top: 3px; left: 3px;
  display: grid; place-items: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: #f1efff; color: #3b2a8f;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: transform 0.55s cubic-bezier(0.68, -0.4, 0.27, 1.4), background 0.6s ease, color 0.6s ease;
}
:root[data-theme="light"] .tema__bola { transform: translateX(30px) rotate(180deg); background: #fff7e0; color: #d98200; }
.tema__sol, .tema__luna { position: absolute; transition: opacity 0.4s ease, transform 0.55s ease; }
.tema__sol { opacity: 0; transform: scale(0.4); }
:root[data-theme="light"] .tema__sol { opacity: 1; transform: scale(1); }
:root[data-theme="light"] .tema__luna { opacity: 0; transform: scale(0.4); }

/* ============================================================
   BOTONES Y ENLACES
   ============================================================ */
.boton {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 12px 26px; border: 0; border-radius: 999px;
  background: var(--violeta-boton); color: var(--sobre-boton);
  font: 600 1rem/1 "Inter", system-ui, sans-serif; text-decoration: none; cursor: pointer;
  overflow: hidden; isolation: isolate;
  transition: transform 0.2s ease;
}
/* Relleno ámbar que entra desde abajo al pasar el cursor. */
.boton::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--acento); transform: translateY(101%);
  transition: transform 0.35s cubic-bezier(0.7, 0, 0.2, 1);
}
.boton:hover { transform: translateY(-2px); color: #1a1300; }
.boton:hover::before { transform: translateY(0); }
.boton:active { transform: translateY(0) scale(0.98); }
.boton--chico { min-height: 40px; padding: 8px 18px; font-size: 0.92rem; }
.boton--grande { min-height: 56px; font-size: 1.05rem; }
.boton--claro { background: transparent; color: var(--texto); box-shadow: inset 0 0 0 1.5px var(--linea-fuerte); }
.boton[disabled] { opacity: 0.7; cursor: progress; transform: none; }
.boton.cargando span::after {
  content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 10px; vertical-align: -2px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: girar 0.7s linear infinite;
}
@keyframes girar { to { transform: rotate(360deg); } }

.enlace-subrayado {
  position: relative; font-weight: 600; text-decoration: none; padding-bottom: 4px;
}
.enlace-subrayado::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: currentColor; transform-origin: right; transition: transform 0.35s ease;
}
.enlace-subrayado:hover::after { transform: scaleX(0.3); }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding: 110px 0 80px; }
.hero__rejilla { display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 32px; }
.hero__firma {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--suave); font-size: 0.92rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
}
.hero__firma::before { content: ""; width: 34px; height: 2px; background: var(--acento); }
.hero__titulo { font-size: clamp(2.8rem, 6.6vw, 5.8rem); margin-bottom: 0.35em; }
.hero__titulo .linea { display: block; overflow: hidden; padding-bottom: 0.08em; }
.hero__titulo .linea > * { display: inline-block; }
.hero__bajada { max-width: 31em; color: var(--suave); font-size: 1.15rem; }
.hero__acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; margin-top: 30px; }

/* Palabras que suben al cargar */
.js .hero__titulo .linea > * {
  opacity: 0; transform: translateY(105%) rotate(3deg);
  animation: subir 0.9s cubic-bezier(0.2, 0.75, 0.2, 1) forwards;
  animation-delay: calc(0.15s + var(--i, 0) * 0.08s);
}
.p0 { --i: 0; } .p1 { --i: 1; } .p2 { --i: 2; } .p3 { --i: 3; } .p4 { --i: 4; } .p5 { --i: 5; }
.d1 { --d: 0.7s; } .d2 { --d: 0.85s; }
@keyframes subir { to { opacity: 1; transform: none; } }

/* Escena */
/* Solo se recorta el borde inferior (el "horizonte"): el astro que no
   está en el cielo queda oculto abajo y el brillo puede salir por arriba
   y por los lados sin dejar un recuadro visible. */
.escena { position: relative; height: min(70vh, 560px); min-height: 420px; clip-path: inset(-300px -300px 0 -300px); }
.orbita {
  position: absolute; left: 50%; top: 100%; width: 0; height: 0;
  transition: transform 1.6s cubic-bezier(0.65, 0, 0.25, 1);
}
:root[data-theme="light"] .orbita { transform: rotate(180deg); }
.astro { position: absolute; width: 130px; height: 130px; margin-left: 10px; border-radius: 50%; }
.astro--luna {
  top: -400px;
  background: radial-gradient(circle at 35% 35%, #fffaf0, #e7defc 60%, #c9bdf0);
  box-shadow: 0 0 60px 12px rgba(214, 200, 255, 0.45), inset -18px -12px 0 rgba(150, 130, 210, 0.35);
}
.astro--luna::before, .astro--luna::after {
  content: ""; position: absolute; border-radius: 50%; background: rgba(160, 140, 215, 0.35);
}
.astro--luna::before { width: 22px; height: 22px; top: 34px; left: 40px; }
.astro--luna::after { width: 14px; height: 14px; top: 76px; left: 70px; }
.astro--sol {
  top: 270px; transform: rotate(180deg);
  background: radial-gradient(circle, #fff3c4, #ffc24a 55%, #ff9a2e);
  box-shadow: 0 0 80px 30px rgba(255, 180, 70, 0.55), 0 0 160px 60px rgba(255, 200, 120, 0.3);
  animation: latir 5s ease-in-out infinite;
}
@keyframes latir { 50% { box-shadow: 0 0 100px 40px rgba(255, 180, 70, 0.6), 0 0 200px 80px rgba(255, 200, 120, 0.32); } }

.buho {
  position: absolute; left: 50%; bottom: 0; width: min(78%, 320px);
  transform: translateX(-50%);
  overflow: visible;
  filter: drop-shadow(0 24px 30px rgba(0, 0, 0, 0.35));
}
.buho__rama { stroke: var(--rama); }
.buho__hoja { fill: #4ade9b; }
.buho__cuerpo { animation: respirar 5s ease-in-out infinite; transform-origin: 110px 220px; }
@keyframes respirar { 50% { transform: translateY(-4px) scale(1.012); } }
.buho__parpado {
  transform-box: fill-box; transform-origin: 50% 0; transform: scaleY(0);
  animation: parpadear 6s infinite;
}
@keyframes parpadear {
  0%, 90%, 100% { transform: scaleY(0); }
  93% { transform: scaleY(1); }
  96% { transform: scaleY(0); }
  97.5% { transform: scaleY(1); }
}
[data-pupila] { transition: transform 0.18s ease-out; }
.buho__ala { transform-box: fill-box; }
.buho__ala--d { transform-origin: 20% 10%; animation: saludar 9s ease-in-out infinite 2s; }
@keyframes saludar {
  0%, 82%, 100% { transform: rotate(0); }
  86% { transform: rotate(-22deg); }
  89% { transform: rotate(-8deg); }
  92% { transform: rotate(-22deg); }
  95% { transform: rotate(0); }
}

.hero__bajar {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid var(--linea-fuerte); border-radius: 20px;
}
.hero__bajar span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  border-radius: 2px; background: var(--acento); animation: rueda 1.8s ease-in-out infinite;
}
@keyframes rueda { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ============================================================
   CINTA
   ============================================================ */
.cinta {
  overflow: hidden; padding: 22px 0; transform: rotate(-1.6deg); margin: 10px -20px 40px;
  border-block: 1px solid var(--linea-fuerte);
  background: color-mix(in srgb, var(--panel-solido) 60%, transparent);
}
.cinta__pista {
  display: flex; align-items: center; gap: 34px; width: max-content;
  font-family: "Fraunces", Georgia, serif; font-style: italic; font-size: clamp(1.4rem, 2.6vw, 2.1rem);
  white-space: nowrap; animation: cinta 38s linear infinite;
}
.cinta__pista i { font-style: normal; color: var(--acento); font-size: 0.8em; }
@keyframes cinta { to { transform: translateX(-50%); } }

/* ============================================================
   SECCIONES
   ============================================================ */
.seccion { padding-block: 110px; scroll-margin-top: 70px; }
.seccion__cabeza { max-width: 760px; margin-bottom: 64px; }
.seccion__num {
  margin-bottom: 14px; font-family: "Fraunces", Georgia, serif; font-style: italic;
  font-size: 1.1rem; color: var(--acento);
}
.seccion__num::after { content: ""; display: inline-block; width: 60px; height: 1px; margin-left: 14px; vertical-align: middle; background: var(--linea-fuerte); }
.seccion__bajada { color: var(--suave); font-size: 1.12rem; max-width: 36em; }

/* Entrada al hacer scroll */
.js [data-reveal] {
  opacity: 0; transform: translateY(36px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.75, 0.2, 1);
  transition-delay: var(--d, 0s);
}
.js [data-reveal].visible { opacity: 1; transform: none; }

/* ============================================================
   QUÉ CONSTRUIMOS
   ============================================================ */
.oferta { display: grid; gap: 28px; }
.oferta__fila {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 70px;
  padding-block: 44px; border-top: 1px solid var(--linea);
}
.oferta__fila--inversa .oferta__texto { order: 2; }
.oferta__texto p { color: var(--suave); font-size: 1.1rem; max-width: 30em; }

.demo {
  position: relative; min-height: 270px; padding: 22px;
  border: 1px solid var(--linea); border-radius: 24px;
  background: var(--panel); box-shadow: var(--sombra);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.chat__barra, .app__barra { display: flex; gap: 6px; margin-bottom: 18px; }
.chat__barra span, .app__barra span { width: 10px; height: 10px; border-radius: 50%; background: var(--linea-fuerte); }

/* Chat */
.burbuja {
  max-width: 78%; margin: 0 0 12px; padding: 11px 16px; border-radius: 18px;
  font-size: 0.96rem; line-height: 1.4; opacity: 0;
}
.burbuja--yo { margin-left: auto; border-bottom-right-radius: 6px; background: var(--violeta-boton); color: #fff; }
.burbuja--ia { border-bottom-left-radius: 6px; background: color-mix(in srgb, var(--texto) 9%, transparent); }
.demo--chat .burbuja:nth-of-type(1) { animation: chat1 10s ease infinite; }
.demo--chat .burbuja:nth-of-type(2) { animation: chat2 10s ease infinite; }
.demo--chat .burbuja:nth-of-type(3) { animation: chat3 10s ease infinite; }
.demo--chat .burbuja:nth-of-type(4) { animation: chat4 10s ease infinite; }
@keyframes chat1 { 0% { opacity: 0; transform: translateY(10px); } 5%, 90% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }
@keyframes chat2 { 0%, 18% { opacity: 0; transform: translateY(10px); } 24%, 90% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }
@keyframes chat3 { 0%, 42% { opacity: 0; transform: translateY(10px); } 47%, 90% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }
@keyframes chat4 { 0%, 56% { opacity: 0; transform: translateY(10px); } 61%, 90% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }
.burbuja--escribiendo { display: inline-flex; gap: 5px; }
.burbuja--escribiendo span { width: 7px; height: 7px; border-radius: 50%; background: var(--suave); animation: punto 1s ease-in-out infinite; }
.burbuja--escribiendo span:nth-child(2) { animation-delay: 0.15s; }
.burbuja--escribiendo span:nth-child(3) { animation-delay: 0.3s; }
@keyframes punto { 50% { transform: translateY(-5px); opacity: 0.5; } }

/* Flujo de automatización */
.demo--flujo { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 40px 28px; }
.nodo {
  position: relative; z-index: 1; display: grid; place-items: center;
  width: 96px; height: 96px; border-radius: 22px;
  background: var(--panel-solido); border: 1.5px solid var(--linea-fuerte);
  font-weight: 600; font-size: 0.95rem;
}
.nodo--ia {
  font-family: "Fraunces", Georgia, serif; font-style: italic; font-size: 1.6rem; color: var(--acento);
  animation: nodoIA 3s ease-in-out infinite;
}
@keyframes nodoIA { 0%, 30%, 70%, 100% { box-shadow: 0 0 0 0 transparent; } 50% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--acento) 22%, transparent), 0 0 40px color-mix(in srgb, var(--acento) 45%, transparent); } }
.nodo:last-of-type { animation: nodoFin 3s ease-in-out infinite; }
@keyframes nodoFin { 0%, 85% { border-color: var(--linea-fuerte); } 95% { border-color: var(--acento); } 100% { border-color: var(--linea-fuerte); } }
.flujo__linea {
  position: absolute; left: 72px; right: 72px; top: 50%; height: 2px;
  background: repeating-linear-gradient(90deg, var(--linea-fuerte) 0 8px, transparent 8px 16px);
}
.flujo__linea i {
  position: absolute; top: -5px; left: 0; width: 12px; height: 12px; border-radius: 50%;
  background: var(--acento); box-shadow: 0 0 14px var(--acento);
  animation: viajar 3s cubic-bezier(0.6, 0, 0.4, 1) infinite;
}
@keyframes viajar { 0% { left: 0; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { left: calc(100% - 12px); opacity: 0; } }

/* App a la medida */
.app__cuerpo {
  display: grid; gap: 12px; height: 190px;
  grid-template-columns: 70px 1fr 1fr;
  grid-template-rows: 26px 1fr 1fr;
}
.bloque { border-radius: 10px; background: color-mix(in srgb, var(--texto) 9%, transparent); opacity: 0; transform: scale(0.9); animation: armar 9s ease infinite; }
.bloque--menu { grid-row: 1 / 4; animation-delay: 0s; }
.bloque--titulo { grid-column: 2 / 4; width: 60%; animation-delay: 0.5s; background: color-mix(in srgb, var(--violeta) 35%, transparent); }
.bloque--a { animation-delay: 1s; }
.bloque--b { animation-delay: 1.5s; }
.bloque--grafica { grid-column: 2 / 4; display: flex; align-items: flex-end; gap: 10px; padding: 12px 16px; animation-delay: 2s; }
.bloque--grafica i { flex: 1; border-radius: 6px 6px 0 0; background: var(--acento); height: 30%; transform-origin: bottom; animation: crecer 9s ease infinite 2.4s; }
.bloque--grafica i:nth-child(2) { height: 65%; background: var(--violeta); }
.bloque--grafica i:nth-child(3) { height: 45%; }
.bloque--grafica i:nth-child(4) { height: 85%; background: var(--violeta); }
@keyframes armar { 0% { opacity: 0; transform: scale(0.9); } 6%, 72% { opacity: 1; transform: none; } 80%, 100% { opacity: 0; transform: scale(0.96); } }
@keyframes crecer { 0% { transform: scaleY(0); } 8%, 66% { transform: scaleY(1); } 74%, 100% { transform: scaleY(0); } }

/* ============================================================
   SECTORES
   ============================================================ */
.constelacion { position: relative; aspect-ratio: 1000 / 420; margin-bottom: 90px; }
.constelacion__lineas { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.constelacion__lineas path {
  fill: none; stroke: var(--linea-fuerte); stroke-width: 1.5; vector-effect: non-scaling-stroke;
  stroke-dasharray: 1600; stroke-dashoffset: 1600; transition: stroke-dashoffset 2.6s ease 0.2s;
}
.constelacion.visible .constelacion__lineas path { stroke-dashoffset: 0; }
.pos-educ { --x: 20%; --y: 50%; }
.pos-salud { --x: 48%; --y: 26%; }
.pos-psico { --x: 76%; --y: 40%; }
.pos-tuya { --x: 56%; --y: 79%; }
.estrella {
  position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%);
  display: grid; justify-items: center; gap: 4px; text-align: center; text-decoration: none;
}
.estrella__punto {
  width: 16px; height: 16px; margin-bottom: 8px; border-radius: 50%;
  background: var(--texto); opacity: 0.7;
  box-shadow: 0 0 18px color-mix(in srgb, var(--texto) 60%, transparent);
  animation: titilar 4s ease-in-out infinite;
}
.estrella__nombre { font-family: "Fraunces", Georgia, serif; font-size: clamp(1.2rem, 2vw, 1.7rem); font-weight: 600; }
.estrella__estado { color: var(--suave); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.estrella--activa .estrella__punto {
  position: relative; width: 26px; height: 26px; opacity: 1; background: var(--acento);
  box-shadow: 0 0 30px var(--acento); animation: none;
}
.estrella--activa .estrella__punto::after {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  border: 2px solid var(--acento); animation: onda 2.4s ease-out infinite;
}
@keyframes onda { from { transform: scale(0.6); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }
.estrella--activa .estrella__estado { color: var(--acento); }
.estrella--tuya .estrella__punto { background: transparent; border: 2px dashed var(--texto); box-shadow: none; }
a.estrella:hover .estrella__nombre { color: var(--acento); }
.js .constelacion .estrella { opacity: 0; transition: opacity 0.8s ease; }
.js .constelacion.visible .estrella { opacity: 1; }
.js .constelacion.visible .estrella:nth-of-type(2) { transition-delay: 0.6s; }
.js .constelacion.visible .estrella:nth-of-type(3) { transition-delay: 1.1s; }
.js .constelacion.visible .estrella:nth-of-type(4) { transition-delay: 1.6s; }

.educacion { display: grid; gap: 28px; scroll-margin-top: 90px; }
.educacion__intro { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.educacion__intro h3 { margin: 0; font-size: clamp(2rem, 3.6vw, 3rem); }
.educacion__intro p { margin: 0; color: var(--suave); }

.producto {
  display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 48px;
  padding: 44px; border-radius: 30px; border: 1px solid var(--linea);
  background: var(--panel); box-shadow: var(--sombra);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.producto h4 { font-size: clamp(2rem, 3.4vw, 2.8rem); }
.producto h4 span { display: block; margin-top: 6px; font-family: "Inter", sans-serif; font-size: 1rem; font-weight: 600; letter-spacing: 0; color: var(--suave); }
.producto__info > p:not(.producto__estado) { color: var(--suave); font-size: 1.05rem; margin-bottom: 26px; }
.producto__estado {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px;
  color: var(--acento); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
}
.producto__estado::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.producto__estado--si { color: #2fbf7d; }
.producto__estado--si::before { animation: titilar 2s ease-in-out infinite; }
.producto--vista { grid-template-columns: 0.9fr 1.1fr; }
.producto--vista .producto__info { order: 2; }

/* Hoja de examen */
.producto__vista { display: grid; place-items: center; }
.hoja {
  display: grid; gap: 10px; width: min(100%, 300px); padding: 26px 24px;
  border-radius: 10px; background: #fffdf8; color: #2a2550;
  box-shadow: 18px 18px 0 -2px color-mix(in srgb, var(--violeta) 30%, transparent), 0 20px 40px -20px rgba(0, 0, 0, 0.5);
  transform: rotate(-4deg); transition: transform 0.5s ease;
}
.producto--niaed:hover .hoja { transform: rotate(0) translateY(-6px); }
.hoja span, .hoja b { display: block; }
.hoja__titulo { height: 12px; width: 55%; border-radius: 4px; background: #6d4aff; }
.w48 { --w: 48%; } .w55 { --w: 55%; } .w58 { --w: 58%; } .w62 { --w: 62%; } .w66 { --w: 66%; } .w70 { --w: 70%; } .w74 { --w: 74%; } .w80 { --w: 80%; }
.hoja__linea { height: 7px; width: var(--w); border-radius: 4px; background: #e2ddf5; }
.hoja__preg, .hoja__op { display: flex !important; align-items: center; gap: 8px; }
.hoja__preg b { font-size: 0.8rem; }
.hoja__preg span, .hoja__op span { height: 7px; width: var(--w); border-radius: 4px; background: #d7d1ef; }
.hoja__op { padding-left: 18px; }
.hoja__op i { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid #9b8fd4; flex: none; }
.hoja__op i.on { background: #f2b441; border-color: #f2b441; }

/* Barras de Vista */
.barras {
  display: flex; align-items: flex-end; gap: 16px; width: min(100%, 340px); height: 220px;
  padding: 0 10px; border-bottom: 2px solid var(--linea-fuerte);
}
.barras span {
  position: relative; flex: 1; height: 50%; border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, var(--violeta), color-mix(in srgb, var(--violeta) 55%, transparent));
  transform-origin: bottom;
}
.barras span:nth-child(1) { height: 28%; }
.barras span:nth-child(3) { height: 48%; }
.barras span:nth-child(4) { height: 14%; }
.barras span:nth-child(2) { height: 92%; background: linear-gradient(180deg, var(--acento), color-mix(in srgb, var(--acento) 55%, transparent)); }
.barras b { position: absolute; left: 50%; bottom: -30px; transform: translateX(-50%); font-size: 0.8rem; color: var(--suave); font-weight: 600; }
.js .producto--vista .barras span { transform: scaleY(0); transition: transform 1.1s cubic-bezier(0.2, 0.8, 0.2, 1); }
.js .producto--vista.visible .barras span { transform: scaleY(1); }
.js .producto--vista.visible .barras span:nth-child(2) { transition-delay: 0.12s; }
.js .producto--vista.visible .barras span:nth-child(3) { transition-delay: 0.24s; }
.js .producto--vista.visible .barras span:nth-child(4) { transition-delay: 0.36s; }

/* ============================================================
   PROCESO
   ============================================================ */
.proceso {
  position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 34px;
  margin: 0 0 80px; padding: 34px 0 0; list-style: none;
}
.proceso::before {
  content: ""; position: absolute; top: 9px; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--violeta), var(--acento));
  transform-origin: left; transition: transform 1.6s cubic-bezier(0.65, 0, 0.25, 1);
}
.js .proceso::before { transform: scaleX(0); }
.js .proceso.visible::before { transform: scaleX(1); }
.proceso li { position: relative; }
.proceso__punto {
  position: absolute; top: -34px; left: 0; width: 20px; height: 20px; border-radius: 50%;
  background: var(--fondo); border: 3px solid var(--acento);
}
.proceso h3 { font-size: 1.7rem; }
.proceso p { color: var(--suave); margin: 0; }
.js .proceso li { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; transition-delay: calc(0.3s + var(--n, 0) * 0.25s); }
.proceso li:nth-child(2) { --n: 1; } .proceso li:nth-child(3) { --n: 2; } .proceso li:nth-child(4) { --n: 3; }
.js .proceso.visible li { opacity: 1; transform: none; }

.compromisos {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border-top: 1px solid var(--linea); border-bottom: 1px solid var(--linea);
}
.compromisos p { margin: 0; padding: 30px 28px 30px 0; color: var(--suave); }
.compromisos p + p { padding-left: 28px; border-left: 1px solid var(--linea); }
.compromisos strong { display: block; margin-bottom: 6px; color: var(--texto); font-family: "Fraunces", Georgia, serif; font-size: 1.3rem; font-weight: 600; }

/* ============================================================
   CONTACTO
   ============================================================ */
.contacto { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 64px; align-items: start; }
.contacto__texto > p { color: var(--suave); font-size: 1.12rem; }
.contacto__directo { margin: 30px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.contacto__directo a { font-weight: 600; text-decoration-color: var(--acento); text-underline-offset: 5px; }

.formulario {
  position: relative; padding: 36px; border-radius: 30px;
  border: 1px solid var(--linea); background: var(--panel); box-shadow: var(--sombra);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.formulario__campos { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.campo { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.campo--ancho { grid-column: 1 / -1; }
.campo label, .campo legend { font-weight: 600; font-size: 0.95rem; padding: 0; }
.campo legend { margin-bottom: 10px; }
.opcional { color: var(--suave); font-weight: 400; }
.campo input, .campo textarea {
  width: 100%; padding: 14px 16px; border-radius: 14px;
  border: 1.5px solid var(--linea-fuerte); background: color-mix(in srgb, var(--panel-solido) 70%, transparent);
  color: var(--texto); font: 400 1rem/1.4 "Inter", system-ui, sans-serif;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.campo textarea { resize: vertical; min-height: 110px; }
.campo input:focus, .campo textarea:focus {
  outline: none; border-color: var(--violeta);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--violeta) 22%, transparent);
}
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
  border: 1.5px solid var(--linea-fuerte); font-size: 0.93rem; font-weight: 600;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.chip span::before {
  content: "+"; display: inline-grid; place-items: center; width: 16px; font-weight: 800;
  transition: transform 0.3s ease;
}
.chip:hover span { border-color: var(--violeta); }
.chip input:checked + span { background: var(--violeta-boton); border-color: var(--violeta-boton); color: #fff; }
.chip input:checked + span::before { content: "✓"; transform: rotate(360deg); }
.chip input:focus-visible + span { outline: 3px solid var(--acento); outline-offset: 2px; }

.consentimiento { display: flex; gap: 12px; align-items: flex-start; font-size: 0.92rem; color: var(--suave); cursor: pointer; }
.consentimiento input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--violeta-boton); }
.consentimiento a { color: var(--texto); text-decoration-color: var(--acento); }
.formulario__error {
  grid-column: 1 / -1; margin: 0; padding: 12px 16px; border-radius: 12px;
  background: rgba(240, 80, 90, 0.14); color: #ff8b93; font-weight: 600;
}
:root[data-theme="light"] .formulario__error { color: #b3261e; }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.formulario__exito { display: grid; justify-items: center; gap: 6px; padding: 30px 10px; text-align: center; outline: none; }
.formulario__exito:not([hidden]) img { animation: aterrizar 0.9s cubic-bezier(0.2, 0.9, 0.3, 1.3) both; }
.formulario__exito h3 { margin-top: 10px; }
.formulario__exito p { color: var(--suave); margin: 0; }
@keyframes aterrizar { from { opacity: 0; transform: translateY(-40px) scale(0.8) rotate(-10deg); } to { opacity: 1; transform: none; } }

/* ============================================================
   PIE
   ============================================================ */
.pie { padding: 40px 0 34px; border-top: 1px solid var(--linea); overflow: hidden; }
.pie__marca {
  margin: 0 0 20px; font-family: "Fraunces", Georgia, serif; font-weight: 600; font-style: italic;
  font-size: clamp(4rem, 17vw, 15rem); line-height: 0.9; letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--violeta), var(--acento));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: 0.85;
}
.pie__fila { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; color: var(--suave); font-size: 0.93rem; }
.pie__fila p { margin: 0; }
.pie__fila ul { display: flex; gap: 22px; margin: 0; padding: 0; list-style: none; flex-wrap: wrap; }
.pie__fila a { text-decoration: none; }
.pie__fila a:hover { color: var(--texto); text-decoration: underline; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .hero { min-height: auto; padding-top: 100px; }
  .hero__rejilla { grid-template-columns: 1fr; }
  .escena { order: -1; height: 340px; min-height: 0; }
  .astro { width: 100px; height: 100px; }
  .astro--luna { top: -300px; }
  .astro--sol { top: 200px; }
  .hero__bajar { display: none; }
  .oferta__fila, .producto, .producto--vista, .contacto { grid-template-columns: 1fr; gap: 34px; }
  .oferta__fila--inversa .oferta__texto, .producto--vista .producto__info { order: 0; }
  .proceso { grid-template-columns: 1fr 1fr; row-gap: 56px; }
  .proceso::before { display: none; }
  .compromisos { grid-template-columns: 1fr; }
  .compromisos p, .compromisos p + p { padding: 22px 0; border-left: 0; }
  .compromisos p + p { border-top: 1px solid var(--linea); }
}
@media (max-width: 700px) {
  body { font-size: 16px; }
  nav { display: none; }
  .cabecera__fila { justify-content: space-between; gap: 12px; }
  .seccion { padding-block: 72px; }
  .seccion__cabeza { margin-bottom: 40px; }
  .producto, .formulario { padding: 26px 20px; border-radius: 24px; }
  .formulario__campos { grid-template-columns: 1fr; }
  .demo--flujo { padding: 30px 14px; }
  .nodo { width: 74px; height: 74px; font-size: 0.85rem; }
  .flujo__linea { left: 50px; right: 50px; }
  .proceso { grid-template-columns: 1fr; }
  .aurora { filter: blur(56px); }
  .aurora--3 { display: none; }

  /* Constelación en lista vertical */
  .constelacion { aspect-ratio: auto; display: grid; gap: 22px; padding-left: 26px; margin-bottom: 60px; border-left: 1.5px solid var(--linea-fuerte); }
  .constelacion__lineas { display: none; }
  .estrella { position: relative; left: auto; top: auto; transform: none; justify-items: start; text-align: left; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; }
  .estrella__punto { grid-row: 1 / 3; margin: 0 0 0 -35px; }
  .estrella--activa .estrella__punto { margin-left: -39px; }
}

/* ============================================================
   MENOS MOVIMIENTO
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal], .js .proceso li, .js .constelacion .estrella, .js .hero__titulo .linea > * { opacity: 1 !important; transform: none !important; }
  .js .proceso::before, .js .producto--vista .barras span { transform: none !important; }
  .constelacion__lineas path { stroke-dashoffset: 0 !important; }
  .burbuja, .bloque { opacity: 1 !important; transform: none !important; }
}

/* ============================================================
   PÁGINA LEGAL
   ============================================================ */
.legal { background: var(--fondo); }
.legal__contenido { max-width: 760px; padding-block: 64px 90px; }
.legal__contenido h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin: 30px 0 10px; }
.legal__contenido h2 { font-size: 1.5rem; margin-top: 40px; }
.legal__contenido p { color: var(--suave); }
.legal__contenido a { color: var(--texto); text-decoration-color: var(--acento); }
.legal__aviso { display: inline-block; padding: 6px 12px; border-radius: 8px; background: color-mix(in srgb, var(--acento) 18%, transparent); color: var(--texto) !important; font-weight: 600; font-size: 0.9rem; }
