/* ═══════════════════════════════════════════════════════════════
   VIGILIA — Estudio de Agentes de IA · Ciudad de Panamá
   Paleta: noche azul profunda + ámbar incandescente
   Tipos:  Fraunces (display) · Instrument Sans (texto) · IBM Plex Mono (datos)
   ═══════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Fraunces';
  src: url('../assets/fonts/fraunces-var.woff2') format('woff2');
  font-weight: 300 700;
  font-stretch: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Sans';
  src: url('../assets/fonts/instrument-var.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../assets/fonts/plexmono-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../assets/fonts/plexmono-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  --noche:      #05070E;
  --noche-2:    #090D1A;
  --tinta:      #10182E;
  --borde:      rgba(156, 178, 218, .14);
  --ambar:      #F5A83C;
  --ambar-vivo: #FFC66B;
  --brasa:      #D9722E;
  --hielo:      #9CC3E8;
  --hueso:      #F2ECDF;
  --hueso-dim:  rgba(242, 236, 223, .60);
  --hueso-tenue:rgba(242, 236, 223, .38);

  --f-display: 'Fraunces', Georgia, serif;
  --f-texto:   'Instrument Sans', 'Segoe UI', sans-serif;
  --f-mono:    'IBM Plex Mono', Consolas, monospace;

  --ancho: min(1200px, calc(100vw - clamp(2rem, 6vw, 7rem)));
  --transicion: cubic-bezier(.22, .8, .24, 1);
}
/* Navegadores sin soporte de clamp() anidado en min() */
@supports not (width: min(10px, clamp(1rem, 2vw, 3rem))) {
  :root { --ancho: calc(100vw - 3rem); }
  @media (min-width: 1300px) { :root { --ancho: 1200px; } }
}

/* ── Reset ── */
*, *::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 {
  background: var(--noche);
  color: var(--hueso);
  font-family: var(--f-texto);
  font-size: clamp(1rem, .95rem + .3vw, 1.125rem);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--ambar); color: var(--noche); }

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--f-mono); font-size: .72em; letter-spacing: .14em; text-transform: uppercase; }

:focus-visible { outline: 2px solid var(--ambar); outline-offset: 3px; border-radius: 2px; }

/* ═══════════ PRELOADER ═══════════ */
#preloader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--noche);
  display: grid; place-content: center; justify-items: center;
  gap: 1.6rem;
  transition: opacity .9s ease .15s, visibility .9s .15s;
}
#preloader.apagado { opacity: 0; visibility: hidden; }
.pre-spark {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--ambar-vivo);
  box-shadow: 0 0 18px 4px rgba(245, 168, 60, .75), 0 0 70px 22px rgba(245, 168, 60, .28);
  animation: respira 1.9s ease-in-out infinite;
}
@keyframes respira {
  0%, 100% { transform: scale(.7); opacity: .55; }
  50%      { transform: scale(1.25); opacity: 1; }
}
.pre-word { display: flex; gap: .35em; font-family: var(--f-display); font-weight: 350; font-size: clamp(1.6rem, 4vw, 2.6rem); letter-spacing: .42em; padding-left: .42em; }
.pre-word span { opacity: 0; animation: letra-en .7s var(--transicion) forwards; }
.pre-word span:nth-child(1) { animation-delay: .12s }
.pre-word span:nth-child(2) { animation-delay: .21s }
.pre-word span:nth-child(3) { animation-delay: .30s }
.pre-word span:nth-child(4) { animation-delay: .39s }
.pre-word span:nth-child(5) { animation-delay: .48s }
.pre-word span:nth-child(6) { animation-delay: .57s }
.pre-word span:nth-child(7) { animation-delay: .66s }
@keyframes letra-en { from { opacity: 0; transform: translateY(.55em); } to { opacity: 1; transform: none; } }
.pre-line { width: min(220px, 40vw); height: 1px; background: rgba(242, 236, 223, .12); overflow: hidden; }
.pre-line i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brasa), var(--ambar-vivo)); transition: width .3s ease; }
.pre-hint { color: var(--hueso-tenue); }

