/* ==========================================================================
   BASE — reset, typography, layout primitives, utilities
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--bone);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked { 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; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }

::selection { background: var(--brass); color: var(--ink); }

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

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

.display,
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 300;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  letter-spacing: -0.02em;
  line-height: var(--lh-snug);
}

.display em, h1 em, h2 em, h3 em {
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  color: var(--brass);
}

.t-hero { font-size: var(--fs-hero); line-height: 0.98; letter-spacing: -0.035em; }
.t-2xl  { font-size: var(--fs-2xl); line-height: var(--lh-tight); letter-spacing: -0.03em; }
.t-xl   { font-size: var(--fs-xl);  line-height: 1.08; }
.t-lg   { font-size: var(--fs-lg);  line-height: 1.25; }
.t-md   { font-size: var(--fs-md); }

.lead {
  font-size: var(--fs-md);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 38ch;
}

/* Small uppercase label with brass rule */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--moss);
}
.eyebrow::before {
  content: "";
  width: 2.2rem;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}
.eyebrow__num { color: var(--brass); font-variant-numeric: tabular-nums; }

.on-dark, .section--dark { color: var(--text-on-dark); }
.on-dark .eyebrow, .section--dark .eyebrow { color: var(--brass-light); }
.on-dark .lead, .on-dark .muted,
.section--dark .lead, .section--dark .muted { color: var(--muted-on-dark); }
.on-dark em, .section--dark em { color: var(--brass-light); }

.muted { color: var(--text-muted); }

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

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

.section { padding-block: var(--section-y); position: relative; }
.section--dark  { background: var(--ink); color: var(--text-on-dark); }
.section--stone { background: var(--limestone); }

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2vw, 2rem);
}

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

.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: fixed;
  top: 1rem; left: 1rem;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  background: var(--brass);
  color: var(--ink);
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform var(--dur-fast) var(--ease-out);
}
.skip-link:focus { transform: none; }

/* Media wrapper that crops images to a ratio */
.media {
  position: relative;
  overflow: hidden;
  background: var(--forest);
}
.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
