/* DPM Design Tokens — derived from Amy's brand palette */

:root,
[data-theme='light'] {
  /* Brand palette — Amy's confirmed colors */
  --dpm-blue: #466892;        /* primary, from logo */
  --dpm-butter: #ffec9f;      /* warm primary, from book cover */
  --dpm-sage: #a9c5b3;
  --dpm-coral: #ef9b9b;
  --dpm-peach: #e8baa3;
  --dpm-lavender: #ccbfd4;
  --dpm-slate: #93abc3;

  /* Derived shades */
  --dpm-blue-deep: #2f4a6b;       /* darker for text & emphasis */
  --dpm-blue-soft: #6a87ad;       /* lighter blue */
  --dpm-butter-soft: #fff4c6;     /* lighter cream */
  --dpm-cream: #fdf8e8;           /* very light cream surface */

  /* Surfaces */
  --color-bg: #fbfaf6;
  --color-surface: #ffffff;
  --color-surface-2: #fdf8e8;     /* cream */
  --color-surface-offset: #f4efde; /* warm offset */
  --color-divider: #e8e2cf;
  --color-border: #d8d0b8;

  /* Text */
  --color-text: #1f2a3a;          /* deep navy-charcoal */
  --color-text-muted: #5b6a80;
  --color-text-faint: #94a0b3;
  --color-text-inverse: #fdfbf3;

  /* Primary (DPM blue) */
  --color-primary: var(--dpm-blue);
  --color-primary-hover: var(--dpm-blue-deep);
  --color-primary-active: #1d2f47;
  --color-primary-highlight: #d8e0eb;
  --color-on-primary: #ffffff;

  /* Accent (butter) for warmth */
  --color-accent: var(--dpm-butter);
  --color-accent-deep: #e3c860;

  /* Semantic */
  --color-success: #5b8a55;
  --color-warning: #c97f4a;

  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.2vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.82rem + 0.25vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  --text-2xl: clamp(2rem, 1.4rem + 2vw, 3rem);
  --text-3xl: clamp(2.5rem, 1.5rem + 3.2vw, 4.25rem);
  --text-hero: clamp(2.75rem, 1.5rem + 5vw, 5.5rem);

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

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

  /* Shadows tuned to warm cream surfaces */
  --shadow-sm: 0 1px 2px rgba(70, 104, 146, 0.06);
  --shadow-md: 0 6px 18px rgba(70, 104, 146, 0.10);
  --shadow-lg: 0 18px 44px rgba(70, 104, 146, 0.14);
  --shadow-glow: 0 0 0 4px rgba(70, 104, 146, 0.12);

  /* Transitions */
  --transition: 220ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 480ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 1040px;
  --content-wide: 1240px;

  /* Fonts — defined in fonts.css */
  --font-display: 'Fraunces', 'Source Serif 4', Georgia, serif;
  --font-body: 'Work Sans', 'Helvetica Neue', system-ui, sans-serif;
  --font-script: 'Caveat', 'Dancing Script', cursive;
}

[data-theme='dark'] {
  --color-bg: #131a26;
  --color-surface: #1a2334;
  --color-surface-2: #1f2a3d;
  --color-surface-offset: #243049;
  --color-divider: #2c374a;
  --color-border: #3b4760;

  --color-text: #ecedef;
  --color-text-muted: #9aa6bd;
  --color-text-faint: #6b7588;
  --color-text-inverse: #1a2334;

  --color-primary: #88a8cf;
  --color-primary-hover: #aac2dd;
  --color-primary-active: #c5d4e6;
  --color-primary-highlight: #2a3850;
  --color-on-primary: #131a26;

  --color-accent: #f5dc7a;
  --color-accent-deep: #d6b850;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 0 4px rgba(136, 168, 207, 0.18);
}
