/* Features — website design tokens v1.0 (7 Nov 2026)
   Light is the default appearance; dark applies via prefers-color-scheme or [data-theme="dark"].
   Fonts: Instrument Sans (OFL 1.1) and IBM Plex Mono (OFL 1.1). Self-host WOFF2 from Google Fonts. */

:root {
  /* Brand */
  --f-brand: #6B4EFF;            /* primary actions, links, focus, keystone dot. Same as the app accent. */
  --f-brand-hover: #5F43F7;
  --f-brand-pressed: #5A3EF0;
  --f-brand-text: #5A3EF0;       /* violet text on light surfaces (6.2:1 on #FFF) */
  --f-brand-soft: #F1EEFF;       /* selection fill, user bubble, brand tint */
  --f-brand-tile: #1E1A33;       /* icon tile, dark brand panels */
  --f-on-brand: #FFFFFF;

  /* Neutrals */
  --f-canvas: #F7F6F3;           /* page background */
  --f-surface: #FFFFFF;          /* cards, frames, form fields */
  --f-sunken: #EFEEEA;           /* code wells, quiet panels */
  --f-inverse: #17151F;          /* final-CTA band, footer, dark panels on light pages */
  --f-text: #17151F;             /* 16.7:1 on canvas */
  --f-text-2: #55525F;           /* secondary, 7.0:1 */
  --f-text-3: #6E6B78;           /* meta, captions, 4.8:1 on canvas — never below 14px */
  --f-text-inverse: #F2F2F5;
  --f-border: #E3E1DC;           /* hairlines, card borders */
  --f-border-strong: #CBC8C1;    /* inputs, secondary buttons (3.0:1 non-text) */
  --f-focus: #6B4EFF;            /* 2px ring + 2px offset in canvas colour */

  /* Status — never brand; always paired with a glyph and a word */
  --f-waiting: #F59E0B;          /* fill: waiting on you  (glyph ?) */
  --f-waiting-text: #B45309;
  --f-waiting-soft: #FFF4E0;
  --f-waiting-border: #F2D29A;
  --f-alert: #E5484D;            /* failing, error        (glyph ×) */
  --f-alert-text: #C2272D;
  --f-alert-soft: #FDECEC;
  --f-success: #1F9D63;          /* passing, deployed, verified (glyph ✓ / ●) */
  --f-success-text: #18794E;
  --f-success-soft: #E7F7EE;
  --f-pending-text: #55525F;     /* running / working (glyph ◷), no hue */
  --f-merged: #6B4EFF;           /* merged chip only, with merge glyph and the word "Merged" */
  --f-unknown: #8F8C99;          /* no data (glyph –) */

  /* Type */
  --f-font-sans: "Instrument Sans", ui-sans-serif, -apple-system, "Segoe UI", sans-serif;
  --f-font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --f-display: 600 clamp(2.75rem, 1.6rem + 4.4vw, 5rem)/1.0 var(--f-font-sans);   /* 44 → 80 */
  --f-display-tracking: -0.035em;
  --f-h2: 600 clamp(2rem, 1.4rem + 2.4vw, 3.25rem)/1.05 var(--f-font-sans);       /* 32 → 52 */
  --f-h2-tracking: -0.03em;
  --f-h3: 600 clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem)/1.25 var(--f-font-sans);     /* 20 → 24 */
  --f-h3-tracking: -0.015em;
  --f-body-l: 400 clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem)/1.55 var(--f-font-sans); /* 17 → 19 */
  --f-body: 400 1rem/1.6 var(--f-font-sans);
  --f-small: 400 0.875rem/1.5 var(--f-font-sans);
  --f-label: 500 0.75rem/1.4 var(--f-font-mono);   /* uppercase, +0.06em */
  --f-tech: 400 0.8125rem/1.5 var(--f-font-mono);  /* PR numbers, paths, checks */

  /* Space (4-pt) */
  --f-space-1: 4px;  --f-space-2: 8px;  --f-space-3: 12px; --f-space-4: 16px;
  --f-space-5: 24px; --f-space-6: 32px; --f-space-7: 48px; --f-space-8: 64px;
  --f-space-9: 96px; --f-space-10: 128px;
  --f-section: clamp(80px, 6vw + 40px, 128px);     /* vertical rhythm between story sections */
  --f-gutter: clamp(20px, 4vw, 48px);
  --f-container: 1200px;
  --f-measure: 640px;

  /* Shape */
  --f-radius-xs: 6px;   /* chips, keycaps */
  --f-radius-s: 10px;   /* buttons, inputs, small cards */
  --f-radius-m: 14px;   /* cards, FAQ items, question card */
  --f-radius-l: 20px;   /* screenshot frames, panels */
  --f-radius-pill: 999px; /* status badges, demo stage pills */

  /* Depth */
  --f-shadow-raised: 0 1px 2px rgb(23 21 31 / 5%), 0 8px 24px rgb(23 21 31 / 6%);
  --f-shadow-frame: 0 1px 2px rgb(23 21 31 / 6%), 0 30px 60px -24px rgb(23 21 31 / 28%);
  --f-shadow-pop: 0 12px 32px rgb(23 21 31 / 16%);

  /* Motion */
  --f-dur-instant: 120ms;  /* hover, press */
  --f-dur-ui: 200ms;       /* FAQ, focus, form states */
  --f-dur-step: 360ms;     /* demo stage changes */
  --f-dur-ring: 640ms;     /* keystone closing, once per page */
  --f-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --f-ease-emph: cubic-bezier(0.3, 0, 0, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --f-brand: #8B7BFF; --f-brand-hover: #9A8CFF; --f-brand-pressed: #7A6AF0; --f-brand-text: #A99DFF;
    --f-brand-soft: #26223D; --f-on-brand: #0E0C18;
    --f-canvas: #111114; --f-surface: #1A1A1F; --f-sunken: #0C0C0F; --f-inverse: #1F1F25;
    --f-text: #F2F2F5; --f-text-2: #A5A7B2; --f-text-3: #8A8D98; --f-text-inverse: #F2F2F5;
    --f-border: rgb(255 255 255 / 10%); --f-border-strong: rgb(255 255 255 / 22%); --f-focus: #A99DFF;
    --f-waiting: #FFAA2C; --f-waiting-text: #FFC061; --f-waiting-soft: #3A2A0E; --f-waiting-border: #6B4E1C;
    --f-alert: #FF6369; --f-alert-text: #FF8589; --f-alert-soft: #3B1618;
    --f-success: #3DD68C; --f-success-text: #3DD68C; --f-success-soft: #12301F;
    --f-pending-text: #A5A7B2; --f-merged: #8B7BFF; --f-unknown: #6D707B;
    --f-shadow-raised: 0 0 0 1px rgb(255 255 255 / 6%);
    --f-shadow-frame: 0 0 0 1px rgb(255 255 255 / 8%), 0 30px 60px -24px rgb(0 0 0 / 60%);
  }
}

@media (prefers-reduced-motion: reduce) {
  :root { --f-dur-step: 0ms; --f-dur-ring: 0ms; --f-dur-ui: 0ms; }
}
