/* ═══════════════════════════════════════════
   Throttle Fitness — Design System Base
   CSS Variables, Reset, Typography
   ═══════════════════════════════════════════ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── CSS Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; line-height: 1.6; color: var(--text-primary); background-color: var(--bg-primary); transition: background-color 0.3s ease, color 0.3s ease; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
button { cursor: pointer; border: none; background: none; }
table { border-collapse: collapse; width: 100%; }
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; color: var(--text-primary); }
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  h4 { font-size: 1.1rem; }
}

/* ── Light Theme (default) ── */
:root {
  --primary: #C41E24;
  --primary-dark: #9A161B;
  --primary-light: #E8383E;
  --primary-rgb: 196, 30, 36;
  --primary-glow: rgba(196, 30, 36, 0.15);

  --bg-primary: #FFFFFF;
  --bg-secondary: #F5F5F7;
  --bg-tertiary: #EEEEF0;
  --bg-card: #FFFFFF;
  --bg-card-hover: #FAFAFA;
  --bg-input: #F5F5F7;
  --bg-overlay: rgba(0, 0, 0, 0.5);
  --bg-glass: rgba(255, 255, 255, 0.8);

  --text-primary: #1A1A2E;
  --text-secondary: #6B7280;
  --text-tertiary: #9CA3AF;
  --text-inverse: #FFFFFF;

  --border: #E5E7EB;
  --border-light: #F0F0F2;
  --border-focus: #C41E24;

  --accent-gold: #F59E0B;
  --accent-green: #10B981;
  --accent-blue: #3B82F6;
  --accent-purple: #8B5CF6;

  --success: #10B981;
  --success-bg: #ECFDF5;
  --warning: #F59E0B;
  --warning-bg: #FFFBEB;
  --error: #EF4444;
  --error-bg: #FEF2F2;
  --info: #3B82F6;
  --info-bg: #EFF6FF;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
  --shadow-card: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-card-hover: 0 8px 30px rgba(0,0,0,0.12);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s ease;

  --header-height: 72px;
  --container-max: 1200px;
  --sidebar-width: 280px;
}

/* ── Dark Theme ── */
[data-theme="dark"] {
  --primary: #E63946;
  --primary-dark: #C41E24;
  --primary-light: #FF5C6A;
  --primary-rgb: 230, 57, 70;
  --primary-glow: rgba(230, 57, 70, 0.2);

  --bg-primary: #0F1117;
  --bg-secondary: #1A1D27;
  --bg-tertiary: #22252F;
  --bg-card: #1E2130;
  --bg-card-hover: #252838;
  --bg-input: #1A1D27;
  --bg-overlay: rgba(0, 0, 0, 0.7);
  --bg-glass: rgba(15, 17, 23, 0.85);

  --text-primary: #E8E8ED;
  --text-secondary: #9CA3AF;
  --text-tertiary: #6B7280;
  --text-inverse: #0F1117;

  --border: #2D3039;
  --border-light: #252838;
  --border-focus: #E63946;

  --success-bg: #064E3B;
  --warning-bg: #78350F;
  --error-bg: #7F1D1D;
  --info-bg: #1E3A5F;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.4);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.5);
  --shadow-card: 0 2px 8px rgba(0,0,0,0.2);
  --shadow-card-hover: 0 8px 30px rgba(0,0,0,0.35);
}

/* ── Typography Scale ── */
.text-xs { font-size: 0.7rem; }
.text-sm { font-size: 0.8125rem; }
.text-base { font-size: 0.9375rem; }
.text-lg { font-size: 1.05rem; }
.text-xl { font-size: 1.15rem; }
.text-2xl { font-size: 1.35rem; }
.text-3xl { font-size: 1.65rem; }
.text-4xl { font-size: 2rem; }
.text-5xl { font-size: 2.75rem; }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-secondary); }
.text-primary-color { color: var(--primary); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-warning { color: var(--warning); }

/* ── Container ── */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 640px; }
.container-lg { max-width: 1400px; }

/* ── Section spacing ── */
.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }

/* ── Animations ── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

.animate-fade-in { animation: fadeIn 0.5s ease forwards; }
.animate-slide-up { animation: slideInUp 0.6s ease forwards; }

/* ── Utility ── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ── Selection ── */
::selection { background: var(--primary); color: #fff; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--text-tertiary); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }
