/* ============================================================
   KROMA — apertura cinematográfica (manifiesto) + hero banner
   Metáfora: la pantalla croma verde que se llena de magia.
   El manifiesto se reproduce SOLO (autoplay, tipo vídeo).
   NOTA: la capa verde se llama .greenscreen (NO .chroma, que
   es la utilidad de texto en degradado).
   ============================================================ */

/* ============ MANIFIESTO (autoplay) ============ */
.manifesto {
  position: relative;
  height: 100svh;
  background: #000;
  overflow: hidden;
}
.manifesto__stage {
  position: absolute; inset: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  isolation: isolate;
}

/* — capa croma (pantalla verde) — */
.greenscreen {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(120% 120% at 50% 50%, #3ad94e 0%, #2ecc40 55%, #25b537 100%);
  opacity: 1;
  transition: opacity 1.2s cubic-bezier(.4,0,.2,1);
  will-change: opacity;
}
.greenscreen::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0.05) 0 2px, transparent 2px 4px);
  opacity: 0.5; mix-blend-mode: multiply;
}
.gs-markers { position: absolute; inset: 0; }
.gs-markers span {
  position: absolute; width: 14px; height: 14px;
  border: 2px solid rgba(8,32,12,0.6); border-radius: 50%;
}
.gs-markers span::after {
  content: ""; position: absolute; inset: 4px; background: rgba(8,32,12,0.6); border-radius: 50%;
}
.gs-markers span:nth-child(1){ left: 8%;  top: 14%; }
.gs-markers span:nth-child(2){ left: 78%; top: 10%; }
.gs-markers span:nth-child(3){ left: 22%; top: 76%; }
.gs-markers span:nth-child(4){ left: 64%; top: 82%; }
.gs-markers span:nth-child(5){ left: 90%; top: 52%; }
.gs-markers span:nth-child(6){ left: 40%; top: 40%; }
.gs-frame { position: absolute; inset: clamp(14px, 2.2vw, 28px); z-index: 2; pointer-events: none; }
.gs-frame i {
  position: absolute; width: 26px; height: 26px;
  border: 2px solid rgba(8,32,12,0.55);
}
.gs-frame i:nth-child(1){ left: 0; top: 0; border-right: 0; border-bottom: 0; }
.gs-frame i:nth-child(2){ right: 0; top: 0; border-left: 0; border-bottom: 0; }
.gs-frame i:nth-child(3){ left: 0; bottom: 0; border-right: 0; border-top: 0; }
.gs-frame i:nth-child(4){ right: 0; bottom: 0; border-left: 0; border-top: 0; }
.gs-label {
  position: absolute; left: 5%; bottom: calc(5% + 14px); z-index: 3;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.16em;
  color: rgba(8,32,12,0.7); text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
}
.gs-label .rec { width: 9px; height: 9px; border-radius: 50%; background: rgba(8,32,12,0.7); animation: recBlink 1.6s steps(1) infinite; }
@keyframes recBlink { 50% { opacity: 0.2; } }

/* — capa proyección (la magia) — */
.projection {
  position: absolute; inset: 0; z-index: 2;
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(.4,0,.2,1);
  will-change: opacity;
}
.projection .scene { z-index: 0; }
.projection__veil {
  position: absolute; inset: 0; z-index: 3;
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, transparent 30%, transparent 55%, rgba(0,0,0,0.78) 100%),
    radial-gradient(120% 90% at 50% 45%, transparent 35%, rgba(0,0,0,0.55) 100%);
}

/* — frases del manifiesto — */
.mphrases {
  position: relative; z-index: 5;
  width: 100%; max-width: 1080px;
  padding-inline: var(--gut);
  text-align: center;
}
.mphrase {
  position: absolute; left: 50%; top: 50%;
  width: calc(100% - var(--gut) * 2);
  transform: translate(-50%, calc(-50% + 22px)) scale(.985);
  opacity: 0;
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1), filter .7s;
  filter: blur(5px);
  pointer-events: none;
}
.mphrase.active { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: blur(0); }
.mphrase .small {
  display: block;
  font-family: var(--font-mono); font-size: clamp(0.7rem, 1.2vw, 0.88rem);
  letter-spacing: 0.22em; text-transform: uppercase; margin-bottom: 1.2rem;
}
.mphrase .big {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.7rem, 4.6vw, 3.8rem); line-height: 1.04; letter-spacing: -0.025em;
  text-wrap: balance;
}
.mphrase .big.up { text-transform: uppercase; letter-spacing: -0.015em; }
.mphrase .big.sm { font-size: clamp(1.35rem, 3.4vw, 2.8rem); line-height: 1.12; }

