/* ==========================================================================
   Base: reset, typography, utilities
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  color-scheme: light;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
  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: clip;
}

body.is-locked { overflow: hidden; }

img, picture, video, canvas, svg { display: block; max-width: 100%; }
img { height: auto; }

input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }

p, h1, h2, h3, h4, h5, h6, li, dd, blockquote { overflow-wrap: break-word; }

ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

a { color: inherit; text-decoration: none; }
a[href^="mailto:"] { overflow-wrap: anywhere; }

::selection { background: var(--color-caramel); color: var(--color-espresso); }

:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: 4px;
}

hr { border: 0; border-top: 1px solid var(--border); }

/* ---------- Typography ---------- */

h1, h2, h3, h4, .h1, .h2, .h3, .h4, .display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  color: inherit;
  font-optical-sizing: auto;
  text-wrap: balance;
}

.display { font-size: var(--fs-display); line-height: 1.02; letter-spacing: -0.03em; }
h1, .h1 { font-size: var(--fs-h1); }
h2, .h2 { font-size: var(--fs-h2); }
h3, .h3 { font-size: var(--fs-h3); line-height: var(--lh-snug); }
h4, .h4 { font-size: var(--fs-h4); line-height: var(--lh-snug); }

/* One highlighted italic word inside headings */
h1 em, h2 em, h3 em, .display em, .h1 em, .h2 em {
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}
:is(.on-dark, .section--dark, .site-footer) h1 em, :is(.on-dark, .section--dark, .site-footer) h2 em, :is(.on-dark, .section--dark, .site-footer) .display em,
.page-hero h1 em, .page-hero .display em, .hero h1 em, .cta-band h2 em { color: var(--color-caramel); }

p { text-wrap: pretty; }
.lead { font-size: var(--fs-lg); line-height: 1.65; color: var(--text-muted); }
.small { font-size: var(--fs-sm); }
.muted { color: var(--text-muted); }
.script { font-family: var(--font-script); font-size: 1.75em; line-height: 1; color: var(--accent-text); }

.prose { max-width: 65ch; }
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3 { margin-top: 1.8em; }
.prose a, .text-link {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--dur-fast);
}
.prose a:hover, .text-link:hover { color: var(--color-espresso); }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: 0.4em; }

/* Eyebrow label: gold rule + small caps */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-gold-text);
  line-height: 1.4;
}
.eyebrow::before {
  content: "";
  width: 32px;
  height: 1.5px;
  background: currentColor;
  flex: none;
}
.eyebrow--center::after {
  content: "";
  width: 32px;
  height: 1.5px;
  background: currentColor;
  flex: none;
}
:is(.on-dark, .section--dark, .site-footer) .eyebrow, .page-hero .eyebrow, .hero .eyebrow, .cta-band .eyebrow { color: var(--color-caramel); }

.num { font-family: var(--font-display); font-variant-numeric: lining-nums tabular-nums; }

/* ---------- 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: absolute;
  top: 0.75rem; left: 0.75rem;
  z-index: calc(var(--z-preloader) + 1);
  padding: 0.75rem 1.25rem;
  background: var(--color-chocolate);
  color: var(--color-cream);
  border-radius: var(--radius-pill);
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform var(--dur-base) var(--ease-out);
}
.skip-link:focus-visible { transform: none; }

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--fill { fill: currentColor; stroke: none; }
.icon--sm { width: 1em; height: 1em; }
.icon--lg { width: 1.6em; height: 1.6em; }

.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.nowrap { white-space: nowrap; }

/* Subtle paper grain for cream sections */
.grain { position: relative; isolation: isolate; }
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.23 0 0 0 0 0.14 0 0 0 0 0.09 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Responsive picture wrapper: image fills its frame with a focal point */
.media { position: relative; overflow: hidden; background: var(--surface-alt); }
picture.media, .media > picture { display: block; }
.media > img, .media > picture, .media > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus, 50% 50%);
}
@media (max-width: 767px) {
  /* Art-directed pictures can set a separate mobile focal point */
  .media > img, .media > picture > img { object-position: var(--focus-m, var(--focus, 50% 50%)); }
}
