/* Shared foundation. Load before base.css and components.css.
   Breakpoints: <768px single column; 768-1023px two-column cards,
   stacked hero; >=1024px split hero and three-column cards;
   >=1440px content remains capped at 1200px. Page layouts own columns. */
:root {
  color-scheme: dark;

  --bg-page: #080c16;
  --bg-app: #0e1424;
  --surface-card: #161c28;
  --surface-card-raised: #1f2737;
  --surface-input: #232c3d;
  --border-subtle: #293447;
  --border-highlight: #475a74;

  --text-primary: #f2f4f7;
  --text-secondary: #9aa4b2;
  --text-muted: #a6afbc;
  --decoration-muted: #6b7280; /* Decoration only; never small text. */
  --accent-blue: #4fb6f0;
  --accent-blue-strong: #2e9fe0;
  --accent-green: #37c977;
  --accent-yellow: #f0b93d;
  --accent-orange: #f2903d;
  --accent-red: #f0563d;
  --status-live: var(--accent-green);
  --status-stale: var(--accent-yellow);
  --status-offline: var(--text-muted);
  --alert-off-route: var(--accent-orange);
  --alert-separated: var(--accent-red);
  --alert-offline: var(--text-muted);

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --radius-device: 28px;
  --content-max: 1200px;
  --gutter-sm: 20px;
  --gutter-md: 32px;
  --gutter-lg: 48px;
  --gutter: var(--gutter-sm);
  --section-spacing: clamp(56px, 7vw, 104px);
  --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;

  --font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-size-label: 0.875rem;
  --font-size-body: 1rem;
  --font-size-lead: clamp(1.125rem, 1.5vw, 1.25rem);
  --font-size-h1: clamp(2.25rem, 4.8vw, 4.5rem);
  --font-size-h2: clamp(1.75rem, 3.2vw, 3rem);
  --font-size-h3: clamp(1.25rem, 1.8vw, 1.5rem);
  --line-height-body: 1.6;
  --line-height-heading: 1.2;
  --control-min: 44px;

  --motion-fast: 140ms;
  --motion-medium: 400ms;
  --motion-slow: 900ms;
  --motion-ease: cubic-bezier(.2, .7, .2, 1);
  --reveal-distance: 12px;

  --gradient-page: radial-gradient(ellipse at 80% 0%, rgba(79, 182, 240, .12), transparent 50%), radial-gradient(ellipse at 15% 45%, rgba(99, 102, 241, .07), transparent 55%), radial-gradient(ellipse at 85% 85%, rgba(55, 201, 119, .06), transparent 50%);
  --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, .04), transparent 65%);
  --gradient-accent: linear-gradient(135deg, #4fb6f0, #88d6f7);
  --gradient-text: linear-gradient(135deg, #ffffff 15%, #c2ebff 55%, #4fb6f0 100%);
  --bg-map-placeholder: linear-gradient(160deg, #1b2530 0%, #10161d 60%, #0b0f14 100%);
  --surface-glass: rgba(22, 28, 40, .85);
  --glass-blur: 16px;
  --shadow-card: 0 16px 48px rgba(0, 0, 0, .28);
  --shadow-float: 0 24px 64px rgba(0, 0, 0, .45), 0 1px 0 rgba(255, 255, 255, .08) inset;
  --shadow-glow: 0 0 32px rgba(79, 182, 240, .18);
  --shadow-glow-lg: 0 0 64px rgba(79, 182, 240, .14);
  --shadow-button: 0 6px 20px rgba(79, 182, 240, .22);
}

@media (min-width: 768px) {
  :root { --gutter: var(--gutter-md); }
}

@media (min-width: 1024px) {
  :root { --gutter: var(--gutter-lg); }
}
