/* ==========================================================================
   Avantar Franquias — Base + Hero
   A hero preserva a identidade original; apenas a largura de leitura
   foi ampliada. As demais seções vivem em css/sections.css.
   ========================================================================== */

:root {
  /* ---------- Paleta oficial Avantar ---------- */
  --avantar-purple: #5B11D6;
  --avantar-purple-dark: #22004D;
  --avantar-purple-deep: #12002E;
  --avantar-purple-glow: #3D1680;
  --avantar-lilac: #C9B2FF;
  --avantar-orange: #F28907;

  --avantar-white: #FFFFFF;
  --avantar-gray-light: #F4F4F7;
  --avantar-gray-medium: #D9D9E0;

  --avantar-text: #1E1B26;
  --avantar-text-soft: rgba(30, 27, 38, 0.72);
  --avantar-text-muted: rgba(30, 27, 38, 0.52);

  --avantar-border: rgba(34, 0, 77, 0.12);
  --avantar-border-strong: rgba(91, 17, 214, 0.22);

  --avantar-purple-soft: #F1EBFF;
  --avantar-purple-soft-2: #E8DBFF;
  --avantar-surface: #FBFAFD;

  --avantar-success-soft: #F1FCEB;
  --avantar-success: #59A84A;

  --shadow-sm: 0 8px 24px rgba(18, 0, 46, 0.06);
  --shadow-md: 0 18px 48px rgba(18, 0, 46, 0.10);
  --shadow-lg: 0 28px 80px rgba(18, 0, 46, 0.15);

  /* ---------- Cores herdadas da hero (não alterar) ---------- */
  --purple-700: #5b21b6;
  --purple-600: #6d28d9;
  --purple-500: #7c3aed;
  --purple-400: #8b5cf6;
  --purple-100: #ede9fe;

  --ink-900: #0d0a1a;
  --ink-800: #171226;
  --ink-600: #4b4560;
  --ink-400: #8b86a0;

  --white: #ffffff;
  --surface: #faf9fc;

  /* ---------- Tipografia ---------- */
  --font-display: "Sora", system-ui, sans-serif; /* hero */
  --font-body: "Inter", system-ui, sans-serif;   /* hero */
  --font-heading: "Montserrat", sans-serif;      /* seções */
  --font-text: "Montserrat", sans-serif;         /* seções */

  /* ---------- Ritmo ---------- */
  --shadow-cta: 0 10px 32px rgba(124, 58, 237, 0.45);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--ink-800);
  background: var(--surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

/* Conteúdo presente só para leitores de tela (ex.: fonte do alt de uma imagem) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Foco visível para navegação por teclado */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--avantar-purple);
  outline-offset: 2px;
}

/* ---------- Utilitários (hero) ---------- */
.glass {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* Animações de entrada da hero (IntersectionObserver) */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0s),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0s);
  will-change: opacity, transform;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Botões da hero ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.95rem 1.9rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.25s ease;
}

.btn:hover svg {
  transform: translateX(4px);
}

.btn--primary {
  background: linear-gradient(135deg, var(--purple-500), var(--purple-600));
  color: var(--white);
  box-shadow: var(--shadow-cta);
}

.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(124, 58, 237, 0.55);
}

.btn--primary:active {
  transform: translateY(-1px);
}

.btn--secondary {
  color: var(--white);
}

.btn--secondary:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.16);
}

.btn--ghost {
  color: var(--white);
  padding: 0.65rem 1.4rem;
  font-size: 0.9rem;
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  color: var(--white);
  background: var(--ink-900);
}

/* Fundo pinado no viewport: a página rola por cima dele ("cortina")
   enquanto o vídeo continua animando. */
.hero__bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  will-change: transform;
}

.hero__bg.is-offscreen {
  visibility: hidden;
}

.hero__bg-poster,
.hero__bg-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.12);
  background: radial-gradient(120% 90% at 50% 10%, #2a1e52 0%, var(--ink-900) 70%);
}

.hero__bg-poster {
  z-index: 0;
}

.hero__bg-media {
  /* Mesma camada (0) do poster, não maior: a ordem no DOM (poster antes
     do vídeo) já garante que o vídeo pinte por cima do poster quando
     pronto — z-index positivo aqui fazia o vídeo pintar acima do
     .hero__overlay (z-index:auto) também, sumindo com o meio-tom. */
  z-index: 0;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  /* Meio-tom (45%) aprofundado de .32 para .44: é onde o título mais
     frequentemente cai depois que logo+lead+CTA+selos são centralizados
     como grupo, e não pode depender do quadro do vídeo por trás dele. */
  background:
    linear-gradient(180deg, rgba(13, 10, 26, 0.54) 0%, rgba(13, 10, 26, 0.44) 45%, rgba(13, 10, 26, 0.8) 100%),
    radial-gradient(90% 60% at 50% 45%, rgba(91, 33, 182, 0.22), transparent 70%);
}

.hero__glow {
  position: absolute;
  z-index: -1;
  width: 720px;
  height: 720px;
  top: -280px;
  left: 50%;
  translate: -50% 0;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.35), transparent 65%);
  filter: blur(40px);
  pointer-events: none;
}

/* Conteúdo central — largura de leitura ampliada */
.hero__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: min(1360px, 100%);
  margin-inline: auto;
  padding: 2.75rem clamp(16px, 2.2vw, 44px) 3rem;
  gap: 1.75rem;
}

.hero__logo {
  display: block;
  width: auto;
  height: auto;
  max-width: 260px;
  max-height: 82px;
  margin: 0 auto 0.4rem;
  object-fit: contain;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.25));
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.1rem, 5.2vw, 3.9rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
  max-width: 1220px;
  margin-inline: auto;
}

