/* ==========================================================================
   CloudDW design tokens · v1.0

   Layout concept: the page is a cross-section. Cloud above, the lake line in
   the middle, the vault below, and a visitor descends through them. The site
   is set on the Vault ground from top to bottom. The Cloud ground is the same
   system in light.
   ========================================================================== */

:root {
  /* ---- Palette: Cloud strata (light) ---------------------------------- */
  --cdw-cloud: #F3F6F6;   /* page ground */
  --cdw-mist: #E6ECED;    /* raised surface */
  --cdw-fog: #C9D3D6;     /* hairlines */
  --cdw-steel: #5A696E;   /* secondary text */
  --cdw-ink: #0B1417;     /* primary text */

  /* ---- Palette: Vault strata (dark) ----------------------------------- */
  --cdw-vault: #0A1215;   /* page ground */
  --cdw-lake: #111D21;    /* raised surface */
  --cdw-reed: #2A3B41;    /* hairlines */
  --cdw-haze: #93A4AA;    /* secondary text */
  --cdw-frost: #EAF1F2;   /* primary text */

  /* ---- Palette: Medallion and ice ------------------------------------- */
  --cdw-gold: #F0B429;       /* the one spot colour */
  --cdw-gold-deep: #8A6100;  /* gold as text on light grounds */
  --cdw-silver: #C7CDD1;
  --cdw-bronze: #B5713F;
  --cdw-ice: #BDE4EC;

  /* ---- Palette: Status (terminal panels only, always on Vault) -------- */
  --cdw-pass: #3DB489;
  --cdw-fail: #E0604C;

  /* ---- Type ------------------------------------------------------------ */
  --font-display: "Archivo", "Arial Nova", "Helvetica Neue", Arial, sans-serif;
  --font-text: "Archivo", "Arial Nova", "Helvetica Neue", Arial, sans-serif;
  --font-data: "Martian Mono", ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  --display-stretch: 125%;   /* headlines are set wide and low, like strata */
  --text-stretch: 100%;

  --type-display-xl: clamp(2.5rem, 4.4vw, 4.375rem);
  --type-display-l: clamp(1.875rem, 3.2vw, 3rem);
  --type-title: 1.25rem;
  --type-lede: 1.1875rem;
  --type-body: 1rem;
  --type-small: 0.875rem;
  --type-label: 0.6875rem;
  --measure: 62ch;

  /* ---- Space (8 px base) ---------------------------------------------- */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;

  /* ---- Grid ------------------------------------------------------------ */
  --cols: 12;
  --gutter: 24px;
  --margin: clamp(20px, 5vw, 80px);
  --max: 1320px;

  /* ---- Shape: two radii, no drawn shadows ----------------------------- */
  --r-slab: 2px;     /* anything that holds content */
  --r-pill: 999px;   /* anything you can press */
  --hairline: 1px;

  /* ---- Motion ---------------------------------------------------------- */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t-fast: 160ms;
  --t-slow: 600ms;

  /* ---- Semantic roles: Cloud theme (default) -------------------------- */
  --bg: var(--cdw-cloud);
  --surface: var(--cdw-mist);
  --line: var(--cdw-fog);
  --text: var(--cdw-ink);
  --text-2: var(--cdw-steel);
  --accent: var(--cdw-gold);
  --on-accent: var(--cdw-ink);
  --accent-text: var(--cdw-gold-deep);
  color-scheme: light;
}

/* ---- Semantic roles: Vault theme -------------------------------------- */
[data-theme="vault"] {
  --bg: var(--cdw-vault);
  --surface: var(--cdw-lake);
  --line: var(--cdw-reed);
  --text: var(--cdw-frost);
  --text-2: var(--cdw-haze);
  --accent: var(--cdw-gold);
  --on-accent: var(--cdw-ink);
  --accent-text: var(--cdw-gold);
  color-scheme: dark;
}

@media (max-width: 1023px) {
  :root { --cols: 8; --gutter: 20px; }
}

@media (max-width: 639px) {
  :root { --cols: 4; --gutter: 16px; }
}

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