/* frases en 2-3 líneas, con tamaños jugados (línea central mayor) — +10% */
.mphrase .big.ml { font-size: clamp(1.87rem, 5.06vw, 4.18rem); line-height: 1.02; letter-spacing: -0.025em; }
.mphrase .mline { display: block; }
.mphrase .mline.s { font-size: 0.44em; font-weight: 700; letter-spacing: 0.01em; opacity: 0.92; margin-bottom: 0.12em; }
.mphrase .mline.m { font-size: 0.66em; }
.mphrase .mline.l { font-size: 1.06em; }
/* entrada por línea (escalonada) en cada frase de texto */
.mphrase .mline { opacity: 0; transform: translateY(0.5em); transition: opacity .6s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.mphrase.active .mline { opacity: 1; transform: none; }
.mphrase.active .mline:nth-child(1) { transition-delay: .12s; }
.mphrase.active .mline:nth-child(2) { transition-delay: .24s; }
.mphrase.active .mline:nth-child(3) { transition-delay: .36s; }

/* DIAPO 2 en dos fases (fondo verde, sin transición entre fases) */
.mphrase.kroma2 .k2-title,
.mphrase.kroma2 .k2-proj { display: block; line-height: 1.0; }
.mphrase.kroma2 .k2-title {
  font-size: 1.5em; font-weight: 800;
  transition: font-size 1.35s cubic-bezier(.3,.7,.2,1);
}
.mphrase.kroma2 .k2-comma { opacity: 0; transition: opacity .7s ease .35s; }
.mphrase.kroma2 .k2-proj {
  font-size: 0.01em; opacity: 0; transform: translateY(0.22em);
  white-space: nowrap;
  transition: font-size 1.4s cubic-bezier(.3,.7,.2,1), opacity 1s ease .3s, transform 1.3s cubic-bezier(.3,.7,.2,1);
}
/* fase B: El KROMA, pequeño arriba + Sobre él... más grande, en una línea */
.mphrase.kroma2.stage-b .k2-title { font-size: 0.52em; }
.mphrase.kroma2.stage-b .k2-comma { opacity: 1; }
.mphrase.kroma2.stage-b .k2-proj { font-size: 0.78em; opacity: 1; transform: none; }
@media (max-width: 600px){ .mphrase.kroma2 .k2-proj { white-space: normal; } }

/* frase final = lockup de marca (estilo banner, sobre la escena) */
.mphrase.lockup { filter: none; }
.mphrase.lockup.active { filter: none; }
.mphrase.lockup .lock {
  font-family: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif;
  font-weight: 800; text-transform: uppercase;
  line-height: 0.96; letter-spacing: -0.02em;
  font-size: clamp(1.5rem, 5vw, 4rem);
}
.mphrase.lockup .lock > span { display: block; }
/* "lo que quieras" mantiene SU fuente (Unbounded) y el contorno verde */
.mphrase.lockup .lock .outline {
  font-family: "Unbounded", sans-serif;
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: clamp(0.8px, 0.16vw, 1.6px) var(--green);
  text-stroke: clamp(0.8px, 0.16vw, 1.6px) var(--green);
  paint-order: stroke fill;
}
.mphrase.lockup .lock .solid-green { color: var(--green); }
/* ensamblaje: las líneas llegan por separado y se unen — más lento */
.mphrase.lockup .lock > span {
  opacity: 0;
  transition: opacity .7s ease, transform 1.05s cubic-bezier(.18,.9,.24,1.06);
}
.mphrase.lockup .lock > span:nth-child(1) { transform: translateX(-0.9em); }
.mphrase.lockup .lock > span:nth-child(2) { transform: translateX(0.9em); }
.mphrase.lockup .lock > span:nth-child(3) { transform: translateY(0.7em); }
.mphrase.lockup .lock > span:nth-child(4) { transform: translateY(-0.7em) scale(.78); }
.mphrase.lockup.active .lock > span { opacity: 1; transform: none; }
.mphrase.lockup.active .lock > span:nth-child(1) { transition-delay: .15s; }
.mphrase.lockup.active .lock > span:nth-child(2) { transition-delay: .45s; }
.mphrase.lockup.active .lock > span:nth-child(3) { transition-delay: .78s; }
.mphrase.lockup.active .lock > span:nth-child(4) { transition-delay: 1.12s; }

/* color de texto según fase */
.manifesto__stage[data-phase="green"] .mphrase { color: #08200c; }
.manifesto__stage[data-phase="green"] .mphrase .small { color: rgba(8,32,12,0.65); }
.manifesto__stage[data-phase="scene"] .mphrase { color: var(--ink); }
.manifesto__stage[data-phase="scene"] .mphrase .small { color: var(--green); }
.mphrase .grn { color: var(--green); }
.manifesto__stage[data-phase="green"] .mphrase .grn { color: #062e0e; }

/* dots de paso + scroll + repetir */
.mtrack { position: absolute; left: 50%; top: 86px; translate: -50% 0; z-index: 6; display: flex; gap: 9px; }
.mtrack i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.3; transition: opacity .3s, transform .3s; }
.mtrack i.on { opacity: 1; transform: scale(1.5); }
.manifesto__stage[data-phase="green"] .mtrack { color: rgba(8,32,12,0.75); }
.manifesto__stage[data-phase="scene"] .mtrack { color: var(--green); }

.mscroll {
  position: absolute; left: 50%; bottom: 26px; z-index: 6; translate: -50% 0;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.2em; text-transform: uppercase;
  transition: color .5s;
}
.manifesto__stage[data-phase="green"] .mscroll { color: rgba(8,32,12,0.7); }
.manifesto__stage[data-phase="scene"] .mscroll { color: var(--ink-3); }
.mscroll .bar { width: 1px; height: 34px; position: relative; overflow: hidden; background: currentColor; opacity: 0.4; }
.mscroll .bar::after { content:""; position:absolute; inset:0 0 60% 0; background: currentColor; animation: scrollDrop 2s ease-in-out infinite; }

.mreplay {
  position: absolute; right: var(--gut); bottom: 24px; z-index: 7;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase;
  background: transparent; border: 1px solid currentColor; border-radius: 999px;
  padding: 8px 14px; cursor: pointer;
  opacity: 0; pointer-events: none; transition: opacity .5s, color .5s, background .25s;
}
.manifesto__stage[data-phase="green"] .mreplay { color: rgba(8,32,12,0.8); }
.manifesto__stage[data-phase="scene"] .mreplay { color: var(--ink-2); }
.manifesto__stage.done .mreplay { opacity: 1; pointer-events: auto; }
.mreplay:hover { background: rgba(127,127,127,0.12); }
@media (max-width: 640px){ .mreplay { display: none; } }

/* reduced-motion / sin JS */
.manifesto.is-static .greenscreen { opacity: 0; }
.manifesto.is-static .projection { opacity: 1; }
.manifesto.is-static .mphrase { opacity: 1; }
.manifesto.is-static .mphrase .mline,
.manifesto.is-static .mphrase.lockup .lock > span { opacity: 1; transform: none; }
.manifesto.is-static .mphrase:not(.last) { display: none; }

/* transición croma → escena: morph suave (más lento) + escena que enfoca */
.greenscreen { transition: opacity 1.9s cubic-bezier(.45,0,.25,1); }
.projection { transition: opacity 1.9s cubic-bezier(.45,0,.25,1); }
.projection .scene { filter: blur(20px); transition: filter 2s cubic-bezier(.4,0,.2,1); }
.manifesto__stage[data-phase="scene"] .projection .scene { filter: blur(0); }
/* flash de "keying" (corte de croma) — más suave para menos contraste */
.gs-flash {
  position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: radial-gradient(120% 120% at 50% 50%, #eafff0 0%, #b6ffc6 60%, #2ecc40 100%);
  opacity: 0; mix-blend-mode: screen;
}
.gs-flash.go { animation: keyFlash 1s ease-out; }
@keyframes keyFlash { 0% { opacity: 0; } 28% { opacity: .62; } 100% { opacity: 0; } }

/* línea de escaneo — sólo el destello central (una sola banda) */
.greenscreen::after {
  content: ""; position: absolute; left: 0; right: 0; height: 30%; z-index: 1;
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(255,255,255,0.30) 50%,
    transparent 100%);
  box-shadow: 0 0 40px rgba(255,255,255,0.16);
  animation: gsScan 3.4s linear infinite;
}
@keyframes gsScan { from { top: -30%; } to { top: 100%; } }

/* — Ken Burns en bucle: push-in lento y continuo (vídeo) — */
@media (prefers-reduced-motion: no-preference) {
  .projection .scene { animation: kenburns 16s ease-in-out infinite alternate; }
}
@keyframes kenburns { from { transform: scale(1.04); } to { transform: scale(1.16); } }

/* — barra de progreso tipo reproductor de vídeo — */
.mprogress {
  position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; z-index: 7;
}
.mprogress i { display: block; height: 100%; width: 0; }
.manifesto__stage[data-phase="green"] .mprogress { background: rgba(8,32,12,0.18); }
.manifesto__stage[data-phase="green"] .mprogress i { background: #08200c; }
.manifesto__stage[data-phase="scene"] .mprogress { background: rgba(255,255,255,0.12); }
.manifesto__stage[data-phase="scene"] .mprogress i { background: var(--green); }

/* ============ HERO BANNER ============ */
.banner {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px var(--gut) 90px;
  overflow: hidden;
  background: var(--bg);
}
.banner::before {
  content: ""; position: absolute; left: 50%; top: 44%; translate: -50% -50%;
  width: 110vw; height: 70vh;
  background: radial-gradient(50% 50% at 50% 50%, rgba(46,204,64,0.10), transparent 70%);
  z-index: 0; pointer-events: none;
}
.banner__statement {
  position: relative; z-index: 2;
  font-family: "Unbounded", var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.9;
  letter-spacing: -0.02em;
  font-size: clamp(1.7rem, 5.6vw, 4.6rem);
}
.banner__statement .ln { display: block; }
.banner__statement .ln > span {
  display: block;
  opacity: 0;
  transform: translateY(0.5em);
  transition: opacity .7s ease, transform .8s cubic-bezier(.2,.85,.2,1);
}
.banner.in .banner__statement .ln > span { opacity: 1; transform: none; }
.banner__statement .ln:nth-child(1) > span { transition-delay: .05s; }
.banner__statement .ln:nth-child(2) > span { transition-delay: .14s; }
.banner__statement .ln:nth-child(3) > span { transition-delay: .23s; }
.banner__statement .ln:nth-child(4) > span { transition-delay: .32s; }
/* línea contorneada: trazo grueso = misma letra, hueca */
.banner__statement .outline {
  color: transparent;
  -webkit-text-stroke: clamp(1.6px, 0.4vw, 3.6px) var(--green);
  text-stroke: clamp(1.6px, 0.4vw, 3.6px) var(--green);
  paint-order: stroke fill;
}
.banner__statement .solid-green { color: var(--green); }

.banner__sub {
  position: relative; z-index: 2;
  margin-top: clamp(20px, 2.6vw, 30px);
  max-width: 42ch;
  color: var(--ink-2);
  font-size: clamp(0.98rem, 1.4vw, 1.2rem);
  opacity: 0; transform: translateY(14px);
  transition: opacity .8s ease .55s, transform .8s cubic-bezier(.2,.8,.2,1) .55s;
}
.banner.in .banner__sub { opacity: 1; transform: none; }
.banner__cta {
  position: relative; z-index: 2; margin-top: clamp(24px, 2.8vw, 34px);
  display: flex; gap: 14px; flex-wrap: wrap; justify-content: center;
  opacity: 0; transform: translateY(14px);
  transition: opacity .8s ease .7s, transform .8s cubic-bezier(.2,.8,.2,1) .7s;
}
.banner.in .banner__cta { opacity: 1; transform: none; }
.banner__scroll {
  position: absolute; left: 50%; bottom: 28px; translate: -50% 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3);
}
.banner__scroll .bar { width: 1px; height: 34px; background: var(--ink-3); opacity: .4; position: relative; overflow: hidden; }
.banner__scroll .bar::after { content:""; position:absolute; inset:0 0 60% 0; background: var(--green); animation: scrollDrop 2s ease-in-out infinite; }
@media (max-width: 640px){ .banner__scroll { display: none; } }
