/* ============================================================
   Mesa Group — mesa.group
   v1.0 site styles
   Editorial register. Senior advisor voice. Reference class:
   Palantir, Stratechery, Oliver Wyman, BCG editorial.
   ============================================================ */

@import url('https://api.fontshare.com/v2/css?f[]=satoshi@300,400,500,700&f[]=fraunces@300,400,500,600,700&display=swap');

:root {
  /* Palette — warm dark ground, bone text, ember accent */
  --ink:        #0E0E0C;     /* primary ground (warm near-black) */
  --ink-2:      #161614;     /* secondary surface */
  --ink-3:      #1F1E1B;     /* card / inset surface */
  --rule:       #2A2823;     /* hairline rules */
  --rule-2:     #3A3731;     /* slightly stronger rule */

  --bone:       #ECE6D9;     /* primary text on dark */
  --bone-mute:  #B8B2A4;     /* secondary text */
  --bone-faint: #7E7A6F;     /* tertiary, captions, meta */

  --ember:      #C4502E;     /* accent — deep terracotta */
  --ember-soft: #E08562;     /* hover / glow */

  --paper:      #F4EFE2;     /* inverse ground for occasional sections */

  /* Type scale */
  --display:    'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --body:       'Satoshi', 'Söhne', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:       'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Spacing rhythm */
  --gutter:     clamp(1.25rem, 4vw, 2.5rem);
  --col-max:    78rem;
  --read-max:   38rem;

  /* Motion */
  --ease:       cubic-bezier(0.2, 0.6, 0.2, 1);
}

/* ----------- Base ----------- */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--body);
  font-weight: 400;
  font-size: 1.0625rem;       /* 17px base, lets serif breathe */
  line-height: 1.55;
  color: var(--bone);
  background: var(--ink);
  font-feature-settings: "ss01", "ss02", "kern";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Subtle film grain ground */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/></svg>");
}

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

a {
  color: var(--bone);
  text-decoration: none;
  transition: color 200ms var(--ease);
}

a:hover { color: var(--ember-soft); }

::selection {
  background: var(--ember);
  color: var(--bone);
}

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

.display-1 {
  font-family: var(--display);
  font-weight: 400;
  font-variation-settings: "SOFT" 30, "WONK" 0, "opsz" 144;
  font-size: clamp(3.25rem, 9vw, 7.5rem);
  line-height: 0.96;
  letter-spacing: -0.025em;
  margin: 0;
}

.display-2 {
  font-family: var(--display);
  font-weight: 400;
  font-variation-settings: "SOFT" 30, "opsz" 144;
  font-size: clamp(2.5rem, 6vw, 4.75rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
}

.display-3 {
  font-family: var(--display);
  font-weight: 500;
  font-variation-settings: "SOFT" 50, "opsz" 144;
  font-size: clamp(1.875rem, 3.5vw, 2.875rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone-faint);
  margin: 0 0 1.5rem 0;
}

.eyebrow .num {
  color: var(--ember);
  margin-right: 0.5rem;
}

.lede {
  font-family: var(--display);
  font-weight: 300;
  font-variation-settings: "SOFT" 30, "opsz" 96;
  font-size: clamp(1.375rem, 2.4vw, 1.75rem);
  line-height: 1.32;
  letter-spacing: -0.01em;
  color: var(--bone);
  max-width: 44rem;
  margin: 0;
}

.body-large {
  font-size: 1.1875rem;
  line-height: 1.55;
  color: var(--bone);
  max-width: var(--read-max);
}

p {
  margin: 0 0 1.25rem 0;
  max-width: var(--read-max);
}

p:last-child { margin-bottom: 0; }

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

em {
  font-family: var(--display);
  font-style: italic;
  font-variation-settings: "SOFT" 100, "opsz" 144;
}

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

.container {
  max-width: var(--col-max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  position: relative;
  z-index: 2;
}

section {
  padding: clamp(4rem, 10vw, 8rem) 0;
  position: relative;
  border-top: 1px solid var(--rule);
}

section:first-of-type {
  border-top: 0;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

@media (max-width: 820px) {
  .section-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* ----------- Header / nav ----------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.125rem 0;
}

.brand {
  font-family: var(--display);
  font-weight: 500;
  font-variation-settings: "SOFT" 0, "opsz" 144;
  font-size: 1.375rem;
  letter-spacing: -0.015em;
  color: var(--bone);
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  white-space: nowrap;
}

.brand-mark + * { margin-left: 0; } /* gap handles spacing */

.brand:hover { color: var(--bone); }

.brand-mark {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--bone-mute);
  letter-spacing: -0.005em;
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a:hover { color: var(--bone); }

.nav-links a[aria-current="page"] {
  color: var(--bone);
}

.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--ember);
}

@media (max-width: 640px) {
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.875rem; }
}