/* ═══════════ FONDO 3D + GRAIN + CURSOR ═══════════ */
#firefly-canvas {
  position: fixed; inset: 0; z-index: 2;
  width: 100%; height: 100%;
  pointer-events: none;
}
.grain {
  position: fixed; inset: -50%; z-index: 90;
  pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: granea 9s steps(6) infinite;
}
@keyframes granea {
  0%,100% { transform: translate(0,0) } 16% { transform: translate(-2%,1%) }
  33% { transform: translate(1%,-2%) } 50% { transform: translate(-1%,2%) }
  66% { transform: translate(2%,1%) }  83% { transform: translate(-2%,-1%) }
}

.cursor-dot, .cursor-halo { position: fixed; top: 0; left: 0; z-index: 150; border-radius: 50%; pointer-events: none; opacity: 0; }
.cursor-dot { width: 6px; height: 6px; background: var(--ambar-vivo); box-shadow: 0 0 10px 2px rgba(255, 198, 107, .8); }
.cursor-halo { width: 38px; height: 38px; border: 1px solid rgba(245, 168, 60, .38); transition: width .28s var(--transicion), height .28s var(--transicion), border-color .28s; }
body.cursor-activo .cursor-dot, body.cursor-activo .cursor-halo { opacity: 1; }
body.cursor-link .cursor-halo { width: 62px; height: 62px; border-color: rgba(255, 198, 107, .85); }
@media (pointer: coarse) { .cursor-dot, .cursor-halo { display: none; } }

/* ═══════════ RELOJ + RAIL ═══════════ */
.night-clock {
  position: fixed; left: clamp(1rem, 3vw, 2.4rem); bottom: 1.6rem; z-index: 100;
  display: flex; align-items: center; gap: .8em;
  color: var(--hueso-dim); font-size: .68rem;
  opacity: 0; transition: opacity .8s ease 1.2s;
}
body.listo .night-clock { opacity: 1; }
.nc-time { color: var(--ambar); font-weight: 500; font-size: 1.05rem; letter-spacing: .1em; font-variant-numeric: tabular-nums; }
.nc-sep { width: 2.2rem; height: 1px; background: linear-gradient(90deg, var(--ambar), transparent); }
.nc-label { max-width: 34ch; }

.scroll-rail {
  position: fixed; right: clamp(.9rem, 2.4vw, 2rem); top: 50%; transform: translateY(-50%);
  z-index: 100; display: flex; flex-direction: column; align-items: center; gap: 1.1rem;
  opacity: 0; transition: opacity .8s ease 1.4s;
}
body.listo .scroll-rail { opacity: 1; }
.scroll-rail::before {
  content: ''; position: absolute; top: 0; bottom: 0; width: 1px;
  background: rgba(156, 178, 218, .15);
}
.rail-fill {
  position: absolute; top: 0; width: 1px; height: 0%;
  background: linear-gradient(180deg, var(--ambar-vivo), var(--brasa));
  box-shadow: 0 0 8px rgba(245, 168, 60, .6);
}
.scroll-rail a {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(156, 178, 218, .28);
  border: 1px solid transparent;
  transition: background .3s, box-shadow .3s, transform .3s;
  position: relative; z-index: 1;
}
.scroll-rail a.activo {
  background: var(--ambar-vivo);
  box-shadow: 0 0 12px 2px rgba(245, 168, 60, .65);
  transform: scale(1.35);
}
@media (max-width: 760px) { .scroll-rail { display: none; } .night-clock { display: none; } }

