@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin-standard-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --t1: 0;
  --t2: 0;
  --t3: 0;
  --t4: 0;
  --shade: 0;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: #2b2b2b; overscroll-behavior: none; }
body { min-height: 100%; overflow-x: hidden; }

/* El recorrido de scroll: el escenario se queda fijo mientras la página avanza. */
.runway { position: relative; height: 520vh; }
.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100lvh;
  width: 100%;
  overflow: hidden;
  background: #2b2b2b;
}

#film {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #2b2b2b;
  pointer-events: none;
}

.shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 70% 38% at 50% 31%, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0) 100%);
  opacity: var(--shade);
}

.copy {
  position: absolute;
  left: 50%;
  top: 31%;
  transform: translate(-50%, -50%);
  width: min(94vw, 1100px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.8rem, 1.7vw, 1.7rem);
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.line { margin: 0; will-change: opacity, transform; }

.l1 {
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 200;
  font-stretch: 125%;
  text-transform: uppercase;
  font-size: clamp(1.2rem, calc(3.6vw + 0.2rem), 3.6rem);
  line-height: 1.1;
  letter-spacing: 0.18em;
  margin-right: -0.18em;
  white-space: nowrap;
  opacity: var(--t1);
  transform: translateY(calc((1 - var(--t1)) * 22px));
}

.l2 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(0.8rem, calc(1.1vw + 0.5rem), 1.5rem);
  letter-spacing: 0.32em;
  margin-right: -0.32em; /* compensa el espaciado final para centrar de verdad */
  opacity: var(--t2);
  transform: translateY(calc((1 - var(--t2)) * 18px));
}

.l3 {
  display: flex;
  justify-content: center;
  gap: clamp(1.25rem, 4.5vw, 4.5rem);
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 300;
  font-size: clamp(1rem, calc(1.6vw + 0.5rem), 2rem);
  letter-spacing: 0.24em;
  opacity: var(--t3);
  transform: translateY(calc((1 - var(--t3)) * 18px));
}
.l3 span { margin-right: -0.24em; }

/* Chip de WhatsApp: aparece al terminar la animación. */
.chip {
  position: fixed;
  right: max(clamp(16px, 3vw, 40px), env(safe-area-inset-right));
  bottom: max(clamp(20px, 4vh, 40px), env(safe-area-inset-bottom));
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: calc(12px + 0.32em);
  height: 52px;
  padding: 0 24px 0 20px;
  border: 2px solid #fff;
  border-radius: 30px;
  background: transparent;
  color: #fff;
  text-decoration: none;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-shadow: none;
  opacity: var(--t4);
  transform: translateY(calc((1 - var(--t4)) * 16px));
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
}
.chip svg { flex: none; }
.chip.is-on { pointer-events: auto; cursor: pointer; }
.chip:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
@media (hover: hover) { .chip.is-on:hover { background: rgba(255, 255, 255, 0.12); } }

/* Flecha blanca dentro de un círculo, en el centro de la pantalla. */
.hint {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px 0 26px;
  border: 2px solid #fff;
  border-radius: 30px;
  background: transparent;
  color: #fff;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.32em;
  cursor: pointer;
  transition: opacity 0.4s ease;
  -webkit-tap-highlight-color: transparent;
}
.hint svg { flex: none; animation: bote 1.3s cubic-bezier(0.35, 0, 0.35, 1) infinite; }
.hint.is-hidden { opacity: 0; pointer-events: none; }
.hint:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

@keyframes bote {
  0%, 100% { transform: translateY(-5px); }
  50% { transform: translateY(6px); }
}

@media (prefers-reduced-motion: reduce) {
  .hint svg { animation: none; }
}

/* Grano de película sobre todo: vídeo, textos y botón. Variantes con ?g=1, ?g=2 o ?g=3. */
.grain {
  position: absolute;
  inset: -60px;
  pointer-events: none;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='n' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='1.7' numOctaves='1' seed='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 200px 200px;
  opacity: 0.5;
  animation: grano 0.5s steps(1) infinite;
}
.g1 .grain { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='n' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='7' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"); background-size: 260px 260px; opacity: 0.6; animation-duration: 0.7s; }
.g3 .grain { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='n' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='0.5' numOctaves='3' seed='11' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"); background-size: 320px 320px; opacity: 0.55; animation-duration: 0.6s; }
@keyframes grano {
  0% { transform: translate(0, 0); }
  17% { transform: translate(-31px, 22px); }
  33% { transform: translate(24px, -40px); }
  50% { transform: translate(-45px, -18px); }
  67% { transform: translate(38px, 33px); }
  83% { transform: translate(-12px, 47px); }
}
@media (prefers-reduced-motion: reduce) { .grain { animation: none; } }

/* Movimiento reducido: se muestra directamente el último fotograma con el texto. */
.reduced .runway { height: 100vh; height: 100lvh; }
.reduced .hint { display: none; }
