/* ==========================================================================
   Tailored Capital Strategies Group — shared stylesheet
   Palette, type and spacing tokens extracted from web_layout-v13.pdf
   ========================================================================== */

/* ---------- Fonts (self-hosted) ---------- */

@font-face {
  font-family: 'Cardo';
  src: url('../fonts/cardo-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cardo';
  src: url('../fonts/cardo-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/montserrat-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/montserrat-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/montserrat-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lato';
  src: url('../fonts/lato-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lato';
  src: url('../fonts/lato-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lato';
  src: url('../fonts/lato-900.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
  /* Color */
  --navy-900: #0a1d31;   /* deep navy — header, heroes, footer */
  --navy-700: #1c3a65;   /* mid navy — feature boxes, open accordion, M&A card */
  --gold: #cca869;       /* gold accent on dark surfaces */
  --gold-dark: #b68f58;  /* gold accent on light surfaces */
  --gray-card: #eeecea;  /* warm gray card surface */
  --gray-cool: #f4f5f7;  /* cool light gray */
  --off-white: #fafaf8;  /* page ground */
  --white: #ffffff;
  --ink: #232220;        /* body text on light */
  --ink-soft: #55534f;   /* secondary text on light */
  --white-soft: rgba(255, 255, 255, 0.85); /* body text on navy */

  /* Type */
  --font-serif: 'Cardo', Georgia, 'Times New Roman', serif;
  --font-sans: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  --font-alt: 'Lato', 'Segoe UI', Arial, sans-serif;

  --text-xs: 0.75rem;                                /* 12px  — nav, footer, eyebrows */
  --text-sm: 0.875rem;                               /* 14px  — captions, labels */
  --text-base: 1rem;                                 /* 16px  — body */
  --text-md: 1.125rem;                               /* 18px  — lead body */
  --text-lg: clamp(1.25rem, 1.125rem + 0.6vw, 1.5rem);  /* card / stat headings */
  --text-xl: clamp(1.25rem, 1.15rem + 0.6vw, 1.5rem);   /* section headings — 24px */
  --text-2xl: clamp(1.625rem, 1.325rem + 1.6vw, 2.375rem); /* page h1 */

  --ls-wide: 0.08em;
  --ls-wider: 0.14em;

  /* Spacing */
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: 6rem;

  /* Layout */
  --container: 90rem;         /* 1440px */
  --container-narrow: 52rem;  /* 832px */
  --header-h: 7.25rem;        /* true rendered header height (logo + padding) */

  /* Content measures — every block width on the site resolves to one of these.
     Derived from the comp, whose container is 201.7..1598 of an 1800px page. */
  --measure-block: 76rem;     /* full content blocks (band, accordion, legal copy) */
  --measure-cards: 82.8rem;   /* overlapping card rows (1325px) */
  --measure-grid: 68rem;      /* multi-column grids */
  --measure-prose: 62rem;     /* centred lead paragraphs */
  --measure-text: 46rem;      /* running body copy (legal pages) */
}

/* ---------- Reset ---------- */

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

/* Always reserve the scrollbar gutter so short pages (Home) don't render
   15px wider than scrolling ones and shift the centred nav. */
html {
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--off-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote {
  margin: 0;
}

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

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* Focus ring. Gold-dark on white is only 2.97:1 — under the 3:1 WCAG requires
   for focus indicators — so light surfaces use navy (10:1) and dark surfaces
   keep the gold below. */
:focus-visible {
  outline: 2px solid var(--navy-700);
  outline-offset: 3px;
}

.site-header :focus-visible,
.site-footer :focus-visible,
.on-dark :focus-visible {
  outline-color: var(--gold);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Utilities ---------- */

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

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

.visually-hidden {
  position: absolute;
  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: -100%;
  left: var(--space-4);
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--gold);
  color: var(--navy-900);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
}

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

/* Recurring gold rule motif */
.gold-rule {
  width: 5.5rem;
  height: 2px;
  border: 0;
  margin: var(--space-4) 0 0;
  background-color: var(--gold-dark);
}

.gold-rule--center {
  margin-inline: auto;
}

.gold-rule--wide {
  width: min(19rem, 60%);
}

.on-dark .gold-rule,
.gold-rule--light {
  background-color: var(--gold);
}

/* Eyebrow label. NOTE: gold-dark on a light background is 2.97:1 — only use
   this class inside .on-dark, where the gold variant below applies. */
.eyebrow {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--gold-dark);
}

.on-dark .eyebrow {
  color: var(--gold);
}

/* Headings */
.heading {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--navy-900);
}

.heading--xl {
  font-size: var(--text-2xl);
}

.heading--lg {
  font-size: var(--text-xl);
}

.heading--md {
  font-size: var(--text-lg);
}

.on-dark .heading {
  color: var(--white);
}

/* Section rhythm */
.section {
  padding-block: var(--space-8);
}

.section--flush {
  padding-block: 0;
}

.on-dark {
  background-color: var(--navy-900);
  color: var(--white-soft);
}

.on-dark--mid {
  background-color: var(--navy-700);
}

/* ---------- Header / navigation ---------- */

/* Floats over the page's first block on every page, so hero imagery runs
   to the top edge behind the nav. Heroes reserve --header-h to clear it. */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background-color: transparent;
  z-index: 20;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  min-height: var(--header-h);
  padding-block: var(--space-4);
}

.site-logo {
  display: block;
  flex-shrink: 0;
}

.site-logo img {
  width: clamp(14rem, 30vw, 25rem); /* 400px on desktop */
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.625rem;
}

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--white);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(var(--space-4), 2.5vw, var(--space-6));
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: inline-block;
  padding: 0.375rem 0.5rem;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--gold);
}

