/* ============================================
   PREPARED PATH PROJECT — Design Tokens
   Nexus-aligned custom palette
   ============================================ */

:root,
[data-theme='light'] {
  /* 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.0625rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.375rem);
  --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);
  --text-hero: clamp(3rem, 0.5rem + 7vw, 7rem);

  /* Spacing */
  --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;

  /* Surfaces — off-white / warm */
  --color-bg: #F7F6F2;
  --color-surface: #F9F8F5;
  --color-surface-2: #FBFBF9;
  --color-surface-offset: #F3F0EC;
  --color-surface-offset-2: #EDEAE5;
  --color-surface-dynamic: #E6E4DF;
  --color-divider: #DCD9D5;
  --color-border: #D4D1CA;

  /* Text */
  --color-text: #28251D;
  --color-text-muted: #7A7974;
  --color-text-faint: #BAB9B4;
  --color-text-inverse: #F9F8F4;

  /* Primary — Teal */
  --color-primary: #01696F;
  --color-primary-hover: #0C4E54;
  --color-primary-active: #0F3638;
  --color-primary-highlight: #CEDCD8;
  --color-primary-subtle: rgba(1, 105, 111, 0.08);

  /* Accent — Warm Orange */
  --color-accent: #DA7101;
  --color-accent-hover: #C55700;
  --color-accent-active: #AC3E00;
  --color-accent-highlight: #E7D7C4;

  /* Hero teal bg (homepage) */
  --color-hero-bg: #014D52;
  --color-hero-bg-2: #01696F;

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

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(20, 18, 14, 0.06);
  --shadow-md: 0 4px 16px rgba(20, 18, 14, 0.09);
  --shadow-lg: 0 12px 40px rgba(20, 18, 14, 0.12);

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

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-post: 720px;

  /* Fonts */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', 'Helvetica Neue', sans-serif;
}

/* ============================================
   DARK MODE
   ============================================ */
[data-theme='dark'] {
  --color-bg: #171614;
  --color-surface: #1C1B19;
  --color-surface-2: #201F1D;
  --color-surface-offset: #1D1C1A;
  --color-surface-offset-2: #22211F;
  --color-surface-dynamic: #2D2C2A;
  --color-divider: #262523;
  --color-border: #393836;
  --color-text: #CDCCCA;
  --color-text-muted: #797876;
  --color-text-faint: #5A5957;
  --color-text-inverse: #2B2A28;
  --color-primary: #4F98A3;
  --color-primary-hover: #227F8B;
  --color-primary-active: #1A626B;
  --color-primary-highlight: #313B3B;
  --color-primary-subtle: rgba(79, 152, 163, 0.12);
  --color-accent: #FDAB43;
  --color-accent-hover: #FEC47E;
  --color-accent-active: #FDD1A4;
  --color-accent-highlight: #564B3E;
  --color-hero-bg: #0A2E32;
  --color-hero-bg-2: #0D3E44;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #171614;
    --color-surface: #1C1B19;
    --color-surface-2: #201F1D;
    --color-surface-offset: #1D1C1A;
    --color-surface-offset-2: #22211F;
    --color-surface-dynamic: #2D2C2A;
    --color-divider: #262523;
    --color-border: #393836;
    --color-text: #CDCCCA;
    --color-text-muted: #797876;
    --color-text-faint: #5A5957;
    --color-text-inverse: #2B2A28;
    --color-primary: #4F98A3;
    --color-primary-hover: #227F8B;
    --color-primary-active: #1A626B;
    --color-primary-highlight: #313B3B;
    --color-primary-subtle: rgba(79, 152, 163, 0.12);
    --color-accent: #FDAB43;
    --color-accent-hover: #FEC47E;
    --color-accent-active: #FDD1A4;
    --color-accent-highlight: #564B3E;
    --color-hero-bg: #0A2E32;
    --color-hero-bg-2: #0D3E44;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.4);
  }
}
