/* HUGS SF — single-page site. No JavaScript.
   One self-hosted variable font (Latin subset, 27KB) covering 300–800. */

@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('/fonts/plus-jakarta-sans-latin.cd8db90c.woff2') format('woff2-variations');
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Metric-matched fallback. Without this the swap from system font to webfont
   nudges the layout; these adjustments hold CLS at 0. */
@font-face {
  font-family: 'Jakarta Fallback';
  src: local('Helvetica Neue'), local('Arial');
  size-adjust: 105%;
  ascent-override: 96%;
  descent-override: 24%;
  line-gap-override: 0%;
}

/* Palette sampled from the site's own photographs rather than picked by eye:
   the deep shade under the oak (#262C1B), the sunlit grass (#758B37), and the
   trail dirt (#98826B / #C5B5A0) that the warm paper and sand are drawn from.
   Every pairing used below clears WCAG AA — the tightest is olive on paper at
   5.14:1, the rest sit between 5.5:1 and 14:1. */
:root {
  --paper: #f7f3ea;   /* warm off-white, replaces the flat #f0f0f0 grey */
  --sand:  #ebe3d3;   /* quieter band, from the trail dirt */
  --ink:   #1e2416;   /* near-black with green in it, never pure grey */
  --ink-soft: #4a5340;
  --forest: #2f3a21;  /* dark band background */
  --olive: #5a6e24;   /* accent: rules, eyebrows, buttons */
  --meadow: #88a201;  /* the green the hills illustration ends on */
  --cream: #f7f3ea;

  --radius: 22px;
  --wrap: 1240px;
  --gap: clamp(1.25rem, 3vw, 2.5rem);
  --pad: clamp(1.75rem, 1rem + 4vw, 5rem);

  --font: 'Plus Jakarta Sans', 'Jakarta Fallback', -apple-system,
          BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
          sans-serif;

  --rise: 1.75rem;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-synthesis-weight: none;
}

/* Headings get balanced ragging so a two-line title never leaves one orphan
   word; body copy gets `pretty`, which only guards the last line. */
h1, h2, .tagline { text-wrap: balance; }
p { text-wrap: pretty; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* ---------- shared type ---------- */

/* Optical sizing: the larger the type, the tighter the tracking. */
.wordmark {
  margin: 0;
  font-size: clamp(3.25rem, 1.5rem + 8.5vw, 7rem);
  line-height: 0.9;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.wordmark span + span { margin-left: 0.16em; }

.tagline {
  margin: 0.3em 0 0;
  font-size: clamp(1.5rem, 0.9rem + 2.8vw, 2.75rem);
  line-height: 1.12;
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--ink-soft);
}

/* Small caps label above each section heading — cheap editorial signal that
   the old flat layout had no equivalent of. */
.eyebrow {
  margin: 0 0 1.1em;
  padding-left: 2.6rem;
  position: relative;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--olive);
}

.eyebrow::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 1.9rem;
  height: 2px;
  background: currentColor;
}

h2 {
  margin: 0 0 0.5em;
  font-size: clamp(2.25rem, 1.2rem + 4.2vw, 3.75rem);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.038em;
}

.lede, .lead-in { color: var(--ink-soft); }

.lede strong { color: var(--ink); font-weight: 700; }

.lead-in {
  font-size: 1.15em;
  font-weight: 500;
  color: var(--ink);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: min(94svh, 940px);
  padding-block: clamp(2rem, 6vw, 4rem) 0;
  /* No overflow clipping: the card is *meant* to hang past the bottom edge.
     The background is inset:0 so it cannot overflow on its own. z-index keeps
     the overhanging card above the opaque band that follows it. */
  z-index: 2;
}

.hero__bg { position: absolute; inset: 0; z-index: 0; }

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 58%;
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, var(--wrap));
  margin-inline: auto;
}

/* The card deliberately hangs past the bottom of the hero and into the section
   below. That overlap is what stops the page reading as a stack of separate
   rectangles. */
.hero__card {
  max-width: 42rem;
  padding: clamp(1.75rem, 1rem + 3vw, 3.25rem);
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: 0 30px 70px -20px rgb(30 36 22 / 0.45);
  margin-bottom: clamp(-8rem, -6vw, -3rem);
}

.lede { margin: clamp(1.1rem, 2.5vw, 1.75rem) 0 0; max-width: 42ch; }

/* ---------- bands ---------- */

/* Full-bleed two-up: the photograph runs to the viewport edge instead of
   sitting in a rounded card inset from it. */
.band {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  background: var(--paper);
}

