/* ============================================
   BRETT BUMGARNER — BASE & DESIGN TOKENS
   Palette: Warm Slate + Earthy Amber + Cream
   Fonts: Lora (display/headings) + DM Sans (body)
   Feel: Honest, personal, grounded — a real person
   ============================================ */

: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.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);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    8rem);

  /* ── 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 — warm cream/linen ── */
  --color-bg:              #faf8f3;
  --color-surface:         #fdfcf9;
  --color-surface-2:       #ffffff;
  --color-surface-offset:  #f2ede3;
  --color-surface-offset-2:#ebe4d8;
  --color-divider:         #e0d9cc;
  --color-border:          #d5ccbc;

  /* ── Text ── */
  --color-text:            #1e1c17;
  --color-text-muted:      #6b6456;
  --color-text-faint:      #b5ac9e;
  --color-text-inverse:    #fdfcf9;

  /* ── Primary — deep warm slate/forest ── */
  --color-primary:         #2d4a3e;
  --color-primary-hover:   #213a30;
  --color-primary-active:  #162b23;
  --color-primary-highlight:#d4e4dc;

  /* ── Accent — warm amber ── */
  --color-accent:          #b5621a;
  --color-accent-hover:    #9a4f12;
  --color-accent-active:   #7e3e0d;
  --color-accent-highlight:#f5e0cc;
  --color-accent-light:    #fdf2e8;

  /* ── Utility ── */
  --color-success:         #3a6e2a;
  --color-error:           #9e2b2b;

  /* ── Radius ── */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.875rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  /* ── Shadows — warm toned ── */
  --shadow-sm: 0 1px 3px rgba(30,28,23,0.07);
  --shadow-md: 0 4px 16px rgba(30,28,23,0.09);
  --shadow-lg: 0 12px 40px rgba(30,28,23,0.13);
  --shadow-xl: 0 24px 64px rgba(30,28,23,0.17);

  /* ── Transitions ── */
  --transition-fast: 150ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-base: 220ms cubic-bezier(0.16, 1, 0.3, 1);

  /* ── Content Widths ── */
  --content-narrow:  640px;
  --content-default: 960px;
  --content-wide:   1200px;

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

/* ── Dark Mode ── */
[data-theme="dark"] {
  --color-bg:              #131210;
  --color-surface:         #1a1814;
  --color-surface-2:       #1f1d19;
  --color-surface-offset:  #23201b;
  --color-surface-offset-2:#282420;
  --color-divider:         #322e28;
  --color-border:          #3d3830;
  --color-text:            #e8e0d4;
  --color-text-muted:      #9a9080;
  --color-text-faint:      #5c5650;
  --color-text-inverse:    #1a1814;
  --color-primary:         #5a9e82;
  --color-primary-hover:   #4a8a6e;
  --color-primary-active:  #3a7560;
  --color-primary-highlight:#1e3328;
  --color-accent:          #e08040;
  --color-accent-hover:    #f09050;
  --color-accent-active:   #f8a060;
  --color-accent-highlight:#3d2510;
  --color-accent-light:    #2a1a08;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
  --shadow-xl: 0 24px 64px rgba(0,0,0,0.6);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:              #131210;
    --color-surface:         #1a1814;
    --color-surface-2:       #1f1d19;
    --color-surface-offset:  #23201b;
    --color-surface-offset-2:#282420;
    --color-divider:         #322e28;
    --color-border:          #3d3830;
    --color-text:            #e8e0d4;
    --color-text-muted:      #9a9080;
    --color-text-faint:      #5c5650;
    --color-text-inverse:    #1a1814;
    --color-primary:         #5a9e82;
    --color-primary-hover:   #4a8a6e;
    --color-primary-active:  #3a7560;
    --color-primary-highlight:#1e3328;
    --color-accent:          #e08040;
    --color-accent-hover:    #f09050;
    --color-accent-active:   #f8a060;
    --color-accent-highlight:#3d2510;
    --color-accent-light:    #2a1a08;
  }
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-20);
}
body {
  min-height: 100dvh;
  line-height: 1.7;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
}
img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
ul[role="list"], ol[role="list"] { list-style: none; }
input, button, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6 { text-wrap: balance; line-height: 1.25; font-family: var(--font-display); font-weight: 600; }
p, li, figcaption { text-wrap: pretty; max-width: 70ch; }
::selection { background: color-mix(in oklab, var(--color-accent) 20%, transparent); color: var(--color-text); }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: var(--radius-sm); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}
