/* =========================================================
   Design tokens, reset, base typography, layout primitives
   ========================================================= */

:root {
  --bg: #f3ece1;
  --bg-soft: #e9dfce;
  --bg-card: #ffffff;
  --ink: #15110f;
  --ink-soft: #44392f;
  --muted: #8a7a6a;
  --line: rgba(21, 17, 15, 0.12);
  --line-strong: rgba(21, 17, 15, 0.4);
  --accent: #8b6f47;
  --accent-hover: #6f5638;
  --accent-soft: #c8a67a;
  --gold: #b58e54;
  --hazel: #8b5a2b;
  --container: 1320px;
  --container-wide: 1560px;
  --gutter: clamp(20px, 4vw, 64px);
  --radius: 14px;
  --radius-lg: 28px;
  --shadow-sm: 0 4px 14px rgba(21, 17, 15, 0.06);
  --shadow-md: 0 12px 36px rgba(21, 17, 15, 0.10);
  --shadow-lg: 0 30px 80px rgba(21, 17, 15, 0.18);
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --header-h: 80px;
  --grain-opacity: 0.06;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: auto;
  overflow-x: clip;
  background: var(--bg);
  /* The page uses Lenis for smooth scrolling, so hide the native bar
     entirely instead of recolouring it — recolouring inevitably clashes
     with the gradient hero on the right edge. */
  scrollbar-width: none;       /* Firefox */
  -ms-overflow-style: none;    /* old Edge / IE */
}
html::-webkit-scrollbar,
body::-webkit-scrollbar { display: none; } /* Chrome, Edge, Safari */

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  width: 100%;
  cursor: none;
}

/* film-grain overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/></svg>");
  mix-blend-mode: multiply;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color .2s ease, opacity .2s ease; }
a:hover { color: var(--accent); }

::selection { background: var(--ink); color: var(--bg); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.08;
  margin: 0 0 0.6em;
  color: var(--ink);
}
h1 { font-size: clamp(2.8rem, 8vw, 7rem); letter-spacing: -0.02em; line-height: 1.04; }
h2 { font-size: clamp(2.2rem, 5.4vw, 4.8rem); letter-spacing: -0.015em; }
h3 { font-size: clamp(1.4rem, 2.4vw, 2rem); }
h4 { font-size: 1.15rem; }
p { margin: 0 0 1em; color: var(--ink-soft); }

.eyebrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}
.eyebrow::before { content: ""; width: 32px; height: 1px; background: currentColor; }

/* Hand-drawn underline injected + animated by DrawSVG (initDrawSVGAccents).
   Absolutely positioned beneath the label text so it never disturbs the
   inline-flex layout; starts at 42px to clear the ::before dash + gap. */
.eyebrow-accent {
  position: absolute;
  left: 42px;
  right: 0;
  bottom: -7px;
  height: 7px;
  width: auto;
  overflow: visible;
  color: var(--gold, var(--accent));
  opacity: 0.85;
  pointer-events: none;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.container--wide { max-width: var(--container-wide); }

main { display: block; }

.section { padding: clamp(96px, 14vw, 180px) 0; position: relative; }
.section--tight { padding: clamp(60px, 8vw, 100px) 0; }
.section--dark { background: var(--ink); color: var(--bg); }
.section--dark p { color: rgba(243, 236, 225, 0.7); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 60px;
  margin-bottom: 80px;
  flex-wrap: wrap;
}
.section-head__text { max-width: 760px; }
.section-head h2 { margin-bottom: 0; font-style: normal; font-weight: 500; }
.section-head h2 .non-italic { font-style: normal; }
.section-head p { margin-top: 24px; max-width: 540px; }

.line-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  line-height: inherit;
  /* Lora has deep descenders (g, j, p, y); pad the clip box and pull the
     baseline back with a matching negative margin so glyphs aren't cut. */
  padding-bottom: 0.16em;
  margin-bottom: -0.16em;
}
.line-mask > span { display: inline-block; will-change: transform; }

/* GSAP SplitText / fallback word units. No mask/clip box is used (a clip
   would cut Lora's deep descenders g/y/p/j); words fade in from below
   instead, so they just need to be inline-block to accept transforms. */
.split-word { display: inline-block; will-change: transform, opacity; }

.reveal { opacity: 0; transform: translateY(40px); will-change: transform, opacity; }

.entry {
  max-width: 760px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 80px) var(--gutter) 100px;
}
.entry h1, .entry h2 { font-family: var(--serif); }
.entry img { border-radius: var(--radius); margin: 24px 0; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  body { cursor: auto; }
}

/* =========================================================
   Global mobile rhythm — tighten vertical spacing, scale
   type, and shrink the header so phones don't feel like a
   stretched-out desktop layout. Anything section-specific
   lives in its own module's media query.
   ========================================================= */
@media (max-width: 720px) {
  :root {
    --header-h: 64px;
  }

  /* Tighter, but still breathing, vertical rhythm */
  .section { padding: 64px 0; }
  .section--tight { padding: 48px 0; }

  /* Section heads stack their text + CTA instead of sitting side-by-side
     with a giant 60px gap */
  .section-head {
    gap: 20px;
    margin-bottom: 40px;
  }
  .section-head p { margin-top: 16px; }

  /* Headlines: dial down the desktop clamp ceilings so a long line
     doesn't eat half the screen in height */
  h1 { font-size: clamp(2.2rem, 11vw, 3.2rem); line-height: 1.08; }
  h2 { font-size: clamp(1.9rem, 8.5vw, 2.6rem); }
  h3 { font-size: clamp(1.3rem, 5.5vw, 1.6rem); }

  .eyebrow { margin-bottom: 16px; }

  /* Entry / article pages */
  .entry { padding: calc(var(--header-h) + 40px) var(--gutter) 60px; }
}

@media (max-width: 480px) {
  .section { padding: 52px 0; }
  h1 { font-size: clamp(2rem, 12vw, 2.8rem); }
}
