/* ============================================================
   FroX — Reset + Base + Layout + Componentes
   ============================================================ */

/* ---------- Reset moderno ---------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Compensa o header fixo ao pular por âncora */
  scroll-padding-top: 96px;
  /* clip (com fallback hidden) no elemento raiz: contém os decorativos
     sem criar um contexto de rolagem que quebraria position: fixed. */
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  font-size: var(--t-base);
  line-height: var(--lh-relaxed);
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-synthesis-weight: none;
  /* Trava definitiva contra rolagem lateral: elementos decorativos
     (glow, marquee) extrapolam de propósito e não podem gerar scroll. */
  overflow-x: clip;
  max-width: 100vw;
}

img, svg, video, canvas { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
:where(p, li) { text-wrap: pretty; }        /* evita linha órfã */
:where(h1, h2, h3, h4) { text-wrap: balance; }

/* ---------- Tipografia -------------------------------------- */
h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  line-height: var(--lh-tight);
  letter-spacing: var(--tr-display);
}
/* h1/h2 em caixa normal: leitura rápida vem antes de impacto. O peso 700
   e o tracking negativo do Sora já dão presença sem gritar — a caixa alta
   anterior triplicava a altura do hero e empurrava o CTA para baixo da dobra. */
h1, h2 {
  font-weight: 700;
  letter-spacing: var(--tr-display);
  line-height: 1.12;
}
h1 { font-size: var(--t-5xl); }
h2 { font-size: var(--t-4xl); }
h3 { font-size: var(--t-2xl); line-height: var(--lh-snug); letter-spacing: var(--tr-tight); }
h4 { font-size: var(--t-xl); line-height: var(--lh-snug); letter-spacing: var(--tr-tight); }

strong, b { font-weight: 600; color: var(--ink); }

/* Label UPPERCASE — assinatura herdada do app FroX */
.eyebrow {
  font-family: var(--font-display);
  font-size: var(--t-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tr-label);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}
.eyebrow::before {
  content: "";
  width: 18px; height: 2px;
  background: var(--brand);
  flex: none;
}
.eyebrow--center::before { display: none; }

.lead {
  font-size: var(--t-lg);
  line-height: var(--lh-relaxed);
  color: var(--ink-3);
}

/* Destaque de texto com traço na marca */
.mark {
  color: var(--brand);
  font-weight: inherit;
}

/* ---------- Acessibilidade ---------------------------------- */
:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: var(--r-xs);
}
/* Só remove o anel de quem usa mouse — teclado sempre vê o foco */
:focus:not(:focus-visible) { outline: none; }

.skip-link {
  position: absolute;
  left: var(--s-4); top: var(--s-4);
  z-index: var(--z-toast);
  background: var(--ink);
  color: var(--bg);
  padding: var(--s-3) var(--s-5);
  border-radius: var(--r-sm);
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform var(--d-base) var(--e-out);
}
.skip-link:focus { transform: translateY(0); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ---------- Layout ------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--section-y); position: relative; }
.section--sunken { background: var(--bg-subtle); }
.section--dark { background: var(--dark); color: var(--dark-ink-2); }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: var(--dark-ink); }

/* Cabeçalho de seção reutilizável */
.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  max-width: 62ch;
  margin-bottom: var(--s-16);
}
@media (max-width: 640px) { .section-head { margin-bottom: var(--s-8); } }
.section-head--center {
  align-items: center;
  text-align: center;
  margin-inline: auto;
}
/* Títulos de seção não precisam do peso do h1 do hero */
.section-head h2 { max-width: 20ch; }
.section-head--center h2 { margin-inline: auto; }

.grid { display: grid; gap: var(--s-6); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

/* ---------- Botões ------------------------------------------ */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--bg);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 0.9375rem var(--s-6);
  font-family: var(--font-display);
  font-size: var(--t-sm);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border-radius: var(--r-xs);
  isolation: isolate;
  overflow: hidden;
  white-space: nowrap;
  transition: transform var(--d-fast) var(--e-out),
              box-shadow var(--d-base) var(--e-out),
              background-color var(--d-base) var(--e-out);
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.985); transition-duration: 60ms; }

/* Em telas de toque não existe hover: o feedback vem do :active.
   Sem isso, o botão parece "morto" ao ser tocado no celular.
   -webkit-tap-highlight-color remove o retângulo cinza do iOS/Android. */
