/* ═══════════════════════════════════════════════════════════════════
   HOUSE STILLWELL — DESIGN TOKENS (lifted for comm)
   Source: 3d3q3/HS-Brand, design-system/colors_and_type.css
   (commit cfcea7164e8e5ec82a46edc73644781628cfc632, blob c93aa53b).
   The :root and [data-mode="night"] blocks are copied unchanged, with
   their variable names, as docs/roles/for-app-creators.md asks; the
   @font-face rules live in fonts.css (self-hosted WOFF2, same families).
   See ../PROVENANCE.md. Re-sync when the brand changes.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  /* Primary Regal Tones */
  --hs-royal-purple:      #5B2C83;   /* Purpure — sovereignty */
  --hs-imperial-gold:     #D4AF37;   /* Or — authority, wisdom */
  --hs-violet-black:      #1C0F26;   /* the quiet of the throne room */

  /* Aldebaran Signatures — the spectral hues of the star */
  --hs-aldebaran-red:     #ad0000;   /* deep, the star's flame */
  --hs-aldebaran-crimson: #af0501;   /* brighter, living blood */
  --hs-stellar-ochre:     #726b04;   /* warm earth, harvest gold */

  /* Base & Surface Tones */
  --hs-cosmic-midnight:   #020645;   /* the vault of night */
  --hs-verdant-emerald:   #085f29;   /* Vert — growth, stewardship */
  --hs-sapphire-silver:   #A7B9D4;   /* Argent — cool counsel */
  --hs-ivory:             #F9F7F0;   /* parchment, the page */

  /* Derived tones — tints & shades for UI surfaces */
  --hs-purple-deep:       #3d1d59;
  --hs-purple-soft:       #7a4aa8;
  --hs-purple-mist:       #e8ddf0;
  --hs-gold-soft:         #e8c96b;
  --hs-gold-deep:         #a68824;
  --hs-parchment:         #F2ECD7;   /* aged parchment for documents */
  --hs-parchment-shadow:  #e0d6b8;
  --hs-ink:               #1a1420;   /* ink on parchment */
  --hs-ink-soft:          #3a2f42;

  /* COLOR — Semantic tokens (light/parchment mode default) */
  --color-bg:             var(--hs-parchment);
  --color-bg-alt:         var(--hs-ivory);
  --color-surface:        #faf6e8;
  --color-surface-raised: #fffcf0;

  --color-fg:             var(--hs-ink);
  --color-fg-muted:       var(--hs-ink-soft);
  --color-fg-subtle:      #6b5f70;

  --color-accent:         var(--hs-royal-purple);
  --color-accent-hover:   var(--hs-purple-deep);
  --color-gilt:           var(--hs-imperial-gold);
  --color-gilt-hover:     var(--hs-gold-deep);
  --color-flame:          var(--hs-aldebaran-red);
  --color-flame-bright:   var(--hs-aldebaran-crimson);

  --color-border:         #d8cba6;
  --color-border-strong:  #b8a76f;
  --color-rule-gilt:      var(--hs-imperial-gold);
  --color-rule-shadow:    rgba(28, 15, 38, 0.14);

  --color-link:           var(--hs-royal-purple);
  --color-link-hover:     var(--hs-aldebaran-red);
  --color-link-visited:   var(--hs-purple-deep);

  --color-success:        var(--hs-verdant-emerald);
  --color-warn:           var(--hs-stellar-ochre);
  --color-danger:         var(--hs-aldebaran-red);
  --color-info:           var(--hs-cosmic-midnight);

  /* TYPE — Font stacks */
  --font-display:   'Cinzel', Georgia, serif;
  --font-display-sm: 'Cinzel', Georgia, serif;
  --font-serif:     'EB Garamond', Georgia, 'Times New Roman', serif;
  --font-editorial: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  --font-script:    'Tangerine', cursive;
  --font-mono:      'JetBrains Mono', 'Courier New', monospace;
  --font-sans:      system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* TYPE — Scale & weights */
  --fs-xs:    11px;
  --fs-sm:    13px;
  --fs-base:  16px;
  --fs-md:    18px;
  --fs-lg:    22px;
  --fs-xl:    28px;
  --fs-2xl:   36px;
  --fs-3xl:   48px;
  --fs-4xl:   64px;
  --fs-5xl:   88px;
  --fs-6xl:   120px;

  --lh-tight:   1.12;
  --lh-snug:    1.28;
  --lh-normal:  1.5;
  --lh-loose:   1.72;

  --ls-tight:   -0.01em;
  --ls-normal:  0;
  --ls-wide:    0.08em;
  --ls-xwide:   0.22em;   /* for SMALL-CAPS mottos & section eyebrows */

  /* SPACING, RADII, ELEVATION, MOTION */
  --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;

  --radius-none: 0;
  --radius-sm:   2px;
  --radius-md:   4px;
  --radius-lg:   8px;
  --radius-pill: 999px;

  /* Elevation — a "manuscript" shadow system: warm, soft, low */
  --shadow-vellum: 0 1px 2px rgba(28, 15, 38, 0.08), 0 2px 6px rgba(28, 15, 38, 0.05);
  --shadow-card:   0 2px 6px rgba(28, 15, 38, 0.10), 0 12px 28px -12px rgba(28, 15, 38, 0.18);
  --shadow-seal:   0 4px 10px rgba(173, 0, 0, 0.22), 0 1px 2px rgba(28, 15, 38, 0.25);
  --shadow-gilt:   0 0 0 1px var(--hs-imperial-gold), 0 1px 3px rgba(28, 15, 38, 0.12);

  /* Motion — slow, deliberate, courtly. No bounce. */
  --ease-courtly:  cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-in:       cubic-bezier(0.4, 0, 1, 1);
  --ease-out:      cubic-bezier(0, 0, 0.2, 1);
  --dur-quick:     160ms;
  --dur-measured:  260ms;
  --dur-processional: 520ms;
}

/* DARK / NIGHT COURT — apply with data-mode="night" on a container. */
[data-mode="night"] {
  --color-bg:             var(--hs-violet-black);
  --color-bg-alt:         #120820;
  --color-surface:        #241638;
  --color-surface-raised: #2f1c47;

  --color-fg:             var(--hs-ivory);
  --color-fg-muted:       var(--hs-sapphire-silver);
  --color-fg-subtle:      #8a7aa0;

  --color-border:         #3d2855;
  --color-border-strong:  var(--hs-imperial-gold);

  --color-link:           var(--hs-gold-soft);
  --color-link-hover:     var(--hs-imperial-gold);
}
