/* =========================================================================
   HARBOUR — Foundations: Color + Type · v1.1
   Source of truth: the Harbour Brand Book (harbourmade.ca/brand2).
   Companions: harbour-tokens.json (same values, W3C-style) and
   /brand2/harbour-brand.md (the full rules as markdown).
   "Every colour has a job." Small palette, two type roles, quiet surfaces.
   -------------------------------------------------------------------------
   FONTS: this system renders in **Geist + Geist Mono** (Vercel, free / OFL) —
   a neutral "no-style" grotesque with a matching mono, chosen to fit Harbour's
   two type roles (sans for reading, mono for details). Geist loads from Google
   Fonts below — no files to bundle, nothing missing.

   Brand target: the paid typeface **Saans** (displaay.net/typeface/saans). If
   you license Saans for web, add its woff2 to fonts/, then prepend 'Saans' to
   the --font-sans stack and add @font-face rules — it will take over.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap');

:root {
  /* =====================================================================
     PALETTE — "Every colour has a job." (exact brand-book values)
     ===================================================================== */
  --ink:      #111114;   /* main reading colour: text, logo, frames, PRIMARY actions */
  --paper:    #FFFFFF;   /* default surface */
  --field:    #F7F7F5;   /* panels, controls (neutral light grey, NOT cream) */
  --muted:    #6B6864;   /* secondary copy */
  --harbour:  #163E5C;   /* Harbour Blue — public hero, brand action, focus, selected */
  --green:    #1F7A4D;   /* Signal Green — status ONLY: live, approved, ready, shipped */

  /* Working tints derived from the six (no new accent colours) */
  --ink-90:   #1C1C20;
  --ink-70:   #3A3A3D;
  --harbour-tint:   rgba(22, 62, 92, 0.08);   /* selected / hover wash */
  --harbour-tint-2: rgba(22, 62, 92, 0.14);
  --harbour-deep:   #0F2C42;                  /* darker blue for hero depth */
  --green-bg: rgba(31, 122, 77, 0.12);
  --green-fg: #1A6541;

  /* Structure — thin Ink lines */
  --line:        rgba(17, 17, 20, 0.10);
  --line-strong: rgba(17, 17, 20, 0.18);
  --line-on-dark: rgba(255, 255, 255, 0.16);

  /* Foreground roles */
  --fg-1: var(--ink);
  --fg-2: var(--ink-70);
  --fg-3: var(--muted);
  --on-dark:   #FFFFFF;
  --on-dark-2: rgba(255, 255, 255, 0.72);

  /* Semantic roles (use these in product UI) */
  --bg:            var(--paper);
  --bg-field:      var(--field);
  --primary:       var(--ink);          /* primary action = Ink solid */
  --primary-hover: #26262B;
  --primary-press: #000000;
  --on-primary:    var(--paper);
  --brand:         var(--harbour);      /* hero / selected / focus */
  --focus-ring:    rgba(22, 62, 92, 0.40);
  --status:        var(--green);        /* positive status only */

  /* =====================================================================
     TYPE — two roles. Geist for reading; Geist Mono for details.
     ===================================================================== */
  --font-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', 'SFMono-Regular', Menlo, Consolas, monospace;

  /* Weights: medium headings · strong actions · regular reading */
  --w-regular: 400;
  --w-medium:  500;
  --w-strong:  600;

  /* Scale — public can be expressive; keep card/panel type modest */
  --fs-display: clamp(2.4rem, 1.4rem + 4vw, 3.75rem); /* 38 → 60 public hero */
  --fs-h1:   2.375rem;  /* 38 */
  --fs-h2:   1.875rem;  /* 30 */
  --fs-h3:   1.375rem;  /* 22 */
  --fs-h4:   1.125rem;  /* 18 */
  --fs-body-lg: 1.1875rem; /* 19 */
  --fs-body: 1.0625rem; /* 17 */
  --fs-small: 0.875rem; /* 14 */
  --fs-label: 0.75rem;  /* 12 — mono detail labels */

  --lh-tight: 1.1;
  --lh-snug:  1.25;
  --lh-body:  1.55;
  --tracking-label: 0.08em;   /* only small mono labels get wider tracking */
  --tracking-normal: 0;

  /* =====================================================================
     RADIUS · SHADOW · SPACING · MOTION
     Rule: cards & mockups use 8px radius or less. Quiet elevation.
     ===================================================================== */
  --r-xs: 3px;
  --r-sm: 5px;
  --r-md: 7px;
  --r-lg: 8px;          /* card max */
  --r-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(17,17,20,0.05);
  --shadow-sm: 0 1px 3px rgba(17,17,20,0.06);
  --shadow-md: 0 6px 18px -8px rgba(17,17,20,0.12);
  --shadow-lg: 0 18px 44px -20px rgba(17,17,20,0.20);

  --sp-1: 4px;   --sp-2: 8px;   --sp-3: 12px;  --sp-4: 16px;
  --sp-5: 24px;  --sp-6: 32px;  --sp-7: 48px;  --sp-8: 64px;
  --sp-9: 96px;  --sp-10: 128px;

  /* Motion clarifies state. Slow, short, reduced-motion safe. */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --dur-fast: 130ms;
  --dur: 200ms;
  --dur-slow: 380ms;

  --maxw: 1200px;
}

/* =========================================================================
   SEMANTIC ELEMENT STYLES
   ========================================================================= */
body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--fg-1);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.h-display {
  font-family: var(--font-sans);
  font-weight: var(--w-medium);
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
}
h1, .h1 { font-family: var(--font-sans); font-weight: var(--w-medium); font-size: var(--fs-h1);
  line-height: var(--lh-tight); letter-spacing: -0.012em; color: var(--ink); text-wrap: balance; }
h2, .h2 { font-family: var(--font-sans); font-weight: var(--w-medium); font-size: var(--fs-h2);
  line-height: var(--lh-snug); letter-spacing: -0.01em; color: var(--ink); text-wrap: balance; }
h3, .h3 { font-family: var(--font-sans); font-weight: var(--w-strong); font-size: var(--fs-h3);
  line-height: var(--lh-snug); letter-spacing: -0.005em; color: var(--ink); }
h4, .h4 { font-family: var(--font-sans); font-weight: var(--w-strong); font-size: var(--fs-h4);
  line-height: 1.35; color: var(--ink); }

p, .body { font-size: var(--fs-body); line-height: var(--lh-body); color: var(--fg-2); }
.body-lg { font-size: var(--fs-body-lg); line-height: 1.5; color: var(--fg-2); }
.small  { font-size: var(--fs-small); }
.muted  { color: var(--muted); }

/* Mono detail label — labels, values, dates, status, specs. Keep it brief. */
.label, .eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: var(--w-medium);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--muted);
}
.mono { font-family: var(--font-mono); font-feature-settings: "tnum" 1; }

a { color: var(--harbour); text-underline-offset: 3px; text-decoration-color: rgba(22,62,92,.35); }
a:hover { text-decoration-color: currentColor; }

::selection { background: var(--harbour-tint-2); color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
