/* Hero da home com vídeo em autoplay. Comportamento em js/hero-video.js. */
:root {
  --fid-plum: #72005B;
  --fid-pink: #EC005A;
  --fid-lilac: #F5F2FA;
}

.fid-hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: var(--fid-plum);
  color: #fff;
}

/* ---------- mídia (poster + vídeo) ---------- */
.fid-hero__media {
  position: absolute;
  inset: 0;
}
.fid-hero__poster,
.fid-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fid-hero__video {
  opacity: 0;
  transition: opacity 0.4s ease;
}
.fid-hero__video.is-playing {
  opacity: 1;
}
/* degradê de legibilidade (desktop) */
.fid-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(114, 0, 91, 0.85) 0%, rgba(114, 0, 91, 0) 55%);
  pointer-events: none;
}

/* ---------- textos ---------- */
.fid-hero__copy {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}
.fid-hero__content {
  max-width: 480px;
}
.fid-hero h1 {
  color: #fff !important;
  font-size: clamp(36px, 4.2vw, 56px);
  font-weight: 700;
  line-height: 1.12;
  margin: 0 0 14px;
}
.fid-hero__lead {
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  line-height: 1.55;
  margin: 0;
}

/* legendas que acompanham o vídeo */
.fid-hero__captions {
  display: grid;
  margin-top: 26px;
  padding-left: 16px;
  border-left: 3px solid var(--fid-pink);
}
.fid-caption {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0s linear 0.4s;
}
.fid-caption.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.45s ease 0.1s, transform 0.45s ease 0.1s, visibility 0s;
}
.fid-hero .fid-caption h2 {
  color: #fff !important;
  font-size: clamp(20px, 1.9vw, 26px);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 6px;
}
.fid-hero .fid-caption p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
}

.fid-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* ---------- botões ---------- */
.fid-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border: 2px solid transparent;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.fid-btn:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
.fid-btn--primary {
  background: var(--fid-pink);
  border-color: var(--fid-pink);
  color: #fff;
}
.fid-btn--primary:hover {
  background: #c8004c;
  border-color: #c8004c;
  color: #fff;
}
.fid-btn--secondary {
  background: transparent;
  border-color: #fff;
  color: #fff;
}
.fid-btn--secondary:hover {
  background: #fff;
  color: var(--fid-plum);
}

/* ---------- indicador de etapas + pausa ---------- */
.fid-hero__controls {
  position: absolute;
  top: 50%;
  right: 24px;
  z-index: 2;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transform: translateY(-50%);
}
.fid-hero.is-enhanced .fid-hero__controls {
  display: flex;
}
.fid-hero__dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.fid-hero__dot:hover {
  border-color: #fff;
}
.fid-hero__dot.is-active {
  background: var(--fid-pink);
  border-color: var(--fid-pink);
  transform: scale(1.25);
}
.fid-hero__toggle {
  position: relative;
  width: 32px;
  height: 32px;
  margin-top: 6px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  background: rgba(114, 0, 91, 0.35);
  cursor: pointer;
}
.fid-hero__toggle:hover {
  border-color: #fff;
}
/* ícone pausa (duas barras) */
.fid-hero__toggle::before,
.fid-hero__toggle::after {
  content: "";
  position: absolute;
  top: 9px;
  width: 3px;
  height: 10px;
  background: #fff;
}
.fid-hero__toggle::before { left: 10px; }
.fid-hero__toggle::after { left: 15px; }
/* ícone play (triângulo) */
.fid-hero__toggle.is-paused::before {
  top: 8px;
  left: 11px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent #fff;
  background: none;
}
.fid-hero__toggle.is-paused::after {
  display: none;
}
.fid-hero__dot:focus-visible,
.fid-hero__toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* ---------- mobile: vídeo inteiro no topo, texto embaixo ---------- */
@media (max-width: 767.98px) {
  .fid-hero {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
  }
  .fid-hero__media {
    position: relative;
    flex: none;
    width: 100%;
    aspect-ratio: 16 / 9;
  }
  .fid-hero__media::after {
    display: none;
  }
  .fid-hero__copy {
    position: relative;
    padding: 28px 0 36px;
  }
  .fid-hero__copy .container {
    padding-right: 48px; /* espaço para os controles */
  }
  .fid-hero__lead {
    font-size: 16px;
  }
  .fid-hero__actions .fid-btn {
    flex: 1 1 auto;
  }
  .fid-hero__controls {
    top: calc(56.25vw + 32px);
    right: 14px;
    transform: none;
  }
}

/* ---------- movimento reduzido: sem autoplay, último quadro + todas as legendas ---------- */
@media (prefers-reduced-motion: reduce) {
  .fid-hero {
    height: auto;
    min-height: 100vh;
  }
  .fid-hero__copy {
    position: relative;
    min-height: 100vh;
    padding: 72px 0;
  }
  .fid-hero__captions {
    gap: 20px;
  }
  .fid-caption,
  .fid-caption.is-active {
    grid-area: auto;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
  }
  .fid-hero__controls,
  .fid-hero__video {
    display: none !important;
  }
}
@media (prefers-reduced-motion: reduce) and (max-width: 767.98px) {
  .fid-hero,
  .fid-hero__copy {
    min-height: 0;
  }
  .fid-hero__copy {
    padding: 28px 0 40px;
  }
  .fid-hero__copy .container {
    padding-right: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
  }
}

/* Correção pontual fora do hero: o .has-shapes solto em index.html (fora da sua
   <section>) posiciona SVGs além da borda direita e gerava rolagem horizontal
   no mobile (página com 474px em tela de 375px). Recortar não muda o visual. */
body > .has-shapes {
  overflow: hidden;
}
