/* ============================================================
   YIELD AI — HOJA DE ESTILOS
   Paleta derivada del logotipo (azul corporativo #2160A5)
   Tema oscuro por defecto + tema claro conmutable.
   ============================================================ */

/* ---------- 1. Variables de diseño ---------- */
:root {
  /* Marca */
  --brand:        #2160a5;   /* azul del logotipo */
  --accent:       #4da3ff;   /* azul eléctrico (botones, glows) */
  --accent-2:     #7cd7ff;   /* cian (detalles, gradientes) */
  --accent-soft:  rgba(77, 163, 255, 0.14);

  /* Tema oscuro (por defecto) */
  --bg:           #060e1c;
  --bg-2:         #0a1a30;
  --bg-3:         #0e2240;
  --surface:      rgba(255, 255, 255, 0.045);
  --surface-brd:  rgba(124, 215, 255, 0.14);
  --text:         #eaf2fb;
  --text-soft:    #a8bdd4;
  --heading:      #ffffff;

  /* Secciones claras dentro del tema oscuro */
  --light-bg:     #f2f7fd;
  --light-bg-2:   #e4eef9;
  --light-text:   #12253e;
  --light-soft:   #47617f;

  /* Tipografía */
  --font-head: "Poppins", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  /* Métricas */
  --radius: 18px;
  --header-h: 76px;
  --container: 1180px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: dark;
}

/* Tema claro global (toggle) */
:root[data-theme="light"] {
  --bg:           #f4f8fd;
  --bg-2:         #e9f1fa;
  --bg-3:         #dce9f7;
  --surface:      rgba(20, 60, 110, 0.05);
  --surface-brd:  rgba(33, 96, 165, 0.16);
  --text:         #14273f;
  --text-soft:    #47617f;
  --heading:      #0d1f36;
  --accent:       #1d69b8;
  --accent-2:     #1592c9;
  --accent-soft:  rgba(29, 105, 184, 0.10);
  --light-bg:     #ffffff;
  --light-bg-2:   #eef4fb;
  color-scheme: light;
}

/* ---------- 2. Reset y base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--accent); color: #04101f; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--heading);
  line-height: 1.12;
  letter-spacing: -0.01em;
  font-weight: 700;
}

.container { width: min(var(--container), 92vw); margin-inline: auto; }

.section { position: relative; padding: clamp(90px, 12vh, 150px) 0; }

/* Secciones claras (legibilidad) — mantienen su look en ambos temas */
.section--light {
  background: var(--light-bg);
  color: var(--light-text);
}
.section--light h2, .section--light h3, .section--light h4 { color: var(--light-text); }
.section--light .section-kicker { color: var(--brand); }
.section--light .section-sub { color: var(--light-soft); }

.section-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent-2);
  margin-bottom: 18px;
}
.section-kicker::before {
  content: ""; width: 26px; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 2px;
}
.section-title { font-size: clamp(1.9rem, 4.2vw, 3rem); margin-bottom: 18px; max-width: 18ch; }
.section-sub { color: var(--text-soft); font-size: clamp(1rem, 1.6vw, 1.15rem); max-width: 58ch; }

/* Grano cinematográfico sutil sobre fondos oscuros */
.grain::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="light"] .grain::after { opacity: 0.03; }

/* ---------- 3. Preloader ---------- */
#preloader {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px;
  background: #060e1c;
  transition: opacity 0.7s var(--ease-out), visibility 0.7s;
}
#preloader.done { opacity: 0; visibility: hidden; }
#preloader .pre-logo { width: 92px; color: #4da3ff; filter: drop-shadow(0 0 24px rgba(77,163,255,0.45)); animation: preloader-pulse 1.6s ease-in-out infinite; }
@keyframes preloader-pulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50%      { transform: scale(1.06); opacity: 1; }
}
#preloader .pre-bar { width: 180px; height: 2px; background: rgba(255,255,255,0.12); border-radius: 2px; overflow: hidden; }
#preloader .pre-bar span { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, #4da3ff, #7cd7ff); transition: width 0.3s ease; }
#preloader .pre-word { font-family: var(--font-head); font-weight: 600; letter-spacing: 0.42em; font-size: 0.8rem; color: #a8bdd4; text-transform: uppercase; }

/* ---------- 4. Barra de progreso + cursor ---------- */
#scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%;
  transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--brand), var(--accent), var(--accent-2));
  z-index: 950; pointer-events: none;
}

#cursor-dot, #cursor-ring {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 990;
  border-radius: 50%; transform: translate(-50%, -50%);
  display: none;
}
@media (hover: hover) and (pointer: fine) {
  #cursor-dot, #cursor-ring { display: block; }
}
#cursor-dot { width: 7px; height: 7px; background: var(--accent-2); }
#cursor-ring {
  width: 38px; height: 38px; border: 1.5px solid rgba(124, 215, 255, 0.55);
  transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out),
              border-color 0.25s, background-color 0.25s;
}
#cursor-ring.is-hover { width: 58px; height: 58px; background: rgba(124,215,255,0.08); border-color: var(--accent); }
body.has-custom-cursor, body.has-custom-cursor a, body.has-custom-cursor button { cursor: none; }

/* ---------- 5. Header ---------- */
#site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background-color 0.4s, backdrop-filter 0.4s, box-shadow 0.4s;
}
#site-header.scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--surface-brd);
}
#site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 18px; }