/* ═══════════ NAV ═══════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 110;
  display: flex; align-items: center; gap: 2.2rem;
  padding: 1.1rem clamp(1.2rem, 4vw, 3rem);
  transform: translateY(-110%);
  transition: transform .6s var(--transicion), background .4s, backdrop-filter .4s;
}
body.listo .nav { transform: none; }
.nav.nav-solida {
  background: rgba(5, 7, 14, .72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(156, 178, 218, .08);
}
.nav-logo {
  font-family: var(--f-display); font-weight: 500; font-size: 1.25rem; letter-spacing: .34em;
  display: flex; align-items: center; gap: .55em;
}
.logo-spark {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ambar-vivo);
  box-shadow: 0 0 10px 2px rgba(245, 168, 60, .8);
  animation: respira 2.6s ease-in-out infinite;
}
.nav-links { display: flex; gap: 1.7rem; margin-left: auto; }
.nav-links a {
  font-size: .82rem; letter-spacing: .06em; color: var(--hueso-dim);
  position: relative; padding: .3em 0; transition: color .3s;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--ambar); transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--transicion);
}
.nav-links a:hover, .nav-links a.activo { color: var(--hueso); }
.nav-links a:hover::after, .nav-links a.activo::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { margin-left: .4rem; }
.nav-burger {
  display: none; margin-left: auto; background: none; border: 0; cursor: pointer;
  width: 40px; height: 40px; position: relative; z-index: 130;
}
.nav-burger i {
  position: absolute; left: 8px; right: 8px; height: 1.5px; background: var(--hueso);
  transition: transform .4s var(--transicion), top .4s, opacity .3s;
}
.nav-burger i:nth-child(1) { top: 15px; }
.nav-burger i:nth-child(2) { top: 24px; }
body.menu-abierto .nav-burger i:nth-child(1) { top: 19px; transform: rotate(45deg); }
body.menu-abierto .nav-burger i:nth-child(2) { top: 19px; transform: rotate(-45deg); }

.nav-overlay {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(5, 7, 14, .96);
  backdrop-filter: blur(18px);
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  gap: 1.4rem; padding: 0 clamp(2rem, 10vw, 5rem);
  clip-path: circle(0% at calc(100% - 2.5rem) 2rem);
  transition: clip-path .7s var(--transicion);
  visibility: hidden;
}
body.menu-abierto .nav-overlay { clip-path: circle(150% at calc(100% - 2.5rem) 2rem); visibility: visible; }
.nav-overlay a {
  font-family: var(--f-display); font-size: clamp(1.9rem, 7vw, 3rem); font-weight: 350;
  color: var(--hueso-dim); transition: color .3s, transform .3s;
}
.nav-overlay a:hover { color: var(--ambar-vivo); transform: translateX(.3em); }
.overlay-cta { color: var(--ambar) !important; }
@media (max-width: 980px) {
  .nav .nav-links, .nav a.nav-cta { display: none; }
  .nav-burger { display: block; }
}

/* ═══════════ BOTONES ═══════════ */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  font-family: var(--f-mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  padding: 1em 1.9em; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .35s var(--transicion), box-shadow .35s, background .35s, color .35s, border-color .35s;
  position: relative; overflow: hidden;
}
.btn-primary {
  background: linear-gradient(120deg, var(--brasa), var(--ambar) 55%, var(--ambar-vivo));
  color: #1A0F02; font-weight: 500;
  box-shadow: 0 4px 30px rgba(217, 114, 46, .35), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 44px rgba(245, 168, 60, .5), inset 0 1px 0 rgba(255,255,255,.35); }
.btn-ghost { border-color: rgba(242, 236, 223, .25); color: var(--hueso); }
.btn-ghost:hover { border-color: var(--ambar); color: var(--ambar-vivo); transform: translateY(-2px); }
.btn-small { padding: .7em 1.4em; font-size: .68rem; }

/* ═══════════ HERO ═══════════ */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-video { width: 100%; height: 100%; object-fit: cover; }
.hero-vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 120% 90% at 50% 42%, transparent 42%, rgba(5, 7, 14, .58) 100%),
    linear-gradient(180deg, rgba(5, 7, 14, .42) 0%, transparent 22%, transparent 62%, var(--noche) 100%);
}
.hero-content {
  position: relative; z-index: 3;
  width: var(--ancho); margin: 0 auto; padding-top: 4rem;
}
.eyebrow { color: var(--ambar); margin-bottom: 1.6rem; display: inline-block; }
.hero-title {
  font-family: var(--f-display); font-weight: 340;
  font-size: clamp(2.7rem, 8.4vw, 7.2rem);
  line-height: 1.04; letter-spacing: -.015em;
  margin-bottom: 1.8rem;
  text-wrap: balance;
}
.ht-line { display: block; }
.ht-accent { font-style: italic; font-weight: 420; color: var(--ambar-vivo); text-shadow: 0 0 60px rgba(245, 168, 60, .35); }
.ht-word { display: inline-block; }
.hero-sub {
  max-width: 56ch; font-size: clamp(1.02rem, 1.35vw, 1.22rem);
  color: var(--hueso-dim); margin-bottom: 2.4rem;
}
.hero-sub strong { color: var(--hueso); font-weight: 600; }
.hero-sub em { color: var(--ambar-vivo); font-style: italic; }
.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; }

