/* ============================================================
   Biohma — Design tokens (redesign 2026)
   Base quase-preta esverdeada, dois verdes institucionais, turquesa
   como cor de água/dado, verde de sinal com avareza. Sem azul
   corporativo e sem verde-limão publicitário.
   ============================================================ */

@font-face {
  font-family: "Buvera";
  src: url("../assets/fonts/Buvera-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Buvera";
  src: url("../assets/fonts/Buvera-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Buvera";
  src: url("../assets/fonts/Buvera-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Buvera";
  src: url("../assets/fonts/Buvera-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* Size-matched fallback: occupies the same vertical box as Buvera
   (unitsPerEm 1000, ascender 990, descender -400, x-height 483) so the
   swap from system font to Buvera costs zero layout shift. */
@font-face {
  font-family: "Buvera Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Liberation Sans");
  size-adjust: 93.1%;
  ascent-override: 106.3%;
  descent-override: 42.9%;
  line-gap-override: 0%;
}

:root {
  color-scheme: light;

  /* --grade-globo is its own value, not an approximation of --green-200:
     #b6cdc0 reads slightly greener and this needed to stay a touch cooler
     to sit right against --paper. Moved darker from the original #c6e1dd
     (then #dbe7e0-adjacent) after two rounds of "still too transparent" —
     at the original tone, even a fully-opaque, fully-drawn stroke still
     read as barely-there against the paper ground. */
  --grade-globo: #a6c2b7;

  /* ---- Verde institucional ------------------------------------ */
  --green-50:  #eef4f0;
  --green-100: #dbe7e0;
  --green-200: #b6cdc0;
  --green-300: #7fae94;
  --green-400: #3f8f5f;
  --green-500: #217a46;
  --green-600: #1b6b3a;
  --green-700: #165433;
  --green-800: #12392a;
  --green-900: #0a2418;
  --green-950: #071a12;

  /* ---- Turquesa — água e dado --------------------------------- */
  --turq-300: #7fe3d4;
  --turq-500: #17c3a8;
  --turq-700: #0e7c6e;
  --turq-800: #0a6e61;

  /* ---- Sinal e ácido — uso raro ------------------------------- */
  --signal: #3ce87a;
  --acid:   #c6f24a;

  /* ---- Papel e neutros ------------------------------------------ */
  --paper:     #f0f3f2;
  --sand-50:   #f0f3f2;
  --sand-100:  #e7ebe9;
  --sand-200:  #dce1df;
  --sand-300:  #c2c9c6;

  --stone-400: #8b968f;
  --stone-500: #6b7a72;
  --stone-600: #55645c;
  --stone-700: #3a4a41;
  --stone-on-dark: #93a69c;

  --white: #ffffff;
  --black: #050f0a;

  /* ---- Campo de luz — o único gradiente do sistema ------------ */
  --field: radial-gradient(150% 130% at 112% -18%, rgba(23,195,168,0.55) 0%, rgba(23,195,168,0.22) 38%, rgba(23,195,168,0) 72%),
           radial-gradient(140% 140% at 124% 82%, rgba(60,232,122,0.42) 0%, rgba(60,232,122,0.16) 42%, rgba(60,232,122,0) 74%),
           linear-gradient(104deg, #071a12 0%, #08200f 34%, #0a2418 62%, #0e3423 100%);

  /* ---- Aliases semânticos --------------------------------------- */
  --surface-page:    var(--paper);
  --surface-inverse: var(--green-950);

  --text-strong: var(--green-950);
  --text-body:   var(--green-950);
  --text-muted:  var(--stone-600);
  --text-on-dark: var(--paper);
  --text-on-dark-muted: var(--stone-on-dark);
  --text-data: var(--turq-800);
  --text-data-on-dark: var(--turq-500);

  --brand: var(--green-800);
  --brand-hover: var(--green-700);
  --on-brand: var(--paper);

  --border-subtle: var(--sand-200);
  --border-default: var(--sand-300);
  --border-strong: var(--green-800);
  --border-on-dark: #1e3a2b;

  --focus-ring: var(--turq-500);

  /* Accent tokens: dark background vs light background context */
  --accent-on-dark:  var(--signal);
  --accent-on-light: var(--green-600);
  --data-on-dark:    var(--turq-500);
  --data-on-light:   var(--turq-800);
  --mark-on-dark:    var(--acid);
  --mark-on-light:   #167a3f;

  /* ---- Type -------------------------------------------------------
     One family, self-hosted. --font-display and --font-body are kept as
     separate semantic tokens (different weights/letter-spacing lean on
     them throughout components.css) but both resolve to the same stack —
     there is no second typeface loaded anywhere on the site. */
  --font-sans:    Buvera, "Buvera Fallback", system-ui, sans-serif;
  --font-display: var(--font-sans);
  --font-body:    var(--font-sans);
  --font-mono:    "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;

  /* Escala fluida — ancorada na escala fechada de 7 degraus do sistema */
  --text-display-2xl: clamp(2.75rem, 2rem + 3.2vw, 6rem);   /* 44 → 96 */
  --text-display-xl:  clamp(2.25rem, 1.7rem + 2.3vw, 4rem); /* 36 → 64 */
  --text-display-lg:  clamp(1.5rem, 1.3rem + 0.9vw, 2.75rem); /* 24 → 44 */
  --text-h1: var(--text-display-lg);
  --text-h2: 1.5rem;
  --text-lg: 1.1875rem;
  --text-base: 1.0625rem;
  --text-sm: 0.9375rem;
  --text-xs: 0.8125rem;
  --text-2xs: 0.6875rem;

  --lh-tight: 1.02;
  --lh-snug: 1.06;
  --lh-heading: 1.04;
  --lh-heading-wrap: 1.15;
  --lh-body: 1.6;
  --lh-relaxed: 1.7;

  --measure-body: 64ch;

  --ls-tighter: -0.02em;
  --ls-tight: -0.015em;
  --ls-wide: 0.04em;
  --ls-caps: 0.08em;

  /* ---- Spacing / radius / motion --------------------------------- */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;
  --space-12: 48px; --space-16: 64px; --space-18: 72px; --space-20: 80px; --space-24: 96px; --space-32: 128px;

  --section-y: clamp(104px, 9vw, 152px);

  --radius-sharp: 2px;
  --radius-sm: 8px;
  --radius-md: 4px;
  --radius-leaf-sm: 20px;
  --radius-lg: 16px;

  --ease-standard: cubic-bezier(0.32, 0.08, 0.24, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 240ms;
  --dur-base: 340ms;
  --dur-slow: 1600ms;
  --stagger: 100ms;

  --container-max: 1200px;
  --container-wide: 1360px;
  --container-text: 720px;
  --pad-inline: clamp(20px, 6vw, 160px);
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-fast: 1ms; --dur-base: 1ms; --dur-slow: 1ms; --stagger: 0ms; }
}