/* Active page — driven by <body data-page>, keeps header markup identical */
body[data-page="home"] .nav-link[data-nav="home"],
body[data-page="about"] .nav-link[data-nav="about"],
body[data-page="services"] .nav-link[data-nav="services"],
body[data-page="team"] .nav-link[data-nav="team"],
body[data-page="legal"] .nav-link[data-nav="legal"],
body[data-page="contact"] .nav-link[data-nav="contact"] {
  background-color: var(--gold);
  color: var(--navy-900);
}

/* Legal dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown__toggle .nav-caret {
  display: inline-block;
  margin-left: 0.375rem;
  border: 4px solid transparent;
  border-top-color: currentColor;
  border-bottom: 0;
  vertical-align: 0.125rem;
}

.nav-dropdown__menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 13rem;
  margin: 0;
  padding: var(--space-2) 0;
  list-style: none;
  background-color: var(--navy-900);
  border-top: 2px solid var(--gold);
  box-shadow: 0 12px 24px rgba(10, 29, 49, 0.35);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-0.25rem);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.nav-dropdown.is-open .nav-dropdown__menu,
.nav-dropdown:hover .nav-dropdown__menu,
.nav-dropdown:focus-within .nav-dropdown__menu {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.nav-dropdown__menu .nav-link {
  display: block;
  padding: 0.5rem 1rem;
}

/* Mobile navigation */
@media (max-width: 56.25em) {
  .nav-toggle {
    display: flex;
    flex-shrink: 0;
  }

  /* With the nav collapsed to the hamburger the logo gets its full size back.
     It may still shrink on genuinely narrow phones, where 400px cannot fit
     beside the toggle — flex handles that, so it stays as large as it can. */
  .site-logo {
    flex-shrink: 1;
    min-width: 0;
  }

  .site-logo img {
    width: 25rem;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--navy-900);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-0.5rem);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  }

  .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-3) 0 var(--space-5);
  }

  .nav-link {
    display: block;
    padding: 0.75rem var(--space-5);
    font-size: var(--text-sm);
  }

  .nav-dropdown__menu {
    position: static;
    visibility: visible;
    opacity: 1;
    transform: none;
    box-shadow: none;
    border-top: 0;
    padding: 0 0 0 var(--space-4);
    background: transparent;
  }

  .nav-dropdown__menu .nav-link {
    color: var(--white-soft);
  }

  body.nav-is-open .nav-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  body.nav-is-open .nav-toggle__bar:nth-child(2) {
    opacity: 0;
  }

  body.nav-is-open .nav-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

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

.hero {
  background-color: var(--navy-900);
  color: var(--white-soft);
  text-align: center;
  padding-top: calc(var(--header-h) + clamp(var(--space-8), 10vw, 8.5rem));
  padding-bottom: clamp(var(--space-8), 10vw, 8.5rem);
}

