/* ==========================================================================
   LINEAR-GRADE SAAS — DESIGN TOKENS
   Every value below was measured from linear.app (computed styles + source
   stylesheets, 28 marketing pages, 1440px and 390px viewports, Nov 2026).
   Do not "round" these. 510 and 590 are intentional variable-font weights.
   BRAND SWAP: only edit the block marked  >>> BRAND <<<
   ========================================================================== */

:root {
  /* >>> BRAND <<< ---------------------------------------------------------- */
  --brand:            #5e6ad2;   /* primary brand fill (buttons, selection)  */
  --brand-text:       #ffffff;   /* text on brand fill                       */
  --accent:           #7170ff;   /* interactive accent (focus, active dots)  */
  --accent-hover:     #828fff;
  --accent-tint:      #18182f;   /* accent @ ~8% on bg — badges, highlights  */
  --link:             #828fff;
  /* product-area hues (optional, for feature-page eyebrows / icons)        */
  --hue-1: #68cc58;  --hue-2: #d4b144;  --hue-3: #7a7fad;
  /* ----------------------------------------------------------------------- */

  /* Fonts ---------------------------------------------------------------- */
  --font-sans: "Inter Variable", "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  --font-mono: "Berkeley Mono", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-serif: "Tiempos Headline", "Newsreader", ui-serif, Georgia, Cambria, "Times New Roman", serif;
  --font-settings: "cv01", "ss03";          /* applied on html,body           */
  --font-mono-settings: "cv01", "ss02";

  --fw-light: 300;
  --fw-normal: 400;
  --fw-medium: 510;     /* ALL marketing headings, nav CTAs, buttons      */
  --fw-semibold: 590;   /* card titles, pricing plan names, changelog h2  */
  --fw-bold: 680;

  /* Title scale  (size / line-height / letter-spacing) ------------------- */
  --title-1-size: 1.0625rem; --title-1-lh: 1.4;   --title-1-ls: -0.012em;  /* 17 */
  --title-2-size: 1.25rem;   --title-2-lh: 1.33;  --title-2-ls: -0.012em;  /* 20 */
  --title-3-size: 1.5rem;    --title-3-lh: 1.33;  --title-3-ls: -0.012em;  /* 24 */
  --title-4-size: 2rem;      --title-4-lh: 1.125; --title-4-ls: -0.022em;  /* 32 */
  --title-5-size: 2.5rem;    --title-5-lh: 1.1;   --title-5-ls: -0.022em;  /* 40 */
  --title-6-size: 3rem;      --title-6-lh: 1;     --title-6-ls: -0.022em;  /* 48 */
  --title-7-size: 3.5rem;    --title-7-lh: 1.1;   --title-7-ls: -0.022em;  /* 56 */
  --title-8-size: 4rem;      --title-8-lh: 1.06;  --title-8-ls: -0.022em;  /* 64 */
  --title-9-size: 4.5rem;    --title-9-lh: 1;     --title-9-ls: -0.022em;  /* 72 */

  /* Text scale ------------------------------------------------------------ */
  --text-large-size:   1.0625rem; --text-large-lh: 1.6;  --text-large-ls: 0;          /* 17 */
  --text-regular-size: 0.9375rem; --text-regular-lh: 1.6; --text-regular-ls: -0.011em; /* 15 */
  --text-small-size:   0.875rem;  --text-small-lh: 1.5;  --text-small-ls: -0.013em;    /* 14 */
  --text-mini-size:    0.8125rem; --text-mini-lh: 1.5;   --text-mini-ls: -0.01em;      /* 13 */
  --text-micro-size:   0.75rem;   --text-micro-lh: 1.4;  --text-micro-ls: 0;           /* 12 */
  --text-tiny-size:    0.625rem;  --text-tiny-lh: 1.5;   --text-tiny-ls: -0.015em;     /* 10 */

  /* Radius ---------------------------------------------------------------- */
  --r-4: 4px; --r-6: 6px; --r-8: 8px; --r-12: 12px; --r-16: 16px;
  --r-24: 24px; --r-32: 32px; --r-pill: 9999px; --r-circle: 50%;
  --hairline: 1px;

  /* Layout ---------------------------------------------------------------- */
  --header-h: 72px;
  --header-blur: 20px;
  --outer: 46px;                 /* page gutter outside the content box    */
  --inset: 32px;                 /* inner inset inside the content box     */
  --content-max: 1344px;
  --shell-max: calc(var(--content-max) + var(--outer) * 2);   /* 1436px    */
  --page-max: 1024px;            /* narrow pages (integrations, docs-ish)  */
  --prose-max: 624px;            /* articles, changelog body, legal        */
  --page-pad-inline: 24px;
  --grid-cols: 12;
  --grid-gap: 32px;

  /* Section rhythm -------------------------------------------------------- */
  --hero-top: 200px;             /* header bottom → H1 cap (marketing hero) */
  --index-top: 80px;             /* header bottom → H1 (index pages)        */
  --section-y: 128px;            /* feature section padding-block           */
  --section-head-gap: 96px;      /* feature header → illustration           */
  --prefooter-y: 224px;          /* closing CTA margin-block                */
  --footer-pad: 56px;

  /* Motion ---------------------------------------------------------------- */
  --t-quick: .1s;
  --t-regular: .25s;
  --t-button: .16s;
  --t-highlight-out: .15s;
  --ease-out-quad:  cubic-bezier(.25,.46,.45,.94);
  --ease-out-cubic: cubic-bezier(.215,.61,.355,1);
  --ease-out-quart: cubic-bezier(.165,.84,.44,1);
  --ease-out-expo:  cubic-bezier(.19,1,.22,1);
  --ease-in-out-quad: cubic-bezier(.455,.03,.515,.955);
  --ease-in-quart:  cubic-bezier(.895,.03,.685,.22);
  --ease-drawer:    cubic-bezier(.32,.72,0,1);

  /* Focus ------------------------------------------------------------------ */
  --focus-w: 2px; --focus-offset: 2px;

  /* Layers ----------------------------------------------------------------- */
  --z-header: 100; --z-popover: 600; --z-dialog: 700; --z-toast: 800; --z-tooltip: 1100;

  /* Fixed palette ---------------------------------------------------------- */
  --white: #fff; --black: #000;
  --blue: #4ea7fc; --red: #eb5757; --green: #27a644; --orange: #fc7840;
  --yellow: #f0bf00; --indigo: #5e6ad2; --teal: #00b8cc;
}

