/* =============================================================
   BASE — reset, tokens de design, tipografia e componentes
   compartilhados. Reutilizável pelas próximas páginas do site.
   ============================================================= */

/* ---------------------------------------------- tokens */
:root {
  /* Marca — amostrada do logo oficial */
  --ouro:            #D9A441;
  --ouro-claro:      #F0C674;
  --ouro-escuro:     #B8842B;

  --navy-950:        #061220;
  --navy-900:        #0B1E33;
  --navy-800:        #12293F;
  --navy-700:        #1B3A56;
  --navy-600:        #27506F;

  /* Neutros */
  --branco:          #FFFFFF;
  --osso:            #F7F6F3;
  --osso-fundo:      #EFEDE8;
  --borda:           #E2DFD8;
  --tinta:           #0F2438;
  --tinta-suave:     #46586B;

  /* Texto sobre fundo escuro */
  --claro:           #F4F6F8;
  --claro-suave:     #A9BACB;

  --foco:            #F0C674;

  /* Tipografia */
  --fonte-titulo:    'Archivo', 'Segoe UI', system-ui, sans-serif;
  --fonte-texto:     'Inter', 'Segoe UI', system-ui, sans-serif;

  --t-xs:    0.75rem;
  --t-sm:    0.875rem;
  --t-base:  1rem;
  --t-md:    clamp(1.0625rem, 0.4vw + 0.95rem, 1.1875rem);
  --t-lg:    clamp(1.25rem, 0.6vw + 1.1rem, 1.5rem);
  --t-xl:    clamp(1.75rem, 1.6vw + 1.3rem, 2.5rem);
  --t-2xl:   clamp(2.125rem, 2.6vw + 1.4rem, 3.25rem);
  --t-3xl:   clamp(2.75rem, 4.4vw + 1.4rem, 5rem);

  /* Espaçamento */
  --e-1: 0.25rem;
  --e-2: 0.5rem;
  --e-3: 0.75rem;
  --e-4: 1rem;
  --e-5: 1.5rem;
  --e-6: 2rem;
  --e-7: 3rem;
  --e-8: 4rem;
  --e-9: clamp(4rem, 7vw, 7rem);

  --largura-container: 78rem;
  --raio:    0.75rem;
  --raio-sm: 0.5rem;
  --raio-pill: 999px;

  --sombra-sm: 0 1px 2px rgb(11 30 51 / 0.06), 0 2px 8px rgb(11 30 51 / 0.05);
  --sombra-md: 0 4px 12px rgb(11 30 51 / 0.08), 0 12px 32px rgb(11 30 51 / 0.08);
  --sombra-lg: 0 18px 50px rgb(6 18 32 / 0.35);

  --transicao: 200ms cubic-bezier(0.4, 0, 0.2, 1);

  --altura-cabecalho: 5rem;
}

/* ---------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--altura-cabecalho) + 1rem);
}

body {
  font-family: var(--fonte-texto);
  font-size: var(--t-base);
  line-height: 1.6;
  color: var(--tinta);
  background: var(--branco);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; }

input, button, textarea, select { font: inherit; color: inherit; }

button { cursor: pointer; background: none; border: none; }

ul, ol { list-style: none; padding: 0; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--fonte-titulo);
  font-weight: 700;
  line-height: 1.1;
  text-wrap: balance;
}

p { text-wrap: pretty; }

:target { scroll-margin-top: calc(var(--altura-cabecalho) + 1rem); }

/* ---------------------------------------------- acessibilidade */
:focus-visible {
  outline: 3px solid var(--foco);
  outline-offset: 3px;
  border-radius: var(--raio-sm);
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 200;
  transform: translate(-50%, -150%);
  padding: var(--e-3) var(--e-5);
  background: var(--ouro);
  color: var(--navy-900);
  font-weight: 600;
  border-radius: 0 0 var(--raio) var(--raio);
  transition: transform var(--transicao);
}
.skip-link:focus { transform: translate(-50%, 0); }