.hero__title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: var(--text-2xl);
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--white);
  max-width: 64rem;
  margin-inline: auto;
}

/* Keep the gold rule optically centred between heading and subheading:
   the space above must equal the subheading's top margin below. */
.hero .gold-rule {
  margin-top: var(--space-6);
}

.hero__eyebrow {
  font-size: var(--text-md);
  font-weight: 400;
  letter-spacing: var(--ls-wider);
  color: var(--white);
}

/* About's "By the Numbers" eyebrow keeps the tighter gap — it reads as a label
   under the rule rather than a full subheading. */
.hero__sub.hero__eyebrow {
  margin-top: var(--space-6);
}

.hero__sub {
  margin: var(--space-7) auto 0;
  font-size: clamp(1.0625rem, 0.975rem + 0.5vw, 1.25rem);
  font-weight: 400;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  line-height: 1.8;
}

/* ---------- Photo feature (bridge) with overlapping panels ---------- */

.photo-feature {
  position: relative;
}

.photo-feature__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 1600 / 889;
  max-height: 50rem;
  object-fit: cover;
}

.photo-feature__box {
  position: absolute;
  top: 11%;
  /* flush with the container's left edge, exactly as in the comp */
  left: max(var(--space-5), calc((100% - var(--container)) / 2 + var(--space-5)));
  width: min(23.75rem, 70%);
  padding: var(--space-6) var(--space-6) var(--space-7);
  background-color: var(--navy-700);
  color: var(--white-soft);
}

.photo-feature__box .heading {
  color: var(--white);
}

.photo-feature__list {
  list-style: none;
  padding: 0;
  margin: var(--space-5) 0 0;
  color: var(--white);
}

/* Cards overlapping the photo's bottom edge */
.card-row {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  max-width: var(--measure-cards);
  margin: -5.5rem auto 0;
  padding-inline: var(--space-5);
}

.card {
  background-color: var(--gray-card);
  padding: var(--space-6) var(--space-6) var(--space-7);
}

.card__title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);  /* 22px at desktop */
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--navy-900);
}

/* Sits between the card heading and its list, aligned to the body indent */
.card__rule {
  width: 11rem;
  max-width: 100%;
  margin-top: var(--space-5);
  margin-left: var(--space-6);
}

.card__body {
  margin-top: var(--space-4);
  padding-left: var(--space-6);
  line-height: 1.9;
  color: var(--ink);
}

@media (max-width: 47.5em) {
  /* Box drops out of its overlap and spans the full width, centred */
  .photo-feature__box {
    position: static;
    width: 100%;
    max-width: none;
    text-align: center;
  }

  .photo-feature__box .gold-rule {
    margin-inline: auto;
  }

  .photo-feature__media img {
    min-height: 14rem;
    object-fit: cover;
  }

  .card-row {
    grid-template-columns: 1fr;
    /* gap above the cards matches their own left/right inset */
    margin-top: var(--space-5);
  }

  .card__body {
    padding-left: 0;
  }

  .card__rule {
    margin-left: 0;
  }
}

/* ---------- Diagonal clipped hero (Financial Services, Team) ---------- */

.diagonal-hero {
  position: relative;
  background-color: var(--navy-900);
  color: var(--white-soft);
  overflow: hidden;
}

.diagonal-hero__media {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 57%;
  clip-path: polygon(22% 0, 100% 0, 100% 100%, 0 100%);
}

.diagonal-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.diagonal-hero__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: clamp(24rem, 36vw, 33rem);
  padding-top: calc(var(--header-h) + var(--space-8));
  padding-bottom: var(--space-9);
}

.diagonal-hero .gold-rule {
  width: 11rem;
  margin-top: var(--space-6);   /* matches .diagonal-hero__sub below */
}

.diagonal-hero__title {
  max-width: 30ch;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: var(--text-2xl);
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--white);
}

.diagonal-hero__sub {
  max-width: 34rem;
  margin-top: var(--space-6);
  font-size: var(--text-md);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  line-height: 1.7;
}

@media (max-width: 56.25em) {
  .diagonal-hero__media {
    position: static;
    width: 100%;
    clip-path: none;
    order: 2;
  }

  .diagonal-hero__media img {
    height: 15rem;
  }

  .diagonal-hero {
    display: flex;
    flex-direction: column;
  }

  .diagonal-hero__inner {
    min-height: 0;
  }
}

