/* ============================================================================
   APEX GAMA SOLUTIONS — Design Tokens
   Single source of truth for color, type, space, and structure.
   Implements docs/03-design-system.md. Portable to any static host; no build.
   ========================================================================== */

:root {
  /* ---- Color: dark-forward (night-operations / darkened bridge) ----------- */
  --ink:        #05080B;   /* deepest surface — bg-ink sections                */
  --slate-900:  #080C11;   /* ground base                                      */
  --slate-800:  #0E151D;   /* footer / dark panels                             */
  --slate-700:  #17212C;   /* raised hover                                     */
  --slate-600:  #94A2AE;   /* secondary/muted text (light on dark)             */
  --slate-500:  #7F8E9B;   /* muted text / eyebrow                             */
  --slate-400:  #6A7883;   /* subtle text                                      */
  --slate-300:  #B0BCC6;   /* ghost-border text / footer legal                */
  --slate-200:  #243441;   /* hairlines / borders (steel-dark)                 */
  --slate-100:  #1B2632;

  --paper:        #080C11; /* primary background — abyssal navy-black          */
  --paper-raised: #0E151D; /* cards / raised surfaces                          */
  --stone-100:    #0C131B; /* alternating section background                   */
  --stone-200:    #121A23;

  /* ---- Color: accent (instrument amber, evolved from brand ochre) --------- */
  --ochre:      #E6A24C;   /* primary accent — rules, active, small marks      */
  --ochre-deep: #EBAC60;   /* accent text / links on dark                      */
  --ochre-deeper: #F2C588; /* accent hover                                     */
  --ochre-soft: #E6A24C;   /* accent on dark grounds                           */
  --steel:      #5E86A0;   /* secondary/data accent                            */
  --steel-soft: #7FA6BE;

  /* ---- Semantic assignments ---------------------------------------------- */
  --bg:            var(--paper);
  --bg-alt:        var(--stone-100);
  --surface:       var(--paper-raised);
  --text:          #EAEEF2;
  --text-muted:    var(--slate-600);
  --text-subtle:   var(--slate-500);
  --border:        var(--slate-200);
  --border-strong: var(--slate-400);
  --accent:        var(--ochre);
  --accent-hover:  var(--ochre-deep);

  --focus-ring: var(--ochre);

  /* ---- Typography --------------------------------------------------------- */
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", "Menlo",
               "Consolas", monospace;

  /* Fluid type scale — major third (~1.25) */
  --step--1: clamp(0.80rem, 0.77rem + 0.14vw, 0.875rem);
  --step-0:  clamp(1.00rem, 0.96rem + 0.18vw, 1.0625rem);
  --step-1:  clamp(1.20rem, 1.13rem + 0.34vw, 1.375rem);
  --step-2:  clamp(1.44rem, 1.33rem + 0.55vw, 1.75rem);
  --step-3:  clamp(1.73rem, 1.55rem + 0.86vw, 2.25rem);
  --step-4:  clamp(2.07rem, 1.79rem + 1.36vw, 2.9375rem);
  --step-5:  clamp(2.49rem, 2.05rem + 2.10vw, 3.75rem);
  --step-6:  clamp(2.85rem, 2.16rem + 3.35vw, 4.75rem);

  --leading-tight: 1.1;
  --leading-snug: 1.28;
  --leading-body: 1.62;
  --tracking-mono: 0.14em;
  --tracking-wide: 0.02em;

  /* ---- Spacing scale ------------------------------------------------------ */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs:  0.75rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  2rem;
  --space-xl:  3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --space-4xl: 8rem;

  /* ---- Layout ------------------------------------------------------------- */
  --container: 1200px;
  --container-narrow: 920px;
  --measure: 68ch;
  --gutter: clamp(1.25rem, 0.6rem + 3vw, 3rem);
  --section-y: clamp(3.5rem, 2rem + 6vw, 7rem);

  /* ---- Lines, radius, shadow (restrained) --------------------------------- */
  --hair: 1px;
  --rule: 2px;
  --radius: 2px;         /* near-square; no rounded-card aesthetic             */
  --radius-none: 0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 22px 50px -22px rgba(0, 0, 0, 0.75);

  /* ---- Motion ------------------------------------------------------------- */
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
  --dur: 220ms;
}

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