/* ==========================================================================
   Realhouse Management Ltd. - site styles
   Direction D "Authority".

   One palette, used everywhere:
     gold      #E3B261   the only yellow (sampled from the logo mark)
     charcoal  #2A2A2A   every dark surface, and the main text colour on light
     greys     #4A4A4A secondary text on light, #C4C4C4 secondary text on dark
     light     #FAFAFA and #FFFFFF, alternating section backgrounds
   Gold is never darkened or recoloured. On light backgrounds it appears as bars, rules
   and underlines (text in gold would fail contrast), and as text only on dark surfaces.
   ========================================================================== */

/* --------------------------------------------------------- design tokens */
:root {
  /* brand - exact values from the live site */
  /* Sampled from the logo PNG itself (99,798 opaque pixels). The mark is a
     gradient running #E3A561 -> #E4BA61, so no flat colour matches it at every
     point; this is its mean, and its most common tone. The old Wix yellow (#EBBA4D) came
     from the Wix theme, not the logo, which is why buttons read yellower than
     the hexagon. */
  --gold:          #E3B261;
  --charcoal:      #2A2A2A;   /* one charcoal for every dark surface */
  --charcoal-deep: #2A2A2A;
  --grey:          #C4C4C4;
  --offwhite:      #FAFAFA;
  --white:         #FFFFFF;

  /* derived, accessibility only */
  --gold-ink:      #2A2A2A;   /* kept as a name only: text that used to be a dark gold is now charcoal, with a gold bar or underline */
  --rule-dark:     #4A4A4A;
  --rule-light:    #E2E0DC;
  --ink-soft:      #4A4A4A;
  --ink-mute:      #C4C4C4;   /* secondary text on dark surfaces: the same grey as --grey */

  /* type */
  --font-display: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body:    'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* fluid scale - replaces the 14 unrelated sizes on the old site */
  --t-hero:    clamp(2.5rem, 6vw, 5.5rem);
  --t-h1:      clamp(2.25rem, 5vw, 3.5rem);
  --t-h2:      clamp(1.875rem, 3.4vw, 2.875rem);
  --t-h3:      clamp(1.125rem, 1.6vw, 1.25rem);
  --t-lead:    clamp(1.0625rem, 1.5vw, 1.25rem);
  --t-body:    1.0625rem;
  --t-small:   0.9375rem;
  --t-eyebrow: 0.78rem;   /* 12.5px - was 11.5px */
  --t-micro:   0.72rem;   /* 11.5px - was 10.6px, too small for tracked caps */

  /* space */
  --gutter:    clamp(1.5rem, 4.2vw, 4rem);
  --section-y: clamp(4.5rem, 9vw, 7.5rem);
  --maxw:      1440px;

  /* motion */
  --ease: cubic-bezier(0.2, 0.7, 0.25, 1);
  --dur:  0.7s;
}

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

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

body {
  margin: 0;
  background: var(--offwhite);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: var(--t-body);
  font-weight: 300;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

/* Do NOT put overflow-x: hidden on body - it promotes body to the scroll
   container, which zeroes window.scrollY and breaks scroll listeners and
   any viewport-rooted IntersectionObserver. `clip` contains overflow
   without creating a scroll container. Sections that bleed (.hero,
   .services) clip their own content anyway. */
html { overflow-x: clip; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; }

a { color: inherit; }

button { font: inherit; }

/* focus - visible, gold, never removed */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 1px;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -120%);
  z-index: 200;
  background: var(--gold);
  color: var(--charcoal-deep);
  font-family: var(--font-display);
  font-size: var(--t-eyebrow);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1rem 1.75rem;
  transition: transform 0.25s var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); }

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

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

.eyebrow {
  display: block;
  font-family: var(--font-display);
  font-size: var(--t-eyebrow);
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-ink);
}
.eyebrow--on-dark { color: var(--gold); }

.rule {
  width: 84px;
  height: 4px;
  background: var(--gold);
  border: 0;
  margin: 1.5rem 0 0;
  transform-origin: left center;
}

.lead {
  font-size: var(--t-lead);
  line-height: 1.6;
  color: var(--ink-soft);
}
.lead--on-dark { color: var(--grey); }

/* ---------------------------------------------------------------- button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 2.25rem;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 0.28s var(--ease), color 0.28s var(--ease),
              border-color 0.28s var(--ease), transform 0.28s var(--ease);
}
.btn--gold { background: var(--gold); color: var(--charcoal-deep); }
.btn--gold:hover { background: var(--gold); transform: translateY(-2px); box-shadow: 0 10px 22px rgba(227, 178, 97, 0.4); }
.btn--ghost { background: transparent; color: var(--white); border-color: rgba(250,250,250,0.45); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }

/* ---------------------------------------------------------------- header */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: transparent;
  transition: background-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.site-header.is-solid,
body:not(.has-hero) .site-header {
  background: var(--charcoal-deep);
  box-shadow: 0 1px 0 rgba(255,255,255,0.08);
}

/* Three equal-weight columns: logo (left edge), tabs (centred on the page), portal button (right edge). The
   logo's left edge and the button's right edge are therefore the container's two edges, and the tabs sit on
   the page's centre line whatever the widths of the other two are. */
.site-header__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 2rem;
  min-height: 100px;
}

/* The logo: mark, then REALHOUSE over "Property Management". The second line is sized in em from the first
   and stretched by script (see fitBrand in site.js) so it starts and ends exactly under REALHOUSE. */
.brand { display: flex; align-items: center; gap: 1rem; text-decoration: none; justify-self: start; }
.brand__mark { width: 68px; height: 68px; flex: none; }
.brand__text { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5em; font-size: 1.875rem; }
.brand__name {
  width: max-content;
  font-family: var(--font-display);
  font-size: 1em;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--white);
}
.brand__name b { font-weight: 700; color: var(--gold); }
.brand__sub {
  width: max-content;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 0.4em;
  font-weight: 500;
  letter-spacing: 0.3em;
  line-height: 1;
  color: var(--white);   /* as in the logo: REAL and PROPERTY MANAGEMENT white, HOUSE gold */
}

.nav { display: flex; justify-content: center; }
.nav__list { display: flex; align-items: center; gap: clamp(1.5rem, 3vw, 3rem); list-style: none; }
.nav__link {
  position: relative;
  display: inline-block;
  white-space: nowrap;   /* "Who We Are" must never break onto three lines */
  padding: 0.5rem 0;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--offwhite);
  text-decoration: none;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.32s var(--ease);
}
.nav__link:hover::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); transform-origin: left center; }

/* burger */
/* scrim exists in the DOM at all widths but only participates on mobile */
.nav-scrim { display: none; }

.burger {
  display: none;
  width: 48px; height: 48px;
  align-items: center; justify-content: center;
  background: none; border: 0; cursor: pointer;
  flex-shrink: 0;
}
.burger__box { display: block; width: 24px; height: 14px; position: relative; }
.burger__box span {
  position: absolute; left: 0;
  width: 100%; height: 2px;
  background: var(--offwhite);
  transition: transform 0.35s var(--ease), opacity 0.2s var(--ease);
}
.burger__box span:nth-child(1) { top: 0; }
.burger__box span:nth-child(2) { top: 6px; }
.burger__box span:nth-child(3) { top: 12px; }
.burger[aria-expanded="true"] .burger__box span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] .burger__box span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] .burger__box span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ------------------------------------------------------------------ hero */
/* Keep the hero inside a 768px-tall laptop screen: the call-to-action buttons must stay above the fold.
   Measured at 1366x768 and 1440x900. */
.hero {
  position: relative;
  min-height: clamp(520px, 78vh, 760px);
  display: flex;
  align-items: flex-end;
  background: var(--charcoal-deep);
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(42, 42, 42, 0.74);
}
.hero__inner { position: relative; width: 100%; padding-block: 8.5rem 3.25rem; }
.hero__title { font-size: var(--t-hero); color: var(--white); margin-top: 1.75rem; }
.hero__lead { margin-top: 2rem; max-width: 42ch; }
.hero__actions { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 1rem; }