/* ---------- Service grid with ghosted numerals (Financial Services) ---------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 0 clamp(var(--space-6), 6vw, var(--space-9));
  max-width: var(--measure-grid);
  margin-inline: auto;
}

/* Each column flows on its own so a short item doesn't hold up the next one */
.services-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.services-col:nth-child(2) {
  margin-top: 9rem;
}

.service {
  position: relative;
  max-width: 30rem;
  padding: 2.5rem;
  transition: background-color 0.3s ease;
}

.service:hover {
  background-color: var(--navy-700);
}

.service:hover .service__title {
  color: var(--white);
}

.service:hover .service__body {
  color: var(--white-soft);
}

.service__title,
.service__body {
  transition: color 0.3s ease;
}

.service__num {
  position: absolute;
  top: 1rem;
  right: 2rem;
  z-index: 0;
  font-family: var(--font-alt);
  font-weight: 900;
  font-size: clamp(5rem, 8vw, 7.5rem);
  line-height: 1;
  color: rgba(182, 143, 88, 0.25);
  pointer-events: none;
  user-select: none;
}

.service__title,
.service__body {
  position: relative;
  z-index: 1;
}

.service__title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: var(--text-lg);
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--navy-900);
  max-width: 22rem;
}

.service__body {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  line-height: 1.8;
  color: var(--ink-soft);
}

@media (max-width: 56.25em) {
  /* Collapse the two columns and restore 1-6 reading order */
  .services-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
  }

  .services-col {
    display: contents;
  }

  .services-col:nth-child(1) > .service:nth-child(1) { order: 1; }
  .services-col:nth-child(2) > .service:nth-child(1) { order: 2; }
  .services-col:nth-child(1) > .service:nth-child(2) { order: 3; }
  .services-col:nth-child(2) > .service:nth-child(2) { order: 4; }
  .services-col:nth-child(1) > .service:nth-child(3) { order: 5; }
  .services-col:nth-child(2) > .service:nth-child(3) { order: 6; }

  .service {
    max-width: none;
  }
}

/* Shared measure for the Team page blocks (band, accordion, legal copy).
   76rem centred in the 1440 container reproduces the comp's ~100px left indent. */
:root {
  --measure-block: 76rem;
}

.block-measure {
  max-width: var(--measure-block);
  margin-inline: auto;
}

/* Section rule that lines up with .block-measure instead of the heading */
.gold-rule--block {
  width: 23rem;
  max-width: 100%;
  margin-left: max(0rem, calc((100% - var(--measure-block)) / 2));
}

/* ---------- Accordion (Team bios) ---------- */

.accordion {
  max-width: var(--measure-block);
  margin: var(--space-6) auto 0;
}

.accordion__item + .accordion__item {
  margin-top: var(--space-3);
}

.accordion__heading {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

.accordion__trigger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: var(--space-5);
  width: 100%;
  padding: var(--space-4) var(--space-5);
  text-align: left;
  background-color: var(--gray-card);
  color: var(--navy-900);
  transition: background-color 0.25s ease, color 0.25s ease;
}

.accordion__name {
  grid-column: 1;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: var(--text-lg);
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.accordion__role {
  grid-column: 1;
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--ink-soft);
  transition: color 0.25s ease;
}

.accordion__icon {
  position: relative;
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

.accordion__icon::before,
.accordion__icon::after {
  content: '';
  position: absolute;
  background-color: currentColor;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.accordion__icon::before {
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  margin-top: -1px;
}

.accordion__icon::after {
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
}

.accordion__item.is-open .accordion__trigger {
  background-color: var(--navy-700);
  color: var(--white);
}

.accordion__item.is-open .accordion__role {
  color: var(--white-soft);
}

.accordion__item.is-open .accordion__icon::after {
  transform: scaleY(0);
  opacity: 0;
}

/* Panels are in the HTML at load and hidden with CSS — JS only toggles state */
.accordion__panel {
  display: none;
  padding: var(--space-5) var(--space-5) var(--space-6) clamp(var(--space-5), 5%, 3.75rem);
  background-color: var(--white);
}

.accordion__item.is-open .accordion__panel {
  display: block;
}

.legal-body {
  margin-top: var(--space-6);
}

.bio-placeholder {
  font-style: italic;
  color: var(--ink-soft);
}

/* ---------- Stat grid overlapping photo (About) ---------- */

.stat-feature {
  position: relative;
  display: flow-root; /* keeps the negative margin from collapsing through */
}

.stat-feature__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.stat-feature__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stat-feature__inner {
  position: relative;
  margin-top: -4rem; /* cards straddle the hero/photo seam */
  padding-bottom: clamp(6rem, 14vw, 11rem);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
}

.stat-card {
  background-color: var(--white);
  padding: var(--space-5) var(--space-5) var(--space-6);
}

.stat-card--wide {
  grid-column: span 2;
}

.stat-card__value {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: var(--text-lg);
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--navy-900);
}

.stat-card__label {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--ink-soft);
}

@media (max-width: 64em) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 34em) {
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .stat-card--wide {
    grid-column: auto;
  }
}

/* ---------- Mid-navy band with lead + pillars (About) ---------- */

.band__lead {
  max-width: var(--measure-prose);
  margin-inline: auto;
  text-align: center;
  font-family: var(--font-alt);
  font-size: clamp(1.125rem, 1.05rem + 0.55vw, 1.3125rem);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}

.pillar-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-7) var(--space-8);
  margin-top: var(--space-8);
}

.pillar {
  flex: 0 1 calc(33.333% - var(--space-8));
  min-width: 16rem;
}

.pillar__title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
}

.pillar .gold-rule {
  width: 8.5rem;
}

.pillar__body {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  line-height: 1.8;
}

@media (max-width: 47.5em) {
  .pillar {
    flex-basis: 100%;
    min-width: 0;
  }
}

/* ---------- Offset gray panel with overlapping heading (About) ---------- */

.offset-block__heading {
  position: relative;
  z-index: 1;
  max-width: 48.5rem;
  margin-left: clamp(0rem, 14%, 13rem);
}

.offset-block__panel {
  max-width: 56rem;
  margin: -2.5rem 0 0 clamp(0rem, 20%, 19rem);
  padding: 5rem clamp(var(--space-5), 4vw, var(--space-7)) var(--space-7);
  background-color: var(--gray-card);
}

@media (max-width: 47.5em) {
  .offset-block__heading {
    max-width: none;
    margin-left: 0;
  }

  .offset-block__panel {
    margin: var(--space-5) 0 0;
  }
}

/* ---------- Two-column split sections ---------- */

.split {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: clamp(var(--space-6), 6vw, var(--space-9));
  align-items: stretch;
}

.split--reverse {
  grid-template-columns: 6fr 5fr;
}

.split__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.split--align-right > div:first-child {
  text-align: right;
}

.split__media--entry img {
  object-position: 72% center;
}

.split__body {
  margin-top: var(--space-5);
}

.prose p + p {
  margin-top: var(--space-4);
}

@media (max-width: 56.25em) {
  .split,
  .split--reverse {
    grid-template-columns: 1fr;
  }

  .split--reverse .split__media {
    order: -1;
  }

  .split__media img {
    max-height: 26rem;
  }
}

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

.site-footer {
  background-color: var(--navy-900);
  color: var(--white-soft);
  margin-top: auto;
  padding-top: 0;
}

main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

/* A hero that should fill the page down to the footer, so its background
   carries all the way (Contact). */
.hero--fill {
  flex: 1 0 auto;
}

main > :last-child:not(.on-dark):not(.hero):not(.is-flush) {
  margin-bottom: var(--space-8);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-6);
  padding-block: var(--space-5);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--gold);
}

/* When the legal links are absent the copyright is the only child — centre it
   rather than letting space-between push it to the left edge. */
.site-footer__copyright:only-child {
  margin-inline: auto;
}

.site-footer__copyright {
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white-soft);
}

@media (max-width: 47.5em) {
  .site-footer__inner {
    flex-direction: column;
    text-align: center;
  }
}


/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.75fr;
  gap: clamp(var(--space-6), 5vw, var(--space-8));
  margin-top: var(--space-8);
  text-align: left;
}

.contact-details__name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: var(--text-lg);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--white);
}

.contact-details address {
  margin-top: var(--space-4);
  font-style: normal;
  line-height: 2;
  color: var(--white-soft);
}

