/* =========================================================================
   Belas Aves — Design tokens + primitivos
   Baseado no Design System "Foundations v1.0" (Geist · 4px · oklch · light-first)
   ========================================================================= */

:root {
  /* ---- Neutros (hue 285) ---- */
  --canvas:      oklch(0.98  0.002 285);
  --surface:     oklch(0.955 0.003 285);
  --surface-2:   oklch(0.925 0.004 285);
  --line:        oklch(0.84  0.007 285);
  --line-soft:   oklch(0.88  0.006 285);
  --line-faint:  oklch(0.90  0.005 285);
  --text-quiet:  oklch(0.52  0.011 285);
  --text-muted:  oklch(0.40  0.010 285);
  --text:        oklch(0.145 0.005 285);

  /* ---- Acentos de sinal ---- */
  --primary:       oklch(0.55 0.15 252);
  --primary-ink:   oklch(0.98 0.01 252);
  --primary-hover: oklch(0.48 0.15 252);
  --live:          oklch(0.50 0.15 152);
  --live-deep:     oklch(0.45 0.15 152);
  --alert:         oklch(0.55 0.15 32);
  --alert-deep:    oklch(0.48 0.15 32);

  /* WhatsApp — verde próximo ao hue "live" do sistema */
  --wa:       oklch(0.63 0.16 150);
  --wa-hover: oklch(0.56 0.16 150);
  --wa-ink:   oklch(0.99 0.01 150);

  /* ---- Raio ---- */
  --r-input: 6px;
  --r-btn:   10px;
  --r-card:  16px;
  --r-pill:  999px;

  /* ---- Elevação ---- */
  --shadow-raised:  0 8px 24px oklch(0 0 0 / 0.07);
  --shadow-overlay: 0 24px 60px oklch(0 0 0 / 0.11);

  /* ---- Tipografia ---- */
  --font: Geist, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --maxw: 1120px;
  --pad:  20px;
}

@media (min-width: 720px) { :root { --pad: 32px; } }

/* ---------------------------------------------------------------- reset */
* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

::selection { background: oklch(0.55 0.15 252 / 0.20); }

:focus-visible {
  outline: 2px solid transparent;
  box-shadow: 0 0 0 3px oklch(0.55 0.15 252 / 0.30);
}

/* ---------------------------------------------------------------- layout */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }

.eyebrow {
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--live);
}

.mono { font-family: var(--mono); }
.quiet { color: var(--text-quiet); }
.muted { color: var(--text-muted); }

/* ---------------------------------------------------------------- botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid transparent; border-radius: var(--r-btn);
  font: 500 14px/1 var(--font);
  cursor: pointer; text-decoration: none;
  transition: background .14s ease, border-color .14s ease, color .14s ease, transform .1s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--primary   { background: var(--text); color: var(--surface-2); }
.btn--primary:hover { background: oklch(0.30 0.006 285); color: var(--surface-2); }

.btn--secondary { background: var(--surface-2); color: var(--text); border-color: oklch(0.80 0.008 285); }
.btn--secondary:hover { border-color: oklch(0.66 0.010 285); }

.btn--ghost     { background: transparent; color: var(--text-muted); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }

.btn--accent    { background: var(--primary); color: var(--primary-ink); }
.btn--accent:hover { background: var(--primary-hover); color: var(--primary-ink); }

.btn--wa        { background: var(--wa); color: var(--wa-ink); }
.btn--wa:hover  { background: var(--wa-hover); color: var(--wa-ink); }

.btn--alert     { background: transparent; color: var(--alert-deep); border-color: oklch(0.55 0.15 32 / 0.4); }
.btn--alert:hover { background: oklch(0.55 0.15 32 / 0.10); }

.btn--sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn--block { width: 100%; }

/* ---------------------------------------------------------------- pills */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  height: 26px; padding: 0 11px; border-radius: var(--r-pill);
  font: 500 11px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--surface-2); color: var(--text-muted);
  white-space: nowrap;
}
.pill--live  { background: oklch(0.50 0.15 152 / 0.13); color: var(--live-deep); }
.pill--alert { background: oklch(0.55 0.15 32 / 0.12); color: var(--alert-deep); }
.pill--primary { background: oklch(0.55 0.15 252 / 0.12); color: var(--primary-hover); }
.pill__dot { width: 5px; height: 5px; border-radius: var(--r-pill); background: currentColor; }

/* ---------------------------------------------------------------- form */
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label { font: 400 13px/1.2 var(--font); color: var(--text-muted); }
.field .help { font: 400 12px/1.5 var(--font); color: var(--text-quiet); }

.input, .textarea, .select {
  width: 100%;
  min-height: 44px; padding: 10px 12px;
  border: 1px solid oklch(0.80 0.008 285); border-radius: var(--r-input);
  background: var(--surface-2); color: var(--text);
  font: 400 15px/1.4 var(--font);
  outline: none;
  transition: border-color .14s ease, box-shadow .14s ease;
}
.textarea { min-height: 92px; resize: vertical; }
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px oklch(0.55 0.15 252 / 0.18);
}
.input::placeholder, .textarea::placeholder { color: var(--text-quiet); }

/* ---------------------------------------------------------------- card */
.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-card);
}

/* ---------------------------------------------------------------- misc */
.spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--text-muted);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
