/* ==========================================================================
   MAT Home Services — site styles
   Token layers: primitive -> semantic -> component.
   Brand colours come from the logo: slate navy #334E68 and roof grey #6B7785.
   ========================================================================== */

:root {
  /* ---- Primitive: blue-grey scale built around the logo navy (700) ---- */
  --slate-50: #F5F7FA;
  --slate-100: #EDF1F5;
  --slate-150: #E1E7EE;
  --slate-200: #D0D9E3;
  --slate-300: #A9B8C8;
  --slate-500: #627D98;
  --slate-600: #486581;
  --slate-700: #334E68; /* logo navy */
  --slate-800: #243B53;
  --slate-900: #102A43;
  --roof-grey: #6B7785; /* logo roof */
  --roof-grey-700: #56616E; /* roof grey darkened for small text (>= 4.5:1 on tints) */
  --amber-50: #FDF6EC;
  --amber-600: #B45309;
  --amber-700: #92400E;
  --red-600: #B42318;
  --red-50: #FEF3F2;
  --green-700: #1D6B3A;
  --green-50: #EEF8F1;
  --white: #FFFFFF;

  /* ---- Semantic ---- */
  --color-bg: var(--white);
  --color-bg-tint: var(--slate-50);
  --color-bg-strong: var(--slate-800);
  --color-text: var(--slate-900);
  --color-text-muted: var(--slate-600);
  --color-text-on-dark: #E6ECF2;
  --color-primary: var(--slate-700);
  --color-primary-hover: var(--slate-800);
  --color-secondary: var(--roof-grey);
  --color-secondary-text: var(--roof-grey-700);
  --color-accent: var(--amber-600);
  --color-accent-hover: var(--amber-700);
  --color-border: var(--slate-150);
  --color-border-strong: var(--slate-300);
  --color-focus: var(--amber-600);
  --color-error: var(--red-600);
  --color-success: var(--green-700);

  /* ---- Type ---- */
  --font-heading: "Lexend", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --text-sm: 0.9375rem;
  --text-base: 1.0625rem;
  --text-lg: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);
  --h1: clamp(2.125rem, 1.6rem + 2.4vw, 3.5rem);
  --h2: clamp(1.625rem, 1.35rem + 1.2vw, 2.375rem);
  --h3: 1.1875rem;

  /* ---- Space / shape / motion ---- */
  --gutter: clamp(1rem, 0.6rem + 2vw, 2rem);
  --section-y: clamp(4rem, 3rem + 5vw, 7rem);
  --radius-sm: 4px;
  --radius: 6px;
  --shadow-sm: 0 1px 2px rgba(16, 42, 67, 0.06);
  --shadow-md: 0 10px 30px -12px rgba(16, 42, 67, 0.22);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 200ms;
  --header-h: 76px;

  /* ---- Component ---- */
  --btn-h: 48px;
  --btn-radius: var(--radius-sm);
  --card-radius: var(--radius);
  --input-h: 48px;
}

/* --------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
/* neutral placeholder while remote photos load */
.hero__media img, .page-hero__media img, .media-frame img, .service-row__media img, .service-card__media img, .inline-figure img { background: var(--slate-100); }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--slate-900);
  line-height: 1.18;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: var(--h1); font-weight: 600; letter-spacing: -0.025em; }
h2 { font-size: var(--h2); font-weight: 600; }
h3 { font-size: var(--h3); font-weight: 600; }
.h3-like { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem); }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--color-primary); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--color-primary-hover); }
ul, ol { padding-left: 1.25em; }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; border-radius: 2px; }
main:focus { outline: none; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--color-primary); color: var(--white); padding: 0.75rem 1rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; color: var(--white); }

.container { width: 100%; max-width: 1220px; margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section-y) 0; }
.section--tint { background: var(--color-bg-tint); }
.section--tight { padding: calc(var(--section-y) * 0.6) 0; }

.icon { width: 1.5rem; height: 1.5rem; flex: none; }
.icon--sm { width: 1.125rem; height: 1.125rem; }

.eyebrow {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-secondary-text);
  margin-bottom: 0.9rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.eyebrow::before { content: ""; width: 1.5rem; height: 2px; background: var(--color-accent); }
.lede { font-size: var(--text-lg); color: var(--color-text-muted); max-width: 62ch; }

.section-head { max-width: 760px; margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.25rem); }
.section-head p:not(.eyebrow) { color: var(--color-text-muted); font-size: var(--text-lg); }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }
.section-head--row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; }
.section-head--row h2 { margin-bottom: 0; }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: var(--btn-h); padding: 0 1.4rem;
  font-family: var(--font-heading); font-size: 0.9688rem; font-weight: 600; letter-spacing: 0.005em;
  border-radius: var(--btn-radius); border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--lg { min-height: 54px; padding: 0 1.75rem; font-size: 1.0313rem; }
