/* ==========================================================================
   Montanaro Asset Management — Design System
   Mobile-first, fluid, WCAG AA calibrated.
   Tokens derived from the original brand palette:
     #CF6528 orange (darkened to #B85018 for interactive text — AA on white
     and cream), #344D60 slate blue, #343E36 dark slate, #F4EFE7 cream,
     #F9F7F3 off-white.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand */
  --brand-orange: #cf6528;
  --brand-orange-ink: #ad4a15;      /* 5.57:1 on white, 4.87:1 on cream — WCAG AA */
  --brand-orange-deep: #93400f;
  --brand-orange-soft: #fbf0e8;
  --brand-slate-blue: #344d60;
  --brand-slate-blue-deep: #22333f;
  --brand-dark: #343e36;
  --brand-dark-deep: #202722;
  --brand-cream: #f4efe7;
  --brand-offwhite: #f9f7f3;

  /* Semantic surfaces */
  --surface: #ffffff;
  --surface-muted: var(--brand-offwhite);
  --surface-cream: var(--brand-cream);
  --surface-dark: var(--brand-dark-deep);
  --surface-blue: var(--brand-slate-blue-deep);

  /* Semantic text */
  --text: #24291f;                  /* 14.6:1 on white */
  --text-body: #3b4238;             /* 9.6:1 on white */
  --text-muted: #5c6459;            /* 5.9:1 on white — replaces 0.5 opacity */
  --text-on-dark: #f6f4ef;
  --text-on-dark-muted: #cfd2c9;    /* 9.3:1 on --surface-dark */
  --text-link: var(--brand-orange-ink);

  /* Lines & elevation */
  --line: #e2ddd3;
  --line-strong: #cbc4b6;
  --line-on-dark: rgba(246, 244, 239, 0.22);
  --shadow-sm: 0 1px 2px rgba(32, 39, 34, 0.06), 0 2px 8px rgba(32, 39, 34, 0.05);
  --shadow-md: 0 4px 12px rgba(32, 39, 34, 0.08), 0 12px 28px rgba(32, 39, 34, 0.07);
  --shadow-lg: 0 10px 24px rgba(32, 39, 34, 0.10), 0 24px 56px rgba(32, 39, 34, 0.10);

  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* Typography */
  --font-display: "Bodoni Moda", "Didot", "Times New Roman", Georgia, serif;
  --font-body: "Libre Franklin", "Helvetica Neue", Arial, system-ui, sans-serif;

  --step--1: clamp(0.8125rem, 0.78rem + 0.16vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --step-1:  clamp(1.125rem, 1.06rem + 0.32vw, 1.3125rem);
  --step-2:  clamp(1.3125rem, 1.19rem + 0.62vw, 1.75rem);
  --step-3:  clamp(1.5625rem, 1.34rem + 1.1vw, 2.375rem);
  --step-4:  clamp(1.875rem, 1.48rem + 1.95vw, 3.25rem);
  --step-5:  clamp(2.25rem, 1.55rem + 3.4vw, 4.5rem);

  /* Spacing */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: 2rem;
  --space-xl: 3rem;
  --space-2xl: clamp(3rem, 2rem + 5vw, 5.5rem);
  --space-3xl: clamp(4rem, 2.5rem + 7vw, 8rem);

  /* Layout */
  --wrap: 1280px;
  --wrap-narrow: 860px;
  --gutter: clamp(1rem, 0.5rem + 2.4vw, 2.5rem);
  --header-h: 68px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 220ms;
}

