/*
 * Hero con vídeo controlado por scroll.
 * Adapta a la marca cambiando solo las variables --hero-*; si el proyecto ya tiene
 * tokens (colores, tipografía), apunta estas variables a ellos.
 */
.hero-scroll {
  --hero-bg: #0b0b0c;
  --hero-fg: #f4f2ee;
  --hero-muted: #b9b5ad;
  --hero-accent: #e8ff3a;
  --hero-accent-fg: #0b0b0c;
  --hero-font: "Arial Narrow", "Helvetica Neue", Arial, system-ui, sans-serif;
  --hero-gutter: clamp(16px, 5vw, 64px);
  --hero-bottom: clamp(32px, 9vh, 96px);
  --hero-intro-lift: 72px;          /* el bloque intro queda más alto que el outro (1,5 × CTA) */
  --hero-length: 320vh;             /* longitud del scrub: más alto = vídeo más lento */
  --hero-poster: none;              /* url() del primer frame, se ve antes de que pinte el canvas */
  --hero-poster-end: none;          /* url() del último frame, para movimiento reducido */

  position: relative; height: var(--hero-length);
  background: var(--hero-bg); color: var(--hero-fg); font-family: var(--hero-font);
}
.hero-scroll *, .hero-scroll *::before, .hero-scroll *::after { box-sizing: border-box; }

.hero-sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.hero-media  { position: absolute; inset: 0; width: 100%; height: 100%; display: block;
               background: var(--hero-bg) var(--hero-poster) center / cover no-repeat; }

/* Velo para contraste del texto: más denso abajo-izquierda */
.hero-sticky::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, rgb(0 0 0 / .65), transparent 55%),
    linear-gradient(to right, rgb(0 0 0 / .35), transparent 60%);
}

.hero-copy {
  position: absolute; z-index: 1; left: var(--hero-gutter); right: var(--hero-gutter);
  bottom: var(--hero-bottom); max-width: 34rem;
  transition: opacity .35s ease, transform .35s ease;
}
.hero-copy[data-step="intro"] { bottom: calc(var(--hero-bottom) + var(--hero-intro-lift)); }
.hero-copy[data-hidden] { opacity: 0; transform: translateY(12px); }

.hero-copy .eyebrow { margin: 0 0 .75rem; font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--hero-accent); }
.hero-copy h1, .hero-copy .h1 {
  margin: 0; font-size: clamp(2.6rem, 8vw, 5.5rem); line-height: .92;
  font-weight: 800; text-transform: uppercase; letter-spacing: -.01em; font-stretch: condensed;
}
.hero-copy .lead { margin: 1rem 0 1.5rem; font-size: clamp(1rem, 2.2vw, 1.2rem); line-height: 1.45; color: var(--hero-muted); max-width: 28rem; }

.hero-copy .btn {
  display: inline-flex; align-items: center; gap: .6em; min-height: 48px; padding: 0 1.4rem;
  background: var(--hero-accent); color: var(--hero-accent-fg); font-weight: 700; text-decoration: none;
  text-transform: uppercase; letter-spacing: .06em; font-size: .9rem; border-radius: 2px;
  transition: transform .2s ease;
}
.hero-copy .btn:hover { transform: translateY(-2px); }
.hero-copy .btn:focus-visible { outline: 3px solid var(--hero-fg); outline-offset: 3px; }

/* Barra de progreso */
.hero-scroll .progress { position: absolute; z-index: 1; left: 0; bottom: 0; height: 3px; width: 100%;
                         background: var(--hero-accent); transform-origin: left; transform: scaleX(var(--p, 0)); }

/* Indicador de rueda de ratón que rebota */
.scroll-hint { position: absolute; z-index: 1; left: 50%; bottom: 28px; margin-left: -12px;
               transition: opacity .3s ease; }
.scroll-hint[data-hidden] { opacity: 0; }
.scroll-hint .mouse { display: flex; justify-content: center; width: 24px; height: 40px;
                      border: 2px solid var(--hero-fg); border-radius: 12px;
                      animation: hero-hint-bounce 1s infinite; }
.scroll-hint .wheel { width: 4px; height: 12px; margin-top: 8px; border-radius: 2px; background: var(--hero-fg); }
@keyframes hero-hint-bounce {
  0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(.8, 0, 1, 1); }
  50%      { transform: none;             animation-timing-function: cubic-bezier(0, 0, .2, 1); }
}

@media (hover: none) { .scroll-hint { display: none; } }   /* táctil: no hay rueda de ratón */

@media (max-width: 640px) {
  .scroll-hint { display: none; }
  .hero-sticky::after { background: linear-gradient(to top, rgb(0 0 0 / .75), transparent 65%); }
}

/* Movimiento reducido: sin scrub, frame final estático y contenido visible */
@media (prefers-reduced-motion: reduce) {
  .hero-scroll { height: auto; }
  .hero-sticky { position: relative; }
  .hero-media { background-image: var(--hero-poster-end); }
  .hero-copy, .hero-copy .btn { transition: none; }
  .hero-scroll .progress, .scroll-hint { display: none; }
}