/* ----------- Hero ----------- */

.hero {
  padding-top: clamp(5rem, 12vw, 9rem);
  padding-bottom: clamp(5rem, 12vw, 9rem);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 85% 15%, rgba(196, 80, 46, 0.10), transparent 60%),
    radial-gradient(ellipse 70% 50% at 10% 90%, rgba(196, 80, 46, 0.06), transparent 65%);
  pointer-events: none;
}

/* Hero atmospheric image — full-bleed behind the hero, masked into the
   warm dark ground via gradients. Reads like Oliver Wyman: image as
   register-setter, not as decoration. The image is set as a CSS
   background on .hero-image, layered behind the hero content. */
.hero-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  /* Image loaded but desaturated and dimmed so type carries primacy */
  filter: saturate(0.85) contrast(1.05);
  opacity: 0.55;
}

/* Hero video — same compositional rules as .hero-image. Sits in the
   same slot. Ink-fade mask sits above (z=1) so type stays primary. */
.hero-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  filter: saturate(0.85) contrast(1.05);
  opacity: 0.55;
  pointer-events: none;
}

/* When a video is present, the hero-image placeholder hides behind it. */
.hero-image.has-video {
  display: none;
}

/* Shared ink-fade mask. Lives above the image/video, below the type.
   Warm dark fade from left so text remains legible. */
.hero-mask {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, var(--ink) 0%, color-mix(in srgb, var(--ink) 80%, transparent) 35%, color-mix(in srgb, var(--ink) 25%, transparent) 70%, transparent 100%),
    linear-gradient(180deg, color-mix(in srgb, var(--ink) 35%, transparent) 0%, transparent 25%, transparent 75%, color-mix(in srgb, var(--ink) 70%, transparent) 100%);
}

/* Mask is handled by .hero-mask — see above. */

/* Placeholder treatment when no image is set — abstract layered
   gradient that evokes mesa silhouette geometry without being literal */
.hero-image.is-placeholder {
  background:
    /* Layer 3: distant mesa silhouette */
    linear-gradient(180deg, transparent 65%, color-mix(in srgb, var(--ember) 30%, var(--ink)) 65%, color-mix(in srgb, var(--ember) 30%, var(--ink)) 68%, transparent 68%),
    /* Layer 2: middle butte */
    linear-gradient(180deg, transparent 72%, color-mix(in srgb, var(--ember) 20%, var(--ink-2)) 72%, color-mix(in srgb, var(--ember) 20%, var(--ink-2)) 78%, transparent 78%),
    /* Layer 1: foreground */
    linear-gradient(180deg, transparent 85%, var(--ink-2) 85%),
    /* Sky wash */
    radial-gradient(ellipse 80% 50% at 75% 30%, rgba(196, 80, 46, 0.18), transparent 65%),
    var(--ink);
  filter: none;
  opacity: 1;
}

.hero-inner {
  position: relative;
  z-index: 2;
}

.hero-meta {
  display: flex;
  gap: 1.5rem;
  align-items: baseline;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bone-faint);
}

.hero-meta-item { display: flex; gap: 0.5rem; }
.hero-meta-item .label { color: var(--ember); }

