/* ============================================================================
   BRAND — the swap point.
   ----------------------------------------------------------------------------
   This is the ONLY file that names a colour or a typeface. base.css and
   style.css reference tokens and never a literal, so restyling the whole site
   is editing this file and nothing else.

   SOURCE: "Apresentacao de Identidade Visual - Zenith", 2025. Four colours,
   two typefaces, and nothing else is brand. Everything below that is NOT one
   of those four values is a utility (body grey, hairline border) that a web
   page needs and a print identity does not; they are named as such.

   THE SEVEN TOKENS ARE A CONTRACT, NOT A PREFERENCE.
   lib/page-templates/zh-sections.ts emits markup that references exactly
   --muted, --sans, --heading, --dark, --border, --text and --gold. Every page
   Autopilot writes into post_content depends on those seven names resolving.
   Rename one and the pages do not break loudly, they just lose a colour.

   --gold is named for the accent slot, not for the colour. It carries Zenith's
   sky blue. The name is kept because the section library already emits it and
   renaming it would mean reissuing every page to change a variable name.

   TYPOGRAPHY, per the identity deck:
     Bomstad Display SemiBold  tipografia principal — the wordmark and headings
     Sora                      texto de apoio — body, UI, everything else

   Bomstad is a commercial face and is not in this repo. The heading stack lists
   it FIRST and falls through to Sora, so headings are on-brand-adjacent today
   and become exactly right the moment the file lands. To finish it: drop
   bomstad-display.woff2 into assets/fonts/. functions.php checks for that file
   and emits the @font-face only when it exists, so there is no 404 until then
   and no code change after.

   FONTS ARE SELF-HOSTED ON PURPOSE. This host runs LiteSpeed (active on this
   site), which rewrites a Google Fonts <link> into local TTF copies and has
   added 300-650KB per page on a client site. A woff2 we serve ourselves cannot
   be "optimised" into that. Sora is VARIABLE: Google serves one byte-identical
   file for every weight, so asking for 400/600/700 separately downloads the
   same file three times.
   ========================================================================= */

@font-face {
  font-family: 'Sora';
  src: url('../fonts/sora-var.woff2') format('woff2-variations'),
       url('../fonts/sora-var.woff2') format('woff2');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
  /* Latin only. The site is English; a full subset would triple the download. */
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* ---- the four brand colours, exactly as the deck specifies them ------ */
  --sky:    #3B6EFF;   /* rgb 59 110 255   — primary */
  --navy:   #1A4FAD;   /* rgb 26 79 173    — dark sky blue */
  --ink:    #000000;   /* black */
  --white:  #FFFFFF;

  /* Derived from the two blues, not new colours: a pressed state needs a
     darker blue than #3B6EFF and a tinted panel needs a lighter one. */
  --sky-ink:        #2255E6;
  --sky-wash:       #EEF3FF;
  --sky-wash-edge:  #DCE6FF;
  --sky-light:      #9DBAFF;  /* sky on a black surface: #3B6EFF on black is
                                 legible but dim for small type */
  /* The deck's signature gradient (sky -> dark sky, left to right). */
  --grad-brand:     linear-gradient(90deg, var(--sky) 0%, var(--navy) 100%);

  /* ---- the seven tokens the section library requires ------------------ */
  --gold:    var(--sky);      /* accent slot. Named by role, not by colour. */
  --dark:    var(--ink);      /* headings. The deck sets display type in black
                                 on white and in white on black; nothing in
                                 between. */
  --text:    #2B3242;         /* UTILITY, not brand. Body copy at 1.8 line
                                 height in pure black reads as harsh; this is
                                 black lifted just off the floor. */
  --muted:   #667085;         /* UTILITY. Labels, captions, meta. */
  --border:  #E3E8F0;         /* UTILITY. Hairlines. */
  --star:    #F5A623;         /* UTILITY, and the one place a non-brand hue is
                                 deliberate: review stars are amber everywhere
                                 a visitor has ever seen one. Blue stars read
                                 as a graphic, not as a rating. */
  --heading: 'Bomstad Display', 'Sora', 'Trebuchet MS', system-ui, sans-serif;
  --sans:    'Sora', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* ---- surfaces ------------------------------------------------------- */
  --bg:         var(--white);
  --bg-alt:     #F7F9FC;      /* UTILITY. Alternating section tint. */
  --bg-dark:    var(--ink);   /* The deck's dark surface is black, not navy. */
  --bg-dark-2:  #0A0A0A;      /* Black lifted 4% so a band on a black section
                                 is visible without introducing a fifth hue. */

  /* ---- shape and depth ------------------------------------------------ */
  --radius:    14px;
  --radius-sm: 9px;
  --radius-lg: 20px;
  /* Shadows are tinted with the brand hue rather than black. A grey shadow on
     a blue-tinted page reads as dirt. */
  --shadow:    0 1px 2px rgba(26, 79, 173, .07), 0 8px 24px rgba(26, 79, 173, .08);
  --shadow-lg: 0 2px 4px rgba(26, 79, 173, .07), 0 24px 56px rgba(26, 79, 173, .14);
  --ring:      0 0 0 3px rgba(59, 110, 255, .35);

  /* A card at rest and a card under the cursor are THE SAME SHADOW at two
     weights, not two different light sources. The hover value is painted on a
     pseudo-element and faded in with opacity, because animating box-shadow
     itself repaints on every frame. */
  --shadow-card:       0 1px 2px rgba(26, 79, 173, .05), 0 10px 22px -14px rgba(26, 79, 173, .20);
  --shadow-card-hover: 0 2px 6px rgba(26, 79, 173, .07), 0 28px 52px -20px rgba(26, 79, 173, .34);

  /* ---- motion ---------------------------------------------------------
     One curve and two durations for the whole site. An "ease" that differs
     per component is the single most reliable way to make a page feel
     assembled rather than designed. Every use is inside a
     prefers-reduced-motion guard; see style.css. */
  --ease:     cubic-bezier(.22, .61, .36, 1);
  --dur-fast: .18s;
  --dur:      .46s;

  /* ---- rhythm --------------------------------------------------------- */
  --wrap:      1140px;
  --wrap-text: 760px;   /* ~70 characters of Sora at 1.0625rem */
  --gutter:    16px;    /* phone side gutter */
  --section-y: clamp(56px, 8vw, 104px);
  /* The left rail a section's kicker sits in on a wide screen, so the heading
     starts on an indent instead of another full-width left-aligned stack. */
  --rail:      164px;
}

@media (min-width: 720px) {
  :root { --gutter: 28px; }
}