.scroll-hint {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  z-index: 3; display: flex; flex-direction: column; align-items: center; gap: .9em;
  color: var(--hueso-tenue); padding-bottom: 0;
}
.hint-line { width: 1px; height: 72px; background: rgba(242, 236, 223, .18); position: relative; overflow: hidden; display: block; }
.hint-line::after {
  content: ''; position: absolute; left: 0; top: -40%; width: 100%; height: 40%;
  background: var(--ambar-vivo); animation: cae 2.2s var(--transicion) infinite;
}
@keyframes cae { 0% { top: -40% } 55%, 100% { top: 110% } }

/* Entradas del hero */
.reveal-up { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--transicion), transform 1s var(--transicion); }
body.listo .reveal-up { opacity: 1; transform: none; }
body.listo .eyebrow.reveal-up { transition-delay: .25s; }
body.listo .hero-sub.reveal-up { transition-delay: .55s; }
body.listo .hero-ctas.reveal-up { transition-delay: .75s; }
.ht-word { opacity: 0; transform: translateY(.6em) rotate(.6deg); }
body.listo .ht-word { opacity: 1; transform: none; transition: opacity .9s var(--transicion), transform .9s var(--transicion); }
body.listo .ht-word:nth-child(1) { transition-delay: .30s }
body.listo .ht-word:nth-child(2) { transition-delay: .38s }
body.listo .ht-word:nth-child(3) { transition-delay: .46s }
body.listo .ht-word:nth-child(4) { transition-delay: .54s }
body.listo .ht-accent .ht-word:nth-child(1) { transition-delay: .68s }
body.listo .ht-accent .ht-word:nth-child(2) { transition-delay: .78s }

/* ═══════════ ESTRUCTURA DE ACTOS ═══════════ */
.acto { position: relative; z-index: 3; width: var(--ancho); margin: 0 auto; padding: clamp(6rem, 14vh, 11rem) 0; }
.acto-head { margin-bottom: clamp(2.6rem, 6vh, 4.5rem); max-width: 880px; }
.acto-num {
  color: var(--ambar); display: inline-block; margin-bottom: 1.2rem;
  padding: .55em 1.1em; border: 1px solid rgba(245, 168, 60, .3); border-radius: 999px;
}
.acto-title {
  font-family: var(--f-display); font-weight: 340;
  font-size: clamp(2.2rem, 5.6vw, 4.6rem);
  line-height: 1.06; letter-spacing: -.01em; text-wrap: balance;
}
.acto-title-claro { text-shadow: 0 2px 30px rgba(5, 7, 14, .65); }
.acto-intro { margin-top: 1.6rem; max-width: 62ch; color: var(--hueso-dim); font-size: clamp(1rem, 1.2vw, 1.15rem); }

/* ═══════════ ACTO I · LA NOCHE ═══════════ */
.statement {
  font-family: var(--f-display); font-weight: 340;
  font-size: clamp(1.5rem, 3.3vw, 2.7rem);
  line-height: 1.38; max-width: 30ch;
  margin-bottom: clamp(3.5rem, 8vh, 6rem);
  text-wrap: pretty;
}
.statement .palabra { opacity: .13; transition: opacity .5s ease; }
.statement .palabra.encendida { opacity: 1; }

.video-panel {
  position: relative; border-radius: 22px; overflow: hidden;
  border: 1px solid var(--borde);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
  margin-bottom: clamp(3rem, 7vh, 5rem);
}
.video-panel video { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.video-panel::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(242, 236, 223, .06), inset 0 -70px 90px -60px var(--noche);
  border-radius: inherit;
}
.panel-caption {
  position: absolute; left: 1.4rem; bottom: 1.1rem; z-index: 2;
  color: rgba(242, 236, 223, .82); font-size: .64rem;
  text-shadow: 0 1px 8px rgba(5, 7, 14, .9);
}

