/* scroll-scrub.css — cinematic scroll-scrub landing template (cinematic-landing skill).
   Canvas frame-sequence hero pinned via position:sticky, captions ride on top.

   BUILDFLOW RESKIN — cambios sobre el molde (documentados, nada estructural):
   1. Variables de .ss-root recoloreadas a la marca BuildFlow (orange/teal/ink)
      + fuentes Poppins/JetBrains Mono self-hosted (ver buildflow.css @font-face).
   2. `font-weight:700` agregado a los selectores "display" (Poppins Bold no es
      un solo peso ultra-black como Bebas Neue/Archive Black del molde original,
      hay que pedirlo explicito).
   3. `.ss-kicker` y `.ss-stat` pasan a --mono-stack (var nueva, aditiva) —
      convención de marca: micro-labels y numeros SIEMPRE en mono tracked-out.
   4. `.ss-video-spacer` baja de 720vh a 520vh/380vh (conversor corto, no
      catalogo — ver plan seccion "Ajuste al molde").
   Las 9 reglas inviolables del molde (RAF loop, .ss-root anchor, ready-antes-
   de-updateLoaderUI, cero overflow-x:hidden, singleton guard, onerror→warn)
   quedan intactas — cero cambios de estructura ni de JS.

   NOTE: do NOT add overflow-x:hidden on html/body/.ss-root or any ancestor of
   .ss-video-stage. Any ancestor with overflow != visible breaks position:sticky
   for its descendants (the canvas detaches and scrolls away instead of
   pinning) — that is what caused the black-void scroll bug, twice. There is
   currently no horizontal overflow source in this layout (verified live:
   document.documentElement.scrollWidth < window.innerWidth), so the rule
   isn't needed. If horizontal overflow ever appears, fix the specific
   offending element (e.g. clamp its width/margin) instead of reintroducing
   this rule on an ancestor. */

.ss-root {
  --accent: #da5a28;       /* BUILD — naranja, CTA/highlight primario */
  --accent-2: #178a79;     /* FLOW — teal, secundario/exito */
  --accent-3: #da5a28;     /* mismo naranja: CTA-labeled bits (nav-cta, price, loader) */
  --ink: #ececf1;          /* texto brillante sobre fondo oscuro */
  --ink-dim: rgba(236, 236, 241, 0.68);
  --surface: #16161d;      /* BuildFlow ink — fondo */
  --surface-2: #0e0e13;    /* variante mas oscura */
  --display-stack: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --text-stack: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono-stack: "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;

  position: relative;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--text-stack);
}

.ss-root * {
  box-sizing: border-box;
}

/* ---------- Nav ---------- */
.ss-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
  background: linear-gradient(to bottom, rgba(22, 22, 29, 0.85), transparent);
  pointer-events: none;
}

.ss-nav > * {
  pointer-events: auto;
}

.ss-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--display-stack);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.03em;
  color: var(--ink);
  text-decoration: none;
}

.ss-brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: conic-gradient(from 200deg, var(--accent), var(--accent-2), var(--accent-2), var(--accent));
  box-shadow: 0 0 18px rgba(218, 90, 40, 0.4);
}

.ss-nav-links {
  display: flex;
  gap: 1.75rem;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.ss-nav-links a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.ss-nav-links a:hover {
  color: var(--accent-3);
}

.ss-nav-cta {
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  background: var(--accent-3);
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .ss-nav-links {
    display: none;
  }
}

/* ---------- Scrub canvas + spacer ---------- */
.ss-video-spacer {
  position: relative;
  height: 520vh; /* molde usa 720vh; BuildFlow es conversor, no catalogo — ver plan */
}

@media (max-width: 720px) {
  .ss-video-spacer {
    height: 380vh;
  }
}

.ss-video-stage {
  position: sticky;
  top: 0;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  background: var(--surface);
}

.ss-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.ss-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--surface);
  z-index: 5;
  transition: opacity 0.6s ease;
}

.ss-loader[data-hidden="true"] {
  opacity: 0;
  pointer-events: none;
}

.ss-loader-bar {
  width: min(220px, 50vw);
  height: 2px;
  background: rgba(236, 236, 241, 0.15);
  border-radius: 999px;
  overflow: hidden;
}

.ss-loader-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.2s ease;
}