.hero-headline {
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.hero-subhead {
  font-family: var(--display);
  font-weight: 300;
  font-variation-settings: "SOFT" 30, "opsz" 96;
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  line-height: 1.42;
  letter-spacing: -0.005em;
  color: var(--bone-mute);
  max-width: 44rem;
  margin: 0 0 clamp(2rem, 4vw, 3rem) 0;
}

.hero-subhead .lead {
  color: var(--bone);
  display: block;
  margin-bottom: 0.5em;
  font-weight: 500;
}

/* ----------- Buttons / CTAs ----------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--body);
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: -0.005em;
  padding: 0.875rem 1.375rem;
  border: 1px solid var(--rule-2);
  background: transparent;
  color: var(--bone);
  cursor: pointer;
  transition: all 220ms var(--ease);
  text-decoration: none;
  position: relative;
}

.btn:hover {
  border-color: var(--ember);
  color: var(--bone);
  background: rgba(196, 80, 46, 0.06);
}

.btn .arrow {
  width: 14px;
  height: 14px;
  transition: transform 220ms var(--ease);
}

.btn:hover .arrow {
  transform: translateX(3px);
}

.btn--primary {
  background: var(--ember);
  border-color: var(--ember);
  color: var(--bone);
}

.btn--primary:hover {
  background: var(--ember-soft);
  border-color: var(--ember-soft);
  color: var(--ink);
}

.btn--minimal {
  border: 0;
  padding: 0.5rem 0;
  background: transparent;
  border-bottom: 1px solid var(--rule-2);
  border-radius: 0;
}

.btn--minimal:hover {
  border-bottom-color: var(--ember);
  background: transparent;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
}

.btn-row .text-link {
  color: var(--bone-mute);
  font-size: 0.9375rem;
  margin-left: 0.5rem;
  border-bottom: 1px solid transparent;
}

.btn-row .text-link:hover {
  color: var(--ember-soft);
  border-bottom-color: var(--ember);
}

/* ----------- Problem section (Home) ----------- */

.problem {
  background: var(--ink-2);
}

.problem .stat {
  font-family: var(--display);
  font-weight: 400;
  font-variation-settings: "SOFT" 0, "opsz" 144;
  font-size: clamp(5rem, 14vw, 12rem);
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--ember);
  display: block;
}

.problem .stat-caption {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bone-faint);
  margin-top: 1rem;
  max-width: 22rem;
}

/* ----------- Routing / divisions ----------- */

.divisions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule);
  margin-top: clamp(2.5rem, 5vw, 4rem);
  border: 1px solid var(--rule);
}

@media (max-width: 820px) {
  .divisions { grid-template-columns: 1fr; }
}

.division {
  background: var(--ink);
  padding: clamp(2rem, 4vw, 3.25rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  transition: background 240ms var(--ease);
  text-decoration: none;
  color: inherit;
}

.division:hover {
  background: var(--ink-3);
  color: inherit;
}

.division-tag {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone-faint);
}

.division-tag .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--ember);
  border-radius: 50%;
  margin-right: 0.5rem;
  transform: translateY(-2px);
}

