/* ============================================================
   Soofos Redesign — Design tokens & shared component classes
   NEW BRAND: Mulish, Soofos blues, red-convert buttons, 8px radius.
   Variable names are stable so var() references across pages
   pick up the new brand automatically.
   ============================================================ */

:root {
  /* Brand blues (the 5 Soofos tints) */
  --blue:           #639ce0;   /* Klassiek — PRIMARY blue */
  --blue-hover:     #327dd6;   /* Helder — hover/darker */
  --deep-blue:      #2261ab;   /* Donker — deep text/accents (AA text on white). Not a button fill: primary buttons use --blue / --blue-hover. */
  --blue-fill:      #e6effa;   /* Licht — soft fills/tints */
  --blue-tint:      #f6f9fd;   /* Achtergrond — page background */
  --blue-border:    #dbe3ee;
  --blue-on-navy:   #639ce0;

  /* Ink & neutrals */
  --ink:            #21344b;   /* navy — headings */
  --ink-2:          #2b4c74;   /* lighter navy — gradient partner on navy cards */
  --ink-soft:       #2261ab;   /* secondary navy/accent */
  --body:           #333333;
  --body-2:         #444444;
  --near-ink:       #333333;
  --muted:          #5a6b7a;
  --muted-2:        #7d8a99;
  --faint:          #a7b2c0;

  /* Surfaces */
  --page:           #f6f9fd;   /* light page background */
  --canvas:         #eef1f6;   /* cool strip / deeper bg */
  --white:          #ffffff;
  --strip:          #eef1f6;   /* cool strip / search pill */

  /* Borders */
  --card-border:    #dbe3ee;
  --input-border:   #dbe3ee;
  --dash-border:    #a7b2c0;

  /* Danger / destructive UI */
  --red-danger:     #d32f2f;   /* destructive UI: delete account, form errors */
  --error:          #c0392b;   /* error status text */
  --amber-ink:      #8a6a2b;   /* star ratings / amber-on-light text */

  /* Convert / status button colors */
  --red:            #ff4859;   /* convert / buy / pay */
  --red-hover:      #e43f42;
  --red-ink:        #c22c3a;   /* red text/accent (AA on white). Not a button fill: purchase buttons use --red / --red-hover. */
  --red-fill:       #ffe7ea;
  --green:          #22b66d;   /* save / positive */
  --green-hover:    #12925a;
  --green-fill:     #e6f6ee;
  --green-ink:      #12925a;

  /* Supporting palette (accents only — fill / ink / solid) */
  --purple:         #963eff; --purple-fill:#efe6ff; --purple-ink:#6a1ff0;
  --lightblue:      #0bb9f7; --lightblue-fill:#dcf5ff; --lightblue-ink:#0784b3;
  --orange:         #ff7417; --orange-fill:#ffece0; --orange-ink:#d1520a;
  --yellow:         #fbd607; --yellow-fill:#fdf6cf; --yellow-ink:#8a6a2b;
  --red-cat:        #ff4859; --red-cat-fill:#ffe7ea; --red-cat-ink:#c22c3a;

  /* Amber-named vars kept as aliases → now the yellow system (legacy refs) */
  --amber:          #fbd607;
  --amber-badge-tx: #8a6a2b;
  --amber-fill:     #fdf6cf;
  --amber-fill-2:   #fdf6cf;
  --amber-text:     #8a6a2b;
  --amber-text-2:   #8a6a2b;

  /* Player dark */
  --player-dark:    #21344b;

  /* Rating stars — a brighter gold than the amber/yellow system, reserved for
     star ratings only (course rating, review stars). */
  --star:           #E8A33D;
  --star-track:     #eef1f6;

  /* Text tones on the dark navy hero (player-dark surface). White for primary,
     progressively softer blues for secondary/meta text on navy. */
  --on-navy:        #ffffff;
  --on-navy-strong: #cfe0f5;
  --on-navy-muted:  #b9c6d8;
  --on-navy-faint:  #9db4d1;
  --on-navy-line:   rgba(255,255,255,.28);
  --on-navy-fill:   rgba(255,255,255,.15);

  /* Radii & shadow */
  --r-pill:  999px;   /* chips / tags only */
  --r-btn:   8px;     /* buttons */
  --r-card:  16px;
  --r-card-sm: 12px;
  --r-card-lg: 20px;
  --shadow-card: 0 8px 24px rgba(33,52,75,.10);
  --shadow-soft: 0 1px 3px rgba(33,52,75,.08);
  --shadow-pop:  0 8px 24px rgba(33,52,75,.14);
  --overlay:     rgba(33,52,75,.5);   /* modal/backdrop scrim — ink @ 50% */

  /* Elevation on the dark navy hero surface: a neutral-black drop shadow, so
     white cards still separate from --player-dark (the ink-tinted --shadow-*
     family disappears against it). */
  --shadow-on-navy:      0 18px 50px rgba(0,0,0,.22);
  /* Floating control bar that overlaps the hero edge. */
  --shadow-float:        0 12px 34px rgba(33,52,75,.14);
  /* Translucent white surface for the same floating bar (backdrop-blurred). */
  --glass-white:         rgba(255,255,255,.97);

  /* Program sales page (design version C, Nov 2026): the few colours the
     page needs beyond the palette. Used by assets/css/pages/program-sales.css. */
  --navy-shade:        #0a131e;   /* shadows and text shadows over photos, always with alpha */
  --veil:              #101a28;   /* spotlight veil and player overlays, always with alpha */
  --end-screen:        #15233a;   /* video end screen, with alpha */
  --video-bg:          #0b1420;   /* video frame behind the film */
  --on-navy-tint:      #e6effa;   /* light-blue text on navy or a darkened photo */
  --on-navy-accent:    #a1c4ec;   /* accent line on the video end screen */
  --on-navy-soft:      #c9d3e0;   /* quiet text on the video end screen */
  --glow-blue:         #c4dbf6;   /* soft glow around the intro video */
  --muted-ink:         #454f58;   /* quiet section-menu links */
  --chip-ink:          #2b4c74;   /* text of the light fact chips */
  --flow-track:        #d5e3f5;   /* timeline line before it fills */
  --flow-track-static: #c9dcf3;   /* timeline line without script */
  --flow-card-border:  #e3eaf5;
  --flow-live-fill:    #eef5fd;   /* live-session step */
  --flow-live-border:  #cfe0f6;

  /* Layout */
  --container-max: 1240px;   /* boxed content width for public pages (matches home sections) */
  --container-browse: 1200px; /* public browse surfaces (catalogue / category / topic) */

  --font: 'Mulish', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --mono: ui-monospace, Menlo, Consolas, monospace;
}