.hero__mark {
  display: inline-block;
  background: linear-gradient(135deg, var(--purple-500), var(--purple-600));
  color: var(--white);
  padding: 0.05em 0.28em;
  border-radius: 0.28em;
  box-shadow: 0 8px 28px rgba(124, 58, 237, 0.4);
}

.hero__lead {
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  max-width: 780px;
  margin-inline: auto;
}

.hero__lead .hero__lead-accent {
  color: var(--avantar-orange);
  font-weight: 800 !important;
}

.hero__actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.4rem;
}

/* ==========================================================================
   Selos e reconhecimentos — carrossel contínuo na Hero
   ========================================================================== */
.hero__seals {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.hero__seals-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  max-width: 560px;
}

.hero__seals-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
}

.hero__seals-label p {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
}

.hero__seals-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--avantar-orange);
  box-shadow: 0 0 8px rgba(242, 137, 7, 0.7);
}

.seals-marquee-shell {
  position: relative;
  width: min(100%, 1380px);
  margin: 0 auto;
  overflow: hidden;
  padding: 12px 0;
  border: 1px solid rgba(210, 184, 255, 0.18);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075) 0%, rgba(255, 255, 255, 0.025) 100%),
    rgba(18, 0, 46, 0.54);
  box-shadow:
    0 16px 44px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.seals-marquee-shell::before,
.seals-marquee-shell::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 84px;
  z-index: 3;
  pointer-events: none;
}

.seals-marquee-shell::before {
  left: 0;
  background: linear-gradient(90deg, rgba(18, 0, 46, 0.96) 0%, rgba(18, 0, 46, 0) 100%);
}

.seals-marquee-shell::after {
  right: 0;
  background: linear-gradient(270deg, rgba(18, 0, 46, 0.96) 0%, rgba(18, 0, 46, 0) 100%);
}

.seals-marquee-track {
  display: flex;
  width: max-content;
  animation: seals-marquee 44s linear infinite;
  will-change: transform;
}

.seals-marquee-shell:hover .seals-marquee-track,
.seals-marquee-shell:focus-within .seals-marquee-track {
  animation-play-state: paused;
}

.seals-marquee-group {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 14px;
}

@keyframes seals-marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.seal-item {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 168px;
  height: 132px;
  padding: 8px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  background: rgba(255, 255, 255, 0.028);
  transition:
    transform 0.28s ease,
    background 0.28s ease,
    border-color 0.28s ease;
}

.seal-item img {
  display: block;
  width: auto;
  max-width: 122px;
  max-height: 60px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.18));
}

.seal-item__title {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.05em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.seal-item__description {
  display: block;
  margin-top: 2px;
  max-width: 136px;
  color: rgba(255, 255, 255, 0.56);
  font-family: var(--font-heading);
  font-size: 9px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-align: center;
  white-space: normal;
}

.seal-item:hover {
  transform: translateY(-2px);
  border-color: rgba(242, 137, 7, 0.28);
  background: rgba(242, 137, 7, 0.055);
}

@media (prefers-reduced-motion: reduce) {
  .seals-marquee-track {
    animation: none;
    transform: none;
  }

  .seals-marquee-shell {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .seals-marquee-shell::-webkit-scrollbar {
    display: none;
  }
}


/* ---------- Responsividade da hero ---------- */
@media (max-width: 640px) {
  .nav {
    padding: 0.7rem 1rem;
  }

  .nav__tagline {
    display: none;
  }

  .nav__cta {
    font-size: 0.8rem;
    padding: 0.55rem 1rem;
  }

  .hero__content {
    padding: 2.25rem clamp(16px, 4vw, 24px) 3rem;
    gap: 1.3rem;
  }

  .hero__logo {
    max-width: 200px;
    max-height: 64px;
  }

  .hero__actions {
    width: 100%;
    flex-direction: column;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .badge {
    font-size: 0.75rem;
    text-align: center;
  }
}

/* ---------- Selos e reconhecimentos · tablet ---------- */
@media (max-width: 1024px) and (min-width: 768px) {
  .seal-item {
    min-width: 150px;
    height: 118px;
    padding: 7px 12px;
  }

  .seal-item img {
    max-width: 108px;
    max-height: 54px;
  }

  .seal-item__title {
    margin-top: 3px;
    font-size: 9.5px;
  }

  .seal-item__description {
    margin-top: 2px;
    max-width: 118px;
    font-size: 8.5px;
  }
}

/* ---------- Selos e reconhecimentos · mobile ---------- */
@media (max-width: 767px) {
  .hero__seals-label {
    max-width: 100%;
    padding-inline: 12px;
  }

  .seals-marquee-shell {
    width: calc(100% + 8px);
    margin-left: -4px;
    padding: 9px 0;
    border-radius: 16px;
  }

  .seal-item {
    min-width: 132px;
    height: 106px;
    padding: 6px 10px;
    border-radius: 12px;
  }

  .seal-item img {
    max-width: 94px;
    max-height: 46px;
  }

  .seal-item__title {
    margin-top: 3px;
    font-size: 9px;
  }

  .seal-item__description {
    margin-top: 2px;
    max-width: 108px;
    font-size: 8px;
    line-height: 1.25;
  }

  .seals-marquee-group {
    gap: 10px;
    padding-right: 10px;
  }

  .seals-marquee-shell::before,
  .seals-marquee-shell::after {
    width: 42px;
  }
}

/* ---------- Acessibilidade · movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero__bg {
    transform: none !important;
  }
}