/* Static twin of the shared site chrome (header, mobile sheet, footer, WhatsApp
   button) for pages that can't run React: the server-rendered /blog and the
   hand-authored /faq pages. Ported from src/chrome.css + the tokens/buttons in
   src/index.css / src/home.css — those stay the source of truth (see DESIGN.md);
   when the React chrome changes, change this file, public/site-chrome.js and
   api/lib/siteChrome.js with it. */

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url('/fonts/bricolage-grotesque-variable.woff2') format('woff2');
}
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/fonts/atkinson-hyperlegible-next-variable.woff2') format('woff2');
}

:root {
  --field: oklch(0.975 0.004 275);
  --field-2: oklch(0.925 0.008 275);
  --void: oklch(0.135 0.012 280);
  --void-2: oklch(0.225 0.014 280);
  --ink: oklch(0.17 0.012 275);
  --ink-2: oklch(0.38 0.014 275);
  --ink-3: oklch(0.49 0.014 275);
  --bone: oklch(0.965 0.005 275);
  --bone-2: oklch(0.8 0.01 275);
  --bone-3: oklch(0.68 0.012 275);
  --line: oklch(0.86 0.01 275);
  --line-d: oklch(0.32 0.015 280);
  --line-strong: oklch(0.6 0.014 275);
  --line-strong-d: oklch(0.55 0.014 280);
  --mint: oklch(0.86 0.15 165);
  --cyan: oklch(0.82 0.11 215);
  --blue: oklch(0.68 0.16 255);
  --violet: oklch(0.62 0.2 295);
  --magenta: oklch(0.7 0.22 335);
  --focus-on-field: oklch(0.5 0.2 265);
  --focus-on-void: oklch(0.82 0.11 215);
  --font-display: 'Bricolage Grotesque', 'Arial Narrow', system-ui, sans-serif;
  --font-ui: 'Atkinson Hyperlegible Next', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --t-xs: 0.8125rem;
  --t-sm: 0.9375rem;
  --t-base: clamp(1.0625rem, 1.02rem + 0.18vw, 1.1875rem);
  --s-1: 0.5rem; --s-2: 1rem; --s-3: 1.5rem; --s-4: 2rem; --s-5: 3rem; --s-6: 4rem; --s-7: 6rem;
  --gutter: clamp(1rem, 3vw, 2.5rem);
  --container: 85rem;
  --r-ctl: 10px;
  --dur-micro: 160ms; --dur-micro-l: 240ms; --dur-ui: 360ms; --dur-panel: 520ms;
  --ease-emerge: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-settle: cubic-bezier(0.22, 1, 0.36, 1);
  --shift-lg: 32px;
  --z-header: 40; --z-dock: 45; --z-skip: 100;
}
@supports not (color: oklch(0 0 0)) {
  :root {
    --field: #f6f7f9; --field-2: #e4e6ec; --void: #07080d; --void-2: #1a1b22;
    --ink: #0e0f15; --ink-2: #40424a; --ink-3: #5e6069;
    --bone: #f2f3f7; --bone-2: #bcbdc4; --bone-3: #9698a0;
    --line: #cfd1d8; --line-d: #31323b; --line-strong: #7d8089; --line-strong-d: #70717a;
    --mint: #5bf0b8; --cyan: #63d6f1; --blue: #4c99f8; --violet: #9264ef; --magenta: #ec5cd3;
    --focus-on-field: #2955d3; --focus-on-void: #63d6f1;
  }
}

/* Surfaces: a section is FIELD (light) or VOID (dark); components read the semantic vars. */
.surface-field, [data-surface='field'], [data-tone='field'] {
  --bg: var(--field); --fg: var(--ink); --fg-2: var(--ink-2); --fg-3: var(--ink-3);
  --rule: var(--line); --rule-strong: var(--line-strong); --wash: var(--field-2);
  --focus: var(--focus-on-field); --btn-bg: var(--void); --btn-fg: var(--bone);
  background: var(--field); color: var(--fg);
}
.surface-void, [data-surface='void'], [data-tone='void'] {
  --bg: var(--void); --fg: var(--bone); --fg-2: var(--bone-2); --fg-3: var(--bone-3);
  --rule: var(--line-d); --rule-strong: var(--line-strong-d); --wash: var(--void-2);
  --focus: var(--focus-on-void); --btn-bg: var(--bone); --btn-fg: var(--ink);
  background: var(--void); color: var(--fg);
}