.logo-link { display: flex; align-items: center; gap: 12px; color: var(--heading); }
.logo-link .logo-mark { width: 40px; height: 42px; color: var(--accent); }
.logo-link img.logo-img { height: 44px; width: auto; }
.logo-link .logo-text { font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; letter-spacing: 0.02em; line-height: 1; }
.logo-link .logo-text small { display: block; font-size: 0.58rem; font-weight: 600; letter-spacing: 0.14em; color: var(--text-soft); margin-top: 3px; text-transform: uppercase; }

/* ----- Animación del logo al pasar el ratón ----- */
.logo-link .logo-mark {
  transition: transform 0.45s var(--ease-out), filter 0.45s;
}
.logo-link:hover .logo-mark {
  transform: scale(1.07) rotate(-3deg);
  filter: drop-shadow(0 0 9px rgba(77, 163, 255, 0.55));
}
/* El engranaje gira (con rebote suave) y vuelve al soltar */
.logo-mark .logo-gear {
  transform-box: fill-box; transform-origin: center;
  transition: transform 1s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.logo-link:hover .logo-gear { transform: rotate(135deg); }
/* Los hexágonos saltan escalonados hacia arriba-izquierda (su dirección de "vuelo") */
.logo-mark .logo-hex { transition: transform 0.45s var(--ease-out); }
.logo-mark .logo-hexes g:nth-of-type(2) .logo-hex { transition-delay: 0.05s; }
.logo-mark .logo-hexes g:nth-of-type(3) .logo-hex { transition-delay: 0.1s; }
.logo-mark .logo-hexes g:nth-of-type(4) .logo-hex { transition-delay: 0.15s; }
.logo-mark .logo-hexes g:nth-of-type(5) .logo-hex { transition-delay: 0.2s; }
.logo-link:hover .logo-hex { transform: translate(-4px, -5px); }

/* La palabra YIELD: línea de luz que cruza por encima + destello en las letras */
.logo-word { position: relative; display: inline-block; }
.logo-word::before {
  content: ""; position: absolute; top: -5px; left: 0;
  width: 30%; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-2), transparent);
  opacity: 0; pointer-events: none;
}
.logo-link:hover .logo-word::before { animation: logo-line 0.8s ease-out forwards; }
@keyframes logo-line {
  0%   { transform: translateX(-40%); opacity: 0; }
  25%  { opacity: 1; }
  100% { transform: translateX(280%); opacity: 0; }
}
.logo-link:hover .logo-word {
  background-image: linear-gradient(110deg,
    var(--heading) 0%, var(--heading) 42%,
    var(--accent-2) 50%,
    var(--heading) 58%, var(--heading) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: logo-shine 0.9s ease-out forwards;
}
@keyframes logo-shine {
  from { background-position: 110% 0; }
  to   { background-position: -10% 0; }
}
/* En el footer el texto es blanco: el destello hereda igual (usa --heading) */
#site-footer .logo-word { --heading: #fff; }

.header-actions { display: flex; align-items: center; gap: 14px; }

/* Botones */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 28px; border-radius: 999px;
  font-family: var(--font-head); font-weight: 600; font-size: 0.95rem;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s, background-color 0.3s, color 0.3s;
  will-change: transform;
}
.btn--primary {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  box-shadow: 0 8px 28px -8px rgba(77, 163, 255, 0.55);
}
.btn--primary:hover { box-shadow: 0 12px 36px -6px rgba(77, 163, 255, 0.75); }
.btn--ghost {
  border: 1.5px solid var(--surface-brd); color: var(--text);
  background: var(--surface); backdrop-filter: blur(8px);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--heading); }
.btn--small { padding: 10px 20px; font-size: 0.85rem; }
.section--light .btn--ghost { border-color: rgba(33,96,165,0.3); color: var(--light-text); }

/* Toggle de tema */
#theme-toggle {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid var(--surface-brd); background: var(--surface);
  transition: border-color 0.3s, transform 0.3s;
}
#theme-toggle:hover { border-color: var(--accent); }
#theme-toggle svg { width: 19px; height: 19px; stroke: var(--text); fill: none; stroke-width: 2; stroke-linecap: round; }
:root:not([data-theme="light"]) #theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] #theme-toggle .icon-sun { display: none; }

/* Botón hamburguesa */
#menu-toggle { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--surface-brd); background: var(--surface); }
#menu-toggle .bars { position: relative; width: 18px; height: 12px; }
#menu-toggle .bars span {
  position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px;
  background: var(--text); transition: transform 0.35s var(--ease-out), top 0.35s, opacity 0.3s;
}
#menu-toggle .bars span:nth-child(1) { top: 0; }
#menu-toggle .bars span:nth-child(2) { top: 5px; }
#menu-toggle .bars span:nth-child(3) { top: 10px; }
body.menu-open #menu-toggle .bars span:nth-child(1) { top: 5px; transform: rotate(45deg); }
body.menu-open #menu-toggle .bars span:nth-child(2) { opacity: 0; }
body.menu-open #menu-toggle .bars span:nth-child(3) { top: 5px; transform: rotate(-45deg); }

