/* ============================================================
   FOCUS SALES EXPERTS — CATÁLOGO BR — base.css
   Reset, tipografia, layout. Zero cor/fonte/raio hard-coded —
   tudo vem de css/brand.css (compartilhado com o site em inglês,
   copiado no build — ver ARQUITETURA-BR.md §8.1) via var(--token).

   Adaptado de us/css/base.css. Diverge daqui pra frente: o BR tem
   mais páginas em superfície clara (--paper) que o EN.

   F7.0 (05/10/2026) — o BR lê os PAPÉIS do brand.css (--bg, --fg, --card…)
   como o EN: o site nasce em --paper e [data-surface] troca a superfície
   de uma seção. Validação do Antonio (01/10): o site todo na paleta clara
   do catálogo. Ver ARQUITETURA-BR-COMERCIAL.md §3.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* clip (não hidden): o menu do celular sai da tela com translate e, no Safari,
     overflow-x:hidden no body virava rolagem vertical vazia depois do rodapé. */
  overflow-x: clip;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }

/* ---------- Superfície ----------
   [data-surface] redefine os papéis (brand.css); aqui o fundo e a cor de texto
   acompanham. Componentes que precisam de outro fundo declaram o próprio em
   components.css/story.css, que carregam depois.
   Regra: [data-surface] nunca aninha — o brand.css só redefine --bg/--card nas
   superfícies claras, então uma seção clara DENTRO de uma escura herdaria o
   texto claro. Uma seção, uma superfície. */
[data-surface] { background: var(--bg); color: var(--fg); }

/* Cabeçalho e rodapé CLAROS.
   O brand.css (compartilhado com o EN) força .topbar/.site-footer para os papéis
   escuros — no EN o cabeçalho ficou escuro a pedido do cliente. No BR a validação
   de 01/10/2026 pede o catálogo inteiro na paleta clara, então os dois voltam aos
   papéis claros. Mesma especificidade do brand.css; este arquivo carrega depois.
   Só valores de tokens (color-mix), nenhum #hex. */
.topbar, .site-footer {
  --bg: var(--paper); --bg-alt: var(--white); --bg-sunk: var(--paper-2); --card: var(--white);
  --fg: var(--ink); --fg-2: var(--ink-muted); --fg-3: var(--ink-muted);
  --border: var(--line-on-paper);
  --border-soft: color-mix(in srgb, var(--ink) 7%, transparent);
  --border-strong: color-mix(in srgb, var(--ink) 24%, transparent);
  --border-accent: color-mix(in srgb, var(--signal-on-paper) 40%, transparent);
  --accent-fg: var(--signal-on-paper); --accent-2: var(--signal);
  --accent-tint: color-mix(in srgb, var(--signal) 12%, transparent);
  --accent-glow: none; --shadow: none; --field-bg: var(--white);
}
.site-footer { --bg: var(--white); --card: var(--paper); }

/* ---------- Grão de textura (só sobre superfícies escuras, ver .grain) ---------- */
.grain { position: relative; }
.grain::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.grain > * { position: relative; z-index: 2; }

/* ---------- Tipografia ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: var(--display-stretch);
  letter-spacing: -.01em;
  line-height: 1.05;
  color: var(--fg);
  overflow-wrap: break-word;
}

h1 { font-size: clamp(2.2rem, 5vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 3.8vw, 2.8rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); }
h4 { font-size: 1.05rem; font-weight: 700; font-stretch: 100%; }

p { color: var(--fg-2); }

.lead {
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
  line-height: 1.55;
  max-width: 56ch;
}

.mono { font-family: var(--font-label); letter-spacing: .04em; }

.eyebrow {
  display: flex;
  align-items: center;
  /* nowrap: com wrap, um texto longo (2 linhas no celular) jogava o traço sozinho
     pra uma linha acima. O texto encolhe e quebra dentro do próprio item. */
  flex-wrap: nowrap;
  gap: 10px;
  font-family: var(--font-label);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent-fg);
  margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--accent-fg); flex: 0 0 auto; }

/* ---------- Links de texto (--accent-fg: legível em cada superfície; o --signal puro não passa contraste no claro) ---------- */
a.link, .link-arrow { color: var(--accent-fg); }

.serif-accent { color: var(--accent-fg); }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: var(--maxw-narrow); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-read { max-width: var(--maxw-read); margin: 0 auto; padding: 0 var(--gutter); }

.section { position: relative; padding: clamp(48px, 8vw, 100px) 0; }
.section--tight { padding: clamp(32px, 5vw, 64px) 0; }
.grid { display: grid; gap: var(--gutter); }
@media (min-width: 860px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.center { text-align: center; }
.vh-only {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Reveal on scroll (fallback CSS-only + JS liga .in) ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease); }
.reveal.in { opacity: 1; transform: none; }
html.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  * { scroll-behavior: auto !important; }
}

/* View Transitions entre páginas (§8.4) — nativo, sem lib. Fica inerte em
   navegadores sem suporte (progressive enhancement puro). */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
