/* =========================================================================
   RESET + BASE
   ========================================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 7rem;
}

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

/* Subtle paper-grain wash so flat black never reads as dead space. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-base);
  background:
    radial-gradient(1100px 620px at 78% -8%, rgba(201,162,39,.055), transparent 62%),
    radial-gradient(900px 520px at 5% 102%, rgba(107,32,40,.05), transparent 60%);
}

h1, h2, h3, h4 {
  font-family: var(--ff-display);
  font-weight: 700;
  line-height: var(--lh-head);
  letter-spacing: var(--ls-tight);
  margin: 0 0 var(--sp-4);
  color: var(--linen);
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { margin: 0 0 var(--sp-4); max-width: var(--maxw-text); text-wrap: pretty; }

a { color: var(--gilt); text-decoration: none; transition: color var(--t-fast) var(--ease); }
a:hover { color: var(--gilt-soft); }

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

ul, ol { margin: 0; padding: 0; list-style: none; }

button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

strong { font-weight: 600; color: var(--linen); }

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

/* ---- Focus: visible for keyboard, not on mouse ------------------------- */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--gilt-soft);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* ---- Skip link --------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -100px;
  z-index: var(--z-toast);
  padding: var(--sp-3) var(--sp-5);
  background: var(--gilt);
  color: var(--ink);
  font-weight: 600;
  font-size: var(--fs-sm);
  border-radius: var(--r-md);
  transition: top var(--t-base) var(--ease);
}
.skip-link:focus-visible { top: var(--sp-4); color: var(--ink); }

/* ---- Layout primitives -------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
  z-index: var(--z-raised);
}
.wrap--narrow { max-width: 900px; }

.section { padding-block: var(--section-y); position: relative; }
.section--raised { background: var(--ink-raised); }
.section--sunken { background: var(--ink-sunken); }

/* Picture-rail moulding divider. */
.rail {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ink-line-2) 18%,
              rgba(201,162,39,.34) 50%, var(--ink-line-2) 82%, transparent);
  border: 0;
  margin: 0;
}

/* ---- Typographic helpers ------------------------------------------------ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--ff-body);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--gilt);
  margin-bottom: var(--sp-4);
}
.eyebrow::before {
  content: '';
  width: 30px;
  height: 1px;
  background: var(--gilt);
  opacity: .75;
}
.eyebrow--center::after {
  content: '';
  width: 30px;
  height: 1px;
  background: var(--gilt);
  opacity: .75;
}

.lede {
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  color: var(--linen-muted);
  line-height: 1.75;
}

.muted { color: var(--linen-muted); }
.serif { font-family: var(--ff-display); }
.center { text-align: center; }
.center p, .center .lede { margin-inline: auto; }

/* Gilt italic emphasis inside display headings. */
.gilt-em {
  font-style: italic;
  color: var(--gilt);
  font-weight: 400;
}

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

/* ---- Section header ----------------------------------------------------- */
.sec-head { max-width: 760px; margin-bottom: var(--sp-8); }
.sec-head.center { margin-inline: auto; }
.sec-head p:last-child { margin-bottom: 0; }