@media (min-width: 1024px) {
  :root { --header-h: 84px; }
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  /* Never overflow:hidden/auto here — it would break the sticky header. */
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--surface);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1, h2, h3, h4, h5 {
  margin: 0 0 var(--space-s);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

h1 { font-size: var(--step-5); line-height: 1.08; }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
h5 { font-size: var(--step-0); }

p { margin: 0 0 var(--space-s); }
p:last-child { margin-bottom: 0; }

a {
  color: var(--text-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color var(--dur) var(--ease);
}
a:hover { color: var(--brand-orange-deep); }

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

ul, ol { margin: 0 0 var(--space-s); padding-inline-start: 1.25em; }
li { margin-bottom: var(--space-3xs); }
li:last-child { margin-bottom: 0; }

strong, b { font-weight: 650; color: var(--text); }

hr {
  border: 0;
  border-block-start: 1px solid var(--line);
  margin-block: var(--space-xl);
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--brand-orange-ink);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

::selection {
  background: var(--brand-orange);
  color: #fff;
}

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.section {
  padding-block: var(--space-2xl);
}

.section--tight { padding-block: var(--space-xl); }

.section--cream { background: var(--surface-cream); }
.section--muted { background: var(--surface-muted); }

.section--dark {
  background: var(--surface-dark);
  color: var(--text-on-dark-muted);
}
.section--dark h2,
.section--dark h3,
.section--dark h4 { color: var(--text-on-dark); }
.section--dark a { color: #f0b98f; }
.section--dark a:hover { color: #fbd9bf; }

.section--blue {
  background: var(--surface-blue);
  color: var(--text-on-dark-muted);
}
.section--blue h2,
.section--blue h3,
.section--blue h4 { color: var(--text-on-dark); }

.section-head {
  max-width: 62ch;
  margin-bottom: var(--space-xl);
}

.section-head > p {
  font-size: var(--step-1);
  color: var(--text-muted);
}

.section--dark .section-head > p,
.section--blue .section-head > p { color: var(--text-on-dark-muted); }

.eyebrow {
  display: block;
  margin-bottom: var(--space-2xs);
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-orange-ink);
}

.section--dark .eyebrow,
.section--blue .eyebrow { color: #f0b98f; }

.lede {
  font-size: var(--step-1);
  line-height: 1.6;
  color: var(--text-body);
}

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

.grid > * { min-width: 0; }

@media (min-width: 768px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid { gap: var(--space-l); }
}

@media (min-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.split {
  display: grid;
  gap: var(--space-xl);
  grid-template-columns: 1fr;
  align-items: center;
}

.split > * { min-width: 0; }

@media (min-width: 900px) {
  .split { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 4.5rem); }
  .split--media-first > .split__media { order: -1; }
}

.stack > * + * { margin-block-start: var(--space-s); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  inset-inline-start: var(--space-s);
  inset-block-start: -100%;
  z-index: 200;
  padding: var(--space-xs) var(--space-m);
  background: var(--surface-dark);
  color: var(--text-on-dark);
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus-visible {
  inset-block-start: var(--space-s);
  color: var(--text-on-dark);
}

/* --------------------------------------------------------------------------
   4. Media wrappers (CLS-safe)
   -------------------------------------------------------------------------- */
.media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--surface-cream);
  aspect-ratio: 4 / 3;
}

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

.media--wide { aspect-ratio: 16 / 9; }
.media--square { aspect-ratio: 1 / 1; }
.media--portrait { aspect-ratio: 3 / 4; }
.media--card { aspect-ratio: 37 / 25; border-radius: 0; }

.media--caption figcaption {
  margin-block-start: var(--space-2xs);
  font-size: var(--step--1);
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--brand-orange-ink);
  color: #fff;
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}

.btn:hover {
  background: var(--brand-orange-deep);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn:active { transform: translateY(0); box-shadow: var(--shadow-sm); }

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn--ghost:hover {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}

.btn--on-dark {
  background: transparent;
  color: var(--text-on-dark);
  border-color: var(--line-on-dark);
}
.btn--on-dark:hover {
  background: var(--text-on-dark);
  border-color: var(--text-on-dark);
  color: var(--surface-dark);
}

.btn--block { width: 100%; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-block-start: var(--space-m);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-weight: 650;
  text-decoration: none;
  min-height: 44px;
}

.link-arrow::after {
  content: "";
  inline-size: 0.6em;
  block-size: 0.6em;
  border-block-start: 2px solid currentColor;
  border-inline-end: 2px solid currentColor;
  transform: rotate(45deg);
  transition: translate var(--dur) var(--ease);
}

.link-arrow:hover { text-decoration: underline; }
.link-arrow:hover::after { translate: 0.25em 0; }

[dir="rtl"] .link-arrow::after { transform: rotate(-135deg); }
[dir="rtl"] .link-arrow:hover::after { translate: -0.25em 0; }

/* --------------------------------------------------------------------------
   6. Header / navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-block-end: 1px solid var(--line);
  transition: box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-sm);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header { background: #fff; }
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
  padding-block: var(--space-2xs);
}

.brand img {
  width: clamp(158px, 20vw, 215px);
  height: auto;
  aspect-ratio: 430 / 43;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 48px;
  min-height: 48px;
  padding: 0 0.75rem;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 650;
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.nav-toggle:hover { background: var(--surface-cream); border-color: var(--text-muted); }

.nav-toggle__bars {
  position: relative;
  inline-size: 20px;
  block-size: 14px;
  flex: 0 0 auto;
}

.nav-toggle__bars span,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  block-size: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.nav-toggle__bars::before { inset-block-start: 0; }
.nav-toggle__bars span { inset-block-start: 6px; }
.nav-toggle__bars::after { inset-block-end: 0; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* Drawer (mobile) */
.primary-nav {
  position: fixed;
  inset-block-start: var(--header-h);
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 99;
  background: var(--surface);
  border-block-start: 1px solid var(--line);
  padding: var(--space-m) 0 var(--space-2xl);
  overflow-y: auto;
  overscroll-behavior: contain;
  translate: 0 -8px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur) var(--ease), translate var(--dur) var(--ease),
              visibility var(--dur) var(--ease);
}

.primary-nav.is-open {
  translate: 0 0;
  opacity: 1;
  visibility: visible;
}

.primary-nav__list {
  list-style: none;
  margin: 0;
  padding: 0 var(--gutter);
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs);
}

.primary-nav__list a {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: var(--space-2xs) 0;
  border-block-end: 1px solid var(--line);
  color: var(--text);
  font-size: var(--step-1);
  font-weight: 600;
  text-decoration: none;
}

.primary-nav__list a:hover { color: var(--brand-orange-ink); }

.primary-nav__list a[aria-current="page"] {
  color: var(--brand-orange-ink);
}

.primary-nav__cta {
  padding: var(--space-m) var(--gutter) 0;
}

.nav-meta {
  padding: var(--space-m) var(--gutter) 0;
  color: var(--text-muted);
  font-size: var(--step--1);
}

.nav-meta a { font-weight: 600; }

@media (min-width: 1024px) {
  .nav-toggle { display: none; }

  .primary-nav {
    position: static;
    inset: auto;
    z-index: auto;
    background: transparent;
    border: 0;
    padding: 0;
    overflow: visible;
    translate: 0;
    opacity: 1;
    visibility: visible;
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
  }

  .primary-nav__list {
    flex-direction: row;
    align-items: center;
    gap: clamp(0.4rem, 1.2vw, 1.25rem);
    padding: 0;
  }

  .primary-nav__list a {
    position: relative;
    min-height: 48px;
    padding: 0 0.25rem;
    border: 0;
    font-size: var(--step--1);
    font-weight: 650;
    letter-spacing: 0.01em;
    white-space: nowrap;
  }

  .primary-nav__list a::after {
    content: "";
    position: absolute;
    inset-inline: 0.25rem;
    inset-block-end: 10px;
    block-size: 2px;
    background: var(--brand-orange-ink);
    scale: 0 1;
    transform-origin: inline-start center;
    transition: scale var(--dur) var(--ease);
  }

  .primary-nav__list a:hover::after,
  .primary-nav__list a[aria-current="page"]::after { scale: 1 1; }

  .primary-nav__cta,
  .nav-meta { display: none; }

  .header-actions .btn { display: inline-flex; }
}

.header-actions .btn {
  display: none;
  min-height: 44px;
  padding: 0.5rem 1.15rem;
  font-size: var(--step--1);
}

/* Note: the open drawer/modal deliberately does NOT set overflow on <html>
   or <body>. Doing so turns them into scroll containers and silently breaks
   `position: sticky` on the header. The overlays cover the viewport and use
   `overscroll-behavior: contain` instead. */
body.nav-open .site-footer,
body.nav-open main { pointer-events: none; }

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  background: var(--surface-dark);
  color: var(--text-on-dark);
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

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

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(32, 39, 34, 0.86) 0%, rgba(32, 39, 34, 0.72) 45%, rgba(32, 39, 34, 0.88) 100%);
}