.contact-details a {
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-details a:hover {
  color: var(--gold);
}

/* Form card */
.contact-card {
  padding: clamp(var(--space-5), 3vw, var(--space-7));
  background-color: var(--white);
  color: var(--ink);
}

.field {
  border: 0;
  padding: 0;
  margin: 0;
}

.field + .field {
  margin-top: var(--space-5);
}

.field__label {
  display: block;
  padding: 0;
  margin-bottom: var(--space-2);
  font-family: var(--font-alt);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--navy-900);
}

.field__req {
  color: #c0392b;
}

.field__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.field__hint {
  display: block;
  margin-top: 0.25rem;
  font-size: var(--text-xs);
  color: var(--ink-soft);
}

.contact-card input[type="text"],
.contact-card input[type="email"],
.contact-card textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--ink);
  background-color: var(--white);
  border: 1px solid #c9c7c4;
  border-radius: 0;
}

.contact-card textarea {
  min-height: 8.5rem;
  resize: vertical;
}

.contact-card input:focus-visible,
.contact-card textarea:focus-visible {
  border-color: var(--navy-700);
  outline: 2px solid var(--navy-700);
  outline-offset: 1px;
}

/* Submission feedback */
.form-status {
  margin-bottom: var(--space-5);
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-sm);
  line-height: 1.7;
  border-left: 3px solid var(--gold-dark);
  background-color: var(--gray-card);
  color: var(--ink);
}

.form-status strong {
  display: block;
  font-weight: 700;
  color: var(--navy-900);
}

.form-status--err {
  border-left-color: #b3261e;
  background-color: #fbeeec;
}

.form-status--err strong {
  color: #8c1d18;
}

.form-status:focus-visible {
  outline: 2px solid var(--navy-700);
  outline-offset: 3px;
}

/* Honeypot — stays empty for real users, filled by bots */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn {
  display: inline-block;
  padding: 0.875rem 2.25rem;
  font-family: var(--font-alt);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--white);
  background-color: var(--navy-900);
  border: 0;
  transition: background-color 0.2s ease;
}

.btn:hover {
  background-color: var(--navy-700);
}

.contact-card .btn {
  margin-top: var(--space-6);
}


@media (max-width: 56.25em) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 34em) {
  .field__row {
    grid-template-columns: 1fr;
  }
}


/* ---------- Legal pages (shared simple template) ---------- */

.hero--compact {
  padding-bottom: clamp(var(--space-7), 5vw, var(--space-8));
}

.legal {
  max-width: var(--measure-text);
  margin-inline: auto;
}

.legal__meta {
  font-size: var(--text-sm);
  color: var(--ink-soft);
}

.legal__section {
  margin-top: var(--space-8);
}

.legal__section .heading {
  margin-bottom: 0;
}

.legal__section .gold-rule {
  margin-bottom: var(--space-5);
}

/* Open items for counsel — search "legal__note" to find them all, then delete */
.legal__note {
  margin-top: var(--space-4);
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--ink-soft);
  background-color: var(--gray-card);
  border-left: 3px solid var(--gold-dark);
}

.legal__note strong {
  color: var(--navy-900);
}

.legal ul {
  margin-top: var(--space-4);
  padding-left: 1.25rem;
}

.legal li + li {
  margin-top: var(--space-2);
}

.legal strong {
  color: var(--navy-900);
}

.legal a {
  color: var(--navy-700);
}

/* ---------- Small-screen vertical rhythm ---------- */
/* Once everything stacks into one column the section padding doubles up
   between neighbours (72px + 72px = 144px), which reads as dead space. */
@media (max-width: 56.25em) {
  /* :not(--flush) matters — this rule sits after .section--flush in the file and
     would otherwise override it, putting padding back on the full-bleed photo
     section and opening a gap under the hero. */
  .section:not(.section--flush) {
    padding-block: var(--space-5);
  }

  main > :last-child:not(.on-dark):not(.hero):not(.is-flush) {
    margin-bottom: var(--space-5);
  }

  /* Right-aligned body copy is hard to read in a narrow column */
  .split--align-right > div:first-child {
    text-align: left;
  }

  /* Stat cards stop overlapping the hero, so give the eyebrow room to breathe */
  .stat-feature__inner {
    margin-top: -1.5rem;
  }
}
