/* =====================================================================
   TOKENS: Precision Nine store
   The ONLY file that names a color, a font or a radius.
   From the client's brand guide (v1.0, November 2026, draft for approval):
     Precision Ink #0B1E22   type, badges, dark panels
     Signal Teal   #0F9B8E   points, label band, one button per view (fill)
     Mint          #7BE0CF   the accent on Ink
     Deep Teal     #0B7268   teal words and links on light grounds
     Mist          #EEF3F2   light ground, panels
     White                   the main ground
     The guide's type is Outfit, Manrope and JetBrains Mono (set c below); the
     site's default is Geist and Geist Mono (owner, 21 Nov 2026: better fonts).
   The template's token NAMES are kept (navy, royal, bright, sky, ice) so
   every shared component reads the new palette without an edit:
     navy -> Ink, royal -> Deep Teal, bright -> Signal Teal, sky -> Mint,
     ice -> Mist.
   Measured, never eyeballed (WCAG AA is 4.5:1 for body text):
     ink on white / mist          17.17 / 15.32
     body #33474B on white / mist  9.80 /  8.74
     ink .70 on white / mist       6.35 /  6.04
     deep teal on white / mist     5.80 /  5.17
     signal teal on white          3.44   <- FAILS: never text on light
     ink on signal teal            4.99   (teal buttons carry Ink text)
     white on signal teal          3.44   <- FAILS: never white on teal
     white on ink                 17.17     white .72 on ink   9.34
     mint on ink                  10.96     signal teal on ink 4.99
   ===================================================================== */

