/* Art direction: Sports card gallery → Museum-quality, warm, reverent
   Palette: Warm off-white base (#FAF9F6), midnight gray-blue accent, minimal chrome
   Typography: Inter (single font family) — weight contrast does the work
   Density: Spacious — gallery/museum feel, cards breathe */

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Type Scale */
  --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);

  /* Spacing (4px grid) */
  --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;

  /* Font */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;
  --radius-full: 9999px;

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

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-max: 1600px;
}

/* ============================================================
   LIGHT MODE (Default)
   ============================================================ */
:root, [data-theme="light"] {
  /* Surfaces — warm off-white */
  --color-bg:             #FAF9F6;
  --color-surface:        #ffffff;
  --color-surface-2:      #f5f4f1;
  --color-surface-offset: #efefe9;
  --color-divider:        #e5e5df;
  --color-border:         #d8d8d0;

  /* Text */
  --color-text:           #1a1a17;
  --color-text-muted:     #6b6b64;
  --color-text-faint:     #a3a39c;
  --color-text-inverse:   #FAF9F6;

  /* Primary Accent — midnight gray-blue */
  --color-primary:        #3d5a80;
  --color-primary-hover:  #2c4a6e;
  --color-primary-active: #1e3a5c;
  --color-primary-highlight: #e8eef4;

  /* Success */
  --color-success:        #2d7a3a;
  --color-success-highlight: #e8f5ea;

  /* Error / Negative */
  --color-error:          #c23b3b;
  --color-error-highlight: #fde8e8;

  /* Shadows — warm-tinted */
  --shadow-sm: 0 1px 2px oklch(0.25 0.02 70 / 0.06);
  --shadow-md: 0 4px 16px oklch(0.25 0.02 70 / 0.08);
  --shadow-lg: 0 12px 40px oklch(0.25 0.02 70 / 0.12);
  --shadow-xl: 0 20px 60px oklch(0.25 0.02 70 / 0.16);
  --shadow-card: 0 8px 32px oklch(0.25 0.02 70 / 0.10), 0 2px 8px oklch(0.25 0.02 70 / 0.06);
  --shadow-card-hover: 0 16px 48px oklch(0.25 0.02 70 / 0.14), 0 4px 12px oklch(0.25 0.02 70 / 0.08);
}

/* ============================================================
   DARK MODE
   ============================================================ */
[data-theme="dark"] {
  --color-bg:             #141412;
  --color-surface:        #1c1c19;
  --color-surface-2:      #232320;
  --color-surface-offset: #2a2a26;
  --color-divider:        #333330;
  --color-border:         #3d3d38;

  --color-text:           #e5e5e0;
  --color-text-muted:     #8e8e86;
  --color-text-faint:     #5a5a54;
  --color-text-inverse:   #1a1a17;

  --color-primary:        #6b8db5;
  --color-primary-hover:  #5a7da5;
  --color-primary-active: #4a6d95;
  --color-primary-highlight: #1e2a38;

  --color-success:        #4caf50;
  --color-success-highlight: #1a2e1b;

  --color-error:          #ef5350;
  --color-error-highlight: #2e1a1a;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.25);
  --shadow-md: 0 4px 16px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 12px 40px oklch(0 0 0 / 0.45);
  --shadow-xl: 0 20px 60px oklch(0 0 0 / 0.55);
  --shadow-card: 0 8px 32px oklch(0 0 0 / 0.35), 0 2px 8px oklch(0 0 0 / 0.25);
  --shadow-card-hover: 0 16px 48px oklch(0 0 0 / 0.45), 0 4px 12px oklch(0 0 0 / 0.30);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:             #141412;
    --color-surface:        #1c1c19;
    --color-surface-2:      #232320;
    --color-surface-offset: #2a2a26;
    --color-divider:        #333330;
    --color-border:         #3d3d38;
    --color-text:           #e5e5e0;
    --color-text-muted:     #8e8e86;
    --color-text-faint:     #5a5a54;
    --color-text-inverse:   #1a1a17;
    --color-primary:        #6b8db5;
    --color-primary-hover:  #5a7da5;
    --color-primary-active: #4a6d95;
    --color-primary-highlight: #1e2a38;
    --color-success:        #4caf50;
    --color-success-highlight: #1a2e1b;
    --color-error:          #ef5350;
    --color-error-highlight: #2e1a1a;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.25);
    --shadow-md: 0 4px 16px oklch(0 0 0 / 0.35);
    --shadow-lg: 0 12px 40px oklch(0 0 0 / 0.45);
    --shadow-xl: 0 20px 60px oklch(0 0 0 / 0.55);
    --shadow-card: 0 8px 32px oklch(0 0 0 / 0.35), 0 2px 8px oklch(0 0 0 / 0.25);
    --shadow-card-hover: 0 16px 48px oklch(0 0 0 / 0.45), 0 4px 12px oklch(0 0 0 / 0.30);
  }
}