.btn--primary { background: var(--color-primary); color: var(--white); }
.btn--primary:hover { background: var(--color-primary-hover); color: var(--white); }
.btn--accent { background: var(--color-accent); color: var(--white); }
.btn--accent:hover { background: var(--color-accent-hover); color: var(--white); }
.btn--ghost { background: transparent; color: var(--color-primary); border-color: var(--color-border-strong); }
.btn--ghost:hover { border-color: var(--color-primary); color: var(--color-primary-hover); background: var(--white); }
.btn--light { background: var(--white); color: var(--color-primary); }
.btn--light:hover { background: var(--slate-100); color: var(--color-primary-hover); }
.btn--on-dark { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, 0.45); }
.btn--on-dark:hover { border-color: var(--white); color: var(--white); background: rgba(255, 255, 255, 0.06); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-heading); font-weight: 600; font-size: 0.9688rem;
  color: var(--color-primary); text-decoration: none;
}
.link-arrow .icon { transition: transform var(--dur) var(--ease); }
.link-arrow:hover { color: var(--color-accent-hover); }
.link-arrow:hover .icon { transform: translateX(3px); }

/* --------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--color-border); box-shadow: var(--shadow-sm); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: var(--header-h); }
.brand { display: inline-flex; flex: none; }
.brand img { height: 50px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.nav { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 0.25rem; }
.nav__item { position: relative; display: flex; align-items: center; }
.nav__link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.75rem;
  font-family: var(--font-heading); font-size: 0.9375rem; font-weight: 500;
  color: var(--slate-800); text-decoration: none; border-radius: var(--radius-sm);
}
.nav__link:hover { color: var(--color-primary); background: var(--slate-50); }
.nav__link[aria-current="page"] { color: var(--color-primary); box-shadow: inset 0 -2px 0 var(--color-accent); border-radius: 0; }
.nav__item--has-menu .nav__link { padding-right: 0.25rem; }
.nav__toggle {
  display: inline-grid; place-items: center; width: 32px; height: 44px; padding: 0;
  background: none; border: 0; color: var(--slate-600); cursor: pointer; border-radius: var(--radius-sm);
}
.nav__toggle:hover { color: var(--color-primary); }
.nav__toggle .icon { transition: transform var(--dur) var(--ease); }
.nav__toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }

.submenu {
  position: absolute; top: calc(100% + 8px); left: -0.5rem; width: 340px;
  background: var(--white); border: 1px solid var(--color-border); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: 0.5rem;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
}
.submenu.is-open { opacity: 1; visibility: visible; transform: none; }
.submenu ul { list-style: none; margin: 0; padding: 0; }
.submenu li a {
  display: block; padding: 0.6rem 0.75rem; border-radius: var(--radius-sm);
  color: var(--slate-800); text-decoration: none; font-size: 0.9688rem; line-height: 1.35;
}
.submenu li a:hover, .submenu li a[aria-current="page"] { background: var(--slate-50); color: var(--color-primary); }
.submenu__all {
  display: flex; align-items: center; gap: 0.4rem; margin-top: 0.35rem; padding: 0.7rem 0.75rem 0.45rem;
  border-top: 1px solid var(--color-border); font-family: var(--font-heading); font-weight: 600; font-size: 0.9063rem;
  text-decoration: none;
}
.menu-button {
  display: none; width: 46px; height: 46px; place-items: center; padding: 0;
  border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--white);
  color: var(--slate-800); cursor: pointer;
}
.menu-button__close { display: none; }
.menu-button[aria-expanded="true"] .menu-button__open { display: none; }
.menu-button[aria-expanded="true"] .menu-button__close { display: inline-flex; }

/* Compact header between tablet and full desktop: keep links in the bar */
@media (max-width: 1180px) and (min-width: 861px) {
  .site-header__inner { gap: 1rem; }
  .site-nav { gap: 0.75rem; }
  .nav { gap: 0; }
  .nav__link { padding: 0 0.5rem; font-size: 0.9063rem; }
  .nav__item--has-menu .nav__link { padding-right: 0.125rem; }
  .nav__toggle { width: 26px; }
  .brand img { height: 42px; }
  .header-cta { padding: 0 1rem; }
}