/* DARK — the default marketing theme ======================================= */
:root, [data-theme="dark"] {
  color-scheme: dark;
  --bg:              #08090a;  /* page                                   */
  --bg-panel:        #0f1011;  /* cards, panels, frames                  */
  --bg-level-2:      #141516;  /* row hover, inputs                      */
  --bg-level-3:      #191a1b;  /* secondary-button hover                 */
  --bg-secondary:    #1c1c1f;
  --bg-tertiary:     #232326;  /* dropdown items                         */
  --bg-quaternary:   #28282c;  /* ghost hover                            */
  --bg-translucent:  #ffffff0d;
  --bg-marketing:    #010102;
  --frame-bg:        #101112;  /* product screenshot frame               */

  --border:          #23252a;  /* footer top, solid dividers             */
  --border-2:        #34343a;
  --border-3:        #3e3e44;
  --border-subtle:   #ffffff0d;  /* card borders, dividers on surfaces   */
  --border-strong:   #ffffff14;  /* header bottom, column rules          */
  --line-2:          #202122;    /* table cell rules                     */

  --fg:              #f7f8f8;  /* headings, primary text                 */
  --fg-2:            #d0d6e0;  /* body on feature sections, emphasis     */
  --fg-3:            #8a8f98;  /* subtitles, nav links, descriptions     */
  --fg-4:            #62666d;  /* meta, captions, legal                  */

  --header-bg:       #0b0b0bcc;
  --header-border:   #ffffff14;
  --invert-bg:       #e5e5e6;  /* PRIMARY CTA = inverted pill            */
  --invert-bg-hover: #ffffff;
  --invert-fg:       #08090a;
  --overlay:         #000000d9;
  --selection-bg:    color-mix(in lch, var(--brand), black 10%);

  --shadow-low:    0 2px 4px #0000001a;
  --shadow-medium: 0 4px 24px #0003;
  --shadow-high:   0 7px 32px #00000059;
  --shadow-stack:  0 8px 2px 0 #0000, 0 5px 2px 0 #00000003, 0 3px 2px 0 #0000000a, 0 1px 1px 0 #00000012, 0 0 1px 0 #00000014;
  --shadow-secondary-btn: inset 0 0 0 1px #ffffff08, inset 0 1px #ffffff0a, 0 0 0 1px #0009, 0 4px 4px #0000001a;
  --shadow-popover: 0 8px 32px #08090a;
  --nav-hover-bg:  #ffffff14;
  --scrollbar:     #ffffff1a;
  --focus-color:   var(--accent);
}

/* LIGHT — optional (docs/app-like pages, or a light brand) ================= */
[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff; --bg-panel: #f8f8f8; --bg-level-2: #f4f4f4; --bg-level-3: #f0f0f0;
  --bg-secondary: #f9f8f9; --bg-tertiary: #f4f2f4; --bg-quaternary: #eeedef;
  --bg-translucent: #00000005; --frame-bg: #f9f8f9;
  --border: #e9e8ea; --border-2: #e4e2e4; --border-3: #dcdbdd;
  --border-subtle: #0000000d; --border-strong: #00000014; --line-2: #eaeaeb;
  --fg: #282a30; --fg-2: #3c4149; --fg-3: #6f6e77; --fg-4: #86848d;
  --header-bg: #ffffffcc; --header-border: #00000014;
  --invert-bg: #282a30; --invert-bg-hover: #1f2024; --invert-fg: #ffffff;
  --overlay: #ffffffa6;
  --brand: #7070ff; --link: #7070ff; --accent-hover: #8989f0; --accent-tint: #f1f1ff;
  --selection-bg: color-mix(in lch, var(--brand), transparent 64%);
  --shadow-low: 0 1px 4px -1px #00000017; --shadow-medium: 0 3px 12px #00000017; --shadow-high: 0 7px 24px #0000000f;
  --shadow-stack: 0 -1px 1px 0 #0000001c inset, 0 8px 2px 0 #0000, 0 5px 2px 0 #00000003, 0 3px 2px 0 #0000000a, 0 1px 1px 0 #00000012, 0 0 1px 0 #00000014;
  --shadow-secondary-btn: 0 0 0 1px #00000014, 0 1px 4px -1px #00000017;
  --shadow-popover: 0 8px 32px #08090a0d;
  --nav-hover-bg: #00000014; --scrollbar: #0000001a;
  --focus-color: #0006;
}

/* RESPONSIVE TOKEN OVERRIDES (exact breakpoints) =========================== */
@media (max-width: 1280px) { :root { --outer: 10px; } }
@media (max-width: 1024px) { :root { --outer: 28px; --inset: 8px; } }
@media (max-width: 768px)  { :root { --grid-cols: 8; } }
@media (max-width: 640px)  { :root { --outer: 16px; --header-h: 64px; --grid-cols: 4; } }
@media (min-resolution: 2dppx) { :root { --hairline: .5px; } }