/* page hero (inner pages) */
:root { --hero-top: clamp(2rem, 3.5vw, 3.25rem); --hero-bottom: clamp(2.5rem, 4vw, 3.75rem); }
.page-hero {
  background: var(--charcoal-deep);
  padding-block: calc(100px + var(--hero-top)) var(--hero-bottom);   /* 100px = the fixed header; the dark band is no taller than its text needs */
}
.page-hero__title { font-size: var(--t-h1); color: var(--white); margin-top: 1.75rem; }
.page-hero__lead { margin-top: 2.25rem; max-width: 62ch; }

.breadcrumb { font-size: var(--t-small); color: var(--ink-mute); }
.breadcrumb a { color: var(--grey); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold); }

/* ----------------------------------------------------------------- stats */
.stats { background: var(--gold); }
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.stat { padding: clamp(2.75rem, 5vw, 4.25rem) clamp(1.25rem, 2.75vw, 2.75rem); }
.stat + .stat { border-left: 1px solid rgba(42, 42, 42, 0.22); }
.stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5.3vw, 4.75rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--charcoal-deep);
  font-variant-numeric: tabular-nums;
}
.stat__label {
  display: block;
  margin-top: 0.875rem;
  font-family: var(--font-display);
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--charcoal);
}

/* ----------------------------------------------------------------- about */
.split { display: grid; grid-template-columns: 0.92fr 1fr; align-items: stretch; }
.split__media { position: relative; min-height: 420px; background: var(--charcoal-deep); overflow: hidden; }
.split__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.split__body { padding: var(--section-y) var(--gutter); display: flex; flex-direction: column; justify-content: center; }
.split__body > * + * { margin-top: 1.75rem; }
.split__body h2 { font-size: var(--t-h2); color: var(--charcoal-deep); }

.link-underline {
  align-self: flex-start;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--charcoal-deep);
  text-decoration: none;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--gold);
  transition: color 0.25s var(--ease), gap 0.25s var(--ease);
}
.link-underline:hover { color: var(--gold-ink); }

/* -------------------------------------------------------------- services */
.services { position: relative; background: var(--charcoal); padding-block: var(--section-y); overflow: hidden; }
.services__watermark {
  position: absolute;
  right: -130px; top: 60px;
  width: 520px;
  opacity: 0.07;
  pointer-events: none;
}
.services__head {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  padding-bottom: 2.875rem;
  border-bottom: 1px solid var(--rule-dark);
}
.services__head h2 { font-size: var(--t-h2); color: var(--white); margin-top: 1.5rem; }

.services__grid { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }

.service {
  display: flex;
  flex-direction: column;
  padding: 2.875rem 2.75rem 3rem;
  text-decoration: none;
  border-bottom: 1px solid var(--rule-dark);
  border-left: 1px solid var(--rule-dark);
  position: relative;
  transition: background-color 0.35s var(--ease);
}
.service:nth-child(3n+1) { border-left: 0; padding-left: 0; }
.service:nth-child(3n)   { padding-right: 0; }
.service::before {
  content: "";
  position: absolute;
  left: 0; top: -1px;
  width: 100%; height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.4s var(--ease);
}
.service:hover::before, .service:focus-visible::before { transform: scaleX(1); }
.service__num {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  color: var(--gold);
}
.service__title {
  margin-top: 1.125rem;
  font-size: var(--t-h3);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--white);
  transition: transform 0.35s var(--ease);
}
.service:hover .service__title { transform: translateX(6px); }
.service__desc { margin-top: 0.875rem; font-size: var(--t-small); line-height: 1.62; color: var(--grey); }

.services__also {
  position: relative;
  margin-top: 3.25rem;
  display: flex;
  align-items: baseline;
  gap: 1.625rem;
  flex-wrap: wrap;
}
.services__also-label {
  font-family: var(--font-display);
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  flex-shrink: 0;
}
.services__also-list { font-size: var(--t-small); color: var(--grey); }

/* ------------------------------------------------------------ testimonial */
.testimonial { background: var(--offwhite); padding-block: var(--section-y); }
.testimonial blockquote {
  margin: 0;
  max-width: 62ch;
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 2.4vw, 1.8125rem);
  font-weight: 600;
  line-height: 1.42;
  letter-spacing: -0.02em;
  color: var(--charcoal-deep);
  text-transform: none;
}
.testimonial cite {
  display: block;
  margin-top: 1.375rem;
  font-family: var(--font-display);
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-style: normal;
  color: var(--gold-ink);
}

/* --------------------------------------------------------------- content */
.prose { max-width: 68ch; }
.prose > * + * { margin-top: 1.5rem; }
.prose h2 { font-size: var(--t-h2); color: var(--charcoal-deep); margin-top: 3.75rem; }
.prose h3 {
  font-size: var(--t-h3);
  color: var(--charcoal-deep);
  margin-top: 2.75rem;
  letter-spacing: 0.01em;
}
.prose ul { list-style: none; }
.prose li { position: relative; padding-left: 1.75rem; margin-top: 0.75rem; }
.prose li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.72em;
  width: 9px; height: 9px;
  background: var(--gold);
}
.section { padding-block: var(--section-y); }
.section--light { background: var(--offwhite); }
.section--white { background: var(--white); }

/* team */
.team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--rule-light); }
.team-card { background: var(--offwhite); padding: 2.75rem 2.5rem 3rem; }
.team-card__name { font-size: var(--t-h3); color: var(--charcoal-deep); letter-spacing: 0.01em; }
.team-card__role {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--font-display);
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-ink);
}
.team-card__bio { margin-top: 1.125rem; font-size: var(--t-small); line-height: 1.64; color: var(--ink-soft); }
.team-card__mail {
  display: inline-block;
  margin-top: 1.125rem;
  font-size: var(--t-small);
  color: var(--charcoal-deep);
  text-decoration: none;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 2px;
}

/* clients list */
.clients-list {
  columns: 3;
  column-gap: 2.5rem;
  list-style: none;
}
.clients-list li {
  break-inside: avoid;
  border-bottom: 1px solid var(--rule-light);
}
.clients-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 44px;
  padding: 0.6875rem 0;
  font-size: var(--t-small);
  color: var(--charcoal-deep);
  text-decoration: none;
  transition: color 0.25s var(--ease), padding-left 0.25s var(--ease);
}
.clients-list a::after {
  content: "\2192";
  color: var(--gold);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.clients-list a:hover { color: var(--gold-ink); padding-left: 0.5rem; }
.clients-list a:hover::after { opacity: 1; transform: none; }

/* client portal call to action */
.portal-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1.5rem, 4vw, 3rem);
  flex-wrap: wrap;
  padding: clamp(1.75rem, 3vw, 2.5rem);
  margin-bottom: clamp(2.5rem, 4vw, 3.5rem);
  background: var(--white);
  border: 1px solid var(--rule-light);
  border-left: 4px solid var(--gold);
}
.portal-cta__title { font-size: var(--t-h3); color: var(--charcoal-deep); letter-spacing: 0.01em; }
.portal-cta__text { margin-top: 0.75rem; max-width: 58ch; font-size: var(--t-small); line-height: 1.6; color: var(--ink-soft); }

/* ---------------------------------------------------------------- contact */
.contact { background: var(--charcoal-deep); }
.contact__grid { display: grid; grid-template-columns: 0.62fr 1fr; }
.contact__info { padding: var(--section-y) clamp(2rem,3vw,3rem) var(--section-y) 0; }
.contact__info h2 { font-size: var(--t-h1); color: var(--white); }
.contact__dl { margin: 2.75rem 0 0; }
.contact__row { display: flex; gap: 1.375rem; padding: 1.1875rem 0; border-top: 1px solid var(--rule-dark); }
.contact__row:last-child { border-bottom: 1px solid var(--rule-dark); }
.contact__row dt {
  width: 78px;
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding-top: 0.25rem;
}
.contact__row dd { margin: 0; font-size: var(--t-small); line-height: 1.6; color: var(--grey); }
.contact__row dd a { text-decoration: none; transition: color 0.25s var(--ease); }
.contact__row dd a:hover { color: var(--gold); }