/* Menú overlay fullscreen */
#nav-overlay {
  position: fixed; inset: 0; z-index: 890;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(22px);
  display: flex; align-items: center;
  visibility: hidden; opacity: 0;
  transition: opacity 0.45s var(--ease-out), visibility 0.45s;
}
body.menu-open #nav-overlay { visibility: visible; opacity: 1; }
#nav-overlay .container { display: grid; gap: 40px; }
#nav-overlay nav { display: flex; flex-direction: column; gap: 6px; }
#nav-overlay .nav-link {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(1.9rem, 5.6vw, 3.4rem);
  color: var(--heading); padding: 6px 0;
  display: inline-flex; align-items: baseline; gap: 18px;
  opacity: 0; transform: translateY(28px);
  transition: color 0.3s;
}
#nav-overlay .nav-link:hover { color: var(--accent); }
#nav-overlay .nav-link .idx { font-size: 0.85rem; font-weight: 600; color: var(--accent-2); letter-spacing: 0.1em; }
#nav-overlay .overlay-meta { display: flex; flex-wrap: wrap; gap: 26px; color: var(--text-soft); font-size: 0.92rem; opacity: 0; transform: translateY(20px); }
#nav-overlay .overlay-meta a:hover { color: var(--accent); }

.desktop-nav { display: none; gap: 26px; font-size: 0.92rem; font-weight: 500; color: var(--text-soft); }
.desktop-nav a { position: relative; padding: 4px 0; transition: color 0.25s; }
.desktop-nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--accent); border-radius: 2px;
  transform: scaleX(0); transform-origin: right; transition: transform 0.3s var(--ease-out);
}
.desktop-nav a:hover { color: var(--heading); }
.desktop-nav a:hover::after { transform: scaleX(1); transform-origin: left; }
@media (min-width: 1060px) {
  .desktop-nav { display: flex; }
  #menu-toggle { display: none; }
}
@media (max-width: 1059px) {
  #header-cta { display: none; }
}

/* ---------- 6. Hero ---------- */
#hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 40px) 0 80px;
  overflow: hidden;
  background:
    radial-gradient(1100px 620px at 78% 18%, rgba(33, 96, 165, 0.34), transparent 62%),
    radial-gradient(900px 560px at 12% 82%, rgba(21, 146, 201, 0.16), transparent 60%),
    linear-gradient(180deg, #060e1c 0%, #0a1a30 100%);
}
:root[data-theme="light"] #hero {
  background:
    radial-gradient(1100px 620px at 78% 18%, rgba(77, 163, 255, 0.22), transparent 62%),
    radial-gradient(900px 560px at 12% 82%, rgba(21, 146, 201, 0.12), transparent 60%),
    linear-gradient(180deg, #eaf3fc 0%, #f4f8fd 100%);
}

/* Aurora animada de fondo (gradientes suaves: sin filter para no
   penalizar el rendimiento; solo se anima transform, que es barato) */
.hero-aurora { position: absolute; inset: -20%; pointer-events: none; opacity: 0.6; }
.hero-aurora::before, .hero-aurora::after {
  content: ""; position: absolute; width: 52vw; height: 52vw; border-radius: 50%;
  will-change: transform;
}
.hero-aurora::before {
  left: 8%; top: 16%;
  background: radial-gradient(circle, rgba(33,96,165,0.34) 0%, rgba(33,96,165,0.14) 40%, transparent 68%);
  animation: aurora-a 16s ease-in-out infinite alternate;
}
.hero-aurora::after {
  right: 4%; bottom: 8%;
  background: radial-gradient(circle, rgba(124,215,255,0.2) 0%, rgba(124,215,255,0.08) 40%, transparent 68%);
  animation: aurora-b 20s ease-in-out infinite alternate;
}
@keyframes aurora-a { from { transform: translate(0, 0) scale(1); } to { transform: translate(9vw, 6vh) scale(1.18); } }
@keyframes aurora-b { from { transform: translate(0, 0) scale(1.12); } to { transform: translate(-8vw, -7vh) scale(0.94); } }

#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; }

.hero-inner { position: relative; z-index: 3; display: grid; gap: 28px; max-width: 760px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px; width: fit-content;
  padding: 8px 18px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--surface-brd);
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em; color: var(--accent-2);
  backdrop-filter: blur(8px);
}
.hero-eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: #35e08f; box-shadow: 0 0 10px #35e08f; animation: blink 2.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.35; } }

.hero-title {
  font-size: clamp(2.6rem, 7.2vw, 5.2rem);
  letter-spacing: -0.02em;
}
.hero-title .kinetic-word { display: inline-block; overflow: hidden; vertical-align: top; }
.hero-title .kinetic-word > span { display: inline-block; will-change: transform; }
.hero-title .w-accent { background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }

.hero-sub { font-size: clamp(1.02rem, 1.8vw, 1.25rem); color: var(--text-soft); max-width: 54ch; }
:root[data-theme="light"] .hero-sub { color: var(--light-soft); }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; }

