/* =========================================================
   Base: reset, typography, layout helpers
   ========================================================= */

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.no-scroll { overflow: hidden; }

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

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

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

/* ---- Headings ---- */
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 400; letter-spacing: 0; line-height: var(--lh-tight); }
.t-display, .t-h1, .t-h2, .t-h3 { font-family: var(--font-display); }
.t-display { font-size: var(--fs-display); font-weight: 300; letter-spacing: var(--tracking-display); text-transform: uppercase; line-height: 1.15; }
.t-display strong, .t-h1 strong, .t-h2 strong { font-weight: 600; }
.t-h1 { font-size: var(--fs-h1); font-weight: 300; }
.t-h2 { font-size: var(--fs-h2); font-weight: 400; }
.t-h3 { font-size: var(--fs-h3); font-weight: 400; line-height: 1.25; }
.t-lead { font-size: var(--fs-lead); color: var(--text-muted); line-height: 1.55; max-width: 52ch; }
.t-small { font-size: var(--fs-small); }
.t-muted { color: var(--text-muted); }

/* Eyebrow / label: small uppercase tracked text above headings */
.eyebrow {
  display: block;
  font-size: var(--fs-caption);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-subtle);
}

p { margin: 0; }

/* ---- Layout helpers ---- */
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--surface { background: var(--surface); }
.section--sage { background: var(--sage); }
.section--brown { background: var(--brown); color: var(--cream); }

.stack > * + * { margin-top: var(--s-4); }

/* Section heading row: title left, link right, rule underneath */
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-5);
  padding-bottom: var(--s-4); margin-bottom: var(--s-7);
  border-bottom: 1px solid var(--line-strong);
}
.section-head .eyebrow { margin-bottom: var(--s-3); }

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

.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: 100;
  background: var(--accent); color: var(--on-accent); padding: var(--s-2) var(--s-4); border-radius: var(--radius-sm);
}
.skip-link:focus { top: var(--s-4); }

@media (max-width: 640px) {
  .section-head { flex-direction: column; align-items: flex-start; margin-bottom: var(--s-6); }
}

/* ---- Smooth scroll (js/smooth-scroll.js, Lenis) ---- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