:focus-visible { outline: 2px solid var(--focus, var(--focus-on-field)); outline-offset: 3px; }
.skip-link {
  position: fixed; top: var(--s-1); left: var(--s-1); z-index: var(--z-skip);
  padding: 0.75rem 1.25rem; border-radius: var(--r-ctl); background: var(--bone); color: var(--ink);
  font: 600 var(--t-sm) / 1 var(--font-ui); transform: translateY(-200%);
}
.skip-link:focus-visible { transform: none; outline-color: var(--focus-on-field); }

.wrap { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.t-label { font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.02em; color: var(--fg-3, var(--ink-3)); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
@property --rim-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes rim-spin { to { --rim-a: 360deg; } }

.btn-hole {
  position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center;
  gap: 0.65em; min-height: 3.25rem; padding: 0 1.6rem; border: 0; border-radius: var(--r-ctl);
  background: transparent; color: var(--btn-fg, var(--bone)); font: 600 var(--t-base) / 1 var(--font-ui);
  cursor: pointer; text-decoration: none; transition: transform var(--dur-micro) var(--ease-settle);
}
.btn-hole::after { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--btn-bg, var(--void)); }
.btn-hole::before {
  content: ''; position: absolute; inset: -2px; z-index: -2; border-radius: calc(var(--r-ctl) + 2px);
  background: conic-gradient(from var(--rim-a), var(--mint), var(--cyan), var(--blue), var(--violet), var(--magenta), var(--mint));
  opacity: 0; transition: opacity var(--dur-micro-l) var(--ease-settle); animation: rim-spin 6s linear infinite paused;
}
.btn-hole:hover::before, .btn-hole:focus-visible::before { opacity: 1; animation-play-state: running; }
.btn-hole:hover { transform: translateY(-1px); }
.btn-hole .arrow { flex: none; transition: transform var(--dur-micro-l) var(--ease-settle); }
.btn-hole:hover .arrow { transform: translateX(3px); }
.btn-line {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: 0 1.6rem;
  border: 1px solid var(--rule-strong); border-radius: var(--r-ctl); color: var(--fg);
  font: 600 var(--t-base) / 1 var(--font-ui); text-decoration: none;
  transition: border-color var(--dur-micro) var(--ease-settle), transform var(--dur-micro) var(--ease-settle);
}
.btn-line:hover { border-color: var(--fg); transform: translateY(-1px); }
.link-draw {
  position: relative; display: inline-flex; align-items: center; gap: 0.5em; color: var(--fg);
  font-weight: 600; text-decoration: none; padding-block: 0.6rem; min-height: 2.75rem;
}
.link-draw::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0.35rem; height: 1px; background: currentColor; opacity: 0.35; transition: opacity var(--dur-micro-l) var(--ease-settle); }
.link-draw:hover::after, .link-draw:focus-visible::after { opacity: 1; }
.w-full { width: 100%; }

.horizon { height: 1px; background: linear-gradient(90deg, transparent, var(--mint), var(--cyan), var(--blue), var(--violet), var(--magenta), transparent); opacity: 0.85; }