.hero-scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--text-soft); font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase;
}
.hero-scroll-hint .mouse {
  width: 22px; height: 34px; border: 1.5px solid var(--surface-brd); border-radius: 12px;
  display: flex; justify-content: center; padding-top: 6px;
}
.hero-scroll-hint .mouse i { width: 3px; height: 7px; border-radius: 3px; background: var(--accent-2); animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(9px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- 7. Métricas / contadores ---------- */
.metrics-band {
  position: relative; z-index: 3;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border-block: 1px solid var(--surface-brd);
  padding: 44px 0;
}
/* Columnas explícitas: con auto-fit, en pantallas anchas se creaba una
   5ª columna vacía y las métricas quedaban descentradas */
.metrics-band .container { display: grid; grid-template-columns: 1fr; gap: 30px; }
@media (min-width: 560px)  { .metrics-band .container { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .metrics-band .container { grid-template-columns: repeat(4, 1fr); } }
.metric { text-align: center; }
.metric .metric-num {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(1.9rem, 3.6vw, 2.7rem); color: var(--heading);
  white-space: nowrap; /* la cifra y su unidad nunca se parten */
}
.metric .metric-prefix {
  font-size: 1rem; font-weight: 600; color: var(--text-soft);
  margin-right: 4px; letter-spacing: 0.02em;
}
.metric .metric-num em { font-style: normal; color: var(--accent); }
.metric .metric-label { color: var(--text-soft); font-size: 0.9rem; margin-top: 4px; }
.metrics-note { grid-column: 1 / -1; text-align: center; font-size: 0.75rem; color: var(--text-soft); opacity: 0.75; }

/* ---------- 8. Problema (storytelling) ---------- */
#problema { background: linear-gradient(180deg, var(--bg), var(--bg-2)); overflow: hidden; }
.problem-grid { display: grid; gap: 22px; margin-top: 54px; }
@media (min-width: 860px) { .problem-grid { grid-template-columns: repeat(3, 1fr); } }

.glass-card {
  position: relative; z-index: 2;
  background: var(--surface);
  border: 1px solid var(--surface-brd);
  border-radius: var(--radius);
  padding: 34px 30px;
  backdrop-filter: blur(12px);
  transition: transform 0.35s var(--ease-out), border-color 0.35s, box-shadow 0.35s;
  transform-style: preserve-3d;
}
.glass-card:hover {
  border-color: rgba(77, 163, 255, 0.45);
  box-shadow: 0 20px 50px -18px rgba(33, 96, 165, 0.5);
}
.glass-card .card-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center; margin-bottom: 20px;
  background: var(--accent-soft); border: 1px solid var(--surface-brd);
}
.glass-card .card-icon svg { width: 25px; height: 25px; stroke: var(--accent); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.glass-card h3 { font-size: 1.18rem; margin-bottom: 10px; }
.glass-card p { color: var(--text-soft); font-size: 0.96rem; }

/* Red de nodos decorativa de fondo */
.net-bg { position: absolute; inset: 0; pointer-events: none; opacity: 0.4; z-index: 1; }
.net-bg svg { width: 100%; height: 100%; }
.net-bg line { stroke: var(--accent); stroke-opacity: 0.12; }
.net-bg circle { fill: var(--accent-2); fill-opacity: 0.35; }

/* ---------- 9. Solución ---------- */
#solucion { background: var(--bg-2); overflow: hidden; }
.solution-layout { display: grid; gap: 50px; align-items: center; margin-top: 20px; }
@media (min-width: 980px) { .solution-layout { grid-template-columns: 1.05fr 0.95fr; } }
.solution-list { display: grid; gap: 16px; margin-top: 34px; }
.solution-item {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 20px 22px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--surface-brd);
  transition: transform 0.3s var(--ease-out), border-color 0.3s;
}
.solution-item:hover { transform: translateX(6px); border-color: rgba(77,163,255,0.4); }
.solution-item .s-icon { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); }
.solution-item .s-icon svg { width: 21px; height: 21px; stroke: var(--accent); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.solution-item h4 { font-size: 1.02rem; margin-bottom: 3px; }
.solution-item p { font-size: 0.9rem; color: var(--text-soft); }

/* Visual "caos → orden" */
.chaos-order { position: relative; border-radius: var(--radius); border: 1px solid var(--surface-brd); background: radial-gradient(600px 400px at 50% 40%, rgba(33,96,165,0.25), transparent 70%), var(--bg); padding: 40px 30px; min-height: 380px; display: grid; place-items: center; overflow: hidden; }
.chaos-order svg { width: 100%; max-width: 420px; height: auto; }

/* Animación del visual: pulsos de datos recorriendo las líneas */
.chaos-order .co-pulse {
  fill: none; stroke-linecap: round;
  stroke-dasharray: 3 30; /* pequeños "paquetes" sobre hueco largo */
  animation: co-flow 2.4s linear infinite;
}
.chaos-order .co-pulse:nth-of-type(2) { animation-duration: 3.1s; animation-delay: 0.6s; }
.chaos-order .co-pulse:nth-of-type(3) { animation-duration: 2.7s; animation-delay: 1.1s; }
.chaos-order .co-pulse:nth-of-type(4) { animation-duration: 3.4s; animation-delay: 0.3s; }
.chaos-order .co-pulse:nth-of-type(5) { animation-duration: 2.9s; animation-delay: 1.5s; }
@keyframes co-flow { from { stroke-dashoffset: 66; } to { stroke-dashoffset: 0; } }

/* Puntos del caos: deriva orgánica */
.chaos-order .co-chaos circle {
  transform-box: fill-box; transform-origin: center;
  animation: co-drift 5.5s ease-in-out infinite alternate;
}
.chaos-order .co-chaos circle:nth-of-type(2) { animation-duration: 4.4s; animation-delay: 0.8s; }
.chaos-order .co-chaos circle:nth-of-type(3) { animation-duration: 6.2s; animation-delay: 1.6s; }
.chaos-order .co-chaos circle:nth-of-type(4) { animation-duration: 4.9s; animation-delay: 0.4s; }
.chaos-order .co-chaos circle:nth-of-type(5) { animation-duration: 5.8s; animation-delay: 2.1s; }
.chaos-order .co-chaos circle:nth-of-type(6) { animation-duration: 4.6s; animation-delay: 1.2s; }
.chaos-order .co-chaos circle:nth-of-type(7) { animation-duration: 6.6s; animation-delay: 0.2s; }
.chaos-order .co-chaos circle:nth-of-type(8) { animation-duration: 5.2s; animation-delay: 1.9s; }
@keyframes co-drift {
  from { transform: translate(-4px, 5px); }
  to   { transform: translate(5px, -6px); }
}

/* Nodo central: anillo latiendo + onda expansiva */
.chaos-order .co-ring, .chaos-order .co-ripple, .chaos-order .co-core {
  transform-box: fill-box; transform-origin: center;
}
.chaos-order .co-ring { animation: co-ring 2.6s ease-in-out infinite; }
@keyframes co-ring {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}
.chaos-order .co-core { animation: co-core 2.6s ease-in-out infinite; }
@keyframes co-core {
  0%, 100% { opacity: 0.85; }
  50%      { opacity: 1; }
}
.chaos-order .co-ripple { opacity: 0; animation: co-ripple 2.6s ease-out infinite; }
@keyframes co-ripple {
  0%   { transform: scale(1); opacity: 0.6; }
  70%  { transform: scale(2); opacity: 0; }
  100% { transform: scale(2); opacity: 0; }
}

/* Bloques de resultados: se iluminan en cadena */
.chaos-order .co-order rect { animation: co-glow 2.6s ease-in-out infinite; }
.chaos-order .co-order rect:nth-of-type(2) { animation-delay: 0.45s; }
.chaos-order .co-order rect:nth-of-type(3) { animation-delay: 0.9s; }
@keyframes co-glow {
  0%, 100% { fill: rgba(53, 224, 143, 0.08); stroke-opacity: 0.6; }
  50%      { fill: rgba(53, 224, 143, 0.3); stroke-opacity: 1; }
}

/* ---------- 10. Sectores / casos de uso ---------- */
#sectores.section--light { background: linear-gradient(180deg, var(--light-bg), var(--light-bg-2)); }
.sector-grid { display: grid; gap: 20px; margin-top: 54px; }
@media (min-width: 700px)  { .sector-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1060px) { .sector-grid { grid-template-columns: repeat(3, 1fr); } }

.sector-card {
  position: relative; border-radius: var(--radius);
  background: #fff; border: 1px solid rgba(33, 96, 165, 0.14);
  padding: 32px 28px; overflow: hidden;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s, border-color 0.35s;
  transform-style: preserve-3d;
}
:root[data-theme="light"] .sector-card { background: #fff; }
.sector-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--accent-2));
  opacity: 0; transition: opacity 0.3s;
}
.sector-card:hover { box-shadow: 0 24px 54px -20px rgba(18, 58, 105, 0.35); border-color: rgba(33,96,165,0.35); }
.sector-card:hover::before { opacity: 1; }
.sector-card .sc-icon {
  width: 52px; height: 52px; border-radius: 14px; margin-bottom: 18px;
  display: grid; place-items: center;
  background: rgba(33, 96, 165, 0.09);
}
.sector-card .sc-icon svg { width: 26px; height: 26px; stroke: var(--brand); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sector-card h3 { color: var(--light-text); font-size: 1.12rem; margin-bottom: 10px; }
.sector-card p { color: var(--light-soft); font-size: 0.93rem; }
.sector-card .sc-tag { display: inline-block; margin-top: 16px; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); }
.sector-note { margin-top: 28px; text-align: center; color: var(--light-soft); font-size: 0.88rem; }