.division-name {
  font-family: var(--display);
  font-weight: 500;
  font-variation-settings: "SOFT" 30, "opsz" 144;
  font-size: clamp(2rem, 3.5vw, 2.875rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
}

.division-line {
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-variation-settings: "SOFT" 100, "opsz" 144;
  font-size: 1.25rem;
  color: var(--bone-mute);
  margin: 0 0 0.5rem 0;
}

.division-body {
  color: var(--bone-mute);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  max-width: none;
}

.division-cta {
  font-family: var(--body);
  font-weight: 500;
  font-size: 0.9375rem;
  margin-top: auto;
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  color: var(--bone);
  border-bottom: 1px solid var(--rule-2);
  padding-bottom: 0.375rem;
  width: fit-content;
  white-space: nowrap;
  transition: border-color 200ms var(--ease), color 200ms var(--ease);
}

.division:hover .division-cta {
  color: var(--ember-soft);
  border-bottom-color: var(--ember);
}

/* ----------- Principles ----------- */

.principles {
  counter-reset: principle;
}

.principle {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: clamp(1.5rem, 3vw, 3rem);
  padding: clamp(2rem, 4vw, 3rem) 0;
  border-top: 1px solid var(--rule);
}

.principle:last-child {
  border-bottom: 1px solid var(--rule);
}

.principle-num {
  font-family: var(--display);
  font-weight: 300;
  font-variation-settings: "SOFT" 0, "opsz" 144;
  font-size: 2.5rem;
  line-height: 1;
  color: var(--ember);
  letter-spacing: -0.02em;
}

.principle-title {
  font-family: var(--display);
  font-weight: 500;
  font-variation-settings: "SOFT" 30, "opsz" 144;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 1rem 0;
  color: var(--bone);
}

.principle-body {
  color: var(--bone-mute);
  font-size: 1.0625rem;
  line-height: 1.6;
  max-width: var(--read-max);
}

@media (max-width: 640px) {
  .principle {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .principle-num { font-size: 1.75rem; }
}

/* ----------- Next Authority Question ----------- */

.next-question {
  position: relative;
}

.next-question::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 50%, rgba(196, 80, 46, 0.08), transparent 70%);
  pointer-events: none;
}

.next-question .label {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 1.5rem;
  display: block;
}

.next-question h2 {
  font-family: var(--display);
  font-weight: 300;
  font-variation-settings: "SOFT" 30, "opsz" 144;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--bone);
  margin: 0 0 2rem 0;
  max-width: 36rem;
}

.next-question p {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--bone-mute);
  max-width: 38rem;
}

/* ----------- Contact teaser / closer ----------- */

.contact-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

@media (max-width: 820px) {
  .contact-block { grid-template-columns: 1fr; }
}

.contact-block h2 {
  font-family: var(--display);
  font-weight: 400;
  font-variation-settings: "SOFT" 30, "opsz" 144;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem 0;
  color: var(--bone);
}

.contact-block .subhead {
  color: var(--bone-mute);
  font-size: 1.0625rem;
  line-height: 1.6;
  max-width: 36rem;
}

/* ----------- Forms (Contact page) ----------- */

.form {
  display: grid;
  gap: 1.5rem;
  max-width: 36rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.field label {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bone-faint);
}

.field input,
.field textarea {
  font-family: var(--body);
  font-size: 1rem;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule-2);
  padding: 0.625rem 0;
  color: var(--bone);
  outline: 0;
  transition: border-color 200ms var(--ease);
  width: 100%;
}

.field textarea {
  resize: vertical;
  min-height: 6rem;
  line-height: 1.55;
}

.field input:focus,
.field textarea:focus {
  border-bottom-color: var(--ember);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--bone-faint);
}

.field-error {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--ember-soft);
  display: none;
  margin-top: 0.25rem;
}

.field.has-error .field-error { display: block; }
.field.has-error input,
.field.has-error textarea { border-bottom-color: var(--ember); }

.form-status {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--bone-mute);
  padding: 1rem;
  border: 1px solid var(--rule);
  background: var(--ink-2);
  display: none;
}

.form-status.is-success { display: block; border-color: var(--ember); color: var(--bone); }
.form-status.is-error { display: block; border-color: var(--ember-soft); color: var(--bone); }

/* ----------- Contact paths block ----------- */

.paths {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin-top: 2.5rem;
}

@media (max-width: 820px) { .paths { grid-template-columns: 1fr; } }

.path {
  background: var(--ink);
  padding: clamp(2rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.path-num {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ember);
}

.path-title {
  font-family: var(--display);
  font-weight: 500;
  font-variation-settings: "SOFT" 30, "opsz" 144;
  font-size: 1.75rem;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--bone);
}

.path-body {
  color: var(--bone-mute);
  font-size: 1rem;
  line-height: 1.55;
  margin: 0;
}

/* ----------- Footer ----------- */

.site-footer {
  background: var(--ink-2);
  border-top: 1px solid var(--rule);
  padding: clamp(3rem, 6vw, 5rem) 0 2rem 0;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: clamp(1.5rem, 3vw, 3rem);
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--rule);
}