.ss-loader-label {
  font-family: var(--mono-stack);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* Overlay captions riding on top of the canvas */
.ss-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.ss-scene {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.6rem;
  padding: 0 1.5rem;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.ss-scene[data-active="true"] {
  opacity: 1;
  transform: translateY(0);
}

/* SCRIM POR ESCENA — agregado sobre el molde (2026-07-27).
   El molde original se probo con metraje oscuro (Breezely) y le alcanzaba el
   text-shadow. Este hero es metraje real con neon brillante: medido frame a
   frame, la luminancia p90 detras del texto llega a 187 en 4 de las 6 escenas
   -> el texto blanco se lava. Un velo global mataria la imagen, asi que el
   scrim es LOCAL: una elipse suave detras de cada bloque de texto, transparente
   en los bordes. Oscurece donde hay que leer y deja limpio el resto.
   `isolation` mantiene el z-index:-1 dentro de la escena (queda sobre el canvas
   y debajo del texto). .ss-scene es DESCENDIENTE del stage, no ancestro, asi
   que esto no toca la regla del sticky. */
.ss-scene {
  isolation: isolate;
}

.ss-scene::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(1180px, 98vw);
  height: 165%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    rgba(22, 22, 29, 0.86) 0%,
    rgba(22, 22, 29, 0.7) 42%,
    rgba(22, 22, 29, 0.32) 66%,
    rgba(22, 22, 29, 0) 80%
  );
}

.ss-scene--hero {
  top: 58%;
}

.ss-scene--top {
  top: 12%;
}

.ss-scene--bottom {
  top: auto;
  bottom: 14%;
}

.ss-kicker {
  font-family: var(--mono-stack);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-3);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.ss-headline {
  font-family: var(--display-stack);
  font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.65);
}

.ss-headline .accent {
  color: var(--accent);
}

.ss-sub {
  max-width: 34rem;
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  color: var(--ink-dim);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
}

.ss-scroll-hint {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono-stack);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.ss-scroll-hint::after {
  content: "";
  width: 1px;
  height: 26px;
  background: linear-gradient(to bottom, var(--accent-3), transparent);
  animation: ss-hint-fall 1.6s ease-in-out infinite;
}

@keyframes ss-hint-fall {
  0% { transform: translateY(-6px); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateY(10px); opacity: 0; }
}

.ss-stat {
  font-family: var(--mono-stack);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: clamp(3.2rem, 9vw, 6.5rem);
  line-height: 0.95;
  color: var(--ink);
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.65);
}

.ss-stat .unit {
  font-size: 0.4em;
  margin-left: 0.3rem;
  color: var(--accent-2);
  vertical-align: middle;
}

/* ---------- Content sections below the scrub ---------- */
.ss-content {
  position: relative;
  z-index: 2;
  background: var(--surface);
}

.ss-section {
  padding: clamp(4rem, 9vw, 7rem) clamp(1.5rem, 6vw, 5rem);
  max-width: 1180px;
  margin: 0 auto;
}

.ss-section-eyebrow {
  font-family: var(--mono-stack);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 0.75rem;
}

.ss-section-title {
  font-family: var(--display-stack);
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

/* Pull quote */
.ss-quote {
  border-left: 3px solid var(--accent);
  padding-left: 1.75rem;
  font-family: var(--display-stack);
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  line-height: 1.3;
  color: var(--ink);
}

.ss-quote cite {
  display: block;
  margin-top: 1.25rem;
  font-family: var(--text-stack);
  font-style: normal;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* CTA closer */
.ss-cta {
  text-align: center;
  padding: clamp(5rem, 10vw, 8rem) clamp(1.5rem, 6vw, 5rem);
  background: radial-gradient(circle at 50% 30%, rgba(218, 90, 40, 0.14), transparent 60%),
    var(--surface-2);
}

.ss-cta-title {
  font-family: var(--display-stack);
  font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 4rem);
  margin-bottom: 1rem;
}

.ss-cta-sub {
  color: var(--ink-dim);
  max-width: 32rem;
  margin: 0 auto 2rem;
}

.ss-cta-btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  border-radius: 4px;
  background: var(--accent-3);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  font-size: 1rem;
  transition: transform 0.15s ease, background 0.15s ease;
}

.ss-cta-btn:hover {
  transform: translateY(-2px);
  background: #c94f22;
}

/* Footer */
.ss-footer {
  border-top: 1px solid rgba(236, 236, 241, 0.08);
  padding: 3rem clamp(1.5rem, 6vw, 5rem) 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
  font-size: 0.85rem;
  color: var(--ink-dim);
}

.ss-footer-col h4 {
  font-family: var(--mono-stack);
  color: var(--ink);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}

.ss-footer-col a {
  display: block;
  color: inherit;
  text-decoration: none;
  margin-bottom: 0.5rem;
}

.ss-footer-col a:hover {
  color: var(--accent-3);
}

.ss-footer-bottom {
  grid-column: 1 / -1;
  margin-top: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(236, 236, 241, 0.06);
  font-family: var(--mono-stack);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  opacity: 0.6;
}