.contact__form-wrap { padding: var(--section-y) 0 var(--section-y) clamp(2rem,3vw,3rem); }
.contact__request { margin: 1.625rem 0 0; max-width: 34rem; font-size: var(--t-lead); line-height: 1.7; color: var(--grey); }
.contact__request-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 1rem; }

/* ------------------------------------------------------------------ form */
.form { margin-top: 1.625rem; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1.125rem 1.25rem; }
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-family: var(--font-display);
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.field input, .field select, .field textarea {
  min-height: 48px;
  padding: 0 0.9375rem;
  font-family: var(--font-body);
  font-size: var(--t-body);
  font-weight: 300;
  color: var(--white);
  background: var(--charcoal);
  border: 1px solid var(--rule-dark);
  border-radius: 0;
  transition: border-color 0.25s var(--ease);
}
.field textarea { padding: 0.75rem 0.9375rem; resize: vertical; min-height: 96px; line-height: 1.55; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-mute); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); }
.field select { appearance: none; background-image: none; cursor: pointer; }
.field select option { background: var(--charcoal); color: var(--white); }

.form__submit { grid-column: 1 / -1; justify-self: start; }

.form__status {
  grid-column: 1 / -1;
  font-size: var(--t-small);
  padding: 0.875rem 1.125rem;
  border-left: 3px solid var(--gold);
  background: rgba(227, 178, 97, 0.08);
  color: var(--grey);
}
.form__status[hidden] { display: none; }
.form__status--error { border-left-color: #E06B5A; background: rgba(224, 107, 90, 0.1); }

.form__consent { grid-column: 1 / -1; font-size: 0.8125rem; line-height: 1.55; color: var(--ink-mute); }
.form__consent a { color: var(--grey); }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--charcoal); color: var(--grey); padding-block: var(--section-y) 2rem; }
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2.75rem;
  border-bottom: 1px solid var(--rule-dark);
}
.site-footer h3 {
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--gold);
  margin-bottom: 1.25rem;
}
.site-footer ul { list-style: none; }
.site-footer li + li { margin-top: 0.625rem; }
.site-footer a { color: var(--grey); text-decoration: none; font-size: var(--t-small); transition: color 0.25s var(--ease); }
.site-footer a:hover { color: var(--gold); }
.site-footer p { font-size: var(--t-small); }

.social { display: flex; gap: 0.75rem; margin-top: 1.5rem; }
.social a {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--rule-dark);
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.social a:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }

.site-footer__base {
  padding-top: 1.75rem;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: var(--ink-mute);
}
.site-footer__base a { font-size: 0.8125rem; }

/* ---------------------------------------------- feature block (homepage) */
.feature {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
}
.feature__intro > * + * { margin-top: 1.5rem; }
.feature__intro h2 { font-size: var(--t-h2); color: var(--charcoal-deep); }
.feature__intro p { color: var(--ink-soft); }

.feature__list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--rule-light);
  border: 1px solid var(--rule-light);
}
.feature__item { background: var(--white); padding: 1.875rem 1.625rem 2rem; }
.feature__item h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--charcoal-deep);
}
.feature__item h3::before {
  content: "";
  display: block;
  width: 26px;
  height: 3px;
  background: var(--gold);
  margin-bottom: 0.875rem;
}
.feature__item p { margin-top: 0.75rem; font-size: var(--t-small); line-height: 1.6; color: var(--ink-soft); }

/* ------------------------------------------------- Atlas credential strip */
.credential {
  background: var(--offwhite);
  border-top: 1px solid var(--rule-light);
  padding-block: clamp(2.25rem, 4vw, 3.25rem);
}
.credential__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.25rem, 3vw, 3rem);
  flex-wrap: wrap;
}
.credential__text {
  font-size: var(--t-small);
  line-height: 1.5;
  color: var(--ink-soft);
  text-align: right;
}
.credential__text strong { color: var(--charcoal-deep); font-weight: 500; }
.credential__logo { width: clamp(170px, 21vw, 250px); height: auto; }

/* -------------------------------------------------------------------- map */
.map { border-top: 4px solid var(--gold); background: var(--charcoal-deep); }
.map__frame {
  display: block;
  width: 100%;
  height: clamp(280px, 42vh, 440px);
  border: 0;
  filter: grayscale(1) contrast(1.04);
  transition: filter 0.5s var(--ease);
}
.map:hover .map__frame, .map:focus-within .map__frame { filter: none; }
.map__bar {
  display: flex;
  align-items: baseline;   /* "Get directions" sits on the same line as the OFFICE / HOURS / TEL / EMAIL labels, not centred against the tallest column */
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.25rem 0;
}
.map__details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem 2rem;
  margin: 0;
  flex: 1 1 420px;
}
.map__details dt {
  font-family: var(--font-display);
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.map__details dd { margin: 0.375rem 0 0; font-size: var(--t-small); line-height: 1.5; color: var(--grey); }
.map__details a { color: var(--grey); text-decoration: none; transition: color 0.25s var(--ease); }
.map__details a:hover { color: var(--gold); }
.map__link {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 4px;
  transition: border-color 0.25s var(--ease);
}
.map__link:hover { border-bottom-color: var(--gold); }

/* ================================================================ MOTION */
/* Elements only start hidden when JS is present, so a no-JS or
   pre-hydration render still shows everything. */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}
.js .reveal.is-visible { opacity: 1; transform: none; }

.js .reveal-rule { transform: scaleX(0); transition: transform 0.8s var(--ease); transition-delay: var(--d, 0ms); }
.js .reveal-rule.is-visible { transform: scaleX(1); }

/* Hero animates on load via keyframes, not on scroll - it is above the
   fold and must not wait for the observer. */
@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}
@keyframes ruleIn {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
@keyframes heroZoom {
  from { transform: scale(1.06); }
  to   { transform: scale(1); }
}

.hero__media img { animation: heroZoom 1.8s var(--ease) both; }
.hero__inner > * { animation: rise 0.8s var(--ease) both; }
.hero__inner > *:nth-child(1) { animation-delay: 0.05s; }
.hero__inner > *:nth-child(2) { animation-delay: 0.14s; }
.hero__inner > *:nth-child(3) { animation: ruleIn 0.7s var(--ease) 0.3s both; }
.hero__inner > *:nth-child(4) { animation-delay: 0.32s; }
.hero__inner > *:nth-child(5) { animation-delay: 0.42s; }
.hero__inner > *:nth-child(6) { animation-delay: 0.54s; }

/* ------------------------------------------------------------ responsive */

@media (max-width: 1080px) {
  .services__grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .service:nth-child(3n+1) { border-left: 1px solid var(--rule-dark); padding-left: 2.75rem; }
  .service:nth-child(3n)   { padding-right: 2.75rem; }
  .service:nth-child(2n+1) { border-left: 0; padding-left: 0; }
  .service:nth-child(2n)   { padding-right: 0; }
  .team-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .clients-list { columns: 2; }
}

/* Burger menu below 1360px: the tabs and the portal button move into the slide-out menu. */
@media (max-width: 1359px) {
  .site-header__inner { display: flex; min-height: 80px; }
  .brand { flex: 1 1 auto; min-width: 0; }
  .brand__mark { width: 54px; height: 54px; }
  .brand__text { font-size: 1.5rem; }
  .burger { display: flex; }

  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(340px, 86vw);
    background: var(--charcoal-deep);
    border-left: 1px solid var(--rule-dark);
    transform: translateX(100%);
    transition: transform 0.42s var(--ease);
    justify-content: flex-start;
    padding: 6rem 2rem 2rem;
    overflow-y: auto;
  }
  .nav.is-open { transform: translateX(0); }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; width: 100%; }
  .nav__list li { border-bottom: 1px solid var(--rule-dark); }
  .nav__link { display: block; padding: 1.125rem 0; font-size: 0.85rem; }
  .nav__link::after { display: none; }

  .nav-scrim {
    display: block;
    position: fixed; inset: 0;
    background: rgba(20,20,20,0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.42s var(--ease);
    z-index: 99;
  }
  .nav-scrim.is-open { opacity: 1; pointer-events: auto; }
}