.hero__inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: clamp(440px, 68vh, 660px);
  padding-block: var(--space-2xl);
  max-width: 44ch;
}

.hero h1 {
  color: #fff;
  margin-bottom: var(--space-m);
}

.hero p {
  color: var(--text-on-dark-muted);
  font-size: var(--step-1);
  max-width: 52ch;
}

.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  align-self: flex-start;
  margin-bottom: var(--space-m);
  padding: 0.4rem 0.95rem;
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius-pill);
  font-size: var(--step--1);
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #f0b98f;
}

/* Compact page hero for inner pages */
.page-hero {
  background: var(--surface-cream);
  padding-block: calc(var(--space-2xl)) var(--space-xl);
  border-block-end: 1px solid var(--line);
}

.page-hero__inner { max-width: 62ch; }

.page-hero h1 { margin-bottom: var(--space-s); }

.page-hero p {
  font-size: var(--step-1);
  color: var(--text-body);
}

/* Breadcrumb */
.crumbs {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 var(--space-s);
  padding: 0;
  font-size: var(--step--1);
  color: var(--text-muted);
}

.crumbs li { margin: 0; display: flex; align-items: center; gap: 0.5rem; }
.crumbs li + li::before { content: "/"; color: var(--line-strong); }
.crumbs a { color: var(--text-muted); }
.crumbs a:hover { color: var(--brand-orange-ink); }

