/* ==========================================================================
   Base — reset, typography defaults, layout primitives, utilities
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--c-linen);
  color: var(--c-ink);
  font-family: var(--f-ui);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

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

a { color: var(--c-canopy); text-decoration: none; transition: color var(--t-micro); }
a:hover { color: #B8722F; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

::selection { background: var(--c-spectrum); color: #14180F; }

:focus-visible {
  outline: 2px solid var(--c-spectrum);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #DDD4C4; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }


/* --- Typography ---------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 400;
  letter-spacing: -.025em;
  line-height: 1.06;
  margin: 0;
}

p { margin: 0; }

.display-xl { font-size: var(--t-display-xl); font-weight: 300; line-height: .98; letter-spacing: -.03em; }
.display-lg { font-size: var(--t-display-lg); font-weight: 300; line-height: 1;   letter-spacing: -.03em; }
.display-md { font-size: var(--t-display-md); font-weight: 400; line-height: 1.06; }
.display-sm { font-size: var(--t-display-sm); font-weight: 400; line-height: 1.08; }
.serif      { font-family: var(--f-display); }
.italic     { font-style: italic; }

/* The brandbook’s fourth type role: small tracked uppercase. Set in the UI
   sans rather than the mono, which is reserved for figures. */
.label {
  font-family: var(--f-label); font-weight: 600;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--c-stone);
}
.label--spectrum { color: var(--c-spectrum); }
.label--clay     { color: var(--c-clay); }

.lede { font-size: clamp(16px, 1.4vw, 19px); line-height: 1.7; color: var(--c-ink-soft); }
.muted { color: var(--c-ink-quiet); }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

/* <code> defaults to the browser's monospace — the one typeface this site
   does not use. Point it at the figure role like every other figure. */
code, kbd, samp {
  font-family: var(--f-mono);
  font-size: .9em;
  background: var(--c-sand);
  padding: 2px 6px;
  border-radius: var(--r-sm);
}

.measure    { max-width: 52ch; }
.measure-sm { max-width: 40ch; }


/* --- Layout primitives --------------------------------------------------- */

.wrap        { max-width: var(--maxw);        margin-inline: auto; padding-inline: var(--gutter); }
.wrap--mid   { max-width: var(--maxw-mid);    margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow{ max-width: var(--maxw-narrow); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--prose { max-width: var(--maxw-prose);  margin-inline: auto; padding-inline: var(--gutter); }

.section        { padding-block: var(--section-y); }
.section--tight { padding-block: var(--section-y-tight); }

/* Full-bleed colour bands — the brand's rhythm device */
.band          { background: var(--c-sand); }
.band--canopy  { background: var(--c-canopy); color: var(--c-cream); }
.band--ink     { background: var(--c-ink);    color: var(--c-cream); }
.band--canopy h1, .band--canopy h2, .band--ink h1, .band--ink h2 { color: var(--c-cream); }

.grid { display: grid; gap: var(--sp-6); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.row { display: flex; align-items: center; gap: var(--sp-3); }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: var(--sp-4); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--sp-8);
  flex-wrap: wrap;
  margin-bottom: var(--sp-12);
}
.section-head__eyebrow { margin-bottom: var(--sp-4); }

.centred { text-align: center; }
.centred .measure, .centred .measure-sm { margin-inline: auto; }


/* --- Motion -------------------------------------------------------------- */

/* Everything reveals upward, never sideways. */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--t-reveal), transform var(--t-reveal);
}
[data-reveal].is-in { opacity: 1; transform: none; }

@keyframes lp-glow     { 0%, 100% { opacity: .45 } 50% { opacity: 1 } }
@keyframes lp-marquee  { from { transform: translateX(0) } to { transform: translateX(-50%) } }
@keyframes lp-kenburns { from { transform: scale(1) }     to { transform: scale(1.08) } }
@keyframes lp-in       { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }
@keyframes lp-slide-in { from { transform: translateX(100%) } to { transform: none } }

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


/* --- Utilities ----------------------------------------------------------- */

/* The hidden attribute is a UA style (display:none), so any author
   `display:flex/grid` beats it. Everything toggled by JS uses [hidden],
   so it has to win. */
[hidden] { display: none !important; }

.u-hidden { display: none !important; }
.u-nowrap { white-space: nowrap; }
.u-mt-0 { margin-top: 0; }

.visually-hidden {
  position: absolute; 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(--sp-4); top: -100px; z-index: 200;
  background: var(--c-canopy); color: var(--c-cream);
  padding: var(--sp-3) var(--sp-6); border-radius: var(--r-pill);
  font-weight: 600; font-size: 14px;
}
.skip-link:focus { top: var(--sp-4); color: var(--c-cream); }


/* --- Responsive collapses ------------------------------------------------ */

@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .section-head { margin-bottom: var(--sp-8); }
}