:root {
  /* ---- 1. BRAND --------------------------------------------------------- */
  --navy:            #0B1E22;
  --navy-hi:         #13292E;
  --navy-deep:       #071417;
  --royal:           #0B7268;
  --bright:          #0F9B8E;
  --bright-deep:     #0B8579;
  --sky:             #7BE0CF;
  --cyan:            #7BE0CF;
  --white:           #FFFFFF;
  --ice:             #EEF3F2;
  --ice-2:           #E2EAE8;
  --ink-body:        #33474B;

  /* ---- 2. LIGHT TONE (default) ----------------------------------------- */
  --accent:          var(--royal);
  --accent-bright:   var(--bright);
  --accent-deep:     var(--navy);
  --accent-soft:     color-mix(in srgb, var(--bright) 7%,  transparent);
  --accent-line:     color-mix(in srgb, var(--bright) 32%, transparent);
  --accent-fill:     var(--bright);

  --bg:              var(--white);
  --bg-alt:          var(--ice);
  --panel:           var(--white);
  --surface:         var(--white);
  --surface-hover:   color-mix(in srgb, var(--bright) 4%, var(--white));
  --raised:          var(--white);
  --band:            var(--ice);

  --line:            color-mix(in srgb, var(--navy) 16%, transparent);
  --line-soft:       color-mix(in srgb, var(--navy) 10%, transparent);
  --line-faint:      color-mix(in srgb, var(--navy) 6%,  transparent);

  --text:            var(--navy);
  --text-body:       var(--ink-body);
  --text-dim:        color-mix(in srgb, var(--navy) 70%, transparent);
  --text-faint:      color-mix(in srgb, var(--navy) 66%, transparent);
  --text-error:      #B3261E;
  --ok:              #15703F;

  --btn-bg:          var(--navy);
  --btn-bg-hover:    var(--navy-hi);
  --btn-ink:         var(--white);

  --shadow:          0 1px 2px color-mix(in srgb, var(--navy) 6%, transparent),
                     0 14px 34px -18px color-mix(in srgb, var(--navy) 30%, transparent);
  --shadow-lift:     0 2px 4px color-mix(in srgb, var(--navy) 6%, transparent),
                     0 24px 48px -22px color-mix(in srgb, var(--bright) 38%, transparent);

  /* The logo's ribbon: navy into bright into cyan. Decoration only. */
  --ribbon:          linear-gradient(100deg, var(--navy) 0%, var(--royal) 30%, var(--bright) 62%, var(--cyan) 100%);
  --ice-wash:        radial-gradient(80% 120% at 85% 10%, color-mix(in srgb, var(--bright) 9%, transparent), transparent 62%),
                     linear-gradient(180deg, var(--ice) 0%, var(--white) 100%);
  --navy-grad:       radial-gradient(90% 120% at 90% 0%, color-mix(in srgb, var(--bright) 34%, transparent), transparent 60%),
                     linear-gradient(160deg, var(--navy-hi) 0%, var(--navy) 55%, var(--navy-deep) 100%);

  /* ---- 3. TYPE -----------------------------------------------------------
     Montserrat and Open Sans, as the playbook specifies. JetBrains Mono for
     instrument output (lot numbers, SKUs, CAS, report numbers): the change
     that makes a store read as analytical rather than as a supplement shop. */
  --font-display: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font:         "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --fw-display:   600;            /* headings */
  --track-display: -.032em;       /* headings are set tight */
  --fw-black: 700;
  --fw-bold:  600;
  --fw-med:   500;

  --fs-hero:    clamp(36px, 4.6vw, 52px);
  --fs-h2:      clamp(26px, 2.6vw, 30px);
  --fs-h3:      20px;
  --fs-body:    16px;
  --fs-small:   14px;
  --fs-label:   12px;
  --fs-micro:   11px;

  --track-eyebrow: .16em;
  --track-btn:     .01em;
  --track-nav:     .01em;

  /* ---- 4. SHAPE ----------------------------------------------------------
     Precise, not soft: 14px cards, 10px controls, pills only for labels. */
  --radius-panel: 16px;
  --radius:       12px;
  --radius-sm:    8px;
  --radius-pill:  999px;
  --border:       1px solid var(--line);

  --max:         1240px;
  --gutter:      16px;
  --section-y:   96px;
  --section-y-sm:60px;

  --ease:        cubic-bezier(.16,.9,.24,1);
  --t-fast:      .2s;
  --t-med:       .35s;

  --z-marquee:   400;
  --z-sticky:    450;
  --z-drawer:    500;
  --z-overlay:   600;
  --z-gate:      900;

  /* ---- 3. BUILD 3 (owner, 18 Nov 2026): the Hims feel and the group colours.
     page / card: white page, ice cards (build 4); the card is the vial
     tiles' own ground (label_vials.py PAGE) so a vial floats seamlessly.
     soft: the second phrase of a headline, large type only (3.6:1 on page).
     Group colours: the label, the cap and the orbit behind each vial. */
  --page:            #FFFFFF;
  --card:            #EEF3F2;   /* Mist: cards and the product tiles' ground */
  --card-2:          #E2EAE8;
  --cream:           #EEF3F2;
  --ink:             #0B1E22;
  --soft:            #5E6F72;
  --hair:            color-mix(in srgb, #0B1E22 9%, transparent);
  --g-peptides:        #0B1E22;
  --g-copper-peptides: #0B1E22;
  --g-blends:          #0B1E22;
  --g-small-molecules: #0B1E22;
  --g-lab-supplies:    #687486;
}

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

/* ---- TYPE: Geist for headings and text, Geist Mono for figures (owner,
   21 Nov 2026: "go with Geist"). The logo and the vial labels stay in the
   brand guide's artwork (Outfit). */

/* ---- 5. DARK TONE: navy panels ----------------------------------------- */
.tone-dark {
  --accent:          var(--sky);
  --accent-bright:   var(--sky);
  --accent-soft:     color-mix(in srgb, var(--sky) 12%, transparent);
  --accent-line:     color-mix(in srgb, var(--sky) 38%, transparent);
  --accent-fill:     var(--sky);

  --bg:              var(--navy);
  --bg-alt:          var(--navy-deep);
  --panel:           color-mix(in srgb, var(--white) 5%, var(--navy));
  --surface:         color-mix(in srgb, var(--white) 5%, transparent);
  --surface-hover:   color-mix(in srgb, var(--white) 9%, transparent);
  --band:            var(--navy-deep);

  --line:            color-mix(in srgb, var(--white) 22%, transparent);
  --line-soft:       color-mix(in srgb, var(--white) 14%, transparent);
  --line-faint:      color-mix(in srgb, var(--white) 8%,  transparent);

  --text:            var(--white);
  --text-body:       color-mix(in srgb, var(--white) 82%, transparent);
  --text-dim:        color-mix(in srgb, var(--white) 72%, transparent);
  --text-faint:      color-mix(in srgb, var(--white) 64%, transparent);

  --btn-bg:          var(--white);
  --btn-bg-hover:    var(--ice-2);
  --btn-ink:         var(--navy);

  color: var(--text-body);
}
