/* ============================================================
   DAMASK — Design Tokens (canonical)
   Locked 15 Jul 2026 · direction "Tempered" (forged steel + brass)
   Accent: Brass (ACTION ONLY) · Type: Fraunces + General Sans · Ground: dark-primary
   This file is the source of truth. Claude Design imports it; Claude Code builds against it.
   Elevation model: NO shadows. Depth = surface fill-step + border. Forged, not pillowy.
   ============================================================ */

:root {
  /* ---- neutrals: cool forged steel ---- */
  --ds-ink:         #0E1013;  /* page base */
  --ds-surface-1:   #1A1F27;  /* cards (clear fill-step off ink) */
  --ds-surface-2:   #242B35;  /* nested / elevated */
  --ds-line:        #39424E;  /* decorative hairline only */
  --ds-line-strong: #59636F;  /* structural border / divider (visible) */

  /* ---- text ramp (full, no gaps) ---- */
  --ds-text:        #E9EBEE;  /* primary   ~15.9:1 on ink (AAA) */
  --ds-text-2:      #B4BAC2;  /* secondary ~8.5:1 (AAA) */
  --ds-text-dim:    #8A929D;  /* tertiary / captions ~5:1 (AA) */
  --ds-text-mute:   #5C646F;  /* disabled · placeholder · divider-on-surface · subtle icon */

  /* ---- accent: brass = ACTION ONLY (CTA + focus ring). Never for headings/labels/emphasis ---- */
  --ds-brass:       #C89B41;
  --ds-brass-hi:    #DBB05B;  /* hover + focus ring */
  --ds-brass-press: #A67F32;  /* active */
  --ds-on-brass:    #17130A;  /* text on brass fill (7.46:1) */
  --ds-brass-soft:  rgba(200,155,65,0.12);

  /* ---- semantic: tuned to the forge, always icon-paired, never adjacent to brass ---- */
  --ds-error:       #D2685E;  /* ember */
  --ds-error-soft:  rgba(210,104,94,0.14);
  --ds-success:     #6FA98C;  /* verdigris (aged-copper patina) */
  --ds-success-soft:rgba(111,169,140,0.14);
  --ds-warning:     #E58A34;  /* oxidised orange (deliberately redder than brass) */
  --ds-warning-soft:rgba(229,138,52,0.14);

  /* ---- type ---- */
  --ds-font-display: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --ds-font-body:    "General Sans", "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ds-display-opsz: 144;     /* drive Fraunces optical size at display sizes: dense, not fragile */

  /* type scale (~1.25 major third) */
  --ds-t-display: clamp(2.6rem, 1.7rem + 3vw, 4rem);
  --ds-t-h1:      clamp(1.9rem, 1.4rem + 1.6vw, 2.4rem);
  --ds-t-h2:      1.6rem;
  --ds-t-h3:      1.2rem;
  --ds-t-body-lg: 1.125rem;
  --ds-t-body:    1rem;
  --ds-t-sm:      0.875rem;
  --ds-t-label:   0.75rem;   /* uppercase, letter-spacing 0.18–0.2em */

  --ds-w-body: 400;
  --ds-w-medium: 500;
  --ds-w-semibold: 600;
  --ds-lh-body: 1.6;
  --ds-lh-tight: 1.05;

  /* ---- spacing (4px base) ---- */
  --ds-s1: 4px;  --ds-s2: 8px;  --ds-s3: 12px; --ds-s4: 16px; --ds-s5: 24px;
  --ds-s6: 32px; --ds-s7: 48px; --ds-s8: 64px; --ds-s9: 96px;

  /* ---- radius (tight; forged) ---- */
  --ds-r1: 2px; --ds-r2: 4px; --ds-r3: 8px;

  /* ---- motion (minimal) ---- */
  --ds-dur: 180ms;
  --ds-ease: cubic-bezier(0.2, 0, 0, 1);

  /* ---- focus ---- */
  --ds-focus-ring: 2px solid var(--ds-brass-hi);
  --ds-focus-offset: 3px;

  /* ---- layout ---- */
  --ds-maxw: 1080px;
}

/* Light = constrained UTILITY subset (email, docs). NOT a second brand identity.
   The brand ground is dark. Do not build the marketing surface light. */
[data-theme="light"] {
  --ds-ink:        #F4F3F0;
  --ds-surface-1:  #FFFFFF;
  --ds-surface-2:  #ECEAE5;
  --ds-line:       #DDDAD3;
  --ds-line-strong:#B9B4AB;
  --ds-text:       #17130A;
  --ds-text-2:     #46433C;
  --ds-text-dim:   #6B675F;
  --ds-text-mute:  #9A958C;
  --ds-brass:      #9A731F;  /* darkened for contrast on light */
  --ds-on-brass:   #FFFFFF;
}

@media (prefers-reduced-motion: reduce) {
  :root { --ds-dur: 0ms; }
}