@media (max-width: 900px) {
  /* No hover on touch, so the greyscale would never lift - show the real map. */
  .map__frame { filter: none; }

  .page-hero { padding-block: calc(80px + var(--hero-top)) var(--hero-bottom); }
  .hero__inner { padding-block: 8.75rem 3.5rem; }
  .hero__title { margin-top: 1.75rem; }
  .hero__lead { margin-top: 2rem; }
  .hero__actions { margin-top: 2.5rem; }

  .split { grid-template-columns: 1fr; }
  .split__media { min-height: 300px; }
  .feature { grid-template-columns: 1fr; }
  .split__body { padding-inline: var(--gutter); }

  .contact__grid { grid-template-columns: 1fr; }
  .contact__info { padding: var(--section-y) 0 0; }
  .contact__form-wrap { padding: 2.5rem 0 var(--section-y); }

  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {

  .services__grid { grid-template-columns: 1fr; }
  .service, .service:nth-child(3n+1), .service:nth-child(3n),
  .service:nth-child(2n+1), .service:nth-child(2n) {
    border-left: 0; padding-inline: 0;
  }

  .team-grid { grid-template-columns: 1fr; }
  .clients-list { columns: 1; }
  .feature__list { grid-template-columns: 1fr; }
  .credential__text { text-align: center; }
  .form { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 2.25rem; }
  .hero__actions .btn { width: 100%; }
}

/* ------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .js .reveal-rule { transform: scaleX(1); }
  .hero__media img { animation: none; }
}

/* ------------------------------------------------------------------ print */
@media print {
  .site-header, .burger, .nav, .hero__media, .form, .social { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ------------------------------------------- split variants (insurance etc.)
   Reuses .split; adds a contained width for TVs/ultrawides, a mirrored order,
   a tinted background, and the gold-square list used in .prose. */
.split--contained { max-width: var(--maxw); margin-inline: auto; }
.split--light { background: var(--offwhite); }
/* text only: no photograph beside it, so one readable column */
.split--text { grid-template-columns: minmax(0, 1fr); }
.split--text .split__body { max-width: 52rem; margin-inline: auto; width: 100%; }
.split--reverse { grid-template-columns: 1fr 0.92fr; }
.split--reverse .split__media { order: 2; }
.split--reverse .split__body { order: 1; }
.split__media picture { display: contents; }
.split__list { list-style: none; }
.split__list li { position: relative; padding-left: 1.75rem; margin-top: 0.75rem; color: var(--ink-soft); }
.split__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.72em;
  width: 9px; height: 9px;
  background: var(--gold);
}
.split__list a { color: var(--gold-ink); text-decoration: underline; text-underline-offset: 3px; }
.split__body .lead { color: var(--ink-soft); }
.insurance-notice { font-size: var(--t-small); line-height: 1.7; color: var(--ink-soft); }
@media (max-width: 900px) {
  .split--reverse { grid-template-columns: 1fr; }
  .split--reverse .split__media, .split--reverse .split__body { order: 0; }
}

/* ----------------------------------------------------- media placeholder
   Clearly marked stand-in for photography still to be supplied. Remove the
   element (and this rule) once the real image is in. */
.media-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.75rem; padding: 2rem; text-align: center;
  border: 2px dashed var(--gold);
  margin: clamp(1rem, 2vw, 1.75rem);
  color: var(--white);
}
.media-placeholder__tag {
  font-family: var(--font-display); font-size: var(--t-small); font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold);
}
.media-placeholder__note { font-size: var(--t-small); color: var(--grey); max-width: 34ch; }

/* ----------------------------------------------------- testimonial carousel
   Scroll-snap track: swipe on touch, buttons on desktop, no library. Controls
   stay hidden until there is more than one slide. */
.tcarousel { margin-top: 1.5rem; }
.tcarousel__track {
  list-style: none; display: flex; gap: 2rem; overflow-x: auto;
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.tcarousel__track::-webkit-scrollbar { display: none; }
.tcarousel__slide { flex: 0 0 100%; scroll-snap-align: start; }
.tcarousel__slide blockquote { margin-top: 0; }
.tcarousel__ctrl { display: flex; align-items: center; gap: 1rem; margin-top: 2rem; }
.tcarousel__ctrl[hidden] { display: none; }
.tcarousel__btn {
  width: 44px; height: 44px; border: 1px solid var(--charcoal-deep); background: transparent;
  color: var(--charcoal-deep); font-size: 1.125rem; cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.tcarousel__btn:hover, .tcarousel__btn:focus-visible { background: var(--gold); border-color: var(--gold); }
.tcarousel__count { font-family: var(--font-display); font-size: var(--t-micro); letter-spacing: 0.2em; color: var(--ink-soft); }
@media (prefers-reduced-motion: reduce) { .tcarousel__track { scroll-behavior: auto; } }

/* ------------------------------------------------------------------ blog */
.post-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
  gap: 0;
}
.post-card { background: var(--white); box-shadow: 0 0 0 1px var(--rule-light); }
.post-card a {
  display: flex; flex-direction: column; gap: 0.875rem; height: 100%;
  padding: 2rem 1.75rem 2.25rem; text-decoration: none; color: inherit;
  border-top: 3px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.post-card a:hover, .post-card a:focus-visible { border-top-color: var(--gold); background: var(--offwhite); }
.post-card__cat {
  font-family: var(--font-display); font-size: var(--t-micro); font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-ink);
}
.post-card__title { font-size: var(--t-h3); line-height: 1.3; color: var(--charcoal-deep); }
.post-card__desc { font-size: var(--t-small); line-height: 1.6; color: var(--ink-soft); }
.post-card__meta { margin-top: auto; font-size: var(--t-micro); letter-spacing: 0.08em; color: var(--ink-soft); }
.post__meta { font-family: var(--font-display); font-size: var(--t-micro); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); }
.post__draft { color: var(--gold-ink); font-weight: 600; }
.post h2 { margin-top: 2.75rem; }
.post ol { padding-left: 1.5rem; }
.post ol li { padding-left: 0.25rem; }
.post ol li::before { display: none; }
.post a:not(.link-underline) { color: var(--gold-ink); text-decoration: underline; text-underline-offset: 3px; }
.post__related { margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--rule-light); }
.post__related h2 { margin-top: 0; font-size: var(--t-h3); }

/* ------------------------------------------------------------------ news */
.news__follow { margin-top: 2.5rem; }
.news-grid {
  list-style: none; margin: 0; padding: 0;
  columns: 1; column-gap: clamp(1rem, 2vw, 1.75rem);   /* a wall of cards: each picture keeps its own shape, columns fill evenly */
}
@media (min-width: 640px)  { .news-grid { columns: 2; } }
@media (min-width: 1000px) { .news-grid { columns: 3; } }
.news-card { display: block; break-inside: avoid; margin: 0 0 clamp(1rem, 2vw, 1.75rem); background: var(--white); box-shadow: 0 0 0 1px var(--rule-light); }
.news-card__btn {
  all: unset; box-sizing: border-box; display: flex; flex-direction: column; width: 100%;
  cursor: pointer; border-top: 3px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.news-card__btn:hover, .news-card__btn:focus-visible { border-top-color: var(--gold); }
.news-card__btn:focus-visible { outline: 2px solid var(--gold-ink); outline-offset: 2px; }
.news-card__media { position: relative; display: block; overflow: hidden; background: var(--charcoal-deep); }
.news-card__media img { display: block; width: 100%; height: auto; transition: transform 0.6s var(--ease); }   /* the whole picture, uncropped */
.news-card__btn:hover .news-card__media img { transform: scale(1.04); }
.news-card__badge {
  position: absolute; right: 0.75rem; bottom: 0.75rem; padding: 0.3rem 0.6rem;
  background: rgba(42,42,42,0.85); color: var(--white); font-size: var(--t-micro); letter-spacing: 0.1em;
}
.news-card__body { display: flex; flex-direction: column; gap: 0.75rem; padding: 1.25rem 1.5rem 1.25rem; }
.news-card__text { font-size: var(--t-small); line-height: 1.6; color: var(--ink-soft); }
.news-card__more { font-family: var(--font-display); font-size: var(--t-micro); letter-spacing: 0.18em; text-transform: uppercase; color: var(--charcoal-deep); }
/* The footer of a card and of the one-post view: the page's avatar and name, with the date under it. */
.news-card__foot { display: flex; align-items: center; gap: 0.75rem; padding: 0.875rem 1.5rem; border-top: 1px solid var(--rule-light); }
.news-card__avatar { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--charcoal-deep); padding: 4px; }
.news-card__who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.news-card__name { font-family: var(--font-display); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.02em; color: var(--charcoal-deep); }
.news-card__date { font-family: var(--font-display); font-size: var(--t-micro); letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-ink); }
.news__more { margin: clamp(1.5rem, 3vw, 2.5rem) 0 0; text-align: center; }
.news__more[hidden], .news-wall[hidden] { display: none; }
.news__sample { margin: 0 0 1.5rem; padding: 0.875rem 1.125rem; border-left: 3px solid var(--gold); background: var(--white); font-size: var(--t-small); color: var(--ink-soft); }
.news__sample[hidden] { display: none; }