@media (max-width: 860px) {
  :root { --header-h: 68px; }
  .brand img { height: 42px; }
  .menu-button { display: inline-grid; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 49;
    flex-direction: column; align-items: stretch; gap: 1.25rem;
    padding: 1rem var(--gutter) 2rem; background: var(--white); overflow-y: auto;
    border-top: 1px solid var(--color-border);
    visibility: hidden; opacity: 0; transform: translateY(-6px);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
  }
  .site-nav.is-open { visibility: visible; opacity: 1; transform: none; }
  .nav { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__item { flex-wrap: wrap; border-bottom: 1px solid var(--color-border); }
  .nav__link { flex: 1; min-height: 54px; font-size: 1.0625rem; padding: 0 0.25rem; }
  .nav__link[aria-current="page"] { box-shadow: none; color: var(--color-accent-hover); }
  .nav__toggle { width: 54px; height: 54px; }
  .submenu {
    position: static; width: 100%; box-shadow: none; border: 0; padding: 0 0 0.75rem;
    opacity: 1; visibility: visible; transform: none; display: none;
  }
  .submenu.is-open { display: block; }
  .submenu li a { padding: 0.65rem 0.75rem; }
  .header-cta { min-height: 54px; }
  body.nav-open { overflow: hidden; }
}

/* --------------------------------------------------------------- hero (home) */
.hero { position: relative; background: var(--color-bg-tint); overflow: hidden; }
.hero__inner {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2rem, 4vw, 4.5rem);
  align-items: center; padding-top: clamp(3rem, 2rem + 4vw, 5.5rem); padding-bottom: clamp(3rem, 2rem + 4vw, 5.5rem);
}
.hero h1 { font-size: clamp(2.375rem, 1.7rem + 2.9vw, 4rem); margin-bottom: 1.25rem; }
.hero h1 span { display: block; color: var(--color-secondary); } /* large text: logo grey passes 3:1 */
.hero .lede { margin-bottom: 0; }
.hero__media { position: relative; }
.hero__media img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border-radius: var(--radius); }
.hero__media::before {
  content: ""; position: absolute; inset: 1.25rem -1.25rem -1.25rem 1.25rem; z-index: 0;
  border: 2px solid var(--slate-200); border-radius: var(--radius);
}
.hero__media img { position: relative; z-index: 1; }
.hero__caption { position: relative; z-index: 1; font-size: 0.8125rem; color: var(--color-text-muted); margin: 0.6rem 0 0; }

.commitments { border-top: 1px solid var(--color-border); background: var(--white); }
.commitments ul {
  list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr);
}
.commitments li { display: flex; gap: 0.9rem; align-items: flex-start; padding: 1.6rem 1.5rem 1.6rem 0; }
.commitments li + li { border-left: 1px solid var(--color-border); padding-left: 1.5rem; }
.commitments .icon { color: var(--color-primary); margin-top: 2px; }
.commitments strong { display: block; font-family: var(--font-heading); font-weight: 600; color: var(--slate-900); }
.commitments span { color: var(--color-text-muted); font-size: var(--text-sm); }

/* --------------------------------------------------------------- page hero */
.page-hero { background: var(--color-bg-tint); border-bottom: 1px solid var(--color-border); }
.page-hero__inner { padding-top: clamp(2.75rem, 2rem + 3vw, 4.5rem); padding-bottom: clamp(2.75rem, 2rem + 3vw, 4.5rem); }
.page-hero--media .page-hero__inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(2rem, 4vw, 4rem); align-items: center; }
.page-hero__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.page-hero h1 { margin-bottom: 1rem; max-width: 20ch; }
.page-hero .lede { margin-bottom: 0; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-wrap: wrap; gap: 0.35rem; font-size: var(--text-sm); color: var(--color-text-muted); }
.breadcrumb li + li::before { content: "/"; margin-right: 0.35rem; color: var(--slate-300); }
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-primary); }

/* --------------------------------------------------------------- service cards */
.service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
.service-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.service-card {
  display: flex; flex-direction: column; background: var(--white);
  border: 1px solid var(--color-border); border-radius: var(--card-radius); overflow: hidden;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.service-card:hover { border-color: var(--slate-200); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.service-card__media { display: block; overflow: hidden; background: var(--slate-100); }
.service-card__media img { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; transition: transform 500ms var(--ease); }
.service-card:hover .service-card__media img { transform: scale(1.03); }
.service-card__body { display: flex; flex-direction: column; flex: 1; padding: 1.35rem 1.35rem 1.4rem; }
.service-card__title { font-size: 1.0938rem; margin-bottom: 0.55rem; }
.service-card__title a { color: inherit; text-decoration: none; }
.service-card__title a:hover { color: var(--color-primary); text-decoration: underline; }
.service-card__body p { color: var(--color-text-muted); font-size: var(--text-sm); margin-bottom: 1.1rem; }
.service-card__actions { margin-top: auto; }
.service-card--prompt { background: var(--color-bg-strong); border-color: var(--color-bg-strong); }
.service-card--prompt:hover { transform: none; }
.service-card--prompt .service-card__body { padding: 1.75rem 1.5rem; justify-content: center; }
.service-card--prompt .service-card__title { color: var(--white); font-size: 1.25rem; }
.service-card--prompt p { color: var(--color-text-on-dark); }
.service-card--prompt .btn { white-space: normal; text-align: center; line-height: 1.3; padding-top: 0.6rem; padding-bottom: 0.6rem; }

/* --------------------------------------------------------------- split / lists */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.split--center { align-items: center; }
.split--wide { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr); }
.media-frame img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }

.checklist { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0.75rem; }
.checklist li { display: flex; gap: 0.75rem; align-items: flex-start; }
.checklist .icon--check { width: 1.25rem; height: 1.25rem; margin-top: 0.2rem; color: var(--color-accent); stroke-width: 2.25; }
.checklist--lg li { font-size: var(--text-lg); padding-bottom: 0.75rem; border-bottom: 1px solid var(--color-border); }
.checklist--lg li:last-child { border-bottom: 0; }
.plain-list { margin: 0 0 1.25rem; padding-left: 1.1rem; color: var(--color-text-muted); }
.plain-list li + li { margin-top: 0.4rem; }
.link-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0; }
.link-list a {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.85rem 0;
  border-bottom: 1px solid var(--color-border); text-decoration: none; color: var(--slate-800);
  font-family: var(--font-heading); font-weight: 500;
}
.link-list a::after { content: "→"; color: var(--color-accent); transition: transform var(--dur) var(--ease); }
.link-list a:hover { color: var(--color-primary); }
.link-list a:hover::after { transform: translateX(3px); }

.note {
  display: flex; gap: 0.6rem; align-items: flex-start; margin: 1.5rem 0 0; padding: 0.9rem 1rem;
  background: var(--color-bg-tint); border-left: 3px solid var(--color-secondary); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: var(--text-sm); color: var(--slate-800);
}
.note .icon { color: var(--color-secondary-text); margin-top: 0.15rem; }

.panel { background: var(--color-bg-tint); border: 1px solid var(--color-border); border-radius: var(--radius); padding: clamp(1.5rem, 1rem + 1.5vw, 2.25rem); }
.panel__title { font-size: 1.25rem; }
.panel__subtitle { font-size: 1rem; margin-top: 1.5rem; }
.panel p { color: var(--color-text-muted); }
.panel__note { font-size: var(--text-sm); border-top: 1px solid var(--color-border); padding-top: 1rem; margin-bottom: 0; }
.inline-figure { margin: 1.5rem 0 0; }
.inline-figure img { border-radius: var(--radius-sm); aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.inline-figure figcaption { font-size: 0.8438rem; color: var(--color-text-muted); margin-top: 0.5rem; }

/* --------------------------------------------------------------- why / features */
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--color-border); }
.feature { padding: 1.6rem 1.5rem 1.6rem 0; border-bottom: 1px solid var(--color-border); }
.feature:nth-child(odd) { border-right: 1px solid var(--color-border); }
.feature:nth-child(even) { padding-left: 1.5rem; padding-right: 0; }
.feature__num { font-family: var(--font-heading); font-size: 0.8125rem; font-weight: 600; color: var(--color-accent); letter-spacing: 0.08em; }
.feature h3 { margin: 0.4rem 0 0.4rem; font-size: 1.0938rem; }
.feature p { color: var(--color-text-muted); font-size: var(--text-sm); margin: 0; }

