/* ==========================================================================
   BASE — reset, tokens de design, tipografia e componentes reutilizáveis
   ========================================================================== */

/* --------------------------------------------------------------------------
   TOKENS — mude uma cor aqui e ela muda na página inteira
   -------------------------------------------------------------------------- */
:root {
  /* Marca */
  --accent:            #FEBC01;
  --accent-soft:       rgba(254, 188, 1, 0.12);
  --accent-glow:       rgba(254, 188, 1, 0.28);

  /* Fundos escuros */
  --dark:              #0A0A0A;
  --dark-card:         #141416;
  --dark-card-hover:   #1A1A1D;
  --dark-gradient:     linear-gradient(150deg, #16161A, #0A0A0A);

  /* Fundos claros */
  --white:             #FFFFFF;
  --gray-50:           #F9F9FB;
  --gray-100:          #F4F4F5;
  --gray-150:          #EFEFF1;
  --gray-200:          #E4E4E7;

  /* Texto sobre fundo claro */
  --ink:               #0F0F11;
  --ink-600:           #3F3F46;
  --ink-500:           #52525B;
  --ink-400:           #71717A;
  --ink-300:           #A1A1AA;
  --ink-200:           #D4D4D8;

  /* Texto sobre fundo escuro.
     Os cinzas acima foram calibrados para fundo branco. Sobre #0A0A0A eles
     caem abaixo de 4.5:1 (WCAG AA) — #71717A dá 4.1, #52525B dá 2.6.
     Estes são os equivalentes que passam no escuro. */
  --on-dark-muted:     #9A9AA3;   /* ~6.0:1 sobre #0A0A0A */
  --on-dark-faint:     #86868F;   /* ~4.8:1 — para texto legal e secundário */

  /* Véus sobre fundo escuro */
  --on-dark-1:         rgba(255, 255, 255, 0.05);
  --on-dark-2:         rgba(255, 255, 255, 0.07);
  --on-dark-3:         rgba(255, 255, 255, 0.14);
  --on-dark-line:      rgba(255, 255, 255, 0.08);
  --on-dark-text:      rgba(255, 255, 255, 0.72);

  /* Sombras */
  --shadow-card:       0 1px 2px rgba(15, 15, 17, 0.04), 0 12px 32px rgba(15, 15, 17, 0.04);
  --shadow-card-hover: 0 20px 46px rgba(15, 15, 17, 0.10);
  --shadow-panel:      0 1px 2px rgba(15, 15, 17, 0.04), 0 24px 60px rgba(15, 15, 17, 0.07);
  --shadow-modal:      0 30px 80px rgba(0, 0, 0, 0.40);

  /* Formas */
  --radius-pill:       9999px;
  --radius-card:       22px;
  --radius-panel:      28px;
  --radius-media:      16px;

  /* Ritmo vertical das seções */
  --section-y:         130px;
  --gutter:            32px;

  --font:              'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:         'Courier New', Courier, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--dark);
  color: var(--white);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

button { font-family: inherit; }

h1, h2, h3, h4, h5, p { margin: 0; }

ul { margin: 0; padding: 0; list-style: none; }

hr.rule {
  height: 1px;
  border: 0;
  background: var(--on-dark-line);
  margin: 0 0 44px;
}

::-webkit-scrollbar { height: 6px; width: 6px; }
::-webkit-scrollbar-thumb {
  background: rgba(254, 188, 1, 0.35);
  border-radius: 3px;
}

/* --------------------------------------------------------------------------
   FOCO VISÍVEL
   :focus-visible aparece só na navegação por teclado — o clique de mouse não
   dispara o anel. Sem isto, quem usa Tab não enxerga onde está.
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
/* Sobre fundo claro o amarelo some; usa o traço escuro */
.section--gray :focus-visible,
.section--offwhite :focus-visible,
.modal__box :focus-visible,
.raiox__body :focus-visible {
  outline-color: var(--ink);
}

/* Link de atalho: invisível até receber foco pelo teclado */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 500;
  background: var(--accent);
  color: var(--ink);
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 16px;
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   LAYOUT
   -------------------------------------------------------------------------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
}
.container--wide { max-width: 1240px; }
.container--full { max-width: 1400px; }

.section {
  padding: var(--section-y) var(--gutter);
}
.section--flush-top { padding-top: 20px; }

.section--dark     { background: var(--dark);     color: var(--white); }
.section--gray     { background: var(--gray-100); color: var(--ink); }
.section--offwhite { background: var(--gray-50);  color: var(--ink); }

/* --------------------------------------------------------------------------
   BOTÕES
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-pill);
  padding: 15px 28px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  text-align: center;
  transition: transform 0.25s, background 0.25s, color 0.25s, box-shadow 0.25s;
}

.btn--sm { padding: 12px 22px; font-size: 13px; }
.btn--lg { padding: 17px 34px; font-size: 15px; }
.btn--block { width: 100%; padding: 16px; font-size: 15px; }

.btn--accent { background: var(--accent); color: var(--ink); }
.btn--accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px var(--accent-glow);
  color: var(--ink);
}

.btn--dark { background: var(--ink); color: var(--white); }
.btn--dark:hover { transform: translateY(-2px); color: var(--white); }

.btn--white { background: var(--white); color: var(--ink); align-self: flex-start; }
.btn--white:hover { transform: translateY(-2px); color: var(--ink); }

/* Botão claro sobre fundo claro */
.btn--soft { background: var(--gray-100); color: var(--ink); font-weight: 500; }
.btn--soft:hover { background: var(--ink); color: var(--white); }

/* Botão translúcido sobre fundo escuro */
.btn--ghost-dark {
  background: var(--on-dark-2);
  color: var(--white);
  font-weight: 500;
}
.btn--ghost-dark:hover { background: var(--on-dark-3); color: var(--white); }

/* Botão só-texto (ex.: "← voltar" do quiz) */
.link-btn {
  background: none;
  border: none;
  padding: 0;
  margin-top: 20px;
  color: var(--ink-300);
  font-size: 13px;
  cursor: pointer;
}
.link-btn:hover { color: var(--ink); }

/* Botão circular das setas do carrossel de experts */
.round-btn {
  width: 46px;
  height: 46px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--on-dark-2);
  color: var(--white);
  font-size: 15px;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}