/* ── Header ──────────────────────────────────────────────────────────────── */
.chrome {
  position: fixed; inset: 0 0 auto 0; z-index: var(--z-header); background: transparent; color: var(--fg);
  border-bottom: 1px solid transparent;
  transition: transform var(--dur-ui) var(--ease-emerge), background-color var(--dur-ui) var(--ease-settle), border-color var(--dur-ui) var(--ease-settle);
}
.chrome[data-tone] { background: transparent; }
.chrome[data-tone][data-scrolled='true'] { background: var(--bg); border-bottom-color: var(--rule); }
.chrome[data-hidden='true'] { transform: translateY(-101%); }
.chrome-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: 4.5rem; }
.chrome-brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--fg); text-decoration: none; flex-shrink: 0; }
.chrome-brand img { width: 3.25rem; height: 3.25rem; object-fit: contain; }
.chrome-word { font-family: var(--font-display); font-size: 1.25rem; letter-spacing: -0.02em; font-weight: 400; white-space: nowrap; }
.chrome-word b { font-weight: 750; }
.chrome-nav { display: none; }
.chrome-nav ul { display: flex; align-items: center; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.chrome-item { position: relative; display: flex; align-items: center; }
.chrome-link {
  position: relative; display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 0.5rem 0 0.75rem;
  font: 500 var(--t-sm) / 1 var(--font-ui); color: var(--fg-2); text-decoration: none; transition: color var(--dur-micro) var(--ease-settle);
}
.chrome-item:not(:has(.chrome-sub-btn)) .chrome-link { padding-right: 0.75rem; }
.chrome-link:hover, .chrome-link[aria-current='true'] { color: var(--fg); }
.chrome-link::after {
  content: ''; position: absolute; left: 0.75rem; right: 0.5rem; bottom: 0.3rem; height: 2px;
  background: linear-gradient(90deg, var(--mint), var(--cyan), var(--blue), var(--violet), var(--magenta));
  transform: scaleX(0); transform-origin: left; transition: transform var(--dur-ui) var(--ease-emerge);
}
.chrome-link[aria-current='true']::after { transform: scaleX(1); }
.chrome-sub-btn { display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 2.75rem; margin-right: 0.25rem; color: var(--fg-2); background: none; border: 0; cursor: pointer; }
.chrome-sub-btn:hover { color: var(--fg); }
.chrome-sub-btn svg { transition: transform var(--dur-micro-l) var(--ease-settle); }
.chrome-sub-btn[aria-expanded='true'] svg { transform: rotate(180deg); }
.chrome-nav .chrome-sub {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  position: absolute; top: calc(100% + 0.25rem); left: 0; min-width: 13.5rem; margin: 0; padding: 0.35rem; list-style: none;
  border: 1px solid var(--rule); border-radius: var(--r-ctl); background: var(--bg); opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity var(--dur-micro-l) var(--ease-settle), transform var(--dur-micro-l) var(--ease-emerge), visibility 0s linear var(--dur-micro-l);
}
.chrome-sub::before { content: ''; position: absolute; left: 0; right: 0; top: -0.5rem; height: 0.5rem; }
.chrome-sub[data-open='true'] { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.chrome-sub a { display: flex; align-items: center; min-height: 2.75rem; padding: 0 0.75rem; border-radius: 6px; font: 500 var(--t-sm) / 1 var(--font-ui); color: var(--fg-2); text-decoration: none; }
.chrome-sub a:hover { color: var(--fg); background: var(--wash); }
.chrome-actions { display: flex; align-items: center; gap: 0.75rem; }
.chrome-actions .chrome-cta { display: none; min-height: 2.75rem; padding: 0 1.15rem; font-size: var(--t-sm); }
.chrome-menu { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 2.75rem; padding: 0 0.25rem 0 0.5rem; font: 600 var(--t-sm) / 1 var(--font-ui); color: var(--fg); background: none; border: 0; cursor: pointer; }
.chrome-menu-bars, .chrome-menu-bars::before { display: block; width: 1.25rem; height: 2px; background: currentColor; border-radius: 1px; }
.chrome-menu-bars { position: relative; margin-block: -3px 3px; }
.chrome-menu-bars::before { content: ''; position: absolute; top: 6px; left: 0; }
@media (min-width: 64rem) {
  .chrome-nav { display: block; }
  .chrome-actions > .chrome-menu { display: none; }
  .chrome-bar { gap: var(--s-4); }
}

/* ── Mobile sheet (<dialog>) ─────────────────────────────────────────────── */
.sheet { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; color: var(--fg); background: var(--void); overflow-y: auto; }
.sheet::backdrop { background: var(--void); }
.sheet[open] { display: flex; flex-direction: column; animation: sheet-in var(--dur-panel) var(--ease-emerge) both; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(var(--shift-lg)); } to { opacity: 1; transform: none; } }
.sheet-top { display: flex; align-items: center; justify-content: space-between; min-height: 4.5rem; flex-shrink: 0; }
.sheet-nav { flex: 1; display: flex; align-items: flex-end; padding-block: var(--s-4); }
.sheet-nav ul { list-style: none; margin: 0; padding: 0; width: 100%; }
.sheet-link { display: block; padding-block: 0.4rem 0.15rem; font: 700 clamp(2.25rem, 10vw, 3.25rem) / 1.05 var(--font-display); letter-spacing: -0.03em; color: var(--fg); text-decoration: none; }
.sheet-nav .sheet-sub { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; padding-bottom: 0.4rem; }
.sheet-sub a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--fg-2); font-size: var(--t-base); text-decoration: none; }
.sheet-foot { display: flex; flex-direction: column; gap: var(--s-3); padding-bottom: max(var(--s-4), env(safe-area-inset-bottom)); flex-shrink: 0; }
.sheet-direct { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.5rem; }
.sheet-direct .t-label { flex-basis: 100%; }