@media (max-width: 820px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    row-gap: 2.5rem;
  }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-firm {
  font-family: var(--display);
  font-weight: 400;
  font-variation-settings: "SOFT" 30, "opsz" 96;
  font-size: 1.125rem;
  line-height: 1.4;
  color: var(--bone);
  max-width: 22rem;
  margin: 0;
}

.footer-col h4 {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone-faint);
  margin: 0 0 1rem 0;
  font-weight: 400;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col a {
  font-size: 0.9375rem;
  color: var(--bone-mute);
}

.footer-col a:hover { color: var(--ember-soft); }

.footer-col .placeholder {
  font-size: 0.9375rem;
  color: var(--bone-faint);
  display: inline-flex;
  align-items: baseline;
  gap: 0.375rem;
}

.footer-col .placeholder::before {
  content: "·";
  color: var(--bone-faint);
}

.footer-bottom {
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--bone-faint);
  flex-wrap: wrap;
  gap: 1rem;
}

/* ----------- 404 (used as a state, not a route in v1) ----------- */
.notfound {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 0;
}

/* ----------- Reveal / load-in animation -----------
   Pure CSS. No JS dependency. Items fade up gently on page load.
   Without animation support, content is still visible by default. */
@keyframes mg-reveal {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 1;
  animation: mg-reveal 700ms var(--ease) both;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ----------- Page intro band (Mapping/Build/About/Contact heros) ----------- */
.page-hero {
  padding-top: clamp(4rem, 9vw, 7rem);
  padding-bottom: clamp(3.5rem, 7vw, 5.5rem);
  position: relative;
  overflow: hidden;
}

.page-hero > .container {
  position: relative;
  z-index: 2;
}

.page-hero .hero-image {
  /* Inherits .hero-image styles. Slightly dimmer for inner pages
     so the breadcrumb and lede stay primary. */
  opacity: 0.42;
}

.page-hero .breadcrumb {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bone-faint);
  margin-bottom: 1.5rem;
  display: flex;
  gap: 0.625rem;
  align-items: center;
}

.page-hero .breadcrumb a { color: var(--bone-faint); }
.page-hero .breadcrumb a:hover { color: var(--ember-soft); }
.page-hero .breadcrumb .sep { color: var(--rule-2); }

/* ----------- Generic prose/content blocks (Mapping/Build/About) ----------- */

.content-block + .content-block {
  border-top: 1px solid var(--rule);
}

.content-block {
  padding: clamp(3.5rem, 7vw, 6rem) 0;
}

.content-block h2 {
  font-family: var(--display);
  font-weight: 400;
  font-variation-settings: "SOFT" 30, "opsz" 144;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 1.75rem 0;
  color: var(--bone);
  max-width: 36rem;
}

.content-block p {
  color: var(--bone-mute);
  font-size: 1.0625rem;
  line-height: 1.65;
}

.content-block .body-prose p {
  max-width: var(--read-max);
}

.content-block .body-prose p strong {
  color: var(--bone);
}

/* Drop-cap on lede for editorial feel */
.drop-lede::first-letter {
  font-family: var(--display);
  font-weight: 400;
  font-variation-settings: "SOFT" 0, "opsz" 144;
  float: left;
  font-size: 4.5em;
  line-height: 0.85;
  padding: 0.05em 0.1em 0 0;
  color: var(--ember);
  letter-spacing: -0.02em;
}

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

.muted   { color: var(--bone-mute); }
.faint   { color: var(--bone-faint); }
.ember   { color: var(--ember); }
.serif   { font-family: var(--display); }
.mono    { font-family: var(--mono); }
.right   { text-align: right; }
.center  { text-align: center; }
.no-margin { margin: 0; }
.spacer-sm { height: 1.5rem; }
.spacer-md { height: 3rem; }
.spacer-lg { height: 5rem; }

.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}

.kicker {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone-faint);
  margin: 0 0 0.75rem 0;
}

/* visually hidden but accessible */
.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;
}
