/* tokens.css — Grade Point Solutions design system
   Concept: "Vertex" — client-requested reskin. Dark, near-black warm
   charcoal-navy is now the PRIMARY default theme (confident, modern SaaS-
   launch energy), with a vivid sky-blue accent doing the heavy lifting on
   CTAs, headline highlight words, eyebrows, and hover states. A teal/cyan
   secondary accent is reserved for badges and small labels. Light mode is
   preserved as an explicit toggle, not the default. */

:root {
  /* ---- Type scale (fluid, clamp-based) ---- */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(2.75rem, 0.5rem + 6.5vw, 7rem);

  /* ---- 4px spacing system ---- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* ---- Radius (soft-UI, generous) ---- */
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.125rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* ---- Motion ---- */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* ---- Content widths ---- */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1240px;
  --content-full: 100%;

  /* ---- Fonts ---- */
  --font-display: 'General Sans', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
}

/* ================= DARK MODE (DEFAULT THEME) ================= */
:root,
[data-theme='dark'] {
  /* Base surfaces — near-black warm charcoal-navy, one step lighter panels */
  --color-bg: #0b0a0f;
  --color-surface: #141420;
  --color-surface-2: #1b1b27;
  --color-surface-offset: #0d1116;
  --color-surface-offset-2: #17171f;
  --color-surface-dynamic: #202030;
  --color-divider: #26262f;
  --color-border: #2c2c38;

  /* Deep charcoal-navy surfaces (hero, header, footer, dark bands) */
  --color-navy: #0b0a0f;
  --color-navy-2: #0d1116;
  --color-navy-3: #131320;
  --color-navy-tint: #1a1a26;
  --color-on-navy: #f1f0f5;
  --color-on-navy-muted: #a6a6b3;

  /* Text (on dark surfaces, the default) */
  --color-text: #f1f0f5;
  --color-text-muted: #a6a6b3;
  --color-text-faint: #6d6d7c;
  --color-text-inverse: #101018;

  /* Primary — vivid sky-blue, the dominant CTA/identity color */
  --color-primary: #328bef;
  --color-primary-hover: #5aa3f4;
  --color-primary-active: #2472cf;
  --color-primary-highlight: #17263d;
  --color-primary-2: #e8f2fe;

  /* Accent — kept as an alias of primary blue so existing components
     (eyebrows, highlight words, hovers) automatically pick up the new
     sky-blue treatment described by the client's reference. */
  --color-accent: #328bef;
  --color-accent-hover: #5aa3f4;
  --color-accent-active: #2472cf;
  --color-accent-highlight: #17263d;
  --color-accent-text: #ffffff;

  /* Secondary support accent — teal/cyan, sparing use (badges, labels) */
  --color-blue: #5aa3f4;
  --color-blue-hover: #7fb8f7;
  --color-blue-active: #328bef;
  --color-blue-highlight: #17263d;
  --color-teal: #00bbd5;
  --color-teal-hover: #22cfe6;
  --color-teal-highlight: #0b2c31;

  /* Warm coral/rust — "problem" card accent for before/after comparisons */
  --color-rust: #d97a5f;
  --color-rust-hover: #e2937c;
  --color-rust-highlight: #2e1a16;

  /* Warm CTA accent (dark-theme fallback value) */
  --color-cta: #e0692b;
  --color-cta-hover: #f07f42;
  --color-cta-text: #ffffff;

  /* Status colors */
  --color-success: #4fbf82;
  --color-success-hover: #6fce98;
  --color-success-highlight: #12271b;
  --color-warning: #d78d47;
  --color-warning-hover: #e4a568;
  --color-warning-highlight: #2c1f10;
  --color-error: #e0796c;
  --color-error-hover: #e8988d;
  --color-error-highlight: #2c1815;

  /* Shadows tuned to near-black surfaces */
  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.35);
  --shadow-md: 0 8px 22px oklch(0 0 0 / 0.45);
  --shadow-lg: 0 22px 50px oklch(0 0 0 / 0.55);
  --shadow-glow: 0 0 0 1px color-mix(in oklab, var(--color-primary) 40%, transparent),
    0 10px 30px color-mix(in oklab, var(--color-primary) 25%, transparent);
}

/* ================= LIGHT MODE (explicit toggle only) ================= */
[data-theme='light'] {
  /* Surfaces — warm off-white family, deep navy for hero/header bands */
  --color-bg: #f5f5f2;
  --color-surface: #ffffff;
  --color-surface-2: #ffffff;
  --color-surface-offset: #ebeae5;
  --color-surface-offset-2: #dfdcd4;
  --color-surface-dynamic: #d3d0c7;
  --color-divider: #dddad2;
  --color-border: #cfccc3;

  --color-navy: #0b0a0f;
  --color-navy-2: #0d1116;
  --color-navy-3: #131320;
  --color-navy-tint: #1a1a26;
  --color-on-navy: #f1f0f5;
  --color-on-navy-muted: #b7b7c4;

  --color-text: #17171f;
  --color-text-muted: #52525f;
  --color-text-faint: #92929c;
  --color-text-inverse: #f4f6fa;

  --color-primary: #1f6fd6;
  --color-primary-hover: #185aad;
  --color-primary-active: #144888;
  --color-primary-highlight: #dcebfd;
  --color-primary-2: #0d3766;

  --color-accent: #1f6fd6;
  --color-accent-hover: #185aad;
  --color-accent-active: #144888;
  --color-accent-highlight: #dcebfd;
  --color-accent-text: #ffffff;

  --color-blue: #1f6fd6;
  --color-blue-hover: #185aad;
  --color-blue-active: #144888;
  --color-blue-highlight: #dcebfd;
  --color-teal: #0092a6;
  --color-teal-hover: #007585;
  --color-teal-highlight: #d8f3f6;

  --color-rust: #c15f45;
  --color-rust-hover: #a24d36;
  --color-rust-highlight: #f7e2db;

  /* Warm CTA accent — used ONLY for primary conversion buttons (get quote,
     call now) so they stand out against the navy/blue brand palette. */
  --color-cta: #e0692b;
  --color-cta-hover: #c85720;
  --color-cta-text: #ffffff;

  --color-success: #2e7d4f;
  --color-success-hover: #256640;
  --color-success-highlight: #d7ecdf;
  --color-warning: #a15a12;
  --color-warning-hover: #82480e;
  --color-warning-highlight: #f2e0c8;
  --color-error: #b3372c;
  --color-error-hover: #932c22;
  --color-error-highlight: #f4dad7;

  --shadow-sm: 0 1px 2px oklch(0.15 0.03 255 / 0.08);
  --shadow-md: 0 6px 16px oklch(0.15 0.03 255 / 0.12);
  --shadow-lg: 0 18px 44px oklch(0.15 0.03 255 / 0.18);
  --shadow-glow: 0 0 0 1px color-mix(in oklab, var(--color-primary) 25%, transparent),
    0 10px 24px color-mix(in oklab, var(--color-primary) 18%, transparent);
}

/* Light is the default brand theme regardless of OS preference; an inline
   blocking script in <head> (build.py) sets data-theme='light' (or the
   visitor's saved cookie preference) before first paint, so no
   prefers-color-scheme fallback block is needed here. */