/* --------------------------------------------------------------------------
   8. Cards
   -------------------------------------------------------------------------- */
.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}

.card:focus-within {
  border-color: var(--brand-orange-ink);
  box-shadow: var(--shadow-md);
}

.card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: var(--space-2xs);
  padding: var(--space-m);
}

.card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  font-size: var(--step--1);
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.card__meta .tag { color: var(--brand-orange-ink); }

.card h3 {
  font-size: var(--step-1);
  margin: 0;
  line-height: 1.3;
}

.card h3 a {
  color: inherit;
  text-decoration: none;
}

.card h3 a:hover { color: var(--brand-orange-ink); }

.card p { color: var(--text-muted); font-size: var(--step--1); line-height: 1.6; }

.card__foot {
  margin-block-start: auto;
  padding-block-start: var(--space-xs);
}

/* Icon / value card */
.value-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  min-width: 0;
  padding: var(--space-m);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.value-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.value-card__icon {
  inline-size: 64px;
  block-size: 64px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  flex: 0 0 auto;
}

.value-card h3 { font-size: var(--step-1); margin: 0; }
.value-card p { margin: 0; color: var(--text-muted); font-size: var(--step--1); }

.section--dark .value-card,
.section--blue .value-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line-on-dark);
  box-shadow: none;
}

.section--dark .value-card p,
.section--blue .value-card p { color: var(--text-on-dark-muted); }

/* Numbered / plain panel */
.panel {
  min-width: 0;
  padding: var(--space-m);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.panel--cream { background: var(--surface-cream); border-color: transparent; }

.panel h3 { font-size: var(--step-1); }
.panel p:last-child { margin-bottom: 0; }

.panel__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 44px;
  block-size: 44px;
  margin-bottom: var(--space-xs);
  border-radius: var(--radius-pill);
  background: var(--brand-orange-soft);
  color: var(--brand-orange-deep);
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
}

.section--dark .panel,
.section--blue .panel {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line-on-dark);
}

.section--dark .panel__num,
.section--blue .panel__num {
  background: rgba(240, 185, 143, 0.16);
  color: #f0b98f;
}