/* --------------------------------------------------------------- steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; counter-reset: step; }
.step { position: relative; background: var(--white); border: 1px solid var(--color-border); border-radius: var(--card-radius); padding: 1.75rem 1.5rem 1.6rem; }
.step__num {
  display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; margin-bottom: 1.1rem;
  font-family: var(--font-heading); font-weight: 600; color: var(--white); background: var(--color-primary); border-radius: var(--radius-sm);
}
.step h3 { font-size: 1.0938rem; margin-bottom: 0.45rem; }
.step p { color: var(--color-text-muted); font-size: var(--text-sm); margin: 0; }
.steps-foot { margin-top: 1.75rem; color: var(--color-text-muted); font-size: var(--text-sm); display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.steps-foot p { margin: 0; max-width: 70ch; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 1.4rem; top: 0.5rem; bottom: 0.5rem; width: 2px; background: var(--slate-150); }
.timeline__item { position: relative; display: grid; grid-template-columns: 2.8rem minmax(0, 1fr); gap: 1.5rem; padding-bottom: 2.5rem; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__num {
  position: relative; z-index: 1; display: grid; place-items: center; width: 2.8rem; height: 2.8rem;
  font-family: var(--font-heading); font-weight: 600; background: var(--white); color: var(--color-primary);
  border: 2px solid var(--color-primary); border-radius: 50%;
}
.timeline__item h3 { font-size: 1.25rem; margin: 0.45rem 0 0.5rem; }
.timeline__item p { color: var(--color-text-muted); margin-bottom: 0.6rem; max-width: 68ch; }
.timeline__item ul { color: var(--color-text-muted); margin: 0; padding-left: 1.1rem; }

.mini-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.mini-steps li { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.1rem; background: var(--white); border: 1px solid var(--color-border); border-radius: var(--radius-sm); font-family: var(--font-heading); font-weight: 500; }
.mini-steps span { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: var(--radius-sm); background: var(--slate-100); color: var(--color-primary); font-weight: 600; font-size: 0.9rem; }

/* --------------------------------------------------------------- audiences / benefits */
.audience-grid, .benefit-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.audience, .benefit { background: var(--white); border: 1px solid var(--color-border); border-top: 3px solid var(--color-primary); border-radius: var(--radius-sm); padding: 1.5rem 1.4rem; }
.audience h3, .benefit h3 { font-size: 1.0625rem; margin-bottom: 0.4rem; }
.audience p, .benefit p { color: var(--color-text-muted); font-size: var(--text-sm); margin: 0; }
.section--tint .audience, .section--tint .benefit { background: var(--white); }

/* --------------------------------------------------------------- engagement types */
.engagement { list-style: none; margin: 1.75rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.engagement li { padding: 1.1rem 1.1rem 1.15rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--white); }
.engagement .icon { color: var(--color-primary); margin-bottom: 0.5rem; }
.engagement strong { display: block; font-family: var(--font-heading); font-weight: 600; margin-bottom: 0.2rem; }
.engagement span { color: var(--color-text-muted); font-size: var(--text-sm); }

/* --------------------------------------------------------------- services page rows */
.service-index { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; padding: 0; list-style: none; }
.service-index a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 0.95rem; border: 1px solid var(--color-border-strong);
  border-radius: 999px; font-size: 0.9063rem; text-decoration: none; color: var(--slate-800); background: var(--white);
}
.service-index a:hover { border-color: var(--color-primary); color: var(--color-primary); }
.service-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; padding: clamp(3rem, 2rem + 3vw, 5rem) 0; border-bottom: 1px solid var(--color-border); }
.service-row:last-child { border-bottom: 0; }
.service-row--flip .service-row__media { order: 2; }
.service-row__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.service-row h2 { font-size: clamp(1.5rem, 1.3rem + 0.9vw, 2rem); }
.service-row .lede { font-size: var(--text-base); }

/* --------------------------------------------------------------- prose / about */
.prose { max-width: 72ch; }
.prose h2 { margin-top: 2.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--slate-800); }
.principles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.principles li { padding: 1.5rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--white); }
.principles .icon { color: var(--color-accent); margin-bottom: 0.75rem; }
.principles h3 { font-size: 1.0625rem; margin-bottom: 0.4rem; }
.principles p { color: var(--color-text-muted); font-size: var(--text-sm); margin: 0; }

/* --------------------------------------------------------------- FAQ */
.faq { border-top: 1px solid var(--color-border); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--color-border); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; cursor: pointer; list-style: none;
  padding: 1.25rem 0; font-family: var(--font-heading); font-weight: 600; font-size: 1.0625rem; color: var(--slate-900);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--color-primary); transition: transform var(--dur) var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--color-text-muted); margin: 0 0 1.4rem; max-width: 70ch; }

/* --------------------------------------------------------------- CTA band */
.cta-band { background: var(--color-bg-strong); color: var(--color-text-on-dark); position: relative; overflow: hidden; }
.cta-band::after {
  content: ""; position: absolute; right: -60px; top: -40px; width: 340px; height: 340px; opacity: 0.06; pointer-events: none;
  background: linear-gradient(135deg, transparent 49%, var(--white) 49%, var(--white) 51%, transparent 51%) 0 0 / 34px 34px;
}
.cta-band__inner { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; padding-top: clamp(3.5rem, 2.5rem + 3vw, 5rem); padding-bottom: clamp(3.5rem, 2.5rem + 3vw, 5rem); }
.cta-band h2 { color: var(--white); margin-bottom: 0.6rem; }
.cta-band p { margin: 0; max-width: 56ch; font-size: var(--text-lg); }
.cta-band .btn-row { margin-top: 0; }

