/* ==========================================================================
   Base: reset, typography, layout primitives, utilities
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }

h1, h2, h3 {
  margin: 0;
  font-weight: 300;
  letter-spacing: -0.035em;
  line-height: 1.04;
}

h2 { font-size: clamp(2.25rem, 4.2vw, 3.75rem); }
h3 { font-size: 1.25rem; font-weight: 400; letter-spacing: -0.01em; line-height: 1.25; }

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

.section { position: relative; padding-block: var(--section-y); }
.section--cream { background: var(--cream); }
.section--white { background: var(--paper); }
.section--forest { background: var(--forest); color: var(--on-dark); }
.section--night { background: var(--night); color: var(--on-dark); }

.section-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head h2 + p,
.section-head .lead { margin-top: 22px; font-size: 1.0625rem; color: var(--text-muted); max-width: 620px; }
.section--forest .section-head .lead,
.section--night .section-head .lead { color: var(--on-dark-muted); }

.eyebrow {
  display: block;
  margin-bottom: 18px;
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--green);
  letter-spacing: -0.005em;
}
.section--forest .eyebrow,
.section--night .eyebrow { color: var(--mint); }

.muted { color: var(--text-soft); }
.mint { color: var(--mint); }
.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sr-only {
  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: fixed;
  top: 12px; left: 12px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: none; }

/* Focus: visible, brand-coloured, never removed */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}
.section--forest :focus-visible,
.section--night :focus-visible,
.on-dark :focus-visible { outline-color: var(--mint); }

/* Scroll reveal. Only hidden when JS is running (html.js), so content is
   always present for crawlers and no-JS visitors. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  transition-delay: calc(var(--d, 0) * 80ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}