/* Stats */
.stats {
  display: grid;
  gap: var(--space-m);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 900px) {
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.stats li {
  margin: 0;
  padding-inline-start: var(--space-s);
  border-inline-start: 3px solid var(--brand-orange);
}

.stats .stat__value {
  display: block;
  font-family: var(--font-display);
  font-size: var(--step-3);
  line-height: 1.1;
  color: var(--text);
}

.stats .stat__label {
  display: block;
  margin-block-start: var(--space-3xs);
  font-size: var(--step--1);
  color: var(--text-muted);
}

.section--dark .stats .stat__value,
.section--blue .stats .stat__value { color: var(--text-on-dark); }

.section--dark .stats .stat__label,
.section--blue .stats .stat__label { color: var(--text-on-dark-muted); }

/* Pill list */
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  list-style: none;
  margin: 0;
  padding: 0;
}

.pill-list li {
  margin: 0;
  padding: 0.4rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: var(--step--1);
  color: var(--text-body);
}

.section--cream .pill-list li { background: #fff; }

/* Tick list */
.tick-list { list-style: none; margin: 0; padding: 0; }

.tick-list li {
  position: relative;
  margin-bottom: var(--space-xs);
  padding-inline-start: 1.9rem;
}

.tick-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 0.42em;
  inline-size: 0.85rem;
  block-size: 0.5rem;
  border-inline-start: 2.5px solid var(--brand-orange-ink);
  border-block-end: 2.5px solid var(--brand-orange-ink);
  transform: rotate(-45deg);
}

.section--dark .tick-list li::before,
.section--blue .tick-list li::before {
  border-color: #f0b98f;
}

/* Cross / exclusion list */
.cross-list { list-style: none; margin: 0; padding: 0; }

.cross-list li {
  position: relative;
  margin-bottom: var(--space-xs);
  padding-inline-start: 1.9rem;
}

.cross-list li::before {
  content: "\00d7";
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: -0.05em;
  font-size: 1.35em;
  line-height: 1.2;
  font-weight: 700;
  color: var(--brand-orange-ink);
}

/* --------------------------------------------------------------------------
   9. Team
   -------------------------------------------------------------------------- */
