/* style.css - Purpose Made Podcast Design Tokens */

/* ===== TYPE SCALE ===== */
:root {
  --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.9rem  + 0.5vw,  1.125rem);
  --text-lg:   clamp(1.125rem, 0.95rem + 0.85vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1rem    + 1.5vw,  2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    8rem);

  /* ===== SPACING (4px base) ===== */
  --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;

  /* ===== TYPOGRAPHY ===== */
  --font-display: 'Bodoni Moda', Georgia, serif;
  --font-body: 'EB Garamond', Georgia, serif;

  /* ===== RADIUS ===== */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-full: 9999px;

  /* ===== TRANSITIONS ===== */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* ===== CONTENT WIDTHS ===== */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;
}

/* ===== DARK MODE (DEFAULT) ===== */
:root, [data-theme="dark"] {
  --color-bg:             #0a0a0a;
  --color-surface:        #111111;
  --color-surface-2:      #1a1a1a;
  --color-surface-offset: #0e0e0e;
  --color-divider:        #222222;
  --color-border:         #2a2a2a;

  --color-text:           #f2f0ed;
  --color-text-muted:     #b0aca6;
  --color-text-faint:     #706c66;
  --color-text-inverse:   #0a0a0a;

  --color-primary:        #c5a47e;
  --color-primary-hover:  #d4b896;
  --color-primary-active: #b89468;
  --color-primary-highlight: rgba(197, 164, 126, 0.1);

  --color-error:          #d16363;
  --color-success:        #6daa45;
  --color-warning:        #bb653b;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
}

/* ===== LIGHT MODE ===== */
[data-theme="light"] {
  --color-bg:             #f5f2ed;
  --color-surface:        #faf8f5;
  --color-surface-2:      #ffffff;
  --color-surface-offset: #ede9e3;
  --color-divider:        #d5d0c9;
  --color-border:         #c5c0b8;

  --color-text:           #1a1815;
  --color-text-muted:     #6b6862;
  --color-text-faint:     #a5a29c;
  --color-text-inverse:   #f5f2ed;

  --color-primary:        #a07b52;
  --color-primary-hover:  #8a6a45;
  --color-primary-active: #75593a;
  --color-primary-highlight: rgba(160, 123, 82, 0.1);

  --color-error:          #c24444;
  --color-success:        #4a8825;
  --color-warning:        #a0501f;

  --shadow-sm: 0 1px 2px oklch(0.2 0.01 80 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0.01 80 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.2 0.01 80 / 0.12);
}

/* System preference fallback */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --color-bg:             #f5f2ed;
    --color-surface:        #faf8f5;
    --color-surface-2:      #ffffff;
    --color-surface-offset: #ede9e3;
    --color-divider:        #d5d0c9;
    --color-border:         #c5c0b8;
    --color-text:           #1a1815;
    --color-text-muted:     #6b6862;
    --color-text-faint:     #a5a29c;
    --color-text-inverse:   #f5f2ed;
    --color-primary:        #a07b52;
    --color-primary-hover:  #8a6a45;
    --color-primary-active: #75593a;
    --color-primary-highlight: rgba(160, 123, 82, 0.1);
    --color-error:          #c24444;
    --color-success:        #4a8825;
    --color-warning:        #a0501f;
    --shadow-sm: 0 1px 2px oklch(0.2 0.01 80 / 0.06);
    --shadow-md: 0 4px 12px oklch(0.2 0.01 80 / 0.08);
    --shadow-lg: 0 12px 32px oklch(0.2 0.01 80 / 0.12);
  }
}
