/* ==========================================================================
   Santech Innovations — design tokens
   Every color, size and spacing value the site uses lives here.
   Light theme is the default; dark applies from the OS setting or the toggle.
   See DESIGN.md for what each token is for.
   ========================================================================== */

:root {
  color-scheme: light;

  /* Color */
  --bg: #FBFAF7;
  --surface: #FFFFFF;
  --surface-2: #F3F1EC;
  --border: #E4E1DA;
  --border-strong: #CFCBC2;
  --text: #15171B;
  --text-2: #4B5058;
  --text-3: #646972;
  --primary: #1F4FD1;
  --primary-hover: #1A43B3;
  --on-primary: #FFFFFF;
  --primary-soft: #E8EEFC;
  --accent: #9E630C;
  --success: #1C7C4A;
  --success-soft: #E5F4EC;
  --error: #B42318;

  /* Typography */
  --font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --fs-xs: 0.875rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-lg: 1.1875rem;
  --fs-xl: 1.375rem;
  --fs-2xl: clamp(1.5rem, 1.2rem + 1.2vw, 1.75rem);
  --fs-3xl: clamp(1.875rem, 1.4rem + 2vw, 2.375rem);
  --fs-4xl: clamp(2.375rem, 1.6rem + 3.6vw, 4rem);
  --fs-5xl: clamp(2.75rem, 1.5rem + 5.4vw, 5.25rem);

  /* Spacing (4px base) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;

  /* Layout */
  --container: 1160px;
  --measure: 680px;
  --gutter: 16px;
  --section-y: 64px;
  --header-h: 68px;

  /* Shape and depth */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(20, 22, 26, 0.04), 0 6px 18px rgba(20, 22, 26, 0.06);
  --shadow-2: 0 2px 4px rgba(20, 22, 26, 0.04), 0 24px 48px -12px rgba(20, 22, 26, 0.16);

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 180ms;

  /* "Stage": the always-dark hero and showcase panels. Same in both themes,
     so these are defined once here and never overridden below. */
  --stage-bg: #0B0E14;
  --stage-surface: #121722;
  --stage-border: rgba(255, 255, 255, 0.10);
  --stage-border-strong: rgba(255, 255, 255, 0.28);
  --stage-grid: rgba(255, 255, 255, 0.045);
  --stage-text: #F4F6FA;
  --stage-text-2: #B9C1CE;
  --stage-text-3: #8F99A9;
  --stage-primary: #8EAEFF;
  --stage-accent: #F0B456;
  --stage-success: #5CC98E;
}

@media (min-width: 720px) {
  :root { --gutter: 24px; --section-y: 88px; }
}
@media (min-width: 1100px) {
  :root { --gutter: 32px; --section-y: 112px; }
}

/* Dark theme: follows the OS unless the visitor picked light with the toggle */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0F1113;
    --surface: #171A1E;
    --surface-2: #1E2227;
    --border: #2A2F35;
    --border-strong: #3A4047;
    --text: #EEF0F2;
    --text-2: #B4BAC2;
    --text-3: #8C939C;
    --primary: #8EAEFF;
    --primary-hover: #A9C1FF;
    --on-primary: #0F1113;
    --primary-soft: #1B2540;
    --accent: #F0B456;
    --success: #5CC98E;
    --success-soft: #16291F;
    --error: #F97066;
    --shadow-1: 0 0 0 1px rgba(255, 255, 255, 0.02);
    --shadow-2: 0 24px 48px -12px rgba(0, 0, 0, 0.55);
  }
}

/* Dark theme picked with the toggle */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0F1113;
  --surface: #171A1E;
  --surface-2: #1E2227;
  --border: #2A2F35;
  --border-strong: #3A4047;
  --text: #EEF0F2;
  --text-2: #B4BAC2;
  --text-3: #8C939C;
  --primary: #8EAEFF;
  --primary-hover: #A9C1FF;
  --on-primary: #0F1113;
  --primary-soft: #1B2540;
  --accent: #F0B456;
  --success: #5CC98E;
  --success-soft: #16291F;
  --error: #F97066;
  --shadow-1: 0 0 0 1px rgba(255, 255, 255, 0.02);
  --shadow-2: 0 24px 48px -12px rgba(0, 0, 0, 0.55);
}