/* One post at a time: a pop-up over the wall, opened by clicking a card. Its arrows and counter are the testimonials'.
   X, a click outside the panel, or Escape closes it. */
html.news-open { overflow: hidden; }
.news-focus {
  border: 0; margin: 0; padding: clamp(0.75rem, 3vw, 2.5rem); width: 100%; max-width: none; height: 100%; max-height: none;
  background: transparent; color: var(--charcoal); overflow-y: auto;
}
.news-focus[open] { display: grid; place-items: center; }
.news-focus::backdrop { background: rgba(20, 20, 20, 0.78); }
.news-focus__panel { position: relative; width: min(100%, 74rem); padding: clamp(3.5rem, 5vw, 4rem) 0 0; }   /* no frame: the post floats over the page */
.news-focus__close {
  position: absolute; top: 0; right: 0; width: 48px; height: 48px; border: 0; padding: 0;
  background: none; color: var(--white); font-size: 2.25rem; font-weight: 300; line-height: 1; cursor: pointer;   /* just the X: no box behind it */
  transition: color 0.25s var(--ease), transform 0.25s var(--ease);
}
.news-focus__close:hover, .news-focus__close:focus-visible { color: var(--gold); transform: scale(1.1); }
/* Over the dimmed page the arrows and counter are white instead of charcoal; hover is the same gold as everywhere else. */
.news-focus .tcarousel__btn { border-color: var(--white); color: var(--white); }
.news-focus .tcarousel__btn:hover, .news-focus .tcarousel__btn:focus-visible { background: var(--gold); border-color: var(--gold); color: var(--charcoal-deep); }
.news-focus .tcarousel__count { color: var(--white); }
.tcarousel--post { margin-top: 0; }
.tcarousel--post .tcarousel__track { gap: clamp(1rem, 3vw, 2.75rem); }
.news-slide {
  flex: 0 0 100%; min-width: 0; scroll-snap-align: start;
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: stretch;
  height: clamp(20rem, 52vh, 30rem);                 /* every post is the same size, in a wide frame like most photos */
  background: var(--white); box-shadow: 0 0 0 1px var(--rule-light); text-align: left;
}
.news-slide--text { grid-template-columns: minmax(0, 1fr); }
/* The photo side is as tall as the text side and the photo fills it completely: no bars, no blur, no slivers, and the same
   for every post. A photo of a different shape loses a little at its edges here; a click on it opens the whole picture. */
.news-slide__media { position: relative; overflow: hidden; min-width: 0; min-height: 0; background: var(--charcoal-deep); }
.news-slide__photo { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.news-slide__img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.news-slide__thumbs { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.75rem; background: rgba(0, 0, 0, 0.35); }
.news-slide__thumb { width: 56px; height: 56px; padding: 0; border: 2px solid transparent; background: none; cursor: pointer; opacity: 0.75; transition: opacity 0.25s var(--ease), border-color 0.25s var(--ease); }
.news-slide__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.news-slide__thumb:hover, .news-slide__thumb:focus-visible, .news-slide__thumb.is-active { opacity: 1; border-color: var(--gold); }
.news-slide__content { display: flex; flex-direction: column; align-items: flex-start; gap: 1.5rem; padding: clamp(1.5rem, 3vw, 2.75rem); min-width: 0; min-height: 0; overflow-y: auto; }
.news-slide__content > :first-child { margin-top: auto; }      /* centred up and down; a long text simply scrolls */
.news-slide__content > :last-child { margin-bottom: auto; }
.news-slide__content .news-card__foot { padding: 0 0 1.25rem; border-top: 0; border-bottom: 1px solid var(--rule-light); width: 100%; }
/* A post with no photo: the text is a centred column in the middle of the card, not pushed to the left edge. */
.news-slide--text .news-slide__content { width: min(100%, 44rem); margin-inline: auto; align-items: center; text-align: center; }
.news-slide--text .news-card__foot { justify-content: center; }
.news-slide--text .news-card__who { align-items: center; }
.news-slide__text { font-size: var(--t-body); line-height: 1.7; color: var(--ink-soft); }
.news-slide__text > * + * { margin-top: 1rem; }
@media (max-width: 760px) {
  .news-slide { grid-template-columns: 1fr; height: auto; }
  .news-slide__media { aspect-ratio: 4 / 3; }
  .news-slide__content { overflow: visible; }
}

/* ------------------------------------------- large displays (TV / ultrawide)
   Content stays in a bounded column; type and column scale together so the
   page reads as intentional instead of a small island on a big screen. */
@media (min-width: 1920px) {
  html { font-size: 112.5%; }
  :root { --maxw: 1620px; }
}
@media (min-width: 2560px) {
  html { font-size: 137.5%; }
  :root { --maxw: 1980px; }
}
@media (min-width: 3200px) {
  html { font-size: 168.75%; }
  :root { --maxw: 2430px; }
}
.split { max-width: var(--maxw); margin-inline: auto; }
/* No hover on touch or hybrid devices, whatever their width: show the real map. */
@media (hover: none) { .map__frame { filter: none; } }

/* ---------------------------------------------- uniform card rows (subgrid)
   Titles that wrap to two lines in one card no longer push that card's
   description out of line with its neighbours: each card shares its row's
   tracks, so num / title / text / footer start at the same height across a row. */
@supports (grid-template-rows: subgrid) {
  .service { display: grid; grid-row: span 3; grid-template-rows: subgrid; align-content: start; row-gap: 0; }
  .service__desc { align-self: start; }
  .feature__item { display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 0; }
  .team-card { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0; }
  .team-card__mail { justify-self: start; align-self: end; }
  .post-card { display: grid; grid-row: span 4; grid-template-rows: subgrid; }
  .post-card a { display: grid; grid-row: 1 / span 4; grid-template-rows: subgrid; row-gap: 0; height: auto; }
  .post-card a > * + * { margin-top: 0.875rem; }
  .post-card__meta { margin-top: 0.875rem; align-self: end; }
}


/* ---------------------------------------- Atlas credential strip, ordered
   Three columns on one centre line: text (right-aligned) | logo | link
   (left-aligned). The logo sits on the page's centre axis, and the text and
   link mirror each other either side of it. */
.credential__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(1.5rem, 3.5vw, 3.5rem);
  row-gap: 1.25rem;
}
.credential__text { text-align: right; }
.credential__logo { justify-self: center; }
.credential__link { align-self: center; justify-self: start; }
@media (max-width: 900px) {
  .credential__inner { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .credential__text { text-align: center; }
  .credential__link { justify-self: center; }
}

/* Reading columns start on the same left edge as the hero and every other block.
   (Previously .wrap.prose shrank the whole wrapper to 68ch and centred it, so body
   text sat ~380px to the right of the page title.) The measure is kept on the children. */
.wrap.prose { max-width: var(--maxw); }
.wrap.prose > * { max-width: 68ch; }
.wrap.prose > img { max-width: min(100%, 692px); }

/* Services page: ten services as a symmetrical 2 x 5 grid (as on the original site).
   Three columns left one card alone on the last row. */
@media (min-width: 681px) {
  .services__grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .services__grid--two .service { padding-left: 2.75rem; padding-right: 2.75rem; border-left: 1px solid var(--rule-dark); }
  .services__grid--two .service:nth-child(odd)  { border-left: 0; padding-left: 0; }
  .services__grid--two .service:nth-child(even) { padding-right: 0; }
}

/* ------------------------------------------------------------------ symmetry
   No orphan cards, no lopsided columns. */

/* Footer: three equal columns (was 1.4fr / 1fr / 1fr, and 2 + 1 on tablets). */
.site-footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 719px) { .site-footer__grid { grid-template-columns: 1fr; } }