.stats-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.4rem, 3vw, 3rem);
  border-top: 1px solid var(--borde); padding-top: 2.6rem;
}
.stat-n, .logro-n {
  font-size: clamp(2.3rem, 4.6vw, 3.8rem); font-weight: 500; letter-spacing: 0;
  text-transform: none; color: var(--ambar-vivo); display: block; margin-bottom: .35em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 42px rgba(245, 168, 60, .3);
}
.stat p { color: var(--hueso-dim); font-size: .95rem; max-width: 30ch; }
.stats-note { margin-top: 2.2rem; color: var(--hueso-tenue); font-size: .62rem; }
@media (max-width: 760px) { .stats-row { grid-template-columns: 1fr; } }

/* ═══════════ ACTO II · EL DESPERTAR ═══════════ */
.acto-despertar { position: relative; z-index: 3; height: 380svh; }
.despertar-sticky {
  position: sticky; top: 0; height: 100svh; overflow: hidden;
  display: grid; place-items: center;
}
.despertar-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.despertar-sticky::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 110% 100% at 50% 50%, transparent 48%, rgba(5, 7, 14, .5) 100%),
    linear-gradient(180deg, var(--noche) 0%, transparent 14%, transparent 86%, var(--noche) 100%);
}
.despertar-frase, .despertar-marca {
  position: absolute; z-index: 3; inset: 0;
  display: grid; place-items: center; text-align: center;
  opacity: 0; padding: 0 1.5rem;
}
.despertar-frase p {
  font-family: var(--f-display); font-weight: 340;
  font-size: clamp(1.9rem, 5vw, 4rem); line-height: 1.16;
  max-width: 22ch; text-wrap: balance;
  text-shadow: 0 2px 40px rgba(5, 7, 14, .85);
}
.despertar-frase em { color: var(--ambar-vivo); font-style: italic; }
.despertar-marca span {
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(3.4rem, 14vw, 12rem); letter-spacing: .3em; padding-left: .3em;
  color: var(--hueso);
  text-shadow: 0 0 90px rgba(245, 168, 60, .55), 0 2px 24px rgba(5, 7, 14, .9);
}

/* ═══════════ ACTO III · LAS MENTES ═══════════ */
.mentes-grid { display: flex; flex-direction: column; gap: clamp(4rem, 9vh, 7rem); }
.mente {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(1.8rem, 4vw, 4rem); align-items: center;
  will-change: transform;
}
.mente-invertida .mente-media { order: 2; }
.mente-media {
  border-radius: 20px; overflow: hidden; position: relative;
  border: 1px solid var(--borde);
  box-shadow: 0 26px 80px rgba(0, 0, 0, .5);
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .18s ease-out, box-shadow .4s;
}
.mente:hover .mente-media { box-shadow: 0 34px 110px rgba(217, 114, 46, .22); }
.mente-media::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 198, 107, .16), transparent 65%);
  opacity: 0; transition: opacity .4s;
}
.mente:hover .mente-media::after { opacity: 1; }
.mente-media img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; }
.mente-oficio { color: var(--ambar); display: block; margin-bottom: .9rem; }
.mente-nombre {
  font-family: var(--f-display); font-style: italic; font-weight: 420;
  font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1;
  margin-bottom: .5rem; color: var(--hueso);
}
.mente-lema { color: var(--ambar-vivo); font-size: 1.02rem; margin-bottom: 1.2rem; font-weight: 500; }
.mente-desc { color: var(--hueso-dim); margin-bottom: 1.6rem; max-width: 52ch; }
.mente-specs { list-style: none; display: grid; gap: .55rem; margin-bottom: 1.8rem; }
.mente-specs li {
  color: var(--hueso-dim); font-size: .68rem; display: flex; gap: .8em; align-items: baseline;
}
.mente-specs li::before { content: '◆'; color: var(--ambar); font-size: .55em; flex-shrink: 0; }
.mente-cta { color: var(--ambar-vivo); display: inline-flex; gap: .6em; align-items: center; position: relative; }
.mente-cta::after {
  content: ''; position: absolute; left: 0; bottom: -4px; height: 1px; width: 100%;
  background: var(--ambar); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--transicion);
}
.mente-cta:hover::after { transform: scaleX(1); transform-origin: left; }
@media (max-width: 860px) {
  .mente, .mente-invertida { grid-template-columns: 1fr; }
  .mente-invertida .mente-media { order: 0; }
  .mente-media { max-width: 480px; }
}

