/* =========================================================
   The Saturday Baker — Design Tokens
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght,SOFT@0,9..144,300..900,30..100;1,9..144,300..900,30..100&family=Source+Serif+4:ital,opsz,wght@0,8..60,300..700;1,8..60,300..700&display=swap');

:root {
  /* ---------- Colour ---------- */
  --bg: #faf3e7;
  --paper: #fdf9f1;
  --paper-deep: #f5ebd9;
  --ink: #2a1f15;
  --ink-soft: #5a4938;
  --ink-quiet: #8a7a68;
  --ink-faint: #b8a890;
  --line: #e3d4ba;
  --line-soft: #ede0c8;

  /* Accents */
  --crust: #b86c2a;        /* sourdough-crust ochre — primary */
  --crust-deep: #8e4f1a;   /* hover/active */
  --crust-soft: #d9a166;   /* tints, badges */
  --jam: #9c2f24;          /* rosehip — milestones */
  --jam-deep: #722018;
  --olive: #6b7a3f;        /* subtle accent */

  /* Shadows */
  --shadow-soft: 0 1px 2px rgba(80, 50, 20, 0.04), 0 4px 12px rgba(80, 50, 20, 0.06);
  --shadow-lift: 0 2px 4px rgba(80, 50, 20, 0.06), 0 12px 32px rgba(80, 50, 20, 0.10);

  /* ---------- Typography ---------- */
  --font-display: 'Fraunces', 'Georgia', 'Times New Roman', serif;
  --font-body: 'Source Serif 4', 'Georgia', 'Times New Roman', serif;

  /* Type scale (modular, 1.250 ratio) */
  --t-xs: 0.78rem;
  --t-sm: 0.875rem;
  --t-base: 1rem;
  --t-md: 1.125rem;
  --t-lg: 1.4rem;
  --t-xl: 1.85rem;
  --t-2xl: 2.4rem;
  --t-3xl: 3.2rem;
  --t-4xl: 4.2rem;

  /* ---------- Space ---------- */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;

  /* ---------- Layout ---------- */
  --container: 760px;
  --container-wide: 1080px;
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 14px;

  /* ---------- Motion ---------- */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-soft: cubic-bezier(0.25, 0.1, 0.25, 1);
  --dur-fast: 150ms;
  --dur: 240ms;
  --dur-slow: 400ms;
}

/* =========================================================
   Reset & base
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  font-feature-settings: 'kern' 1, 'liga' 1, 'ss01' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Subtle paper texture via radial gradients */
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(184, 108, 42, 0.04), transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(107, 122, 63, 0.03), transparent 50%);
  background-attachment: fixed;
}

img,
svg {
  max-width: 100%;
  display: block;
}

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

a {
  color: var(--crust-deep);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color var(--dur-fast) var(--ease);
}

a:hover {
  color: var(--jam);
}

/* =========================================================
   Display typography
   ========================================================= */

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.01em;
  /* Fraunces variable axes — slightly soft, slightly tight */
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
  font-weight: 500;
}

h1 {
  font-size: var(--t-3xl);
  font-weight: 400;
  font-variation-settings: 'opsz' 144, 'SOFT' 70;
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--t-2xl);
  font-weight: 500;
}

h3 {
  font-size: var(--t-xl);
  font-weight: 500;
}

h4 {
  font-size: var(--t-lg);
  font-weight: 600;
}

/* Italic Fraunces is gorgeous — use for accents */
.italic-display {
  font-family: var(--font-display);
  font-style: italic;
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
}

/* Small caps eyebrow text */
.eyebrow {
  font-family: var(--font-display);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--crust-deep);
  font-variation-settings: 'opsz' 9, 'SOFT' 50;
}
