/* MasterCraft Finish — base.css
 * Design tokens + element resets
 * Warm cream / walnut / burnt-copper palette
 */

:root {
  /* === Light theme (default) === */
  --bg: #F4EFE6;
  --bg-elevated: #ECE4D6;
  --bg-deep: #E3D9C6;
  --surface: #FFFDF8;
  --ink: #1F1A14;
  --ink-soft: #463B30;
  --ink-mute: #6E6155;
  --line: #D6CCBA;
  --line-strong: #B9AB94;
  --accent: #B8552B;        /* burnt copper */
  --accent-deep: #8E3F1F;
  --accent-soft: #E8CDB6;
  --walnut: #3E2A1B;
  --gold: #C3673B;
  --shadow-sm: 0 1px 2px rgba(31, 26, 20, .06), 0 1px 1px rgba(31, 26, 20, .04);
  --shadow-md: 0 4px 14px rgba(31, 26, 20, .08), 0 2px 4px rgba(31, 26, 20, .05);
  --shadow-lg: 0 24px 60px rgba(31, 26, 20, .14), 0 10px 24px rgba(31, 26, 20, .08);

  /* Type */
  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --text-xs: 0.78rem;
  --text-sm: 0.88rem;
  --text-base: 1rem;
  --text-lg: 1.13rem;
  --text-xl: 1.31rem;
  --text-2xl: 1.6rem;
  --text-3xl: 2.05rem;
  --text-4xl: 2.65rem;
  --text-hero: clamp(2.4rem, 6vw, 4.6rem);
  --text-display: clamp(2rem, 4.5vw, 3.4rem);

  --leading-tight: 1.08;
  --leading-snug: 1.22;
  --leading-normal: 1.55;
  --leading-relaxed: 1.7;

  --tracking-tight: -0.018em;
  --tracking-normal: 0;
  --tracking-wide: 0.06em;
  --tracking-wider: 0.14em;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 2.75rem;
  --space-8: 3.5rem;
  --space-9: 4.5rem;
  --space-10: 6rem;
  --space-11: 8rem;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  --container: 1200px;
  --container-narrow: 760px;
  --container-wide: 1400px;

  --transition-quick: 160ms cubic-bezier(.4, 0, .2, 1);
  --transition: 280ms cubic-bezier(.4, 0, .2, 1);
  --transition-slow: 600ms cubic-bezier(.16, .8, .3, 1);
}

[data-theme="dark"] {
  --bg: #14110D;
  --bg-elevated: #1C1814;
  --bg-deep: #0E0B08;
  --surface: #221D17;
  --ink: #F2E9DA;
  --ink-soft: #C6BAA6;
  --ink-mute: #8C8170;
  --line: #2D2620;
  --line-strong: #44382D;
  --accent: #D87149;
  --accent-deep: #B8552B;
  --accent-soft: #4A2D1C;
  --walnut: #C19A78;
  --gold: #D88955;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, .45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition), color var(--transition);
}

img, picture, svg, video { display: block; max-width: 100%; height: auto; }

a {
  color: inherit;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
  transition: color var(--transition-quick), text-decoration-color var(--transition-quick);
}
a:hover { color: var(--accent); text-decoration-color: var(--accent); }

button {
  font: inherit; color: inherit;
  background: none; border: 0; padding: 0; cursor: pointer;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  margin: 0;
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
}
h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-display); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }

p { margin: 0 0 1rem; max-width: 70ch; }
em {
  font-family: var(--font-display);
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  color: var(--accent);
}
strong { font-weight: 600; }

ul, ol { padding-left: 1.2rem; margin: 0 0 1rem; }

hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: var(--space-7) 0;
}

::selection { background: var(--accent); color: var(--surface); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--bg);
  padding: 0.75rem 1rem; z-index: 100;
  text-decoration: none;
}
.skip-link:focus { left: 1rem; top: 1rem; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

@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;
  }
}
