/* ============================================================
   Base — design tokens, resets, primitives
   Riley Costello Hauling
   ============================================================ */

:root {
  /* Spacing scale (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;

  /* Type scale */
  --text-xs:   clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);
  --text-sm:   clamp(0.875rem, 0.85rem + 0.15vw, 0.9375rem);
  --text-base: clamp(1rem, 0.97rem + 0.2vw, 1.0625rem);
  --text-lg:   clamp(1.125rem, 1.07rem + 0.4vw, 1.25rem);
  --text-xl:   clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --text-2xl:  clamp(2rem, 1.6rem + 2vw, 3rem);
  --text-3xl:  clamp(2.75rem, 2rem + 3.5vw, 4.5rem);
  --text-hero: clamp(3.25rem, 2.2rem + 5vw, 6rem);

  /* Fonts */
  --font-display: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --font-body: 'General Sans', 'Inter', system-ui, -apple-system, sans-serif;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-full: 999px;

  /* Easing & motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 180ms;
  --dur-base: 320ms;
  --dur-slow: 600ms;

  /* Container */
  --container: 1240px;
  --container-narrow: 880px;

  /* Z-layers */
  --z-header: 50;
  --z-modal: 100;

  /* ---------- Theme: Dark (default — regal black) ---------- */
  --bg:           #0a0a0a;
  --bg-elev:      #121212;
  --surface:      #161616;
  --surface-alt:  #1c1c1c;
  --border:       #262626;
  --border-strong:#3a3a3a;
  --text:         #ececec;
  --text-muted:   #a3a39e;
  --text-faint:   #6e6e6a;
  --gold:         #c8a96a;     /* primary accent */
  --gold-soft:    #d8bf85;
  --gold-deep:    #8a6f3e;
  --shadow-1: 0 1px 2px rgba(0,0,0,0.5), 0 1px 1px rgba(0,0,0,0.3);
  --shadow-2: 0 12px 32px rgba(0,0,0,0.55), 0 4px 12px rgba(0,0,0,0.35);
  --shadow-frame: 0 20px 45px rgba(0,0,0,0.55), 0 6px 16px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(200,169,106,0.18);
}

/* Light theme override */
[data-theme="light"] {
  --bg:           #f6f3ec;
  --bg-elev:      #ffffff;
  --surface:      #ffffff;
  --surface-alt:  #f0ece2;
  --border:       #ddd6c5;
  --border-strong:#b9b09a;
  --text:         #1a1814;
  --text-muted:   #5a574e;
  --text-faint:   #8c887d;
  --gold:         #8a6f3e;
  --gold-soft:    #a98d54;
  --gold-deep:    #5f4e2c;
  --shadow-1: 0 1px 2px rgba(20,16,8,0.06), 0 1px 1px rgba(20,16,8,0.04);
  --shadow-2: 0 12px 28px rgba(20,16,8,0.10), 0 4px 12px rgba(20,16,8,0.06);
  --shadow-frame: 0 18px 36px rgba(20,16,8,0.14), 0 4px 10px rgba(20,16,8,0.08), inset 0 0 0 1px rgba(138,111,62,0.25);
}

/* ============================================================
   Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 4px;
}
a:hover { color: var(--gold); }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--text);
}

p { margin: 0; }

::selection { background: var(--gold); color: #0a0a0a; }

/* Focus ring */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--gold);
  color: #0a0a0a;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 1000;
  transition: top var(--dur-base) var(--ease-out);
}
.skip-link:focus { top: 1rem; color: #0a0a0a; }