/* ---------- 11. Calculadora ---------- */
#calculadora { background: linear-gradient(180deg, var(--bg), var(--bg-3) 60%, var(--bg)); overflow: hidden; }
.calc-layout { display: grid; gap: 34px; margin-top: 50px; }
@media (min-width: 980px) { .calc-layout { grid-template-columns: 1.1fr 0.9fr; align-items: stretch; } }

.calc-panel { padding: 38px 34px; }
.calc-field { margin-bottom: 30px; }
.calc-field label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-weight: 600; font-size: 0.95rem; color: var(--heading); margin-bottom: 14px; }
.calc-field label output { font-family: var(--font-head); color: var(--accent-2); font-size: 1.05rem; white-space: nowrap; }

input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px;
  border-radius: 6px; outline: none; cursor: pointer;
  background: linear-gradient(90deg, var(--accent) var(--fill, 50%), rgba(124, 215, 255, 0.15) var(--fill, 50%));
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 3px solid var(--accent);
  box-shadow: 0 0 0 6px rgba(77, 163, 255, 0.18), 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 3px solid var(--accent);
  box-shadow: 0 0 0 6px rgba(77, 163, 255, 0.18);
}

.calc-results {
  display: grid; gap: 18px; align-content: center;
  padding: 38px 34px; border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(33, 96, 165, 0.35), rgba(12, 30, 55, 0.65));
  border: 1px solid rgba(77, 163, 255, 0.3);
  backdrop-filter: blur(12px);
}
:root[data-theme="light"] .calc-results { background: linear-gradient(150deg, rgba(33,96,165,0.12), rgba(124,215,255,0.10)); }
.calc-result .cr-value { font-family: var(--font-head); font-weight: 700; font-size: clamp(2rem, 4vw, 2.9rem); color: var(--heading); }
.calc-result .cr-value em { font-style: normal; background: linear-gradient(100deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.calc-result .cr-label { color: var(--text-soft); font-size: 0.9rem; }
.calc-disclaimer { font-size: 0.75rem; color: var(--text-soft); opacity: 0.8; }
.calc-cta { margin-top: 8px; }

/* ---------- 12. Proceso (timeline) ---------- */
#proceso.section--light { background: var(--light-bg); }
.timeline { position: relative; margin-top: 60px; display: grid; gap: 0; }
.timeline::before {
  content: ""; position: absolute; left: 25px; top: 10px; bottom: 10px; width: 2px;
  background: linear-gradient(180deg, var(--brand), var(--accent-2));
  opacity: 0.35;
}
.tl-step { position: relative; display: grid; grid-template-columns: 52px 1fr; gap: 24px; padding: 26px 0; }
.tl-step .tl-num {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; font-size: 1.05rem;
  background: #fff; color: var(--brand);
  border: 2px solid var(--brand);
  box-shadow: 0 6px 20px -6px rgba(33, 96, 165, 0.4);
  z-index: 2;
}
.tl-step h3 { font-size: 1.2rem; margin-bottom: 8px; }
.tl-step p { color: var(--light-soft); max-width: 62ch; }
.tl-step .tl-time { display: inline-block; margin-top: 10px; font-size: 0.76rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand); background: rgba(33, 96, 165, 0.08); padding: 5px 12px; border-radius: 999px; }
@media (min-width: 900px) {
  .timeline::before { left: 50%; transform: translateX(-1px); }
  .tl-step { grid-template-columns: 1fr 52px 1fr; width: 100%; }
  .tl-step .tl-body { grid-column: 3; padding-left: 10px; }
  .tl-step .tl-num { grid-column: 2; grid-row: 1; justify-self: center; }
  .tl-step:nth-child(even) .tl-body { grid-column: 1; grid-row: 1; text-align: right; padding-right: 10px; padding-left: 0; }
  .tl-step:nth-child(even) p { margin-left: auto; }
}

/* ---------- 13. Fundador ---------- */
#fundador { background: linear-gradient(180deg, var(--bg-2), var(--bg)); overflow: hidden; }
.founder-layout { display: grid; gap: 44px; align-items: center; }
@media (min-width: 940px) { .founder-layout { grid-template-columns: 0.85fr 1.15fr; } }
.founder-visual { position: relative; display: grid; place-items: center; }
.founder-visual .fv-ring {
  width: min(300px, 70vw); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, rgba(77, 163, 255, 0.25), rgba(12, 30, 55, 0.6));
  border: 1px solid var(--surface-brd);
  box-shadow: 0 30px 80px -30px rgba(33, 96, 165, 0.6), inset 0 0 60px rgba(77, 163, 255, 0.08);
}
.founder-visual .fv-ring svg { width: 46%; color: var(--accent); filter: drop-shadow(0 0 26px rgba(77, 163, 255, 0.4)); }
.founder-visual .fv-badge {
  position: absolute; bottom: 8%; right: 8%;
  padding: 10px 18px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--surface-brd); backdrop-filter: blur(10px);
  font-size: 0.8rem; font-weight: 600; color: var(--accent-2);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.founder-visual .fv-badge.switching { opacity: 0; transform: translateY(8px); }