.team-grid {
  display: grid;
  gap: var(--space-m);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.team-card {
  min-width: 0;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.team-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.team-card .media { border-radius: 0; }

.team-card__body { padding: var(--space-s); }

.team-card__name {
  margin: 0 0 0.15rem;
  font-size: var(--step-0);
  font-family: var(--font-display);
  color: var(--text);
}

.team-card__role {
  margin: 0;
  font-size: var(--step--1);
  color: var(--text-muted);
  line-height: 1.45;
}

.team-group + .team-group { margin-block-start: var(--space-xl); }

.team-group__title {
  display: flex;
  align-items: baseline;
  gap: var(--space-xs);
  flex-wrap: wrap;
  margin-bottom: var(--space-m);
  padding-block-end: var(--space-2xs);
  border-block-end: 1px solid var(--line);
  font-size: var(--step-2);
}

.team-group__count {
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   10. Tables
   -------------------------------------------------------------------------- */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

table {
  inline-size: 100%;
  min-inline-size: 680px;
  border-collapse: collapse;
  font-size: var(--step--1);
  text-align: start;
}

caption {
  padding: var(--space-s) var(--space-m);
  text-align: start;
  font-size: var(--step--1);
  color: var(--text-muted);
}

th, td {
  padding: var(--space-xs) var(--space-s);
  text-align: start;
  vertical-align: top;
  border-block-end: 1px solid var(--line);
}

thead th {
  background: var(--surface-cream);
  color: var(--text);
  font-weight: 700;
  font-size: var(--step--1);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

tbody tr:last-child td { border-block-end: 0; }
tbody tr:hover { background: var(--brand-orange-soft); }

td strong { display: block; }

/* --------------------------------------------------------------------------
   11. Accordion / FAQ
   -------------------------------------------------------------------------- */
.accordion {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}

.accordion details + details { border-block-start: 1px solid var(--line); }

.accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  min-height: 56px;
  padding: var(--space-s) var(--space-m);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 650;
  color: var(--text);
  list-style: none;
  transition: background var(--dur) var(--ease);
}

.accordion summary::-webkit-details-marker { display: none; }
.accordion summary:hover { background: var(--surface-muted); }

.accordion summary::after {
  content: "";
  flex: 0 0 auto;
  inline-size: 0.6rem;
  block-size: 0.6rem;
  border-block-end: 2px solid var(--brand-orange-ink);
  border-inline-end: 2px solid var(--brand-orange-ink);
  transform: rotate(45deg);
  transition: transform var(--dur) var(--ease);
}

.accordion details[open] summary::after { transform: rotate(-135deg); }

.accordion__panel {
  padding: 0 var(--space-m) var(--space-m);
  color: var(--text-body);
}

/* --------------------------------------------------------------------------
   12. Forms
   -------------------------------------------------------------------------- */
.form-grid {
  display: grid;
  gap: var(--space-m);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-field--full { grid-column: 1 / -1; }
}

.form-field { display: flex; flex-direction: column; gap: var(--space-3xs); min-width: 0; }

.form-field label {
  font-size: var(--step--1);
  font-weight: 650;
  color: var(--text);
}

.form-field .hint {
  font-size: var(--step--1);
  color: var(--text-muted);
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  inline-size: 100%;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

textarea { min-height: 150px; resize: vertical; }

input::placeholder,
textarea::placeholder { color: var(--text-muted); opacity: 1; }

input:hover, select:hover, textarea:hover { border-color: var(--text-muted); }

input:focus, select:focus, textarea:focus {
  border-color: var(--brand-orange-ink);
  box-shadow: 0 0 0 3px rgba(173, 74, 21, 0.18);
  outline: none;
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2xs);
  min-height: 48px;
}

.checkbox-field input[type="checkbox"] {
  inline-size: 22px;
  block-size: 22px;
  margin-block-start: 0.25rem;
  flex: 0 0 auto;
  accent-color: var(--brand-orange-ink);
}

.checkbox-field label { font-weight: 500; font-size: var(--step--1); color: var(--text-body); }

.form-status {
  margin-block-start: var(--space-s);
  padding: var(--space-s) var(--space-m);
  border-radius: var(--radius-sm);
  background: var(--brand-orange-soft);
  border: 1px solid var(--line-strong);
  font-size: var(--step--1);
  color: var(--text);
}

.form-status[hidden] { display: none; }

/* --------------------------------------------------------------------------
   13. Contact blocks
   -------------------------------------------------------------------------- */
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-m);
}

.contact-list li { margin: 0; }

.contact-list dt,
.contact-label {
  font-size: var(--step--1);
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-block-end: var(--space-3xs);
}

.contact-list dd { margin: 0; font-size: var(--step-1); color: var(--text); }
.contact-list dd a { font-weight: 600; }

/* --------------------------------------------------------------------------
   14. Callout / disclaimer notes
   -------------------------------------------------------------------------- */
.callout {
  padding: var(--space-m);
  border-inline-start: 4px solid var(--brand-orange);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--brand-orange-soft);
  color: var(--text-body);
}

.callout h3 { font-size: var(--step-1); }
.callout p:last-child { margin-bottom: 0; }

.section--dark .callout,
.section--blue .callout {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-on-dark-muted);
}

.note {
  font-size: var(--step--1);
  color: var(--text-muted);
  line-height: 1.6;
}

.quote {
  margin: 0;
  padding-inline-start: var(--space-m);
  border-inline-start: 3px solid var(--brand-orange);
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.35;
  color: var(--text);
}