/* ═══════════ ACTO IV · EL MÉTODO ═══════════ */
.acto-metodo { position: relative; }
.metodo-bg {
  position: absolute; inset: 0; z-index: -1; overflow: hidden;
  opacity: .5;
}
.metodo-bg video { width: 100%; height: 100%; object-fit: cover; }
.metodo-bg::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, var(--noche) 0%, transparent 26%, transparent 72%, var(--noche) 100%),
    linear-gradient(90deg, rgba(5,7,14,.75) 0%, rgba(5,7,14,.25) 55%, rgba(5,7,14,.6) 100%);
}
.metodo-lista {
  list-style: none; position: relative;
  display: grid; gap: clamp(2.6rem, 6vh, 4.4rem);
  padding-left: clamp(2.6rem, 6vw, 4.4rem);
  max-width: 820px;
}
.metodo-lista::before {
  content: ''; position: absolute; left: 12px; top: 8px; bottom: 8px; width: 1px;
  background: rgba(156, 178, 218, .16);
}
.metodo-lista .linea-viva {
  position: absolute; left: 12px; top: 8px; width: 1px; height: 0;
  background: linear-gradient(180deg, var(--ambar-vivo), var(--brasa));
  box-shadow: 0 0 10px rgba(245, 168, 60, .7);
}
.paso { position: relative; }
.paso::before {
  content: ''; position: absolute; left: calc(-1 * clamp(2.6rem, 6vw, 4.4rem) + 8px); top: .5em;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--tinta); border: 1px solid rgba(156, 178, 218, .4);
  transition: background .5s, box-shadow .5s, border-color .5s;
}
.paso.encendido::before {
  background: var(--ambar-vivo); border-color: var(--ambar-vivo);
  box-shadow: 0 0 14px 3px rgba(245, 168, 60, .55);
}
.paso-num { color: var(--ambar); display: block; margin-bottom: .6rem; }
.paso h3 {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(1.4rem, 2.6vw, 2rem); margin-bottom: .7rem;
}
.paso-tiempo { color: var(--hueso-tenue); font-size: .58em; vertical-align: middle; }
.paso p { color: var(--hueso-dim); max-width: 58ch; }