.round-btn:hover { background: var(--accent); color: var(--ink); }

/* --------------------------------------------------------------------------
   ELEMENTOS RECORRENTES
   -------------------------------------------------------------------------- */

/* Rótulo pequeno com ícone que abre cada seção */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6B6B74;  /* 4.4:1 com --ink-400 nao passava sobre #F4F4F5 */
}
.eyebrow--block { margin-bottom: 64px; }
/* Sobre fundo escuro o cinza padrão nao alcanca 4.5:1 */
.section--dark .eyebrow,
.experts .eyebrow,
.footer .eyebrow { color: var(--on-dark-muted); }
.eyebrow--accent { color: var(--accent); margin-bottom: 16px; }

/* Cabeçalho de seção em duas colunas: rótulo + título */
.section-head {
  display: grid;
  grid-template-columns: minmax(160px, 0.32fr) minmax(280px, 1fr);
  gap: 40px;
  align-items: start;
  margin-bottom: 64px;
}
.section-head .eyebrow { padding-top: 12px; }
.section-head__title {
  font-size: clamp(26px, 3.4vw, 42px);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -0.03em;
  max-width: 820px;
}

/* Etiqueta arredondada (hero) */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-pill);
  padding: 8px 17px;
  margin-bottom: 34px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

/* Chips (credenciais do fundador, badges do rodapé) */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-pill);
  padding: 9px 16px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-200);
}
.chips--muted { gap: 10px; }
.chips--muted .chip {
  background: var(--on-dark-1);
  padding: 9px 17px;
  font-size: 12px;
  color: var(--ink-300);
}

/* --------------------------------------------------------------------------
   PLACEHOLDERS DE IMAGEM
   Hachura que ocupa o lugar das fotos ainda não entregues.
   Para usar a foto real: troque o elemento por <img> e remova a classe.
   -------------------------------------------------------------------------- */
.ph--hatch-light,
.ph--hatch-dark {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
}

.ph--hatch-light {
  background: repeating-linear-gradient(135deg,
    #E7E7EA 0px, #E7E7EA 9px,
    #F1F1F3 9px, #F1F1F3 18px);
}

.ph--hatch-dark {
  background: repeating-linear-gradient(135deg,
    rgba(255, 255, 255, 0.05) 0px, rgba(255, 255, 255, 0.05) 9px,
    rgba(255, 255, 255, 0.02) 9px, rgba(255, 255, 255, 0.02) 18px);
}

.ph__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: #8A8A93;
  white-space: pre-line; /* respeita o \n usado nos textos de data.js */
}
.ph--hatch-dark .ph__label { color: var(--ink-400); }

/* Slot já preenchido com a foto real (js/main.js troca a hachura por <img>).
   O !important existe porque as regras por seção em styles.css (ex.: o
   padding de .expert__media) vêm depois e reintroduziriam a moldura. */
.has-photo {
  padding: 0 !important;
  background: var(--gray-150);
  overflow: hidden;
}
.has-photo > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center; /* mantém o rosto enquadrado nos retratos */
}
/* Sobre fundo escuro o vão da imagem não pode piscar cinza-claro */
.expert__media.has-photo,
.about__portrait.has-photo { background: var(--dark-card); }

/* Selos são logotipos, não fotos: precisam aparecer inteiros e flutuar
   sobre o fundo da seção, sem cartão nem recorte. */
.seal__media.has-photo {
  background: transparent;
  border-radius: 0;
}
.seal__media.has-photo > img {
  object-fit: contain;
  object-position: center;
}

/* --------------------------------------------------------------------------
   FORMULÁRIOS
   -------------------------------------------------------------------------- */
.lead-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 420px;
}

.field {
  background: var(--gray-100);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  padding: 15px 22px;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.field::placeholder { color: var(--ink-400); }
.field:focus {
  background: var(--white);
  border-color: var(--accent);
}
/* Só marca erro depois que o usuário tentou enviar */
.lead-form.was-validated .field:invalid { border-color: #DC2626; }

.consent {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 6px;
  cursor: pointer;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-400);
}
.consent input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.consent a { color: var(--ink); text-decoration: underline; }

/* Armadilha anti-robô: precisa existir no DOM e ser preenchível por script,
   então não pode usar display:none — robô esperto ignora campo escondido
   assim. Fica fora da tela e fora do leitor de tela. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Mensagem de falha no envio */
.form-erro {
  margin: 4px 0 0;
  padding: 12px 18px;
  border-radius: 14px;
  background: #FEF2F2;
  color: #B91C1C;
  font-size: 13.5px;
  line-height: 1.5;
}
.form-erro[hidden] { display: none; }

/* Botão desabilitado durante o envio */
.btn:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none !important;
  box-shadow: none !important;
}

/* --------------------------------------------------------------------------
   ANIMAÇÃO DE ENTRADA
   Elementos com [data-reveal] sobem e aparecem ao entrar na viewport.
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal-delay="1"] { transition-delay: 0.08s; }
[data-reveal-delay="2"] { transition-delay: 0.16s; }
[data-reveal-delay="3"] { transition-delay: 0.24s; }

/* Respeita quem pediu menos movimento no sistema */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}
