/* ============================================================
   Three Spoons Catering — base.css
   Reset · tokens · typography · utilities
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ---------- Tokens ---------- */
:root {
  /* Colour — ivory paper + sage olive + warm copper spark.
     Footer / cookie banner are warm-dark only. */
  --ink:        #1F231C;
  --ink-2:      #2E332A;
  --ink-3:      #4A4F44;
  --surface-dark: #13160F;        /* footer + banner — warm near-black */
  --paper:      #F5F1E8;          /* ivory */
  --paper-2:    #FCF8EE;          /* card surface, slightly lighter */
  --line:       #DDD6BF;
  --line-2:     #B7AE92;
  --muted:      #6C6852;
  --accent:     #4A5D32;          /* deep sage olive */
  --accent-deep:#2E3D1F;
  --accent-on-dark:#7A9657;       /* on the dark footer / cookie only */
  --accent-tint:#E5E8D4;
  --cta-bg:     #4A5D32;
  --cta-bg-hover:#2E3D1F;
  --good:       #4D7A4F;

  /* Brass secondary spark — butter-yellow, sparingly */
  --brass:      #C9A14B;
  --brass-soft: rgba(201, 161, 75, 0.16);

  /* Grid backdrop for hero + dark sections */
  --grid-line:  rgba(31, 35, 28, 0.05);
  --grid-line-strong: rgba(31, 35, 28, 0.08);

  /* Typography
     Display: Fraunces — warm variable serif (weight 800 + opsz 144 for h1, 600 for h2)
     Italic accent: Fraunces italic — same family, weight 400 italic
     Body / UI: Inter
     Mono: IBM Plex Mono (NEVER JetBrains Mono) */
  --font-display: "Fraunces", "Times New Roman", serif;
  --font-serif:   "Fraunces", Georgia, serif;
  --font-sans:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", monospace;

  /* Type scale — mobile defaults */
  --fs-xs:   12px;
  --fs-sm:   14px;
  --fs-base: 16px;
  --fs-md:   18px;
  --fs-lg:   22px;
  --fs-xl:   28px;
  --fs-2xl:  32px;
  --fs-display: 38px;

  /* Spacing */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;
  --sp-10: 128px;

  /* Layout */
  --container: 1240px;
  --gutter: 20px;

  --r-sm: 4px;
  --r-md: 10px;
  --r-pill: 999px;

  --shadow-card: 0 14px 32px -16px rgba(31, 35, 28, 0.22);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 160ms;
  --t: 280ms;
}

@media (min-width: 768px) {
  :root {
    --fs-base: 17px;
    --fs-md:   20px;
    --fs-lg:   26px;
    --fs-xl:   30px;
    --fs-2xl:  40px;
    --fs-display: 52px;
    --gutter: 32px;
  }
}

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

/* ---------- Base typography ---------- */
html {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  font-size: var(--fs-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Fraunces — warm display serif. NOT uppercase. Variable-axis for opsz + wght. */
h1, h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  line-height: 1.04;
  letter-spacing: -0.018em;
  color: var(--ink);
}
h3, h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.018em;
  color: var(--ink);
}

h1 { font-size: var(--fs-display); font-variation-settings: "opsz" 144, "SOFT" 50; }
h2 { font-size: var(--fs-2xl); font-weight: 600; font-variation-settings: "opsz" 96, "SOFT" 50; }
h3 { font-size: var(--fs-xl); letter-spacing: -0.015em; }
h4 { font-size: var(--fs-lg); letter-spacing: -0.01em; }

em, .italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}
h1 em, h2 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 60;
  color: var(--accent-deep);
  letter-spacing: -0.015em;
}

p { max-width: 65ch; color: var(--ink-3); }
p.lead { color: var(--ink-2); font-size: var(--fs-md); max-width: 58ch; }

small, .small { font-size: var(--fs-sm); color: var(--muted); }
strong { font-weight: 600; color: var(--ink); }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(31, 35, 28, 0.25);
  text-underline-offset: 4px;
  transition: text-decoration-color var(--t-fast) var(--ease);
}
a:hover { text-decoration-color: var(--accent); }

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

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

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-deep);
  font-weight: 500;
}
.eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--accent);
}

.mono { font-family: var(--font-mono); }
.accent { color: var(--accent-deep); }

.divide-top { border-top: 1px solid var(--line); }
.divide-bottom { border-bottom: 1px solid var(--line); }

/* Accent scoped to dark backgrounds */
.site-footer,
.cookie-banner {
  --accent: var(--accent-on-dark);
  --accent-deep: var(--accent-on-dark);
}

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