/* ═══════════ ACTO V · EL AMANECER ═══════════ */
.acto-amanecer { position: relative; z-index: 3; }
.amanecer-media { position: sticky; top: 0; height: 72svh; overflow: hidden; }
.amanecer-media video { width: 100%; height: 100%; object-fit: cover; }
.amanecer-media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--noche) 0%, transparent 20%, transparent 70%, var(--noche) 100%);
}
.amanecer-contenido {
  position: relative; z-index: 2;
  width: var(--ancho); margin: -18svh auto 0;
  padding-bottom: clamp(6rem, 12vh, 10rem);
}
.logros {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.4rem, 3vw, 2.6rem);
  background: rgba(9, 13, 26, .55);
  border: 1px solid var(--borde);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 24px;
  padding: clamp(1.8rem, 4vw, 3.2rem);
  margin-bottom: clamp(3rem, 7vh, 5rem);
  box-shadow: 0 40px 110px rgba(0, 0, 0, .5);
}
.logro p { color: var(--hueso-dim); font-size: .88rem; }
.voces { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.2rem, 2.6vw, 2rem); }
.voz {
  background: rgba(9, 13, 26, .5);
  border: 1px solid var(--borde);
  border-radius: 18px;
  padding: 1.8rem 1.6rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex; flex-direction: column; gap: 1.2rem;
  transition: transform .5s var(--transicion), border-color .5s, box-shadow .5s;
}
.voz:hover { transform: translateY(-6px); border-color: rgba(245, 168, 60, .4); box-shadow: 0 24px 60px rgba(217, 114, 46, .14); }
.voz p { font-size: .98rem; color: var(--hueso); }
.voz footer { color: var(--ambar); font-size: .6rem; margin-top: auto; }
@media (max-width: 980px) { .logros { grid-template-columns: repeat(2, 1fr); } .voces { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .logros { grid-template-columns: 1fr; } }

/* ═══════════ ACTO VI · NOSOTROS ═══════════ */
.nosotros-media {
  position: relative; border-radius: 22px; overflow: hidden;
  border: 1px solid var(--borde);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
  margin-bottom: clamp(3rem, 7vh, 5rem);
  clip-path: inset(0 0 0 0 round 22px);
}
.nosotros-media img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transform: scale(1.06); }
.manifiesto { max-width: 820px; }
.manifiesto-grande {
  font-family: var(--f-display); font-weight: 340;
  font-size: clamp(1.5rem, 3.2vw, 2.5rem); line-height: 1.34;
  margin-bottom: 1.8rem; text-wrap: pretty;
}
.manifiesto > p:not(.manifiesto-grande) { color: var(--hueso-dim); max-width: 68ch; margin-bottom: 3rem; }
.valores { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.4rem, 3vw, 2.4rem); }
.valor h3 { color: var(--ambar); margin-bottom: .8rem; font-size: .74rem; font-weight: 500; }
.valor p { color: var(--hueso-dim); font-size: .92rem; }
@media (max-width: 760px) { .valores { grid-template-columns: 1fr; } }

/* ═══════════ ACTO VII · CONTACTO + FOOTER ═══════════ */
.acto-contacto { position: relative; z-index: 3; padding-top: clamp(6rem, 14vh, 11rem); overflow: hidden; }
.contacto-horizonte {
  position: absolute; inset: 0 0 auto 0; height: 62%;
  background: url('../assets/img/horizonte.jpg') center 38% / cover no-repeat;
  opacity: .6;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 18%, #000 62%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 18%, #000 62%, transparent);
}
.contacto-inner { position: relative; width: min(880px, var(--ancho)); margin: 0 auto; }
.contacto-head { text-align: center; margin-bottom: 3.4rem; }
.contacto-title {
  font-family: var(--f-display); font-weight: 340;
  font-size: clamp(2.4rem, 6.4vw, 5.2rem); line-height: 1.06; text-wrap: balance;
  margin: 1.4rem 0 1.6rem;
}
.contacto-title em { font-style: italic; color: var(--ambar-vivo); }
.contacto-sub { color: var(--hueso-dim); max-width: 58ch; margin: 0 auto; }