.band__media { display: block; }

.band__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.band__text {
  padding: clamp(3.5rem, 8vw, 7rem) var(--pad);
}

.band__text > p { margin: 0 0 1em; max-width: 54ch; }
.band__text > p:last-child { margin-bottom: 0; }

@media (min-width: 900px) {
  .band { grid-template-columns: 1fr 1fr; }
  .band--reverse .band__media { order: 2; }
  .band__media img { aspect-ratio: auto; min-height: 100%; }
  .band__text { padding-block: clamp(5rem, 9vw, 8rem); }
  /* Give the text a comfortable measure without letting it drift to the far
     edge of a very wide screen. */
  .band:not(.band--reverse) .band__text { padding-left: clamp(2.5rem, 6vw, 6rem); }
  .band--reverse .band__text { padding-right: clamp(2.5rem, 6vw, 6rem); }
}

/* First band clears the hero card's overhang. */
#about .band__text { padding-top: clamp(9rem, 16vw, 12rem); }

@media (max-width: 899px) {
  #about .band__text { padding-top: clamp(7rem, 22vw, 10rem); }
  /* On mobile the media sits above the text, so the overhang must clear the
     photo instead. */
  #about .band__media { margin-top: clamp(4rem, 14vw, 7rem); }
}

/* Dark band — the page's one strong colour field. */
.band--dark {
  background: var(--forest);
  color: var(--cream);
}

.band--dark .eyebrow { color: var(--meadow); }
.band--dark .lede, .band--dark p { color: color-mix(in srgb, var(--cream) 86%, transparent); }

/* ---------- button ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  margin: 0.75rem 0 1.75rem;
  padding: 0.9em 1.5em;
  border-radius: 999px;
  background: var(--meadow);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.btn:hover, .btn:focus-visible {
  background: #99b501;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -10px rgb(136 162 1 / 0.7);
}

.btn__icon { width: 1.35em; height: 1.35em; flex: none; }

.contact { font-size: 1.05em; }
.contact a { font-weight: 700; text-underline-offset: 3px; }
.band--dark .contact a { color: var(--meadow); }

/* ---------- 404 ---------- */

.notfound {
  max-width: 40rem;
  margin: clamp(4rem, 12vh, 9rem) auto;
  padding: clamp(2rem, 5vw, 3.5rem);
  background: var(--sand);
  border-radius: var(--radius);
  text-align: center;
}

.notfound h1 {
  margin: 0 0 0.4em;
  font-size: clamp(2rem, 1.2rem + 3.5vw, 3.25rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.notfound p { color: var(--ink-soft); }
.notfound .btn { margin-bottom: 0; }

/* ---------- footer ---------- */

.footer { position: relative; }

.footer__hills img { width: 100%; display: block; }

.footer__inner {
  padding: clamp(2rem, 4vw, 3rem) 1rem clamp(2.5rem, 5vw, 3.5rem);
  background: var(--meadow);
  color: var(--ink);
  text-align: center;
}

.footer__mark {
  margin: 0 0 0.35em;
  font-size: clamp(1.5rem, 1rem + 2vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

/* No opacity here — fading text over the green would drop it back below the
   contrast threshold the dark ink was chosen to clear. */
.footer__note { margin: 0.25em 0; font-size: 0.95em; }

/* The footer email sits on its own line, so give it a finger-sized target
   rather than the ~19px an inline link would otherwise get. */
.footer__note a { display: inline-block; padding: 0.3em 0.2em; }

/* ---------- motion ---------- */

/* Scroll-driven reveals, CSS only — `animation-timeline: view()` ties the
   animation to the element's position in the viewport, so there is no
   IntersectionObserver and no JavaScript.
   Everything is inside @supports: browsers without scroll-timeline simply
   never apply the animation, and the content is fully visible by default
   rather than hidden waiting for a script that will never run. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .band__media,
    .band__text,
    .footer__hills {
      animation: rise-in linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }

    .hero__card {
      animation: rise-in 0.75s cubic-bezier(0.22, 0.61, 0.36, 1) both;
    }

    /* Stagger the two halves so a band does not arrive as one slab. */
    .band__text { animation-range: entry 8% entry 62%; }
  }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(var(--rise)); }
  to   { opacity: 1; transform: none; }
}

/* ---------- a11y ---------- */

a:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--olive);
  outline-offset: 3px;
  border-radius: 4px;
}

.band--dark a:focus-visible,
.footer__note a:focus-visible { outline-color: var(--meadow); }

.footer__note a:focus-visible { outline-color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
