/* ============================================================
   hero.css — hero carousel full-width (4 vídeos atmosféricos)
   Vai Com Medo Mesmo — Swiss/Bauhaus editorial
   Escopo: APENAS <section id="hero">
   ============================================================ */

/* --- Container: 100vh full-width, sem margens laterais --- */
#hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  background: #0b0b0b;             /* fallback antes do vídeo carregar */
  isolation: isolate;               /* cria novo stacking context p/ z-index dos slides */
}

/* --- Slides (camadas de vídeo empilhadas) --- */
.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 1;
  pointer-events: none;
  background-color: #0b0b0b;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: opacity 0.8s var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1));
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 2;
  pointer-events: auto;
  will-change: opacity;
}

/* Vídeo: cobre toda a área sem distorcer (object-fit: cover) */
.hero-slide video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* Degradê sutil no bottom do hero p/ profundidade + legibilidade */
#hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40%;
  background: linear-gradient(
    to bottom,
    rgba(11, 11, 11, 0) 0%,
    rgba(11, 11, 11, 0.25) 45%,
    rgba(11, 11, 11, 0.7) 100%
  );
  z-index: 3;
  pointer-events: none;
}

/* ============================================================
   Wrapper da headline + faixa (canto inferior-esquerdo)
   Contém: faixa hairline (num + label) + h1 com o texto
   ============================================================ */
.hero-headline-wrap {
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: 96px;                     /* espaço pros controles no canto inf-dir */
  z-index: 5;
  max-width: 1400px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0;
  padding: 0;
}

/* ============================================================
   Headline ("Não é sobre ele. / É sobre você.")
   ============================================================ */
.hero-headline {
  margin: 0;
  padding: 0;
  max-width: 100%;
}

.hero-headline h1 {
  font-family: var(--font-display, 'Oswald', sans-serif);
  font-weight: 600;
  font-size: clamp(72px, 14vw, 220px);
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: #f2f0ec;                   /* papel claro sobre vídeo dark */
  margin: 0;
  padding: 0;
}

.hero-headline h1 .linha {
  display: block;
}

.hero-headline h1 .fogo {
  color: #d97742;                   /* laranja — destaque único */
}

/* ============================================================
   Faixa hairline acima da headline: "01 / 04 — A mecânica"
   ============================================================ */
.hero-faixa {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  /* num + fio + label */
}

.hero-faixa .rot-num {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #f2f0ec;
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
  white-space: nowrap;
  flex: 0 0 auto;
  /* transição do crossfade */
  transition: opacity 0.6s var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1)),
              transform 0.6s var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1));
}

.hero-faixa .fio {
  flex: 1;
  height: 1px;
  background: rgba(242, 240, 236, 0.35);
  min-width: 12px;
}

.hero-faixa .rot-label {
  font-family: var(--font-display, 'Oswald', sans-serif);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #f2f0ec;
  opacity: 0.7;
  white-space: nowrap;
  flex: 0 0 auto;
  transition: opacity 0.6s var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1)),
              transform 0.6s var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1));
}

.hero-faixa.is-swapping .rot-num,
.hero-faixa.is-swapping .rot-label {
  opacity: 0;
  transform: translateY(6px);
}

/* ============================================================
   Controles do carousel (canto inferior-direito)
   ============================================================ */
.hero-controles {
  position: absolute;
  right: 32px;
  bottom: 32px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  font-family: var(--font-display, 'Oswald', sans-serif);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f2f0ec;
}

.hero-controles button {
  /* reset */
  appearance: none;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  line-height: 1;
  transition: opacity 0.2s var(--ease, cubic-bezier(0.65, 0, 0.35, 1));
}

.hero-controles button:hover,
.hero-controles button:focus-visible {
  opacity: 0.65;
}

.hero-controles button:focus-visible {
  outline: 1px solid #f2f0ec;
  outline-offset: 4px;
}

/* Dots */
.hero-dots {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid #f2f0ec;
  background: transparent;
  padding: 0;
  display: inline-block;
  transition: background-color 0.3s var(--ease, cubic-bezier(0.65, 0, 0.35, 1));
}

.hero-dot[aria-current="true"] {
  background: #f2f0ec;
}

/* Setas */
.hero-arrow {
  font-family: var(--font-display, 'Oswald', sans-serif);
  font-size: 16px;
  letter-spacing: 0;
  padding: 4px 6px;
}

/* ============================================================
   Hint "use as setas" — aparece após 6s, some no 1º scroll/click
   ============================================================ */
.hero-hint {
  position: absolute;
  right: 32px;
  top: 80px;
  z-index: 6;
  font-family: var(--font-display, 'Oswald', sans-serif);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #f2f0ec;
  opacity: 0;
  transition: opacity 0.6s var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1));
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.hero-hint.is-visible {
  opacity: 0.55;
}

.hero-hint .key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border: 1px solid rgba(242, 240, 236, 0.55);
  border-radius: 2px;
  font-size: 12px;
  letter-spacing: 0;
}

/* ============================================================
   Responsivo — mobile (≤ 767px)
   ============================================================ */
@media (max-width: 767px) {
  #hero {
    min-height: 560px;
  }

  .hero-headline-wrap {
    left: 20px;
    right: 20px;
    bottom: 88px;
    gap: 14px;
  }

  .hero-controles {
    right: 20px;
    bottom: 20px;
    gap: 12px;
    font-size: 12px;
  }

  .hero-dots {
    gap: 8px;
  }

  .hero-hint {
    right: 20px;
    top: 70px;
    font-size: 10px;
  }
}

/* ============================================================
   Responsivo — desktop (≥ 1024px)
   ============================================================ */
@media (min-width: 1024px) {
  .hero-headline-wrap {
    left: 96px;
    right: 96px;
    bottom: 96px;
  }

  .hero-controles {
    right: 96px;
    bottom: 48px;
  }

  .hero-hint {
    right: 96px;
    top: 96px;
  }
}

/* ============================================================
   Reduced motion — sem autoplay, sem crossfade
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .hero-slide {
    transition: none;
  }

  .hero-slide.is-active {
    will-change: auto;
  }

  .hero-controles,
  .hero-dots,
  .hero-arrow,
  .hero-dot,
  .hero-hint,
  .hero-faixa .rot-num,
  .hero-faixa .rot-label {
    transition: none;
  }
}

/* ============================================================
   Telas muito altas — limita tamanho da headline p/ legibilidade
   ============================================================ */
@media (min-height: 1100px) {
  .hero-headline h1 {
    font-size: clamp(72px, 12vw, 180px);
  }
}