/* Office details strip: four across, or a 2 x 2 block, never 3 + 1. */
.map__details { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1180px) { .map__details { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .map__details { grid-template-columns: 1fr; } }

/* Blog and news tiles sit on a six-track grid: 3 across (2 tracks each) on wide screens,
   2 across (3 tracks each) on tablets. A last row holding one or two tiles stretches to fill
   the row, so the grid stays symmetrical whatever the number of posts. */
.post-grid, .news-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.post-card, .news-card { grid-column: span 2; }
.post-card:last-child:nth-child(3n+1), .news-card:last-child:nth-child(3n+1) { grid-column: span 6; }
.post-card:last-child:nth-child(3n+2), .news-card:last-child:nth-child(3n+2),
.post-card:nth-last-child(2):nth-child(3n+1), .news-card:nth-last-child(2):nth-child(3n+1) { grid-column: span 3; }
@media (max-width: 1100px) {
  .post-card, .news-card,
  .post-card:nth-last-child(2):nth-child(3n+1), .news-card:nth-last-child(2):nth-child(3n+1),
  .post-card:last-child:nth-child(3n+2), .news-card:last-child:nth-child(3n+2) { grid-column: span 3; }
  .post-card:last-child:nth-child(odd), .news-card:last-child:nth-child(odd) { grid-column: span 6; }
}
@media (max-width: 680px) {
  .post-grid, .news-grid { grid-template-columns: 1fr; }
  .post-card, .news-card, .post-card:last-child, .news-card:last-child { grid-column: auto !important; }
}

/* Label + list rows ("Additional service", "Optional extras", "Also", "Extras"): the label sits in a
   fixed column so every list starts on the same left edge, and the rows read as one group. */
.services__also {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  align-items: baseline;
  column-gap: 1.625rem;
}
.services__also + .services__also { margin-top: 1.5rem; }
@media (max-width: 680px) {
  .services__also { grid-template-columns: 1fr; row-gap: 0.5rem; }
}

/* Four testimonials of different lengths: a steady reading size, same measure and left edge for all. */
.tcarousel__slide { display: flex; flex-direction: column; justify-content: flex-start; }
.tcarousel__slide blockquote {
  max-width: 72ch;
  font-size: clamp(1.1875rem, 1.9vw, 1.5rem);
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: -0.01em;
}
.tcarousel__slide cite { margin-top: 1.5rem; }
.testimonial[id] { scroll-margin-top: 96px; }

.tcarousel__track { position: relative; }

/* Second carousel on the Services page (Google reviews) on white, so it reads as its own block. */
.testimonial--alt { background: var(--white); border-top: 1px solid var(--rule-light); }
.google-rating { margin-top: 1.25rem; max-width: 72ch; font-size: var(--t-small); line-height: 1.6; color: var(--ink-soft); }
.google-rating strong { color: var(--charcoal-deep); font-weight: 500; }
.google-rating a { color: var(--gold-ink); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.testimonial--alt .tcarousel { margin-top: 2rem; }

/* Each slide keeps its natural height; the track grows or shrinks to the slide in view (set in site.js),
   so a short review is not followed by a screenful of empty space. */
.tcarousel__track { align-items: flex-start; transition: height 0.4s var(--ease); }
@media (prefers-reduced-motion: reduce) { .tcarousel__track { transition: none; } }

/* The counter has a fixed width, so the arrows sit in the same place whether it reads "1 / 4" or "10 / 10". */
.tcarousel__count { min-width: 9ch; text-align: center; font-variant-numeric: tabular-nums; }

/* The label column is only as wide as the widest label in its own group (EXTRAS on the homepage,
   ADDITIONAL SERVICE on the Services page), so lists sit close to their labels and still line up. */
@supports (grid-template-columns: subgrid) {
  .services__also-group {
    position: relative;
    margin-top: 3.25rem;
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: 1.625rem;
    row-gap: 1.25rem;
  }
  .services__also-group > .services__also {
    margin-top: 0;
    display: grid;
    grid-template-columns: subgrid;
    grid-column: 1 / -1;
    column-gap: inherit;
  }
  @media (max-width: 680px) {
    .services__also-group { grid-template-columns: 1fr; }
    .services__also-group > .services__also { grid-template-columns: 1fr; }
  }
}

/* Burger / close button: pinned to the top-right corner of the header. It is the same button in both
   states, so the "X" sits exactly where the burger was. The negative margin lines the 24px icon
   (not the 48px touch area) up with the page's right text edge. */
@media (max-width: 1359px) {
  .burger { margin-left: auto; margin-right: -12px; position: relative; z-index: 101; }
}
/* The slide-out menu uses the page gutter on both sides, so its links end on the same right edge as the X. */
@media (max-width: 1359px) {
  .nav { padding: 6rem var(--gutter) 2rem; }
}

/* Insurance intro: the three policy paragraphs and the Atlas banner form one column, centred on the page
   as a whole (this page only; other pages keep their left-aligned reading column). */
.insurance-intro > * { width: min(100%, 41rem); max-width: none; margin-inline: auto; }
.insurance-intro .prose { max-width: none; }
.insurance-intro__banner { width: min(100%, 41rem); height: auto; margin-top: 2.5rem; }

/* Team grid dividers drawn as card borders. They used to be the 1px grid gap showing a background
   colour, which at fractional widths could round to nothing and drop a line. Borders never vanish. */
.team-grid { gap: 0; background: none; }
.team-card { border-top: 0; border-left: 0; }
.team-card:not(:nth-child(3n+1)) { border-left: 1px solid var(--rule-light); }
.team-card:nth-child(n+4) { border-top: 1px solid var(--rule-light); }
@media (max-width: 1080px) {
  .team-card:not(:nth-child(3n+1)) { border-left: 0; }
  .team-card:nth-child(n+4) { border-top: 0; }
  .team-card:nth-child(even) { border-left: 1px solid var(--rule-light); }
  .team-card:nth-child(n+3) { border-top: 1px solid var(--rule-light); }
}
@media (max-width: 680px) {
  .team-card:nth-child(even) { border-left: 0; }
  .team-card:nth-child(n+2) { border-top: 1px solid var(--rule-light); }
}

/* Feature cards: same fix as the team grid. Dividers are card borders, not a 1px gap that can round away. */
.feature__list { gap: 0; background: none; }
.feature__item { border-top: 0; border-left: 0; }
.feature__item:nth-child(even) { border-left: 1px solid var(--rule-light); }
.feature__item:nth-child(n+3) { border-top: 1px solid var(--rule-light); }
@media (max-width: 680px) {
  .feature__item:nth-child(even) { border-left: 0; }
  .feature__item:nth-child(n+2) { border-top: 1px solid var(--rule-light); }
}

/* Reading columns (service pages, privacy, blog articles, 404) are centred on the page as a whole, so
   there is no empty half to the right of the text. The width is fixed in rem and shared by every block
   (paragraphs, headings, lists, images), so they all start on one left edge. It is not "68ch": ch follows
   each element's own font size, which made large headings far wider than the body text. */
.wrap.prose > * { width: min(100%, 41rem); max-width: none; margin-inline: auto; }
.wrap.prose > img { height: auto; }

/* Very small phones: the longest single words ("Maintenance.", "Commercial") must fit the line. */
@media (max-width: 380px) {
  .page-hero__title { font-size: clamp(1.75rem, 9vw, 2.25rem); overflow-wrap: break-word; }
}

/* Closing "Talk to us" band (every page): centred, so it sits under the centred text instead of leaving the
   right half empty. */
.cta .wrap { text-align: center; }
.cta .rule { margin-inline: auto; transform-origin: center; }
.cta .lead { max-width: 56ch; margin-inline: auto; }
.cta .wrap > p:last-child { justify-content: center; }

/* Wider reading column with slightly larger text, so the page uses more of its width but a line still holds
   about 100 characters (the upper end of comfortable reading). The width and the type size are set in one place for every
   text page, blog article and the Insurance intro. */
:root { --prose-w: 60rem; --prose-fs: clamp(1.0625rem, 0.85rem + 0.5vw, 1.3rem); }
.wrap.prose > *, .insurance-intro > *, .insurance-intro__banner { width: min(100%, var(--prose-w)); }
.wrap.prose p, .wrap.prose li, .insurance-intro p { font-size: var(--prose-fs); line-height: 1.75; }
.wrap.prose .lead, .insurance-intro .lead { font-size: clamp(1.25rem, 1rem + 0.6vw, 1.6rem); line-height: 1.6; }
.wrap.prose > img { height: auto; }

/* ---------------------------------------------------------- carousel layout
   Quote and name centred. Previous / next arrows sit on the left and right of the quote, and the
   "n / total" counter is centred underneath. On phones there is no room beside the text, so the arrows
   flank the counter on one row below it. Applies to every carousel (testimonials, Google reviews). */
.testimonial .eyebrow, .google-rating { text-align: center; }
.google-rating { max-width: none; }
.tcarousel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "prev track next" ". count .";
  align-items: center;
  column-gap: clamp(1rem, 3vw, 2.75rem);
  row-gap: 1.5rem;
}
.tcarousel__track { grid-area: track; min-width: 0; }
.tcarousel__ctrl { display: contents; }
.tcarousel__ctrl[hidden] { display: none; }
.tcarousel__btn[data-dir="-1"] { grid-area: prev; }
.tcarousel__btn[data-dir="1"] { grid-area: next; }
.tcarousel__count { grid-area: count; justify-self: center; }
.tcarousel__slide { align-items: center; text-align: center; }
.tcarousel__slide blockquote { margin-inline: auto; text-align: center; }
.tcarousel__slide cite { text-align: center; }
@media (max-width: 700px) {
  .tcarousel { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "track track track" "prev count next"; row-gap: 1.25rem; }
}

/* ============================================================ one design language
   Cards, lists and headings share the same treatment on every page: a short gold bar, hairline borders,
   a gold rule that draws across the top on hover, and the same scroll-in reveal. */

/* 1. Section headings inside text pages get the gold rule used by every other section, drawn in as they appear. */
.wrap.prose:not(.post) > h2::after {
  content: ""; display: block; width: 84px; height: 4px; margin-top: 1.25rem; background: var(--gold);
}
.js .wrap.prose:not(.post) > h2.reveal::after { transform: scaleX(0); transform-origin: left center; transition: transform 0.8s var(--ease) 0.15s; }
.js .wrap.prose:not(.post) > h2.reveal.is-visible::after { transform: scaleX(1); }

/* 2. Bullet lists on text pages become the same tile grid as the feature cards (Project Management, homepage). */
.wrap.prose:not(.post) > ul {
  list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0; border: 1px solid var(--rule-light); background: var(--white);
}
.wrap.prose:not(.post) > ul > li {
  position: relative; margin: 0; padding: 2.75rem 1.625rem 1.625rem; background: var(--white);
  font-size: var(--t-small); line-height: 1.6; color: var(--ink-soft);
  transition: background-color 0.3s var(--ease);
}
.wrap.prose:not(.post) > ul > li::before {          /* the gold bar, as on .feature__item h3 */
  content: ""; position: absolute; left: 1.625rem; top: 1.5rem; width: 26px; height: 3px; background: var(--gold);
}
.wrap.prose:not(.post) > ul > li::after {           /* the rule that draws across on hover, as on .service */
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--gold);
  transform: scaleX(0); transform-origin: left center; transition: transform 0.4s var(--ease);
}
.wrap.prose:not(.post) > ul > li:hover::after { transform: scaleX(1); }
.wrap.prose:not(.post) > ul > li:hover { background: var(--offwhite); }
.wrap.prose:not(.post) > ul > li:nth-child(even) { border-left: 1px solid var(--rule-light); }
.wrap.prose:not(.post) > ul > li:nth-child(n+3) { border-top: 1px solid var(--rule-light); }
.wrap.prose:not(.post) > ul > li:last-child:nth-child(odd) { grid-column: 1 / -1; }   /* no orphan tile */
.wrap.prose:not(.post) > ul > li:last-child:nth-child(odd):not(:first-child) { border-top: 1px solid var(--rule-light); }
@media (max-width: 680px) {
  .wrap.prose:not(.post) > ul { grid-template-columns: 1fr; }
  .wrap.prose:not(.post) > ul > li:nth-child(even) { border-left: 0; }
  .wrap.prose:not(.post) > ul > li:nth-child(n+2) { border-top: 1px solid var(--rule-light); }
}