/* --------------------------------------------------------------- contact */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(2rem, 4vw, 4rem); align-items: start; }
.contact-aside { position: sticky; top: calc(var(--header-h) + 1.5rem); display: grid; gap: 1.25rem; }
.email-card { background: var(--color-bg-strong); color: var(--color-text-on-dark); border-radius: var(--radius); padding: 1.75rem; }
.email-card h2 { color: var(--white); font-size: 1.25rem; margin-bottom: 0.5rem; }
.email-card p { margin-bottom: 1.1rem; }
.email-card a.email-big { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--white); font-family: var(--font-heading); font-weight: 600; font-size: clamp(1rem, 0.9rem + 0.4vw, 1.15rem); }
.email-card a.email-big:hover { color: #F5D9B5; }
.next-steps { list-style: none; padding: 0; margin: 0; counter-reset: ns; }
.next-steps li { counter-increment: ns; position: relative; padding: 0 0 1rem 2.4rem; color: var(--color-text-muted); font-size: var(--text-sm); }
.next-steps li::before { content: counter(ns); position: absolute; left: 0; top: 0; width: 1.6rem; height: 1.6rem; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--slate-100); color: var(--color-primary); font-weight: 700; font-size: 0.8125rem; }
.next-steps strong { color: var(--slate-900); display: block; }

.request-form { background: var(--white); border: 1px solid var(--color-border); border-radius: var(--radius); padding: clamp(1.4rem, 1rem + 2vw, 2.5rem); }
.form-intro { font-size: var(--text-sm); color: var(--color-text-muted); }
fieldset { border: 0; padding: 0; margin: 0 0 1.75rem; min-width: 0; }
legend { font-family: var(--font-heading); font-weight: 600; font-size: 1.0625rem; padding: 0; margin-bottom: 1rem; color: var(--slate-900); }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1.25rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field[hidden] { display: none; }
.field label { font-weight: 600; font-size: 0.9688rem; color: var(--slate-800); }
.req { color: var(--color-accent); }
.optional { font-weight: 400; color: var(--color-text-muted); }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"], select, textarea {
  width: 100%; min-height: var(--input-h); padding: 0.7rem 0.85rem;
  font: inherit; font-size: 1rem; color: var(--color-text); background: var(--white);
  border: 1.5px solid var(--color-border-strong); border-radius: var(--radius-sm);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