.contacto-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem;
  background: rgba(9, 13, 26, .62);
  border: 1px solid var(--borde);
  border-radius: 24px;
  padding: clamp(1.6rem, 4vw, 2.8rem);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 40px 110px rgba(0, 0, 0, .5);
}
.campo { display: flex; flex-direction: column; gap: .5rem; }
.campo-full { grid-column: 1 / -1; }
.campo label { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--hueso-dim); }
.campo input, .campo textarea {
  background: rgba(5, 7, 14, .6);
  border: 1px solid rgba(156, 178, 218, .18);
  border-radius: 12px;
  padding: .95em 1.1em;
  color: var(--hueso);
  font-family: var(--f-texto); font-size: 1rem;
  transition: border-color .3s, box-shadow .3s;
  resize: vertical;
}
.campo input::placeholder, .campo textarea::placeholder { color: rgba(242, 236, 223, .28); }
.campo input:focus, .campo textarea:focus {
  outline: none; border-color: var(--ambar);
  box-shadow: 0 0 0 3px rgba(245, 168, 60, .16);
}
.campo.invalido input, .campo.invalido textarea { border-color: #E0603C; box-shadow: 0 0 0 3px rgba(224, 96, 60, .14); }
.form-error { grid-column: 1 / -1; color: #F0906B; font-size: .66rem; }
.btn-form { grid-column: 1 / -1; justify-content: center; margin-top: .4rem; }
.btn-form.enviando .btn-texto { opacity: .25; }
.btn-spark {
  position: absolute; width: 9px; height: 9px; border-radius: 50%;
  background: #1A0F02; opacity: 0;
}
.btn-form.enviando .btn-spark { opacity: 1; animation: orbita 1s linear infinite; }
@keyframes orbita {
  from { transform: rotate(0turn) translateX(2.2em); }
  to   { transform: rotate(1turn) translateX(2.2em); }
}

.form-exito {
  text-align: center; padding: clamp(2.5rem, 6vw, 4rem);
  background: rgba(9, 13, 26, .62);
  border: 1px solid rgba(245, 168, 60, .35);
  border-radius: 24px;
  backdrop-filter: blur(16px);
  box-shadow: 0 0 90px rgba(245, 168, 60, .12), 0 40px 110px rgba(0,0,0,.5);
}
.exito-spark {
  width: 14px; height: 14px; border-radius: 50%; margin: 0 auto 1.6rem;
  background: var(--ambar-vivo);
  box-shadow: 0 0 24px 6px rgba(245, 168, 60, .8), 0 0 90px 30px rgba(245, 168, 60, .25);
  animation: respira 2.2s ease-in-out infinite;
}
.form-exito h3 { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.6rem, 3.4vw, 2.4rem); margin-bottom: .8rem; }
.form-exito p { color: var(--hueso-dim); max-width: 46ch; margin: 0 auto .6rem; }
.exito-meta { color: var(--ambar); font-size: .62rem; margin-top: 1.2rem; }

.contacto-datos {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1.2rem 2.8rem;
  margin: 3rem 0 0; color: var(--hueso-dim); font-size: .66rem;
}
.contacto-datos a { color: var(--ambar-vivo); }
@media (max-width: 640px) { .contacto-form { grid-template-columns: 1fr; } }

/* Footer */
.footer { margin-top: clamp(6rem, 12vh, 10rem); border-top: 1px solid var(--borde); position: relative; }
.footer-marca {
  font-family: var(--f-display); font-weight: 500; text-align: center;
  font-size: clamp(4rem, 17vw, 15rem); letter-spacing: .16em; padding-left: .16em;
  line-height: 1.1; margin: 2rem 0 1rem;
  color: transparent;
  -webkit-text-stroke: 1px rgba(242, 236, 223, .13);
  user-select: none;
}
.footer-grid {
  width: var(--ancho); margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, minmax(0, 220px));
  justify-content: center; gap: 2rem;
  padding: 2rem 0 3rem;
}
.footer-col { display: flex; flex-direction: column; gap: .7rem; }
.footer-col h4 { color: var(--ambar); font-size: .62rem; font-weight: 500; margin-bottom: .4rem; }
.footer-col a { color: var(--hueso-dim); font-size: .88rem; transition: color .3s; }
.footer-col a:hover { color: var(--ambar-vivo); }
.footer-legal {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem 2.6rem;
  padding: 1.6rem 1rem 2.2rem;
  border-top: 1px solid rgba(156, 178, 218, .07);
  color: var(--hueso-tenue); font-size: .58rem;
}
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr; text-align: center; } }

/* ═══════════ MODO FOTO (capturas deterministas) ═══════════ */
html.foto *, html.foto *::before, html.foto *::after { transition: none !important; }
html.foto .reveal-up, html.foto .ht-word { opacity: 1 !important; transform: none !important; }
html.foto .nav { transform: none !important; }
html.foto .night-clock, html.foto .scroll-rail { opacity: 1 !important; }
html.foto #preloader { display: none !important; }
html.foto .despertar-frase[data-frase="2"] { opacity: 1 !important; }
html.foto .grain { animation: none !important; }

/* ═══════════ REDUCED MOTION ═══════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .acto-despertar { height: auto; }
  .despertar-frase, .despertar-marca { position: relative; opacity: 1; inset: auto; padding: 2rem; }
  .statement .palabra { opacity: 1; }
  #firefly-canvas { display: none; }
}
