/* =====================================================================
   CLIPPER website tokens  -  app-tokens.css
   Sections 1 + 2 below are a VERBATIM copy of the desktop app's
   clipper/ui/static_next/css/tokens.css (v2 "plain", ChemLab palette),
   copied 2026-11-21. Do not edit them here: if the app changes, re-copy.
   Section 3 (bottom) holds the few website-only additions, each one
   derived from a value the app already uses.

   FONTS: the app ships NO web fonts. It uses the operating system's own:
     serif (headings, wordmark, card titles): Iowan Old Style (macOS/iOS),
       Palatino Linotype (Windows), Palatino, Georgia
     sans  (everything else): -apple-system / BlinkMacSystemFont (San Francisco),
       Segoe UI (Windows), Roboto, Helvetica, Arial
     mono: ui-monospace, SF Mono, Menlo, Consolas
   So the website must NOT add a Google Font or @font-face: the system
   stacks below are what make the page look like the app on the
   customer's own Mac or Windows machine. Two weights only: 400 and 600.

   THEME: light is the default. With no data-theme attribute the page
   follows prefers-color-scheme. <html data-theme="light|dark"> forces one
   (the app stores the choice in localStorage key "clip-theme").
   ===================================================================== */

/* ---------- 1. ChemLab palette: light (default) ---------- */
:root {
  color-scheme: light;
  --ground:#F3F6F5; --panel:#FFFFFF; --panel2:#EAF0EF; --ink:#16232B; --ink-soft:#51636E;
  --line:#D9E2E1; --bunsen:#2456A6; --bunsen-soft:#E3EBF7; --on-bunsen:#FFFFFF;
  --ok:#2E7D4F; --warn:#B0761A; --danger:#B23A3A;
  --warn-ink:#8A5A0F;   /* amber for text: 5.9:1 on --panel (--warn itself is only for dots, bars, icons) */
  --shadow:0 1px 3px rgba(22,35,43,.08),0 4px 16px rgba(22,35,43,.06); --r:10px;
  /* platform marks (icons only, never text / borders / backgrounds) */
  --twitch:#9146FF; --kick:#2C8C06; --youtube:#E00030; --tiktok:#16232B; --instagram:#D62D6A;
}
/* ---------- dark via the system: unused on the site (theme-init.js always sets data-theme); kept in step with the app ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground:#0F171C; --panel:#16222A; --panel2:#1C2A33; --ink:#E5EDEF; --ink-soft:#8FA3AD;
    --line:#24343D; --bunsen:#6FA0E8; --bunsen-soft:#1B2C42; --on-bunsen:#0F171C;
    --ok:#5BBF8A; --warn:#D9A24A; --danger:#E07B7B; --warn-ink:#D9A24A;
    --shadow:0 1px 3px rgba(0,0,0,.4),0 4px 16px rgba(0,0,0,.3);
    --twitch:#A970FF; --kick:#53FC18; --youtube:#FF4D6A; --tiktok:#E5EDEF; --instagram:#F0568C;
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --ground:#F3F6F5; --panel:#FFFFFF; --panel2:#EAF0EF; --ink:#16232B; --ink-soft:#51636E;
  --line:#D9E2E1; --bunsen:#2456A6; --bunsen-soft:#E3EBF7; --on-bunsen:#FFFFFF;
  --ok:#2E7D4F; --warn:#B0761A; --danger:#B23A3A; --warn-ink:#8A5A0F;
  --shadow:0 1px 3px rgba(22,35,43,.08),0 4px 16px rgba(22,35,43,.06);
  --twitch:#9146FF; --kick:#2C8C06; --youtube:#E00030; --tiktok:#16232B; --instagram:#D62D6A;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground:#0F171C; --panel:#16222A; --panel2:#1C2A33; --ink:#E5EDEF; --ink-soft:#8FA3AD;
  --line:#24343D; --bunsen:#6FA0E8; --bunsen-soft:#1B2C42; --on-bunsen:#0F171C;
  --ok:#5BBF8A; --warn:#D9A24A; --danger:#E07B7B; --warn-ink:#D9A24A;
  --shadow:0 1px 3px rgba(0,0,0,.4),0 4px 16px rgba(0,0,0,.3);
  --twitch:#A970FF; --kick:#53FC18; --youtube:#FF4D6A; --tiktok:#E5EDEF; --instagram:#F0568C;
}

/* ---------- 2. everything else (theme-independent; aliases resolve per theme) ---------- */
:root {
  /* derived helpers */
  --bunsen-hover: color-mix(in srgb, var(--bunsen) 88%, #000);
  --danger-hover: color-mix(in srgb, var(--danger) 88%, #000);
  --scrim-color: rgba(8, 14, 18, .5);

  /* ---------- v1 surfaces -> ChemLab ---------- */
  --bg:            var(--ground);
  --bg-sunken:     var(--panel2);
  --surface-1:     var(--panel);
  --surface-2:     var(--panel);
  --surface-3:     var(--panel2);
  --surface-4:     color-mix(in srgb, var(--ink) 9%, var(--panel));
  --overlay:       var(--panel);
  --glass:         var(--panel);
  --glass-strong:  var(--panel);
  --scrim:         var(--scrim-color);
  --tip-bg:        var(--ink);
  --well:          var(--panel);
  --tint-1: color-mix(in srgb, var(--ink) 3%, transparent);
  --tint-2: color-mix(in srgb, var(--ink) 6%, transparent);
  --tint-3: color-mix(in srgb, var(--ink) 10%, transparent);
  --tint-4: color-mix(in srgb, var(--ink) 18%, transparent);

  /* ---------- hairlines ---------- */
  --line-1: var(--line);
  --line-2: var(--line);
  --line-3: color-mix(in srgb, var(--ink) 22%, var(--line));
  --line-4: color-mix(in srgb, var(--ink) 38%, var(--line));
  --hairline-top: 0 0 0 0 transparent;   /* was a lit top edge; kept so shadow lists stay valid */

  /* ---------- ink ---------- */
  --ink-1: var(--ink);
  --ink-2: var(--ink-soft);
  --ink-3: var(--ink-soft);
  --ink-4: color-mix(in srgb, var(--ink-soft) 55%, var(--panel));   /* decorative / disabled only */
  --ink-inverse: var(--on-bunsen);

  /* ---------- brand (v1 names; all flat now) ---------- */
  --cyan: var(--bunsen);
  --pink: var(--danger);
  --violet: var(--bunsen);
  --grad-brand: var(--bunsen);
  --grad-brand-soft: var(--bunsen-soft);
  --grad-hot: var(--danger);
  --grad-instagram: var(--instagram);

  /* ---------- roles ---------- */
  --accent:       var(--bunsen);
  --accent-ink:   var(--bunsen);
  --accent-soft:  var(--bunsen-soft);
  --accent-line:  color-mix(in srgb, var(--bunsen) 45%, var(--line));

  --hot:          var(--danger);
  --hot-ink:      var(--danger);
  --hot-soft:     color-mix(in srgb, var(--danger) 10%, var(--panel));
  --hot-line:     color-mix(in srgb, var(--danger) 40%, var(--line));

  --success:      var(--ok);     --success-ink: var(--ok);
  --success-soft: color-mix(in srgb, var(--ok) 10%, var(--panel));     --success-line: color-mix(in srgb, var(--ok) 40%, var(--line));
  /* --warn-ink is set per theme above */
  --warn-soft:    color-mix(in srgb, var(--warn) 11%, var(--panel));   --warn-line:    color-mix(in srgb, var(--warn) 42%, var(--line));
  --danger-ink:   var(--danger);
  --danger-soft:  color-mix(in srgb, var(--danger) 10%, var(--panel)); --danger-line:  color-mix(in srgb, var(--danger) 42%, var(--line));
  --info:         var(--bunsen);  --info-ink: var(--bunsen);
  --info-soft:    var(--bunsen-soft);                                  --info-line:    color-mix(in srgb, var(--bunsen) 40%, var(--line));

  /* platform "-ink" names: text never uses platform colour, so these are plain ink */
  --twitch-ink: var(--ink-soft); --kick-ink: var(--ink-soft); --youtube-ink: var(--ink-soft);
  --tiktok-ink: var(--ink-soft); --instagram-ink: var(--ink-soft);

  /* ---------- data-viz series (fixed order; text never uses these) ---------- */
  --viz-1: var(--bunsen); --viz-2: var(--danger); --viz-3: #8E7CC3; --viz-4: var(--warn);
  --viz-5: var(--ok);     --viz-6: #2E9E7B;      --viz-7: var(--ink-soft);
  --viz-grid: var(--line);
  --viz-threshold: var(--ink-soft);

  /* ---------- typography ---------- */
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: var(--font-serif);
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  /*            size   / line-height              usage                            */
  --fs-micro:   12px;  --lh-micro: 16px;   /* tiny meta                              */
  --fs-xs:      13px;  --lh-xs:    18px;   /* meta, table headers, hints             */
  --fs-sm:      14px;  --lh-sm:    20px;   /* controls, dense rows                   */
  --fs-md:      15px;  --lh-md:    22px;   /* body (default)                         */
  --fs-lg:      17px;  --lh-lg:    24px;   /* card titles                            */
  --fs-xl:      22px;  --lh-xl:    28px;   /* section titles (h2, serif)             */
  --fs-2xl:     32px;  --lh-2xl:   38px;   /* page titles (h1, serif)                */
  --fs-3xl:     28px;  --lh-3xl:   34px;   /* a number that matters                  */
  --fs-4xl:     36px;  --lh-4xl:   42px;
  --fs-5xl:     44px;  --lh-5xl:   50px;

  /* two weights only: 400 and 600 */
  --fw-regular: 400; --fw-medium: 600; --fw-semibold: 600; --fw-bold: 600; --fw-heavy: 600;
  --tracking-tight: 0;
  --tracking-snug:  0;
  --tracking-caps:  0;     /* no letter-spaced caps anywhere */

  /* ---------- spacing: 8px rhythm (4px half-steps kept for old names) ---------- */
  --s-0: 0; --s-px: 1px; --s-0-5: 2px;
  --s-1: 4px;  --s-1-5: 6px; --s-2: 8px;  --s-2-5: 10px; --s-3: 12px; --s-3-5: 14px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px;  --s-7: 28px; --s-8: 32px;   --s-10: 40px; --s-12: 48px;
  --s-16: 64px; --s-20: 80px;

  /* ---------- control sizing ---------- */
  --h-sm: 36px; --h-md: 40px; --h-lg: 44px;

  /* ---------- radii ---------- */
  --r-xs: 4px; --r-sm: 6px; --r-md: 8px; --r-lg: 10px; --r-xl: 12px; --r-2xl: 12px; --r-pill: 999px;

  /* ---------- elevation: one neutral shadow ---------- */
  --e-0: none;
  --e-1: var(--shadow);
  --e-2: var(--shadow);
  --e-3: var(--shadow);
  --e-4: var(--shadow);
  --glow-accent: none;
  --glow-hot:    none;
  --glow-brand:  none;

  /* ---------- focus ---------- */
  --focus-color: var(--bunsen);
  --focus-ring: 0 0 0 2px var(--panel), 0 0 0 4px var(--bunsen);
  --focus-ring-inset: inset 0 0 0 2px var(--bunsen);

  /* ---------- layers ---------- */
  --z-base: 0; --z-raised: 1; --z-sticky: 20; --z-sidebar: 30; --z-topbar: 40;
  --z-dropdown: 50; --z-drawer: 60; --z-modal: 70; --z-palette: 80; --z-toast: 90; --z-tooltip: 100;

  /* ---------- motion: short and plain ---------- */
  --ease-out:    cubic-bezier(.2, .7, .3, 1);
  --ease-in:     cubic-bezier(.4, 0, 1, 1);
  --ease-in-out: cubic-bezier(.4, 0, .2, 1);
  --ease-spring: var(--ease-out);       /* no overshoot */
  --dur-1: 120ms;   /* hover background */
  --dur-2: 150ms;   /* menus, tooltips  */
  --dur-3: 150ms;   /* modal, drawer    */
  --dur-4: 150ms;
  --dur-pulse: 0s;  /* nothing pulses   */

  /* ---------- layout ---------- */
  --sidebar-w: 216px;
  --sidebar-w-rail: 216px;   /* no icon-only rail in v2 */
  --topbar-h: 56px;
  --bottom-bar-h: 0px;       /* phone tab bar height; toasts + save bar sit above it */
  --content-max: 1180px;
  --content-pad: 48px;
  --bp-phone: 700px;         /* reference only: media queries can't read vars */
}

@media (max-width: 960px) { :root { --content-pad: 32px; } }
@media (max-width: 700px) { :root { --bottom-bar-h: 64px; --content-pad: 20px; --fs-2xl: 26px; --lh-2xl: 32px; } }

/* ---------- 3. website-only additions (not in the app; derived from app values) ---------- */
:root {
  /* literal colours the app's components.css uses inline, promoted to tokens so site CSS stays token-only */
  --knob: #FFFFFF;                                    /* switch knob, both themes (app: .c-switch::after) */
  --knob-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  --media-scrim: rgba(10, 16, 20, .72);               /* dark chip over video (app: .c-clip__score / __dur) */
  --media-scrim-strong: rgba(10, 16, 20, .78);        /* action strip over video (app: .c-clip__actions) */
  --on-media: #FFFFFF;
  /* what the RENDERED CLIP looks like (clipper/edit/hook.py + captions.py), for clip mock-ups only, never UI chrome */
  --clip-hook-bg: #FFFFFF; --clip-hook-ink: #000000;           /* hook: white rounded box, black ExtraBold */
  --clip-caption: #FFFFFF; --clip-caption-outline: #000000;    /* captions: white ALL CAPS, black outline */
  --clip-caption-hype: #FFD60A;                                /* hype words: yellow (255,214,10) */
  --clip-caption-shock: #FF342C;                               /* shock / rage words: red (255,52,44) */
  --clip-font: "Montserrat", var(--font-sans);                 /* the app bundles Montserrat for video text only */

  /* marketing layout: same rhythm as the app shell, wider column for a landing page */
  --site-max: var(--content-max);                     /* 1180px, same as the app's main column */
  --site-pad: var(--content-pad);                     /* 48 / 32 / 20px, same breakpoints as the app */
  --site-header-h: var(--topbar-h);                   /* 56px, the app's phone top bar height */
  --site-section-gap: var(--s-20);                    /* 80px between page sections (app max spacing step) */
  --fs-hero: var(--fs-5xl); --lh-hero: var(--lh-5xl); /* 44/50 serif: the app's .t-display size */
}
@media (max-width: 960px) { :root { --site-section-gap: var(--s-16); } }
@media (max-width: 700px) { :root { --site-section-gap: var(--s-12); --fs-hero: var(--fs-4xl); --lh-hero: var(--lh-4xl); } }