@media (hover: none) {
  /* Alvo mínimo de 44px em qualquer botão no toque */
  .btn { min-height: 44px; }
  .btn:hover { transform: none; }
  .btn:hover::after { transform: translateX(-120%); }
  .btn:active { transform: scale(0.96); filter: brightness(0.94); }
  .card--hover:active { transform: scale(0.99); border-color: var(--line-2); }
}
a, button, summary, .card, [role="button"] { -webkit-tap-highlight-color: transparent; }

/* Brilho que varre o botão no hover — puro CSS, sem JS */
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(115deg, transparent 20%, oklch(100% 0 0 / 0.28) 46%, transparent 72%);
  transform: translateX(-120%);
  transition: transform var(--d-slow) var(--e-out);
}
.btn:hover::after { transform: translateX(120%); }

.btn--primary {
  --btn-bg: var(--brand);
  --btn-fg: var(--brand-fg);
  box-shadow: var(--sh-brand);
}
.btn--primary:hover { --btn-bg: var(--brand-600); box-shadow: var(--sh-brand-hover); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.btn--ghost:hover { --btn-bg: var(--bg-sunken); box-shadow: inset 0 0 0 1px var(--ink-4); }

.btn--light {
  --btn-bg: var(--surface);
  --btn-fg: var(--ink);
  box-shadow: var(--sh-sm);
}
.btn--lg { padding: 1.125rem var(--s-8); font-size: var(--t-base); }
.btn--block { width: 100%; }

/* Seta que avança no hover */
.btn__arrow { transition: transform var(--d-base) var(--e-spring); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* ---------- Cards ------------------------------------------- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-8);
  transition: border-color var(--d-base) var(--e-out),
              box-shadow var(--d-base) var(--e-out),
              transform var(--d-base) var(--e-out);
}
.card--hover:hover {
  border-color: var(--line-2);
  box-shadow: var(--sh-lg);
  transform: translateY(-4px);
}

/* Badge / pill */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-1) var(--s-3);
  font-size: var(--t-xs);
  font-weight: 600;
  border-radius: var(--r-pill);
  background: var(--brand-50);
  color: var(--brand-700);
  border: 1px solid var(--brand-100);
  white-space: nowrap;
}

/* Ícone em caixa */
.icon-box {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: var(--r-sm);
  background: var(--brand-50);
  color: var(--brand);
  border: 1px solid var(--brand-100);
  flex: none;
}
.icon-box svg { width: 22px; height: 22px; }

/* ---------- Utilitários ------------------------------------- */
.text-center { text-align: center; }
.flow > * + * { margin-top: var(--flow, var(--s-4)); }
.hide-mobile { }
@media (max-width: 767px) { .hide-mobile { display: none !important; } }
@media (min-width: 768px) { .only-mobile { display: none !important; } }

/* Linha divisória com fade nas pontas */
.rule {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

/* ---------- Marca em texto ----------------------------------
   Toda menção a FroX no texto segue a logo: "Fro" na cor do texto ao
   redor, "X" no vermelho da marca. Uso: <span class="fx">Fro<i>X</i></span>
   (o <i> é só gancho de cor; o itálico é anulado aqui).
   Exceção deliberada: chips de fundo vermelho (.compare__tag--good)
   ficam todos brancos — logo em negativo, como o frox-branco.svg.
   (Nos eyebrows a marca VALE: o usuário pediu o padrão da logo até
   dentro do rótulo vermelho — 2026-08-10.)
   ARMADILHA: dentro de pai flex/grid, o .fx vira item de flex e o
   espaço vizinho é engolido ("Sobre oFroX") — embrulhe o rótulo num
   span único, como no .faq__q e no link do rodapé. */
/* A cor NÃO herda do parágrafo de propósito: herdando, o "Fro" saía no
   cinza do texto corrido e ficava um meio-termo — nem texto, nem logo.
   Como na logo: "Fro" no preto pleno, X no vermelho. */
.fx { font-weight: 700; color: var(--ink); }
.fx i { font-style: normal; color: var(--brand); }
/* Fundo escuro = logo em negativo (como o frox-branco.svg): "Fro"
   branco e X no vermelho claro — o vermelho puro rende 3,5:1 no escuro
   e reprova em AA, mesmo ajuste usado no resto do site. */
.section--dark .fx,
.cta .fx,
.footer .fx { color: var(--dark-ink); }
.section--dark .fx i,
.cta .fx i,
.footer .fx i { color: var(--brand-on-dark, #ec5f52); }