.sr-apenas {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.sprite { display: none; }

/* ---------------------------------------------- layout */
.container {
  width: 100%;
  max-width: var(--largura-container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

.secao { padding-block: var(--e-9); }

/* ---------------------------------------------- tipografia utilitária */
.sobretitulo {
  font-family: var(--fonte-titulo);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tinta-suave);
  margin-bottom: var(--e-4);
}
.sobretitulo--claro { color: var(--ouro); }

.titulo-secao {
  font-size: var(--t-2xl);
  letter-spacing: -0.02em;
  color: var(--navy-900);
}

.texto-apoio {
  font-size: var(--t-base);
  color: var(--tinta-suave);
  max-width: 34ch;
}

.texto-ouro { color: var(--ouro); }

/* Título em linhas empilhadas com muito espaçamento entre letras */
.titulo-empilhado {
  display: grid;
  gap: 0.15em;
  font-size: var(--t-xl);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--branco);
}

/* ---------------------------------------------- ícones */
.icone {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
}

/* ---------------------------------------------- botões */
.botao {
  display: inline-flex;
  align-items: center;
  gap: var(--e-3);
  padding: 0.875rem 1.5rem;
  font-family: var(--fonte-titulo);
  font-size: var(--t-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--raio-pill);
  border: 1.5px solid transparent;
  transition: background-color var(--transicao), border-color var(--transicao),
              color var(--transicao), transform var(--transicao),
              box-shadow var(--transicao);
}

.botao .icone { transition: transform var(--transicao); }
.botao:hover .icone { transform: translateX(3px); }

.botao--ouro {
  background: var(--ouro);
  color: var(--navy-900);
  box-shadow: 0 6px 18px rgb(217 164 65 / 0.28);
}
.botao--ouro:hover {
  background: var(--ouro-claro);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgb(217 164 65 / 0.34);
}
.botao--ouro:active { transform: translateY(0); }

.botao--contorno {
  border-color: var(--ouro);
  color: var(--ouro);
}
.botao--contorno:hover {
  background: var(--ouro);
  color: var(--navy-900);
}

.botao--cheio {
  width: 100%;
  justify-content: center;
}

.botao--grande {
  padding: 1.05rem 1.9rem;
  font-size: var(--t-base);
}

/* ---------------------------------------------- links */
.link-sublinhado {
  display: inline-flex;
  align-items: center;
  gap: var(--e-2);
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--claro);
  padding-bottom: 2px;
  border-bottom: 1px solid currentColor;
  transition: color var(--transicao), gap var(--transicao);
}
.link-sublinhado:hover { color: var(--ouro); gap: var(--e-3); }
.link-sublinhado--escuro { color: var(--navy-900); }
.link-sublinhado--escuro:hover { color: var(--ouro-escuro); }

.link-simples {
  color: var(--ouro-escuro);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.link-simples:hover { color: var(--ouro); }

/* ---------------------------------------------- selos com ícone */
.selo {
  display: flex;
  align-items: center;
  gap: var(--e-3);
  font-size: var(--t-sm);
  line-height: 1.3;
  color: var(--claro-suave);
}

.selo__icone {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  flex: none;
  border-radius: 50%;
  border: 1px solid rgb(217 164 65 / 0.45);
  color: var(--ouro);
}

.selo-breve {
  display: inline-block;
  margin-left: var(--e-1);
  padding: 0.1rem 0.4rem;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--raio-pill);
  background: rgb(217 164 65 / 0.16);
  color: var(--ouro);
}

/* ---------------------------------------------- revelação ao rolar */
/* O estado escondido só existe quando js/deteccao.js confirma que há
   JavaScript. Sem JS, o conteúdo nasce visível em vez de sumir. */
.js-ativo [data-revelar] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}
.js-ativo [data-revelar].visivel { opacity: 1; transform: none; }

/* Trava a rolagem do fundo enquanto o menu lateral está aberto */
.corpo-travado { overflow: hidden; }

/* ------------------------------------- entrada do hero (sem esperar scroll) */
/* Texto que sobe de dentro de uma máscara — o recorte é o que dá a
   sensação de peso, em vez do fade genérico. */
.mascara {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}

.js-ativo .mascara__texto {
  display: block;
  transform: translateY(105%);
  animation: subir 900ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.js-ativo .linha-anim {
  opacity: 0;
  animation: surgir 800ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes subir  { to { transform: translateY(0); } }
@keyframes surgir { from { opacity: 0; transform: translateY(14px); }
                    to   { opacity: 1; transform: none; } }

/* Escalonamento por atributo: mantém a CSP intacta (nada de style inline) */
[data-anim="1"] { animation-delay:  60ms; }
[data-anim="2"] { animation-delay: 140ms; }
[data-anim="3"] { animation-delay: 230ms; }
[data-anim="4"] { animation-delay: 320ms; }
[data-anim="5"] { animation-delay: 470ms; }
[data-anim="6"] { animation-delay: 580ms; }
[data-anim="7"] { animation-delay: 680ms; }

/* ------------------------------------------- barra de progresso da leitura */
.progresso {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 110;
  height: 3px;
  pointer-events: none;
}

.progresso__barra {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--ouro-escuro), var(--ouro-claro));
}

/* Animação ligada ao scroll, em CSS puro: sem listener, sem custo de INP.
   Onde não houver suporte, a barra simplesmente não aparece. */
@supports (animation-timeline: scroll()) {
  .progresso__barra {
    animation: crescer linear;
    animation-timeline: scroll(root block);
  }
  @keyframes crescer { to { transform: scaleX(1); } }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js-ativo [data-revelar],
  .js-ativo .linha-anim { opacity: 1; transform: none; }
  .js-ativo .mascara__texto { transform: none; }
  .progresso { display: none; }
}
