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

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

* { margin: 0; }

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

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

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

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

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

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

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

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-snug); }

p { text-wrap: pretty; }

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

/* ---------- Focus ---------- */
:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--deep-canopy); }
::-webkit-scrollbar-thumb {
  background: var(--forest-core);
  border-radius: var(--r-pill);
  border: 2px solid var(--deep-canopy);
}
::-webkit-scrollbar-thumb:hover { background: var(--living-moss); }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--sp-4);
  z-index: var(--z-toast);
  padding: 0.75rem 1.25rem;
  background: var(--sap-gold);
  color: var(--ink);
  font-weight: 700;
  border-radius: var(--r-sm);
  transition: top var(--t-base) var(--ease);
}
.skip-link:focus { top: var(--sp-4); }

/* ==========================================================================
   LAYOUT PRIMITIVES
   ========================================================================== */

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

.container--narrow { max-width: 960px; }

.section {
  position: relative;
  padding-block: var(--section-y);
  background: var(--bg);
  /* Decorative overlays (tree rings, mesh glows) are intentionally oversized
     and bleed past the section edge — clip them so they never widen the page. */
  overflow-x: clip;
}

.section--alt { background: var(--bg-alt); }

.section--light {
  background: var(--light-bg);
  color: var(--light-text);
}

/* Grain overlay for dark sections — premium print finish */
.section--grain::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.section > .container { position: relative; z-index: 1; }

/* ---------- Section heading block ---------- */
.sec-head { margin-bottom: clamp(2.5rem, 1.8rem + 3vw, 4.5rem); }
.sec-head--center { text-align: center; max-width: 62ch; margin-inline: auto; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--sap-gold);
  margin-bottom: var(--sp-4);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.75;
}
.sec-head--center .eyebrow::after {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.75;
}

.sec-lede {
  margin-top: var(--sp-5);
  font-size: var(--fs-lg);
  color: var(--text-muted);
  max-width: var(--maxw-text);
  line-height: 1.68;
}
.sec-head--center .sec-lede { margin-inline: auto; }

/* Gold flourish under headings */
.flourish {
  display: block;
  width: 72px;
  height: 2px;
  margin-top: var(--sp-5);
  background: linear-gradient(90deg, var(--sap-gold), transparent);
  border-radius: var(--r-pill);
}
.sec-head--center .flourish {
  margin-inline: auto;
  background: linear-gradient(90deg, transparent, var(--sap-gold), transparent);
}

/* ---------- Utility ---------- */
.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;
}

.text-gold { color: var(--sap-gold); }
.text-moss { color: var(--fresh-growth); }

/* Display serif italic accent used inside headings */
.accent-italic {
  font-style: italic;
  font-weight: 300;
  color: var(--sap-gold);
}

.grid { display: grid; gap: var(--sp-5); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
