/* ==========================================================================
   Pacery Website-v1 (pacery.app) - Design System Tokens
   1:1 Parity with Pacery App (Brand V2, Dark Default & Warm-Cream Light)
   ========================================================================== */

:root {
  color-scheme: dark;

  /* Surfaces & Backgrounds (Dark Default) */
  --bg-app: #0b0f19;
  --bg-surface: #121826;
  --bg-surface-elevated: #1a2235;
  --bg-surface-subtle: #151d2e;
  --bg-nav-glass: rgba(11, 15, 25, 0.86);
  --bg-scrim: rgba(7, 10, 18, 0.72);
  --bg-code: #0e1422;
  --bg-toast: #1e293b;

  /* Text Hierarchy */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-toast: #f8fafc;

  /* Borders */
  --border-subtle: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(148, 163, 184, 0.30);
  --border-toast: rgba(148, 163, 184, 0.24);

  /* Accent (Cyan) */
  --accent-primary: #06b6d4;
  --accent-primary-hover: #22d3ee;
  --accent-primary-soft: rgba(6, 182, 212, 0.14);
  --accent-on-primary: #04131a;

  /* Brand V2 Flat Heart-Rhythm Palette (No Neon Glow) */
  --brand-coral: #ff744d;
  --brand-peach: #e5a080;
  --brand-mint: #7fd2c0;
  --brand-gradient: linear-gradient(120deg, #ff744d 0%, #e5a080 52%, #7fd2c0 100%);
  --brand-gradient-soft: linear-gradient(120deg, rgba(255, 116, 77, 0.14) 0%, rgba(229, 160, 128, 0.12) 52%, rgba(127, 210, 192, 0.14) 100%);

  /* Semantic Status */
  --status-success: #10b981;
  --status-success-soft: rgba(16, 185, 129, 0.14);
  --status-warning: #f59e0b;
  --status-warning-soft: rgba(245, 158, 11, 0.14);
  --status-error: #ef4444;
  --status-error-soft: rgba(239, 68, 68, 0.14);

  /* Sport & Domain Colors */
  --sport-running: #06b6d4;
  --sport-running-soft: rgba(6, 182, 212, 0.14);
  --sport-cycling: #f59e0b;
  --sport-cycling-soft: rgba(245, 158, 11, 0.14);
  --sport-hiking: #10b981;
  --sport-hiking-soft: rgba(16, 185, 129, 0.14);
  --sport-swimming: #38bdf8;
  --sport-swimming-soft: rgba(56, 189, 248, 0.14);
  --sport-strength: #a855f7;
  --sport-strength-soft: rgba(168, 85, 247, 0.14);
  --domain-body: #f43f5e;
  --domain-body-soft: rgba(244, 63, 94, 0.14);
  --domain-recovery: #6366f1;
  --domain-recovery-soft: rgba(99, 102, 241, 0.15);

  /* Heart Rate Zones (Dark) */
  --hr-z1: #38bdf8;
  --hr-z2: #10b981;
  --hr-z3: #f59e0b;
  --hr-z4: #f97316;
  --hr-z5: #ef4444;
  --gradient-heatmap-hr-zones: linear-gradient(90deg, #38bdf8 0%, #38bdf8 20%, #10b981 20%, #10b981 40%, #f59e0b 40%, #f59e0b 60%, #f97316 60%, #f97316 80%, #ef4444 80%, #ef4444 100%);
  --gradient-heatmap-pace: linear-gradient(90deg, #38bdf8 0%, #06b6d4 35%, #10b981 70%, #f59e0b 100%);
  --gradient-multisport: linear-gradient(90deg, #38bdf8 0%, #f59e0b 50%, #06b6d4 100%);

  /* Elevation & Shadows */
  --shadow-card: 0 6px 24px rgba(0, 0, 0, 0.28);
  --shadow-elevated: 0 14px 38px rgba(0, 0, 0, 0.42);
  --shadow-sheet: 0 24px 64px rgba(0, 0, 0, 0.56);
  --shadow-toast: 0 10px 28px rgba(0, 0, 0, 0.42);

  /* 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: 56px;
  --space-16: 76px;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  /* Layout & Touch */
  --container-max: 1140px;
  --container-narrow: 820px;
  --nav-height: 68px;
  --touch-min: 44px;

  /* Typography (100% System Font Stack, 0 External Webfonts) */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;

  /* Motion */
  --motion-fast: 140ms;
  --motion-base: 220ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] {
  color-scheme: light;

  /* Surfaces & Backgrounds (Warm-Cream Light Theme) */
  --bg-app: #faf0e6;
  --bg-surface: #fffaf4;
  --bg-surface-elevated: #f0e4d6;
  --bg-surface-subtle: #f5eadc;
  --bg-nav-glass: rgba(250, 240, 230, 0.88);
  --bg-scrim: rgba(28, 25, 23, 0.52);
  --bg-code: #f4e9dc;
  --bg-toast: #1c1917;

  /* Text Hierarchy */
  --text-primary: #1c1917;
  --text-secondary: #57534e;
  --text-muted: #78716c;
  --text-toast: #fffaf4;

  /* Borders */
  --border-subtle: rgba(120, 113, 108, 0.20);
  --border-strong: rgba(120, 113, 108, 0.36);
  --border-toast: rgba(255, 250, 244, 0.16);

  /* Accent (Deep Cyan for High Contrast on Warm Cream) */
  --accent-primary: #0e7490;
  --accent-primary-hover: #155e75;
  --accent-primary-soft: rgba(14, 116, 144, 0.12);
  --accent-on-primary: #fffaf4;

  /* Brand V2 Soft Tint on Cream */
  --brand-gradient-soft: linear-gradient(120deg, rgba(255, 116, 77, 0.16) 0%, rgba(229, 160, 128, 0.16) 52%, rgba(127, 210, 192, 0.18) 100%);

  /* Semantic Status (Contrast-tuned for Light) */
  --status-success: #059669;
  --status-success-soft: rgba(5, 150, 105, 0.12);
  --status-warning: #d97706;
  --status-warning-soft: rgba(217, 119, 6, 0.13);
  --status-error: #dc2626;
  --status-error-soft: rgba(220, 38, 38, 0.12);

  /* Sport & Domain Colors (Contrast-tuned) */
  --sport-running: #0e7490;
  --sport-running-soft: rgba(14, 116, 144, 0.12);
  --sport-cycling: #d97706;
  --sport-cycling-soft: rgba(217, 119, 6, 0.12);
  --sport-hiking: #059669;
  --sport-hiking-soft: rgba(5, 150, 105, 0.12);
  --sport-swimming: #0284c7;
  --sport-swimming-soft: rgba(2, 132, 199, 0.12);
  --sport-strength: #7e22ce;
  --sport-strength-soft: rgba(126, 34, 206, 0.11);
  --domain-body: #e11d48;
  --domain-body-soft: rgba(225, 29, 72, 0.11);
  --domain-recovery: #4f46e5;
  --domain-recovery-soft: rgba(79, 70, 229, 0.11);

  /* Heart Rate Zones (Light) */
  --hr-z1: #0284c7;
  --hr-z2: #059669;
  --hr-z3: #d97706;
  --hr-z4: #ea580c;
  --hr-z5: #dc2626;
  --gradient-heatmap-hr-zones: linear-gradient(90deg, #0284c7 0%, #0284c7 20%, #059669 20%, #059669 40%, #d97706 40%, #d97706 60%, #ea580c 60%, #ea580c 80%, #dc2626 80%, #dc2626 100%);
  --gradient-heatmap-pace: linear-gradient(90deg, #0284c7 0%, #0e7490 35%, #059669 70%, #d97706 100%);
  --gradient-multisport: linear-gradient(90deg, #0284c7 0%, #d97706 50%, #0e7490 100%);

  /* Elevation & Shadows */
  --shadow-card: 0 6px 20px rgba(28, 25, 23, 0.07);
  --shadow-elevated: 0 14px 32px rgba(28, 25, 23, 0.12);
  --shadow-sheet: 0 24px 56px rgba(28, 25, 23, 0.22);
  --shadow-toast: 0 10px 24px rgba(28, 25, 23, 0.22);
}