/* 3. Feature cards and team cards get the same hover as the service cards. */
.feature__item, .team-card { position: relative; transition: background-color 0.3s var(--ease); }
.feature__item::after, .team-card::after {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--gold);
  transform: scaleX(0); transform-origin: left center; transition: transform 0.4s var(--ease); pointer-events: none;
}
.feature__item:hover::after, .team-card:hover::after { transform: scaleX(1); }
.feature__item:hover, .team-card:hover { background: var(--offwhite); }
.feature__item h3, .team-card__name { transition: transform 0.35s var(--ease); }
.feature__item:hover h3, .team-card:hover .team-card__name { transform: translateX(6px); }
@media (prefers-reduced-motion: reduce), (hover: none) {
  .feature__item:hover h3, .team-card:hover .team-card__name { transform: none; }
}
.wrap.prose:not(.post) > ul > li { font-size: clamp(1rem, 0.9rem + 0.25vw, 1.125rem); }

/* ================================================================ one gold
   Small text on light backgrounds used to be a darker, browner gold. That was a second "yellow". It is now
   charcoal, and the gold shows up as a bar in front of the label or an underline beneath the link, so
   there is exactly one gold on the whole site. */
.eyebrow:not(.eyebrow--on-dark) { display: flex; align-items: center; gap: 0.875rem; }
.eyebrow:not(.eyebrow--on-dark)::before { content: ""; flex: none; width: 26px; height: 3px; background: var(--gold); }
.testimonial .eyebrow:not(.eyebrow--on-dark), .cta .eyebrow, .google-rating { justify-content: center; }
.testimonial .eyebrow:not(.eyebrow--on-dark)::after, .cta .eyebrow::after { content: ""; flex: none; width: 26px; height: 3px; background: var(--gold); }
.post a:not(.link-underline), .google-rating a, .split__list a {
  color: var(--charcoal-deep); text-decoration: underline; text-decoration-color: var(--gold);
  text-decoration-thickness: 2px; text-underline-offset: 4px;
}
.post a:not(.link-underline):hover, .google-rating a:hover, .split__list a:hover { text-decoration-color: var(--charcoal-deep); }
.clients-list a:hover { color: var(--charcoal-deep); }
.link-underline:hover { color: var(--charcoal-deep); border-bottom-color: var(--charcoal-deep); }

/* ============================================================== navigation
   Home, Who We Are, Services (a dropdown), More (a dropdown), and the Client Portal as a button on the right.
   Desktop: the dropdowns open on hover, focus or a click on their arrow. Menu: they become expanding lists. */
.nav__list { gap: clamp(1.75rem, 3vw, 3rem); }
.nav__link { font-size: 0.78rem; letter-spacing: 0.12em; background: none; border: 0; cursor: pointer; }
.nav__drop { position: relative; display: flex; align-items: center; }
.nav__drop-btn { display: inline-flex; align-items: center; gap: 0.5rem; }
.nav__toggle {
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: 0.5rem; padding: 0.5rem 0; background: none; border: 0; color: var(--offwhite); cursor: pointer;
}
.nav__chev { transition: transform 0.3s var(--ease); }
.nav__drop.is-open .nav__chev { transform: rotate(180deg); }
/* The gold underline of a tab. A dropdown tab (Services, More) keeps its line on the page you are on; when it opens, a gold line grows out
   from the middle of the tab to the full width of the menu, and only when it has finished does the menu appear underneath it.
   Closing reverses it: the menu fades, then the line draws back to the middle. */
