/* ==========================================================================
   Reset + base typography
   ========================================================================== */

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

* { margin: 0; }

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

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

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

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

button { cursor: pointer; background: none; border: none; }

p,
h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }

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

/* ---- Headings --------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-display);
  font-variation-settings: "opsz" 72, "SOFT" 0, "WONK" 0;
}

h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-display);
  font-weight: 400;
}

h2 { font-size: var(--fs-h2); font-weight: 400; }
h3 { font-size: var(--fs-h3); font-weight: 600; font-family: var(--font-body); letter-spacing: -0.01em; }
h4 { font-size: var(--fs-h4); font-weight: 600; font-family: var(--font-body); letter-spacing: -0.005em; }

p { max-width: var(--measure); }

a { color: inherit; text-decoration: none; }

strong { font-weight: 700; }

/* ---- Focus ------------------------------------------------------------ */

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

.dark :focus-visible,
.section--dark :focus-visible { outline-color: var(--gold-bright); }

/* ---- Skip link -------------------------------------------------------- */

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--s-2);
  z-index: var(--z-modal);
  padding: 0.75rem 1.25rem;
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
  border-radius: var(--r-xs);
  transition: top var(--t-micro) var(--ease-out);
}

.skip-link:focus { top: var(--s-2); }

/* ---- Selection -------------------------------------------------------- */

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

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

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

.container--narrow { max-width: var(--container-narrow); }

.section {
  position: relative;
  padding-block: var(--section-y);
  overflow: hidden;
}

.section--dark {
  background: var(--grad-ink);
  color: var(--text-on-dark);
}

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

.section--tint { background: var(--platinum); }

/* Noise texture over dark sections */
.section--dark::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.section > .container { position: relative; z-index: var(--z-base); }

/* ---- Section heading block -------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--fs-caption);
  font-weight: 700;
  letter-spacing: var(--ls-caption);
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--s-2);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--gold);
  opacity: 0.7;
}

.section-head { max-width: 760px; margin-bottom: var(--s-6); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }
.section-head--center p { margin-inline: auto; }

.section-head p {
  margin-top: var(--s-2);
  font-size: var(--fs-lead);
  color: var(--text-muted);
}

/* Oversized watermark glyph */
.watermark {
  position: absolute;
  font-family: var(--font-display);
  font-size: clamp(14rem, 30vw, 28rem);
  line-height: 0.8;
  font-weight: 400;
  color: transparent;
  -webkit-text-stroke: 1px rgba(200, 164, 75, 0.10);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.watermark--tr { top: -2rem; right: -3rem; }
.watermark--bl { bottom: -4rem; left: -3rem; }

/* ---- Hairline divider -------------------------------------------------- */

.rule-gold {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, rgba(200, 164, 75, 0.5), transparent);
  margin-block: var(--s-5);
}

/* ---- Utility ----------------------------------------------------------- */

.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;
}

.text-gold { color: var(--gold); }
.text-emerald { color: var(--emerald); }
.nowrap { white-space: nowrap; }

.grid { display: grid; gap: var(--s-4); }
.flow > * + * { margin-top: var(--s-3); }