.quote footer {
  margin-block-start: var(--space-s);
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section--dark .quote,
.section--blue .quote { color: var(--text-on-dark); }

.section--dark .quote footer,
.section--blue .quote footer { color: var(--text-on-dark-muted); }

/* --------------------------------------------------------------------------
   15. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--surface-dark);
  color: var(--text-on-dark-muted);
  padding-block: var(--space-2xl) var(--space-l);
  font-size: var(--step--1);
}

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

@media (min-width: 640px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: var(--space-l); }
}

.footer-grid > * { min-width: 0; }

.footer-brand img {
  width: 200px;
  aspect-ratio: 430 / 43;
  height: auto;
  margin-bottom: var(--space-m);
}

.footer-brand p { color: var(--text-on-dark-muted); max-width: 42ch; }

.footer-col h2 {
  margin-bottom: var(--space-s);
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-on-dark);
}

.footer-col ul { list-style: none; margin: 0; padding: 0; }

.footer-col li { margin-bottom: var(--space-3xs); }

.footer-col a,
.footer-brand a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  color: var(--text-on-dark-muted);
  text-decoration: none;
}

.footer-col a:hover,
.footer-brand a:hover { color: #f0b98f; text-decoration: underline; }

.footer-contact { list-style: none; margin: 0; padding: 0; }
.footer-contact li { margin-bottom: var(--space-2xs); line-height: 1.5; }

.footer-bottom {
  margin-block-start: var(--space-xl);
  padding-block-start: var(--space-m);
  border-block-start: 1px solid var(--line-on-dark);
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
}

@media (min-width: 900px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; align-items: flex-start; }
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-bottom p { max-width: 70ch; color: var(--text-on-dark-muted); }

/* --------------------------------------------------------------------------
   16. Back to top
   -------------------------------------------------------------------------- */
.back-to-top {
  position: fixed;
  inset-block-end: clamp(1rem, 3vw, 2rem);
  inset-inline-end: clamp(1rem, 3vw, 2rem);
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 52px;
  block-size: 52px;
  padding: 0;
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius-pill);
  background: var(--surface-dark);
  color: var(--text-on-dark);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  translate: 0 12px;
  transition: opacity var(--dur) var(--ease), translate var(--dur) var(--ease),
              visibility var(--dur) var(--ease), background var(--dur) var(--ease);
}

.back-to-top.is-visible { opacity: 1; visibility: visible; translate: 0 0; }
.back-to-top:hover { background: var(--brand-orange-deep); border-color: var(--brand-orange-deep); }

.back-to-top svg { inline-size: 22px; block-size: 22px; }

/* --------------------------------------------------------------------------
   17. Modal dialog
   -------------------------------------------------------------------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
  background: rgba(32, 39, 34, 0.7);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur) var(--ease), visibility var(--dur) var(--ease);
}

.modal.is-open { opacity: 1; visibility: visible; }

.modal[hidden] { display: none; }

.modal__dialog {
  inline-size: min(100%, 620px);
  max-block-size: min(86vh, 760px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(1.25rem, 4vw, 2.25rem);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  translate: 0 14px;
  transition: translate var(--dur) var(--ease);
}

.modal.is-open .modal__dialog { translate: 0 0; }

.modal__dialog h2 { font-size: var(--step-2); }

.modal__close {
  position: absolute;
  inset-block-start: var(--space-s);
  inset-inline-end: var(--space-s);
  inline-size: 48px;
  block-size: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.modal__close:hover { background: rgba(255, 255, 255, 0.22); }

.modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-block-start: var(--space-m);
}

.modal__actions .btn { flex: 1 1 200px; }

/* --------------------------------------------------------------------------
   18. Utilities
   -------------------------------------------------------------------------- */
.text-center { text-align: center; }
.mt-0 { margin-block-start: 0; }
.mt-m { margin-block-start: var(--space-m); }
.mt-l { margin-block-start: var(--space-l); }
.mb-0 { margin-block-end: 0; }
.mb-m { margin-block-end: var(--space-m); }
.mb-l { margin-block-end: var(--space-l); }

.long-word { overflow-wrap: anywhere; word-break: break-word; }

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  list-style: none;
  margin: 0;
  padding: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-pill);
  background: var(--brand-orange-soft);
  border: 1px solid #e8c8b0;
  color: var(--brand-orange-deep);
  font-size: var(--step--1);
  font-weight: 650;
}

/* --------------------------------------------------------------------------
   19. Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   20. Print
   -------------------------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .back-to-top, .modal, .primary-nav { display: none !important; }
  body { color: #000; }
  a { text-decoration: underline; }
}
