/**
 * FAST Design System v1 — Design Tokens
 * Source: design-system/03-colors.md
 */

:root {
  color-scheme: dark;

  /* Primary */
  --color-brand-primary: #2563eb;
  --color-brand-primary-hover: #3b82f6;
  --color-brand-primary-muted: rgba(37, 99, 235, 0.12);
  --color-primary: var(--color-brand-primary);
  --color-primary-hover: var(--color-brand-primary-hover);

  /* Backgrounds */
  --color-bg-base: #05060a;
  --color-bg-raised: #080a10;
  --color-bg-surface: #0d111a;
  --color-bg-surface-hover: #111827;
  --color-bg-overlay: rgba(5, 6, 10, 0.72);
  --color-bg: var(--color-bg-base);
  --color-card: var(--color-bg-surface);

  /* Borders */
  --color-border-subtle: rgba(255, 255, 255, 0.08);
  --color-border-default: rgba(255, 255, 255, 0.14);
  --color-border-strong: rgba(255, 255, 255, 0.22);
  --color-border-divider: rgba(255, 255, 255, 0.06);

  /* Text */
  --color-text-primary: #f8fafc;
  --color-text-secondary: #cbd5e1;
  --color-text-muted: #94a3b8;
  --color-text-disabled: #64748b;
  --text-primary: var(--color-text-primary);

  /* Semantic */
  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-info: var(--color-primary);
  --color-danger-muted: rgba(239, 68, 68, 0.12);

  /* Gradients (hero + final CTA only) */
  --gradient-hero-ambient: radial-gradient(
    ellipse 80% 50% at 50% -20%,
    rgba(37, 99, 235, 0.15),
    transparent 60%
  );
  --gradient-cta-glow: radial-gradient(
    ellipse 60% 40% at 50% 100%,
    rgba(37, 99, 235, 0.1),
    transparent 70%
  );

  /* Typography */
  --font-display: "Space Grotesk", Inter, system-ui, sans-serif;
  --font-body: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --text-display-xl: clamp(2.75rem, 5.5vw, 5.5rem);
  --text-display-lg: clamp(2.25rem, 4vw, 4rem);
  --text-display-md: clamp(1.875rem, 3vw, 3rem);
  --text-hero: clamp(2.5rem, 4.8vw, 5.5rem);
  --text-heading: clamp(1.25rem, 1.5vw, 1.5rem);
  --text-body-lg: 1.125rem;
  --text-body: 1.0625rem;
  --text-body-sm: 0.875rem;
  --text-caption: 0.8125rem;
  --text-overline: 0.75rem;

  --leading-display: 1.05;
  --leading-heading: 1.25;
  --leading-body: 1.65;
  --leading-body-sm: 1.6;
  --leading-caption: 1.5;

  --tracking-display: -0.04em;
  --tracking-heading: -0.02em;
  --tracking-overline: 0.08em;

  /* Grid & container */
  --grid-max: 1280px;
  --content-max: 840px;
  --reading-max: 720px;
  --hero-content-max: 620px;
  --grid-gutter: 24px;
  --bp-sm: 480px;
  --bp-md: 768px;
  --bp-lg: 1024px;
  --bp-xl: 1280px;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-30: 120px;

  --section-padding-y: var(--space-30);
  --section-padding-compact: var(--space-20);
  --section-gap-heading: var(--space-12);
  --stack-gap-loose: var(--space-8);
  --stack-gap-default: var(--space-6);
  --stack-gap-tight: var(--space-4);

  /* Elevation */
  --shadow-none: none;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.32);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.48);
  --shadow-glow-primary: 0 8px 32px rgba(37, 99, 235, 0.2);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-card: 24px;
  --radius-input: 16px;
  --radius-dialog: 28px;
  --radius-full: 999px;

  /* Motion */
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 450ms;
  --duration-extra: 700ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Layout */
  --nav-height: 72px;
  --nav-height-mobile: 64px;
  --drawer-width: 320px;
  --focus-ring: 0 0 0 2px var(--color-bg-base), 0 0 0 4px var(--color-primary);

  /* Z-index */
  --z-header: 100;
  --z-dropdown: 200;
  --z-drawer: 300;
  --z-modal: 500;
  --z-toast: 700;
}

@media (max-width: 767px) {
  :root {
    --grid-gutter: 16px;
    --nav-height: var(--nav-height-mobile);
  }
}

@media (min-width: 768px) and (max-width: 1279px) {
  :root {
    --grid-gutter: 20px;
  }
}