select { appearance: none; padding-right: 2.5rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23486581' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.85rem center; }
textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-color: var(--slate-500); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(51, 78, 104, 0.18); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--color-error); }
.field-hint { margin: 0; font-size: 0.875rem; color: var(--color-text-muted); }
.field-error { margin: 0; font-size: 0.875rem; color: var(--color-error); font-weight: 600; }
.field--check { flex-direction: row; align-items: flex-start; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.field--check input { width: 1.25rem; height: 1.25rem; margin: 0.2rem 0 0; flex: none; accent-color: var(--color-primary); }
.field--check label { flex: 1; font-weight: 400; font-size: 0.9688rem; color: var(--slate-800); min-width: 0; }
.field--check .field-error { flex-basis: 100%; padding-left: 2rem; }
.form-fineprint { font-size: 0.875rem; color: var(--color-text-muted); }
.form-actions { margin-top: 1.25rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.spinner { display: none; width: 1.1rem; height: 1.1rem; border: 2px solid rgba(255,255,255,0.4); border-top-color: var(--white); border-radius: 50%; animation: spin 700ms linear infinite; }
.is-loading .spinner { display: inline-block; }
.is-loading { pointer-events: none; opacity: 0.85; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-status { padding: 1rem 1.15rem; border-radius: var(--radius-sm); margin-bottom: 1.5rem; border: 1px solid; font-size: 0.9688rem; }
.form-status:focus { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.form-status h3 { font-size: 1.0625rem; margin: 0 0 0.35rem; }
.form-status p { margin: 0 0 0.5rem; }
.form-status p:last-child { margin-bottom: 0; }
.form-status--error { background: var(--red-50); border-color: #F4C7C3; color: #7A271A; }
.form-status--error h3 { color: #7A271A; }
.form-status--success { background: var(--green-50); border-color: #B7DFC4; color: #14532D; }
.form-status--success h3 { color: #14532D; }
.form-status--info { background: var(--amber-50); border-color: #EBCB9E; color: #6B3A0D; }
.form-status--info h3 { color: #6B3A0D; }
.form-status .btn { min-height: 42px; margin-top: 0.4rem; font-size: 0.9063rem; }
.request-form.is-sent fieldset, .request-form.is-sent .field--check, .request-form.is-sent .form-actions, .request-form.is-sent .form-fineprint, .request-form.is-sent .form-intro { display: none; }

/* --------------------------------------------------------------- legal */
.legal { padding: clamp(2.5rem, 2rem + 3vw, 4.5rem) 0 var(--section-y); }
.legal__layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.legal__toc { position: sticky; top: calc(var(--header-h) + 1.5rem); font-size: 0.9063rem; }
.legal__toc h2 { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-secondary-text); }
.legal__toc ol { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.45rem; color: var(--color-text-muted); }
.legal__toc a { color: var(--color-text-muted); text-decoration: none; }
.legal__toc a:hover { color: var(--color-primary); text-decoration: underline; }
.legal .prose h2 { font-size: 1.375rem; margin-top: 2.5rem; padding-top: 0.5rem; }
.legal .prose h3 { font-size: 1.0625rem; margin-top: 1.5rem; }
.legal-meta { font-size: var(--text-sm); color: var(--color-text-muted); }
.draft-notice { display: flex; gap: 0.9rem; align-items: flex-start; padding: 1.1rem 1.25rem; margin-bottom: 2rem; background: var(--amber-50); border: 1px solid #EBCB9E; border-radius: var(--radius-sm); font-size: 0.9688rem; color: #5A3410; }
.draft-notice .icon { color: var(--amber-600); margin-top: 0.1rem; }
.confirm { display: inline; padding: 0.05em 0.4em; border-radius: 3px; background: var(--amber-50); border: 1px dashed #D9A45F; color: #6B3A0D; font-size: 0.9em; font-weight: 600; white-space: nowrap; }
.related-legal { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border); font-size: var(--text-sm); color: var(--color-text-muted); }

/* --------------------------------------------------------------- 404 */
.not-found { padding: clamp(4rem, 3rem + 6vw, 8rem) 0; text-align: center; }
.not-found__code { font-family: var(--font-heading); font-weight: 700; font-size: clamp(4rem, 3rem + 6vw, 7rem); line-height: 1; color: var(--slate-150); margin-bottom: 0.5rem; }
.not-found .lede { margin: 0 auto; }
.not-found .btn-row { justify-content: center; }
.not-found .link-list { max-width: 520px; margin: 3rem auto 0; text-align: left; }

/* --------------------------------------------------------------- footer */
.site-footer { background: var(--color-bg-tint); border-top: 1px solid var(--color-border); font-size: var(--text-sm); }
.site-footer__grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 2.5rem; padding-top: 4rem; padding-bottom: 3rem; }
.brand--footer img { height: 54px; width: auto; margin-bottom: 1.25rem; }
.site-footer__brand p { color: var(--color-text-muted); max-width: 42ch; }
.footer-email { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; }
.site-footer__heading { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-secondary-text); margin-bottom: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15rem; }
.site-footer nav a { display: inline-block; padding: 0.3rem 0; color: var(--slate-800); text-decoration: none; }
.site-footer nav a:hover { color: var(--color-primary); text-decoration: underline; }
.site-footer__bottom { display: flex; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; padding-top: 1.5rem; padding-bottom: 2rem; border-top: 1px solid var(--color-border); color: var(--color-text-muted); font-size: 0.875rem; }
.site-footer__bottom p { margin: 0; }

/* --------------------------------------------------------------- motion
   All motion is gated behind .js (content is visible without JavaScript) and
   switched off entirely for visitors who prefer reduced motion. */
:root { --ease-out: cubic-bezier(0.16, 1, 0.3, 1); --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1); }

/* Scroll reveal: rise + fade, staggered per row (delay set in main.js) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 700ms var(--ease-out), transform 800ms var(--ease-out); transition-delay: var(--reveal-delay, 0ms); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal.is-settled { transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease); transition-delay: 0ms; }
.js .service-card.reveal.is-settled:hover { transform: translateY(-4px); }

/* Photos slide open as they enter */
.js .reveal-media { overflow: hidden; border-radius: var(--radius); }
.js .reveal-media img { clip-path: inset(0 0 100% 0); transform: scale(1.12); transition: clip-path 1100ms var(--ease-out), transform 1400ms var(--ease-out); transition-delay: calc(var(--reveal-delay, 0ms) + 100ms); }
.js .reveal-media.is-visible img { clip-path: inset(0 0 0 0); transform: none; }

/* Eyebrow rule draws in */
.js .reveal .eyebrow::before { transform: scaleX(0); transform-origin: left; transition: transform 700ms var(--ease-out) 300ms; }
.js .reveal.is-visible .eyebrow::before { transform: none; }

/* Step and timeline numbers pop in after their card */
.js .step.reveal .step__num, .js .timeline__item.reveal .timeline__num { opacity: 0; transform: scale(0.4); transition: opacity 400ms var(--ease-out), transform 600ms var(--ease-pop); transition-delay: calc(var(--reveal-delay, 0ms) + 250ms); }
.js .step.reveal.is-visible .step__num, .js .timeline__item.reveal.is-visible .timeline__num { opacity: 1; transform: none; }
.js .timeline::before { transform: scaleY(0); transform-origin: top; transition: transform 1600ms var(--ease-out); }
.js .timeline.is-drawn::before { transform: none; }

/* Hero entrance on page load */
@keyframes rise-in { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: none; } }
@keyframes clip-open { from { clip-path: inset(0 0 100% 0); transform: scale(1.12); } to { clip-path: inset(0 0 0 0); transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes frame-in { from { opacity: 0; transform: translate(-18px, -18px); } to { opacity: 1; transform: none; } }
@keyframes rule-in { from { transform: scaleX(0); } to { transform: none; } }
.js .hero__text > *, .js .page-hero__text > * { animation: rise-in 900ms var(--ease-out) both; }
.js .hero__text > :nth-child(2), .js .page-hero__text > :nth-child(2) { animation-delay: 110ms; }
.js .hero__text > :nth-child(3), .js .page-hero__text > :nth-child(3) { animation-delay: 220ms; }
.js .hero__text > :nth-child(4), .js .page-hero__text > :nth-child(4) { animation-delay: 330ms; }
.js .hero__text > :nth-child(5), .js .page-hero__text > :nth-child(5) { animation-delay: 440ms; }
.js .hero .eyebrow::before, .js .page-hero .eyebrow::before { transform-origin: left; animation: rule-in 700ms var(--ease-out) 450ms both; }
.js .hero__media img, .js .page-hero__media img { animation: clip-open 1300ms var(--ease-out) 250ms both; }
.js .hero__media, .js .page-hero__media { overflow: hidden; border-radius: var(--radius); }
.js .hero__media { overflow: visible; }
.js .hero__media::before { animation: frame-in 900ms var(--ease-out) 900ms both; }
.js .commitments li { animation: rise-in 800ms var(--ease-out) both; }
.js .commitments li:nth-child(1) { animation-delay: 600ms; }
.js .commitments li:nth-child(2) { animation-delay: 720ms; }
.js .commitments li:nth-child(3) { animation-delay: 840ms; }

/* Buttons lift on hover */
.btn:hover { transform: translateY(-2px); }
.btn--accent:hover { box-shadow: 0 10px 22px -10px rgba(180, 83, 9, 0.75); }
.btn--primary:hover { box-shadow: 0 10px 22px -10px rgba(36, 59, 83, 0.7); }
.btn:active { transform: translateY(0); box-shadow: none; }

/* Header tightens after scrolling (desktop only; mobile menu is positioned from header height) */
@media (min-width: 861px) {
  .site-header__inner { transition: height 300ms var(--ease-out); }
  .brand img { transition: height 300ms var(--ease-out); }
  .site-header.is-scrolled .site-header__inner { height: 64px; }
  .site-header.is-scrolled .brand img { height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .js .reveal, .js .reveal-media img, .js .reveal .eyebrow::before, .js .step.reveal .step__num, .js .timeline__item.reveal .timeline__num, .js .timeline::before { opacity: 1; transform: none; clip-path: none; }
  .service-card:hover, .service-card:hover .service-card__media img, .btn:hover { transform: none; }
}

/* --------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
  .hero__inner, .page-hero--media .page-hero__inner, .split, .split--wide, .service-row, .contact-layout, .legal__layout { grid-template-columns: minmax(0, 1fr); }
  .service-row--flip .service-row__media { order: 0; }
  .hero__media::before { display: none; }
  .hero__media img { aspect-ratio: 16 / 10; }
  .audience-grid, .benefit-grid, .service-grid--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-aside, .legal__toc { position: static; }
  .legal__toc { padding: 1.25rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-bg-tint); }
  .commitments ul { grid-template-columns: minmax(0, 1fr); }
  .commitments li { padding: 1.1rem 0; }
  .commitments li + li { border-left: 0; border-top: 1px solid var(--color-border); padding-left: 0; }
}
@media (max-width: 640px) {
  .service-grid, .service-grid--three, .audience-grid, .benefit-grid, .steps, .feature-list, .principles, .engagement, .field-grid { grid-template-columns: minmax(0, 1fr); }
  .feature, .feature:nth-child(even) { padding: 1.35rem 0; border-right: 0; }
  .feature:nth-child(odd) { border-right: 0; }
  .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1.5rem; }
  .btn-row .btn { flex: 1 1 100%; }
  .cta-band .btn-row { width: 100%; }
  .brand img { height: 38px; }
  .confirm { white-space: normal; }
}
@media print {
  .site-header, .site-footer, .cta-band, .draft-notice .icon { display: none; }
  .js .reveal { opacity: 1; transform: none; }
  .js .reveal-media img { clip-path: none; transform: none; }
}