/* ============================================================
   Dark mode — ONE site-wide theme (Klaas, 2026-10).
   Set on <html data-theme="dark"> before first paint by
   inc/theme-mode.php (default light; the learner's choice is kept in
   localStorage `soofos-theme` and, when logged in, in user meta so it
   follows them across devices). Brand blue/red button fills and the
   colourful category solids stay identical; only surfaces, text, borders
   and pale fills are re-pointed. Values derive from the brand navy
   (#21344b mixed toward black) and brand tints mixed over that surface.

   Two tokens have a fixed role in dark that differs from their name:
   --white  = the card/surface colour (most CSS paints surfaces with it);
              white text on blue/red/navy fills uses --on-navy (#fff).
   --ink    = primary text (light); a navy *surface* uses --player-dark.
   ============================================================ */
:root[data-theme="dark"] {
  color-scheme: dark;

  /* Surfaces */
  --white:          #182536;   /* card / panel surface (navy 72% → black) */
  --page:           #121d29;   /* page background (navy 55% → black) */
  --canvas:         #101923;   /* deeper strip / sidebar */
  --strip:          #1d2e42;   /* raised strip / search pill */
  --glass-white:    rgba(24, 37, 54, .97);

  /* Text */
  --ink:            #eff5fc;
  --ink-soft:       #a1c4ec;
  --body:           #cfe0f5;
  --body-2:         #cfe0f5;
  --near-ink:       #cfe0f5;
  --muted:          #b9c6d8;
  --muted-2:        #9db4d1;
  --faint:          #687b93;

  /* Borders */
  --card-border:    #384452;
  --input-border:   #46535f;
  --dash-border:    #687b93;
  --blue-border:    #384452;

  /* Blue tints (brand --blue / --blue-hover fills are unchanged) */
  --deep-blue:      #a1c4ec;   /* links / accents: readable on dark */
  --blue-fill:      #2a425f;
  --blue-tint:      #21334a;

  /* Status */
  --error:          #ff7f8b;
  --red-ink:        #ff7f8b;
  --red-fill:       #422b3c;
  --green-ink:      #64cc99;
  --green-fill:     #1a4241;
  --amber-ink:      #fbd607;
  --amber-badge-tx: #fbd607;
  --amber-fill:     #3c412e;
  --amber-fill-2:   #3c412e;
  --amber-text:     #fbd607;
  --amber-text-2:   #fbd607;

  /* Supporting palette: solids unchanged, fills/inks re-mixed for dark */
  --purple-fill:    #312a5e; --purple-ink:    #c08bff;
  --lightblue-fill: #15435d; --lightblue-ink: #6dd5fa;
  --orange-fill:    #463530; --orange-ink:    #ffac74;
  --yellow-fill:    #3c412e; --yellow-ink:    #fbd607;
  --red-cat-fill:   #422b3c; --red-cat-ink:   #ff7f8b;

  --star-track:     #4b5562;

  /* Elevation & scrim: neutral black instead of ink-tinted */
  --shadow-card:    0 8px 24px rgba(0, 0, 0, .35);
  --shadow-soft:    0 1px 3px rgba(0, 0, 0, .4);
  --shadow-pop:     0 8px 24px rgba(0, 0, 0, .45);
  --shadow-float:   0 12px 34px rgba(0, 0, 0, .4);
  --overlay:        rgba(5, 10, 16, .7);

  /* Program sales page (version C): surface-bound colours re-pointed. */
  --glow-blue:         #2a425f;
  --muted-ink:         #b9c6d8;
  --chip-ink:          #cfe0f5;
  --flow-track:        #384452;
  --flow-track-static: #384452;
  --flow-card-border:  #384452;
  --flow-live-fill:    #21334a;
  --flow-live-border:  #46535f;
}