.nav__drop > .nav__link::after { display: none; }
.nav__drop::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: var(--gold);
  transform: scaleX(0); transition: none;
}
.nav__drop.has-current::after { transform: scaleX(1); }

.nav__menu {
  list-style: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); min-width: 17rem; z-index: 120;
  margin-top: -2px;                                  /* the menu's line sits exactly on the tab's underline */
  padding: calc(2px + 0.5rem) 0 0.5rem;
  visibility: hidden; pointer-events: none;
  transition: visibility 0s linear 0.4s;             /* hidden only once the fade and the line have both finished */
}
.nav__menu::before {                                  /* the line: grows from the middle (the middle of the tab) outwards */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--gold);
  transform: scaleX(0); transform-origin: center; transition: transform 0.28s var(--ease) 0.12s;
}
.nav__menu::after {                                   /* the menu's panel, behind its links */
  content: ""; position: absolute; inset: 2px 0 0 0; z-index: -1;
  background: var(--charcoal); border: 1px solid var(--rule-dark); border-top: 0;
  opacity: 0; transition: opacity 0.12s var(--ease);
}
.nav__menu > li { opacity: 0; transition: opacity 0.12s var(--ease); }

.nav__drop.is-open .nav__menu, .nav__drop:focus-within .nav__menu { visibility: visible; pointer-events: auto; transition-delay: 0s; }
.nav__drop.is-open .nav__menu::before, .nav__drop:focus-within .nav__menu::before { transform: scaleX(1); transition: transform 0.28s var(--ease); }
.nav__drop.is-open .nav__menu::after, .nav__drop:focus-within .nav__menu::after { opacity: 1; transition: opacity 0.2s var(--ease) 0.28s; }
.nav__drop.is-open .nav__menu > li, .nav__drop:focus-within .nav__menu > li { opacity: 1; transition: opacity 0.2s var(--ease) 0.28s; }
@media (hover: hover) and (min-width: 1360px) {
  .nav__drop:hover .nav__menu { visibility: visible; pointer-events: auto; transition-delay: 0s; }
  .nav__drop:hover .nav__menu::before { transform: scaleX(1); transition: transform 0.28s var(--ease); }
  .nav__drop:hover .nav__menu::after { opacity: 1; transition: opacity 0.2s var(--ease) 0.28s; }
  .nav__drop:hover .nav__menu > li { opacity: 1; transition: opacity 0.2s var(--ease) 0.28s; }
  .nav__drop:hover .nav__chev { transform: rotate(180deg); }
}
.nav__menu a {
  display: block; padding: 0.8125rem 1.5rem; white-space: nowrap; text-decoration: none; color: var(--offwhite);
  font-family: var(--font-display); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.11em; text-transform: uppercase;
  transition: color 0.25s var(--ease), background-color 0.25s var(--ease), padding-left 0.25s var(--ease);
}
.nav__menu a:hover, .nav__menu a:focus-visible { color: var(--gold); padding-left: 1.875rem; background: rgba(255,255,255,0.04); }
.nav__menu a[aria-current="page"] { color: var(--gold); }
/* Escape closes the menu even while keyboard focus is still inside it. */
.nav__drop[data-esc]:not(.is-open) .nav__menu { visibility: hidden; pointer-events: none; }
.nav__drop[data-esc]:not(.is-open) .nav__menu::before { transform: scaleX(0); }
.nav__drop[data-esc]:not(.is-open) .nav__menu::after, .nav__drop[data-esc]:not(.is-open) .nav__menu > li { opacity: 0; }

/* The Client Portal button: an outline in the logo gold that fills on hover. The arrow marks that it opens
   the portal in a new tab. One copy sits in the header, one at the bottom of the slide-out menu. */
.portal-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.625rem;
  min-height: 48px; padding: 0 1.5rem;
  font-family: var(--font-display); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--gold); text-decoration: none; background: transparent; border: 1.5px solid var(--gold);
  white-space: nowrap; cursor: pointer;
  transition: background-color 0.28s var(--ease), color 0.28s var(--ease), transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
}
.portal-btn:hover, .portal-btn:focus-visible {
  background: var(--gold); color: var(--charcoal-deep); transform: translateY(-2px); box-shadow: 0 10px 22px rgba(227, 178, 97, 0.35);
}
.portal-btn__icon { flex: none; transition: transform 0.28s var(--ease); }
.portal-btn:hover .portal-btn__icon, .portal-btn:focus-visible .portal-btn__icon { transform: translate(2px, -2px); }
.portal-btn--header { justify-self: end; }
.portal-btn--nav { display: none; }

/* Opening hours: one line for the days, one for each part of the day, numbers lined up. */
.hours { font-variant-numeric: tabular-nums; }

@media (max-width: 1359px) {
  .nav { flex-direction: column; align-items: stretch; justify-content: flex-start; }
  .nav__list > li { border-bottom: 1px solid var(--rule-dark); }
  .nav__drop { width: 100%; flex-wrap: wrap; }
  .nav__drop::after { display: none; }
  .nav__drop > a.nav__link { flex: 1 1 auto; }
  .nav__drop-btn { width: 100%; justify-content: space-between; text-align: left; }
  .nav__toggle { width: 48px; margin-left: 0; padding: 0; align-self: stretch; justify-content: flex-end; }
  .nav__menu, .nav__drop.is-open .nav__menu, .nav__drop:focus-within .nav__menu {
    position: static; flex: 1 0 100%; min-width: 0; margin: 0; border: 0; padding: 0 0 0.75rem 1rem; background: none;
    opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition: none; display: none;
  }
  .nav__menu::before, .nav__menu::after { display: none; }      /* the slide-out menu has no animated line or panel: it is a plain list */
  .nav__menu > li, .nav__drop.is-open .nav__menu > li, .nav__drop:focus-within .nav__menu > li { opacity: 1; transition: none; }
  .nav__drop.is-open .nav__menu { display: block; }
  .nav__menu a { padding: 0.75rem 0; font-size: 0.8rem; white-space: normal; letter-spacing: 0.1em; }
  .nav__menu a:hover, .nav__menu a:focus-visible { padding-left: 0.5rem; background: none; }
  .portal-btn--header { display: none; }
  .portal-btn--nav { display: inline-flex; width: 100%; margin-top: 1.75rem; }
}

/* Client list: a name that has its own page is a link; the others (no page on the old site either) are plain
   text. Both have the same height and spacing so the columns stay even. */
.clients-list li { padding: 0; }
.clients-list__name {
  display: flex; align-items: center; min-height: 44px; padding: 0.6875rem 0;
  font-size: var(--t-small); color: var(--charcoal-deep);
}
/* Names without a page are a shade quieter than the ones you can click. */
.clients-list__name { color: var(--ink-soft); }

/* Statistics band: four equal cells, and in each one the number and its label are centred horizontally and vertically.
   Horizontally: the trailing letter-spacing of each line is given back as padding, so the text is centred by what you see
   (its ink), not by a box a few pixels wider than the letters. Vertically: the number's line box is as tall as its digits
   and the label's as tall as its capitals, so the padding above the digits and below the label can be made equal. */
.stat, .stat:first-child {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; text-align: center;
  padding: clamp(2.75rem, 5vw, 4.25rem) clamp(1rem, 2vw, 2rem);
}
.stat__num { line-height: 0.72; padding-right: 0.04em; margin-top: 0.02em; }       /* tracked -0.04em */
.stat__label { line-height: 1; padding-left: 0.22em; margin-top: 1.125rem; margin-bottom: -0.13em; }   /* tracked +0.22em */

/* Up to tablet width the four cells become a 2 x 2 grid, so the longest label ("Years of experience") fits on one line. */
@media (max-width: 1000px) {
  .stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(odd)  { border-left: 0; }
  .stat:nth-child(even) { border-left: 1px solid rgba(42, 42, 42, 0.22); }
  .stat:nth-child(-n+2) { border-bottom: 1px solid rgba(42, 42, 42, 0.22); }
}
/* On phones that label still needs two lines, so every label reserves two: all four cells stay identical. */
@media (max-width: 560px) { .stat__label { min-height: 2em; } }