/* ── WhatsApp floating button ────────────────────────────────────────────── */
.wa-fab {
  position: fixed; right: max(1.25rem, env(safe-area-inset-right)); bottom: max(1.25rem, env(safe-area-inset-bottom)); z-index: var(--z-dock);
  display: inline-flex; align-items: center; justify-content: center; width: 3.5rem; height: 3.5rem; border-radius: 1.1rem;
  background: var(--void); color: var(--bone); outline-offset: 5px; --focus: var(--focus-on-void); isolation: isolate; transition: transform var(--dur-micro) var(--ease-settle);
}
.wa-fab::before { content: ''; position: absolute; inset: -2px; z-index: -1; border-radius: calc(1.1rem + 2px); background: conic-gradient(from var(--rim-a), var(--mint), var(--cyan), var(--blue), var(--violet), var(--magenta), var(--mint)); animation: rim-spin 10s linear infinite; }
.wa-fab::after { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--void); }
.wa-fab:hover { transform: translateY(-2px); }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-foot { padding-bottom: var(--s-4); }
.site-foot .wrap { padding-top: var(--s-6); }
.foot-grid { display: grid; gap: var(--s-5); grid-template-columns: 1fr; }
@media (min-width: 48rem) { .foot-grid { grid-template-columns: 1.6fr 1fr 1fr; gap: var(--s-6); } }
.foot-brand { display: flex; flex-direction: column; gap: var(--s-2); }
.foot-brand p { max-width: 34ch; color: var(--fg-2); margin: 0; }
.foot-h { margin: 0 0 var(--s-2); }
.foot-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.foot-link { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--fg-2); font-size: var(--t-sm); text-decoration: none; transition: color var(--dur-micro) var(--ease-settle); }
a.foot-link:hover { color: var(--fg); }
.foot-legal { display: flex; flex-direction: column; gap: 0.5rem; margin-top: var(--s-6); padding-top: var(--s-3); border-top: 1px solid var(--rule); font-size: var(--t-sm); color: var(--fg-3); }
.foot-legal p { margin: 0; }
@media (min-width: 48rem) { .foot-legal { flex-direction: row; justify-content: space-between; } }

@media (prefers-reduced-motion: reduce) {
  .btn-hole::before, .wa-fab::before { animation: none !important; }
  .sheet[open] { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* The CTA repeats the nav's "Contato"; it only appears once the bar has room for it. */
.chrome-cta { white-space: nowrap; }
@media (min-width: 75rem) {
  .chrome-actions .chrome-cta { display: inline-flex; }
}
