/*
  alexandrostzoumas.com — design tokens
  Single source for colors, type, spacing, radius, shadow and motion.
  Used by: public/ (site + game), coming-soon/, admin/.
  Docs and visual reference: design/README.md, design/index.html.

  THEMES
  Every color is one light-dark(light, dark) value, so the two themes cannot drift.
  - Default: follows the visitor's system setting.
  - <html data-theme="light"> or <html data-theme="dark"> forces one theme.

  RULE: pages use the semantic tokens (--ink, --accent, --tech ...).
  The --brand-* tokens are for the logo, the crossing × and the bridge gradient only.
*/

:root {
  color-scheme: light dark;

  /* ---------- Brand (logo colors — do not change, see brand/README.md) ---------- */
  --brand-blue:   light-dark(#2D69E0, #5C8DF6);   /* tech        */
  --brand-purple: light-dark(#7438DB, #A273FF);   /* the bridge  */
  --brand-coral:  light-dark(#E5532F, #FF7556);   /* business    */
  --brand-badge: #2C1858;                          /* badge disc, both themes */
  /* The badge arch always uses the dark-theme accents, because the disc is always dark. */
  --brand-arch-blue: #5C8DF6;
  --brand-arch-purple: #A273FF;
  --brand-arch-coral: #FF7556;
  --gradient-bridge: linear-gradient(90deg, var(--brand-blue), var(--brand-purple), var(--brand-coral));
  /* Third-party logos (LinkedIn, X, Threads): one color, black or white, as their brand rules allow. */
  --social-ink: light-dark(#000000, #FFFFFF);

  /* ---------- Surfaces and text ---------- */
  --bg:          light-dark(#FFFFFF, #110F17);   /* page                         */
  --surface:     light-dark(#F6F5F9, #1A1722);   /* panels, code, game stage     */
  --ink:         light-dark(#18151F, #ECE9F3);   /* body text      18.0 / 15.9:1 */
  --muted:       light-dark(#5E596C, #A19CB0);   /* secondary text  6.7 /  7.2:1 */
  --line:        light-dark(#E2DFE9, #2A2635);   /* dividers only (decorative)   */
  --line-strong: light-dark(#8E899C, #6E6980);   /* input and control borders, ≥ 3:1 */

  /* ---------- Accent (purple = the bridge) ---------- */
  --accent:      light-dark(#7438DB, #A273FF);   /* links, primary buttons  6.3 / 5.8:1 */
  --accent-soft: light-dark(#ECE6F8, #221B33);   /* tinted panels, selected rows */
  --on-accent:   light-dark(#FFFFFF, #110F17);   /* text on --accent */

  /* ---------- Two worlds (text-safe versions of the logo colors) ---------- */
  --tech: light-dark(#2D69E0, #5C8DF6);          /* 5.0 / 6.0:1 */
  --biz:  light-dark(#C4431F, #FF7556);          /* 5.0 / 7.2:1 — brand coral is too light for text on white */

  /* ---------- Status (admin app) ---------- */
  --success:      light-dark(#1F7A4D, #5FD39A);
  --success-soft: light-dark(#E2F3EA, #15291F);
  --warning:      light-dark(#8A5A00, #F2C063);
  --warning-soft: light-dark(#FBF0D9, #2B2312);
  --danger:       var(--biz);
  --danger-soft:  light-dark(#FEF3F0, #2E1A16);

  /* ---------- Type ---------- */
  --font-display: "Sora", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body:    "IBM Plex Sans", "Segoe UI", Roboto, system-ui, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* Loaded weights: Sora 300/600/700, Plex Sans 400/600 + italic 400, Plex Mono 400.
     Do not use other weights: the browser fakes them. */
  --weight-light: 300;    /* Sora: the voice (taglines, greetings, "tzoumas") */
  --weight-regular: 400;
  --weight-semibold: 600; /* headings, buttons, labels */
  --weight-bold: 700;     /* Sora only: hero headline */

  --text-xs:   0.75rem;    /* 12px  pills, counters        */
  --text-sm:   0.875rem;   /* 14px  help text, small UI    */
  --text-base: 1.0625rem;  /* 17px  site body              */
  --text-ui:   0.9375rem;  /* 15px  admin body             */
  --text-lg:   1.25rem;    /* 20px                         */
  --text-h3:   1.125rem;
  --text-h2:   clamp(1.6rem, 4.5vw, 2.1rem);
  --text-h1:   clamp(2.4rem, 7.5vw, 4.6rem);
  --text-lede: clamp(1.2rem, 3.2vw, 1.45rem);
  --text-voice: clamp(1.4rem, 4.5vw, 2rem);

  --leading-tight: 1.05;
  --leading-heading: 1.15;
  --leading-body: 1.65;
  --leading-ui: 1.5;

  --tracking-display: -0.035em;
  --tracking-heading: -0.02em;
  --tracking-eyebrow: 0.12em;

  /* ---------- Space (4px steps) ---------- */
  --space-1: 0.25rem;  /*  4 */
  --space-2: 0.5rem;   /*  8 */
  --space-3: 0.75rem;  /* 12 */
  --space-4: 1rem;     /* 16 */
  --space-5: 1.5rem;   /* 24 */
  --space-6: 2rem;     /* 32 */
  --space-7: 3rem;     /* 48 */
  --space-8: 4.5rem;   /* 72 */

  /* ---------- Layout ---------- */
  --measure: 46rem;      /* page column  */
  --measure-prose: 38rem;
  --gutter: 1.5rem;
  --tap: 44px;           /* minimum touch target */

  /* ---------- Radius ---------- */
  --radius-sm: 6px;      /* focus ring, small boxes    */
  --radius-md: 10px;     /* inputs, list rows          */
  --radius-lg: 14px;     /* code blocks, lists         */
  --radius-xl: 20px;     /* cards, game stage          */
  --radius-pill: 999px;  /* buttons, chips, segmented  */

  /* ---------- Shadow (use little: the system is flat) ---------- */
  --shadow-pop: 0 20px 60px light-dark(rgb(30 10 60 / 0.18), rgb(0 0 0 / 0.55));
  --ring-accent: 0 0 0 4px var(--bg), 0 0 0 6px var(--accent);

  /* ---------- Focus ---------- */
  --focus-width: 3px;
  --focus-offset: 3px;
  --focus-color: var(--accent);

  /* ---------- Motion ---------- */
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-standard: ease-out;
  --dur-1: 150ms;   /* hover, color   */
  --dur-2: 260ms;   /* view arrive    */
  --dur-3: 400ms;   /* fades          */
  --dur-4: 800ms;   /* game layout    */

  /* ---------- Layers ---------- */
  --z-sticky: 5;
  --z-overlay: 20;
  --z-modal: 50;
  --z-toast: 100;
}

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"]  { color-scheme: dark; }

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