/* ----- Burbuja viva del fundador ----- */
.fv-follow { will-change: transform; }
/* Respiración constante, lenta y suave */
.founder-visual .fv-ring { animation: fv-breathe 6.5s ease-in-out infinite alternate; }
@keyframes fv-breathe {
  from { transform: scale(1); }
  to   { transform: scale(1.035); }
}
/* La Y gira sutilmente hacia el ratón (transform puesto por JS) */
.fv-logo { will-change: transform; }
/* Engranaje: rotación continua controlada por JS (acelera con hover) */
.fv-logo .fv-gear { transform-box: fill-box; transform-origin: center; }
/* Hexágonos: flotan mientras el ratón está encima */
.fv-logo .fv-hex {
  animation: fv-hex-float 2.2s ease-in-out infinite alternate;
  animation-play-state: paused;
}
.founder-visual:hover .fv-hex { animation-play-state: running; }
.fv-logo .fv-hexes g:nth-of-type(2) .fv-hex { animation-duration: 1.8s; animation-delay: 0.3s; }
.fv-logo .fv-hexes g:nth-of-type(3) .fv-hex { animation-duration: 2.6s; animation-delay: 0.6s; }
.fv-logo .fv-hexes g:nth-of-type(4) .fv-hex { animation-duration: 2s; animation-delay: 0.9s; }
.fv-logo .fv-hexes g:nth-of-type(5) .fv-hex { animation-duration: 2.4s; animation-delay: 0.15s; }
@keyframes fv-hex-float {
  from { transform: translate(-2.5px, 3px); }
  to   { transform: translate(3px, -4px); }
}
/* Lucecita del nodo central: pulso discreto, más viva con el ratón encima */
.fv-node-light { opacity: 0.35; animation: fv-node 3.2s ease-in-out infinite; }
.fv-node-halo { opacity: 0.1; filter: blur(4px); animation: fv-node-halo 3.2s ease-in-out infinite; }
@keyframes fv-node {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 0.7; }
}
@keyframes fv-node-halo {
  0%, 100% { opacity: 0.08; }
  50%      { opacity: 0.26; }
}
.founder-visual:hover .fv-node-light { filter: drop-shadow(0 0 5px #7cd7ff); }
.founder-visual:hover .fv-node-halo { filter: blur(4px) drop-shadow(0 0 8px #7cd7ff); }
.founder-body blockquote {
  border-left: 3px solid var(--accent); padding-left: 20px; margin: 24px 0;
  color: var(--text); font-size: 1.05rem; font-style: italic;
}
.founder-body p { color: var(--text-soft); margin-bottom: 14px; }
.founder-sign { margin-top: 22px; font-family: var(--font-head); }
.founder-sign strong { display: block; color: var(--heading); font-size: 1.1rem; }
.founder-sign span { color: var(--text-soft); font-size: 0.85rem; }

/* ---------- 14. Contacto ---------- */
#contacto { background: radial-gradient(900px 500px at 80% 0%, rgba(33, 96, 165, 0.3), transparent 60%), var(--bg); overflow: hidden; }
.contact-layout { display: grid; gap: 40px; margin-top: 50px; }
@media (min-width: 980px) { .contact-layout { grid-template-columns: 0.9fr 1.1fr; } }

.contact-channels { display: grid; gap: 16px; align-content: start; }
.channel-card {
  display: flex; align-items: center; gap: 18px;
  padding: 22px 24px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--surface-brd);
  transition: transform 0.3s var(--ease-out), border-color 0.3s, box-shadow 0.3s;
}
.channel-card:hover { transform: translateY(-4px); border-color: rgba(77, 163, 255, 0.5); box-shadow: 0 18px 40px -18px rgba(33, 96, 165, 0.55); }
.channel-card .ch-icon { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); }
.channel-card .ch-icon svg { width: 23px; height: 23px; stroke: var(--accent); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.channel-card.whatsapp .ch-icon { background: rgba(37, 211, 102, 0.12); }
.channel-card.whatsapp .ch-icon svg { stroke: #25d366; }
.channel-card h4 { font-size: 0.98rem; }
.channel-card p { font-size: 0.88rem; color: var(--text-soft); }

.contact-form { padding: 38px 34px; display: grid; gap: 18px; position: relative; overflow: hidden; }
.form-row { display: grid; gap: 18px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.field { position: relative; display: grid; gap: 7px; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--heading); }
.field label .opt { color: var(--text-soft); font-weight: 400; }
.field input, .field textarea, .field select {
  width: 100%; padding: 14px 16px; border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  border: 1.5px solid var(--surface-brd);
  color: var(--text); font: inherit; font-size: 0.95rem;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237cd7ff' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(77, 163, 255, 0.15);
}
.field.error input, .field.error textarea { border-color: #ff6b6b; animation: shake 0.4s; }
.field .field-error { font-size: 0.76rem; color: #ff8686; min-height: 1em; opacity: 0; transition: opacity 0.25s; }
.field.error .field-error { opacity: 1; }
@keyframes shake { 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }

.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 0.82rem; color: var(--text-soft); }
.consent input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--accent); flex: 0 0 auto; }
.consent a { color: var(--accent-2); text-decoration: underline; }
.consent.error { color: #ff8686; }

/* Elección de método de envío (Gmail web o app de correo) */
.form-choice {
  position: absolute; inset: 0; z-index: 6;
  display: grid; place-items: center; text-align: center; padding: 30px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px); border-radius: var(--radius);
  opacity: 0; visibility: hidden; transition: opacity 0.4s, visibility 0.4s;
}
.form-choice.show { opacity: 1; visibility: visible; }
.form-choice h3 { margin-bottom: 8px; }
.form-choice p { color: var(--text-soft); font-size: 0.92rem; max-width: 40ch; margin-inline: auto; }
.form-choice .choice-buttons { display: flex; flex-direction: column; gap: 12px; margin-top: 22px; align-items: center; }
.form-choice .choice-close {
  position: absolute; top: 12px; right: 16px;
  font-size: 1.05rem; color: var(--text-soft); padding: 8px; line-height: 1;
  transition: color 0.25s;
}
.form-choice .choice-close:hover { color: var(--heading); }

/* Confirmación de envío */
.form-success {
  position: absolute; inset: 0; z-index: 5;
  display: grid; place-items: center; text-align: center; padding: 30px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px); border-radius: var(--radius);
  opacity: 0; visibility: hidden; transition: opacity 0.5s, visibility 0.5s;
}
.form-success.show { opacity: 1; visibility: visible; }
.form-success .check-ring { width: 90px; height: 90px; margin-inline: auto; margin-bottom: 20px; }
.form-success .check-ring circle { stroke: var(--accent); stroke-width: 3; fill: none; stroke-dasharray: 260; stroke-dashoffset: 260; }
.form-success .check-ring path { stroke: var(--accent-2); stroke-width: 4; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; }
.form-success.show .check-ring circle { animation: draw 0.9s var(--ease-out) forwards; }
.form-success.show .check-ring path { animation: draw 0.6s 0.55s var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.form-success h3 { margin-bottom: 8px; }
.form-success p { color: var(--text-soft); font-size: 0.92rem; max-width: 38ch; margin-inline: auto; }

/* ---------- 15. Footer ---------- */
#site-footer { background: #050b16; border-top: 1px solid var(--surface-brd); padding: 64px 0 34px; position: relative; }
:root[data-theme="light"] #site-footer { background: #0d1f36; }
#site-footer, #site-footer h4 { color: #a8bdd4; }
#site-footer h4 { color: #fff; font-size: 0.95rem; margin-bottom: 16px; }
.footer-grid { display: grid; gap: 38px; }
@media (min-width: 820px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-brand .logo-link { margin-bottom: 16px; }
.footer-brand .logo-link .logo-text, #site-footer .logo-link { color: #fff; }
.footer-brand p { font-size: 0.88rem; max-width: 34ch; }
.footer-col ul { list-style: none; display: grid; gap: 10px; font-size: 0.88rem; }
.footer-col a { transition: color 0.25s; }
.footer-col a:hover { color: var(--accent-2); }
.footer-social { display: flex; gap: 12px; margin-top: 18px; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid rgba(124, 215, 255, 0.2);
  transition: border-color 0.25s, background-color 0.25s;
}
.footer-social a:hover { border-color: var(--accent); background: rgba(77, 163, 255, 0.12); }
.footer-bottom {
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid rgba(124, 215, 255, 0.1);
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between;
  font-size: 0.78rem; color: #6d84a0;
}

/* ---------- 16. Botón WhatsApp flotante ---------- */
#wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 880;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: #25d366; box-shadow: 0 10px 30px -8px rgba(37, 211, 102, 0.6);
  transform: scale(0); transition: transform 0.4s var(--ease-out), box-shadow 0.3s;
}
#wa-float.show { transform: scale(1); }
#wa-float:hover { box-shadow: 0 14px 38px -6px rgba(37, 211, 102, 0.8); }
#wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* ---------- 17. Banner de cookies ---------- */
#cookie-banner {
  position: fixed; left: 50%; bottom: 22px; z-index: 960;
  transform: translate(-50%, 140%);
  width: min(680px, calc(100vw - 32px));
  padding: 22px 26px; border-radius: 18px;
  background: color-mix(in srgb, var(--bg-2) 90%, transparent);
  border: 1px solid var(--surface-brd); backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6);
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
  transition: transform 0.6s var(--ease-out);
}
#cookie-banner.show { transform: translate(-50%, 0); }
#cookie-banner p { font-size: 0.83rem; color: var(--text-soft); max-width: 46ch; }
#cookie-banner p a { color: var(--accent-2); text-decoration: underline; }
#cookie-banner .cb-actions { display: flex; gap: 10px; }

/* ---------- 18. Animaciones de aparición ----------
   Visibles por defecto (SEO y sin-JS). Solo se ocultan cuando el
   JS confirma que va a animarlas (clase js-anim en <body>).
   La transición se retira al terminar (.reveal-done) para no
   interferir con los efectos hover/tilt de las tarjetas. */
.js-anim [data-reveal]:not(.revealed) { opacity: 0; transform: translateY(36px); }
.js-anim [data-reveal]:not(.reveal-done) {
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

/* ---------- 19. Páginas legales ---------- */
.legal-page { padding: calc(var(--header-h) + 60px) 0 90px; min-height: 70vh; }
.legal-page h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 12px; }
.legal-page h2 { font-size: 1.25rem; margin: 34px 0 12px; }
.legal-page p, .legal-page li { color: var(--text-soft); font-size: 0.95rem; margin-bottom: 10px; }
.legal-page ul { padding-left: 22px; }
.legal-updated { font-size: 0.8rem; opacity: 0.7; margin-bottom: 28px; }
.legal-warning {
  margin: 26px 0; padding: 18px 22px; border-radius: 14px;
  background: rgba(255, 190, 80, 0.08); border: 1px solid rgba(255, 190, 80, 0.3);
  color: #ffd894; font-size: 0.86rem;
}
.legal-back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 30px; color: var(--accent-2); font-size: 0.9rem; }
.legal-back:hover { text-decoration: underline; }

/* ---------- 20. Transición de tema (circle reveal) ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { animation: circle-reveal 0.7s var(--ease-out); }
@keyframes circle-reveal {
  from { clip-path: circle(0% at var(--tx, 90%) var(--ty, 5%)); }
  to   { clip-path: circle(140% at var(--tx, 90%) var(--ty, 5%)); }
}

/* ---------- 21. Accesibilidad / movimiento reducido ---------- */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.15s !important;
    scroll-behavior: auto !important;
  }
  .hero-aurora::before, .hero-aurora::after { animation: none; }
  .js-anim [data-reveal] { opacity: 1; transform: none; }
  #cursor-dot, #cursor-ring { display: none !important; }
}
