/* ==========================================================================
   MLC Architecture P.C. — design system
   Traditional practice: cream paper, warm ink, Cinzel headings and labels,
   Montserrat Light copy,
   full-bleed imagery, hairline rules, an ink header and dark surfaces, and the
   logo's blue kept to small details: labels, link rules, focus rings.
   ========================================================================== */

/* ---------- webfonts (self-hosted; see assets/fonts/) ----------
   Both families are variable fonts, so one file per subset covers every weight
   we use. Latin loads for nearly every visitor; latin-ext is fetched only when
   a glyph in its range actually appears. */
@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../assets/fonts/cinzel-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../assets/fonts/cinzel-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 300 400;
  font-display: swap;
  src: url("../assets/fonts/montserrat-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 300 400;
  font-display: swap;
  src: url("../assets/fonts/montserrat-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --paper: #faf8f3;
  --paper-2: #f2eee5;
  --paper-3: #e7e1d5;
  --ink: #2c2a26;
  --ink-2: #46433d;
  --ink-3: #66625a;
  --ink-4: #85807a;
  --line: #d8d0c2;
  --line-soft: rgba(44, 42, 38, 0.13);
  --accent: #1a4d85;
  --accent-dark: #15406f;
  /* a lighter tint of the accent, for accents on dark surfaces */
  --accent-light: #8fb0d6;
  /* the accent as a surface (blue tiles); --accent itself is re-pointed to --accent-light inside them */
  --surface-blue: var(--accent);
  --error-light: #ffb4a8;
  --deep: #24221f;
  /* text on dark surfaces (ink, deep, accent): primary, secondary, tertiary */
  --on-dark: var(--paper);
  --on-dark-2: rgba(250, 248, 243, 0.92);
  --on-dark-3: rgba(250, 248, 243, 0.8);
  --error: #9d3b2f;

  --font-display: "Cinzel", "Times New Roman", Georgia, serif;
  --font-label: "Cinzel", "Times New Roman", Georgia, serif;
  --font-serif: var(--font-display);
  --font-sans: "Montserrat", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1240px;
  --wrap-narrow: 860px;
  --gutter: clamp(20px, 5vw, 40px);
  --mat: 0.5rem; /* paper mat round the hero and feature rows; 1vw from 900px */
  --section: clamp(64px, 8.5vw, 128px);
  /* phone logo: 80% of the width that just clears the burgers (the file's ink
     is 841 of 900px wide; 9rem = two gutters + two burgers) */
  --logo-h: min(141px, calc((100vw - 9rem) * 0.429));
  --header-h: calc(var(--logo-h) + 1rem); /* phone bar hugs the logo; 84px from 900px, where the logo sets the height */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  /* The logo file carries more transparent margin under the wordmark than above
     the monogram, so its optical middle sits this fraction of its height above
     the middle of its box. Anything aligned to the logo has to allow for it. */
  --logo-skew: 0.033;
  --border: 1px;
  /* Tracking for spaced capitals (nav, labels, buttons, brand text). Matches
     the logo wordmark, which is set nearly solid. */
  --track: 0.05em;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-anchor: none;
}
img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
address { font-style: normal; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- typography ---------- */
.display, .h1, .h2, .h3, .h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: 0.002em;
  text-wrap: balance;
  color: var(--ink);
}
.display { font-size: clamp(2.6rem, 6.4vw, 5.2rem); line-height: 1.04; }
.h1 { font-size: clamp(2.3rem, 5vw, 4rem); }
.h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
.h3 { font-size: clamp(1.45rem, 2.1vw, 1.95rem); line-height: 1.2; }
.h4 { font-size: 1.2rem; line-height: 1.3; }

.lead { font-size: clamp(1.02rem, 1.1vw, 1.12rem); line-height: 1.72; color: var(--ink-2); text-wrap: pretty; }
.body { font-size: 0.97rem; line-height: 1.78; color: var(--ink-2); text-wrap: pretty; }
.body + .body, .lead + .body, .lead + .lead { margin-top: 1.1em; }
.upper { text-transform: uppercase; }
.measure { max-width: 60ch; }
.measure-narrow { max-width: 42ch; }
.center { text-align: center; }
.center .measure, .center .measure-narrow { margin-inline: auto; }

/* eyebrow: small, tracked, sentence of one or two words */
.label {
  font-family: var(--font-label);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.6;
}
.label .idx { color: inherit; }
.label + .h1, .label + .h2, .label + .h3, .label + .display { margin-top: 0.9rem; }

/* ---------- layout ---------- */
.container { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.container--narrow { max-width: calc(var(--wrap-narrow) + var(--gutter) * 2); }
.container--full { max-width: none; padding-left: 0; padding-right: 0; }
.section { padding-top: var(--section); padding-bottom: var(--section); position: relative; }
.section--tight { padding-top: calc(var(--section) * 0.55); padding-bottom: calc(var(--section) * 0.55); }
.section--flush-top { padding-top: 0; }
.section--flush-bottom { padding-bottom: 0; }

.rule { height: var(--border); background: var(--line-soft); border: 0; margin: 0; }

.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(20px, 3vw, 44px); row-gap: 2.5rem; }
.col-12 { grid-column-end: span 12; }
@media (min-width: 900px) {
  .md\:col-3 { grid-column-end: span 3; }
  .md\:col-4 { grid-column-end: span 4; }
  .md\:col-5 { grid-column-end: span 5; }
  .md\:col-6 { grid-column-end: span 6; }
  .md\:col-7 { grid-column-end: span 7; }
  .md\:col-8 { grid-column-end: span 8; }
  .md\:col-9 { grid-column-end: span 9; }
  .md\:col-10 { grid-column-end: span 10; }
  .md\:start-2 { grid-column-start: 2; }
  .md\:start-4 { grid-column-start: 4; }
  .md\:start-5 { grid-column-start: 5; }
  .md\:start-6 { grid-column-start: 6; }
  .md\:start-7 { grid-column-start: 7; }
}

/* centred section header, the way a traditional practice sets one */
.section-head { max-width: 46rem; margin-inline: auto; text-align: center; margin-bottom: clamp(2.75rem, 5vw, 4.5rem); }
.section-head .lead, .section-head .body { margin-top: 1.1rem; }
.section-head--left { margin-inline: 0; text-align: left; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.7rem;
  padding: 0.95rem 1.9rem;
  font-family: var(--font-label); font-size: 0.7rem; font-weight: 600; letter-spacing: var(--track); text-transform: uppercase;
  border-radius: 0; border: var(--border) solid transparent; line-height: 1.2;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease);
  text-align: center;
}
.btn .arrow { display: inline-block; transition: transform 0.45s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
/* primary action is the logo blue; it deepens on hover */
.btn--brand { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.btn--brand:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn--block { display: flex; width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn-row--center { justify-content: center; }

/* understated text link */
.link {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--font-label); font-size: 0.7rem; font-weight: 600; letter-spacing: var(--track); text-transform: uppercase;
  color: var(--ink); border-bottom: var(--border) solid var(--accent); padding-bottom: 0.35em;
  transition: color 0.3s var(--ease);
}
.link:hover { color: var(--accent); }
.link .arrow { transition: transform 0.45s var(--ease); }
.link:hover .arrow { transform: translateX(4px); }

/* ---------- header ---------- */
.header {
  --hd-bg: var(--ink); --hd-line: rgba(250, 248, 243, 0.12); --hd-text: var(--on-dark); --hd-text-2: var(--on-dark); --hd-text-3: var(--on-dark-3); --hd-rule: var(--accent-light);
}
.header { position: sticky; top: 0; z-index: 100; background: var(--hd-bg); border-bottom: var(--border) solid var(--hd-line); transition: box-shadow 0.4s var(--ease); }
.header.is-scrolled { box-shadow: 0 1px 18px rgba(20, 18, 15, 0.28); }
.header :focus-visible { outline-color: var(--paper); }
.header__inner {
  max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto;
  padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--header-h); gap: 0; /* the logo file has its own side margin */
}

/* brandmark: the logo carries the wordmark */
.brandmark { display: inline-block; line-height: 1.1; }
.header .brandmark { text-align: center; }
.header .brandmark__logo {
  height: var(--logo-h); width: auto; margin-inline: auto;
  transition: height 0.45s var(--ease);
}
.brandmark__text { font-family: var(--font-serif); font-size: clamp(1.15rem, 2.4vw, 1.6rem); font-weight: 500; letter-spacing: var(--track); text-transform: uppercase; display: block; }
.brandmark__text small { display: block; font-family: var(--font-label); font-weight: 500; font-size: 0.56rem; letter-spacing: var(--track); color: var(--ink-3); margin-top: 0.5em; text-transform: uppercase; }
.brandmark__mark { display: none; }

.nav { display: none; align-items: flex-end; gap: clamp(1.5rem, 2.6vw, 2.6rem); }
.nav a { font-size: 0.82rem; color: var(--ink-2); padding: 0.35rem 0; position: relative; transition: color 0.3s var(--ease); }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease); }
.nav a:hover { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after, .nav a.is-section::after { transform: scaleX(1); }
.nav a[aria-current="page"], .nav a.is-section { color: var(--ink); }
.header .nav a { font-family: var(--font-label); font-size: clamp(1.15rem, 1.45vw, 1.4rem); font-weight: 600; letter-spacing: var(--track); text-transform: uppercase; color: var(--hd-text); }
.header .nav a::after { background: var(--hd-rule); }

/* section nav, sitting under the brandmark; collapses on scroll */
.subnav { display: none; overflow: hidden; max-height: 4rem; opacity: 1; transition: max-height 0.45s var(--ease), opacity 0.3s var(--ease); }
.subnav__inner {
  max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto;
  padding: 0 var(--gutter) 0.6rem;
  display: flex; justify-content: center; gap: clamp(1.5rem, 3vw, 2.75rem);
}
.subnav a { font-family: var(--font-label); font-size: 1rem; font-weight: 500; letter-spacing: var(--track); text-transform: uppercase; color: var(--hd-text-3); padding: 0.25rem 0; position: relative; transition: color 0.3s var(--ease); }
.subnav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--hd-rule); transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease); }
.subnav a:hover { color: var(--hd-text); }
.subnav a:hover::after, .subnav a[aria-current="page"]::after { transform: scaleX(1); }
.subnav a[aria-current="page"] { color: var(--hd-text); }

.menu-btn { display: inline-flex; align-items: center; gap: 0.65rem; font-family: var(--font-label); font-size: 1.15rem; font-weight: 500; letter-spacing: var(--track); text-transform: uppercase; color: var(--hd-text-2); justify-self: end; }
/* phones: logo centred in the bar, burger pinned to the right edge */
@media (max-width: 899.98px) {
  .header__inner { position: relative; justify-content: center; }
  .menu-btn { position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%); }
}
.menu-btn__icon { width: 44px; height: 22px; position: relative; display: block; }
/* the logo takes the room on phones: the label is read out, not shown */
.menu-btn { padding-block: 0.75rem; }
.menu-btn__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.menu-btn__icon::before, .menu-btn__icon::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; transition: transform 0.4s var(--ease), top 0.4s var(--ease); }
.menu-btn__icon::before { top: 0; } .menu-btn__icon::after { top: 21px; }
.menu-open .menu-btn__icon::before { top: 10.5px; transform: rotate(45deg); }
.menu-open .menu-btn__icon::after { top: 10.5px; transform: rotate(-45deg); }

@media (min-width: 900px) {
  .header__inner {
    display: grid; grid-template-columns: 1fr auto 1fr;
    align-items: center; justify-items: center;
    column-gap: clamp(1.5rem, 4vw, 3.5rem);
    padding-top: 1.15rem; padding-bottom: 0.85rem;
    /* height comes from the logo and padding, so the bar shrinks with the logo */
    min-height: 0;
    transition: padding 0.45s var(--ease);
  }
  /* lift the nav by the logo's own skew to land the links on its optical middle */
  .nav {
    display: flex;
    transform: translateY(calc(-1 * var(--logo-h) * var(--logo-skew)));
    transition: transform 0.45s var(--ease);
  }
  .nav--left { justify-self: start; }
  .nav--right { justify-self: end; }
  .menu-btn { display: none; }
  .subnav { display: block; }
  /* pages with a section nav: tuck it up under the logo row */
  .header__inner:has(+ .subnav) { padding-bottom: 0.15rem; }

  :root { --header-h: 84px; }
  .header { --logo-h: clamp(165px, 16vw, 210px); }
  /* condensed (always, on every page but home): the bar shrinks to the logo; the section nav stays, tucked up under it */
  .header.is-condensed .header__inner { padding-top: 0.6rem; padding-bottom: 0.6rem; }
  .header.is-condensed { --logo-h: clamp(91px, 8.34vw, 113px); }
  .header.is-condensed .header__inner:has(+ .subnav) { padding-bottom: 0.15rem; }
  /* with a section nav the condensed bar is taller than the logo row, so drop
     the links by half the extra to centre them on the whole bar: the extra is
     the subnav (1rem link at body line-height 1.65, 0.25rem padding each side,
     0.6rem under) less the row's uneven padding (0.6rem top, 0.15rem bottom) */
  .header.is-condensed .header__inner:has(+ .subnav) .nav {
    transform: translateY(calc(-1 * var(--logo-h) * var(--logo-skew) + (1.65rem + 0.5rem + 0.6rem - 0.45rem) / 2));
  }
}

@media (prefers-reduced-motion: reduce) {
  .header .brandmark__logo, .header .nav, .subnav, .header__inner { transition: none; }
}

/* mobile overlay menu */
.menu { position: fixed; inset: 0; z-index: 90; background: var(--paper); color: var(--ink); display: flex; flex-direction: column; padding: calc(var(--header-h) + 1rem) var(--gutter) 1.5rem; transform: translateY(-100%); transition: transform 0.55s var(--ease); visibility: hidden; overflow-y: auto; }
.menu-open .menu { transform: translateY(0); visibility: visible; }
.menu-open { overflow: hidden; }
.menu__list { display: flex; flex-direction: column;
  /* type as big as fits one screen: the list is 11.7em tall (6 links, 2 group
     heads, their gaps), so the size is what's left under the bar over 11.7 */
  font-size: min(12.5vw, 3.6rem, calc((100vh - var(--header-h) - 2.5rem - 6px) / 11.7)); }
@supports (height: 100svh) { .menu__list { font-size: min(12.5vw, 3.6rem, calc((100svh - var(--header-h) - 2.5rem - 6px) / 11.7)); } }
.menu__list a { display: block; font-family: var(--font-serif); font-size: 1em; font-weight: 500; line-height: 1.2; padding: 0.153em 0; border-bottom: var(--border) solid var(--line-soft); }
.menu__list a .idx { display: none; }
.menu__list a[aria-current="page"] { color: var(--accent); }
.menu__grp { padding-top: 0.444em; }
.menu__grp:first-child { padding-top: 0; }
.menu__grp-head { font-family: var(--font-label); font-size: 0.472em; line-height: 1.65; font-weight: 500; letter-spacing: var(--track); text-transform: uppercase; color: var(--ink-3); padding-bottom: 0.235em; }
/* label / value pairs in two aligned columns (opening hours on the contact page) */
.pairs { display: inline-grid; grid-template-columns: auto auto; column-gap: 1.25rem; text-align: left; font-variant-numeric: tabular-nums; }
.pairs > :nth-child(odd) { color: var(--ink-3); }
@media (min-width: 900px) { .menu { display: none; } }

/* ---------- hero (home): framed slideshow ----------
   Set in the same paper mat (--mat) as the feature rows below (the rows' own
   top padding is the gap underneath). It fills the width and the viewport
   below the sticky header (js/main.js measures that into --hero-offset;
   without JS it falls back to the 192px mobile bar plus its rule), trimming
   sky and lawn to fit. On narrow screens it stops at 3:2 rather than going
   tall, so phones show the whole house instead of a slice of it. svh keeps
   mobile browser toolbars from pushing it past the fold. */
.hero { --interval: 6s; --hero-room: calc(100vh - var(--hero-offset, calc(var(--header-h) + var(--border))) - 2 * var(--mat)); position: relative; overflow: hidden; color: var(--paper); background: var(--deep); aspect-ratio: 3 / 2; width: calc(100% - 2 * var(--mat)); max-height: var(--hero-room); margin: var(--mat) auto 0; }
@supports (height: 100svh) { .hero { --hero-room: calc(100svh - var(--hero-offset, calc(var(--header-h) + var(--border))) - 2 * var(--mat)); } }
.hero__bg { position: absolute; inset: 0; }
/* no text over the photos any more, so only a light foot to lift the
   controls, plus soft shading at each side behind the prev / next arrows */
.hero__bg::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background:
  linear-gradient(to top, rgba(26,24,21,0.6) 0%, rgba(26,24,21,0) 35%),
  linear-gradient(to right, rgba(26,24,21,0.5) 0%, rgba(26,24,21,0) 15%, rgba(26,24,21,0) 85%, rgba(26,24,21,0.5) 100%); }
/* Crossfade: the incoming slide fades in on top while the outgoing one holds
   underneath, then drops out once the fade is done, so there's no dip to the
   background mid-change. visibility keeps hidden slides out of the a11y tree. */
.slide { position: absolute; inset: 0; margin: 0; z-index: 0; opacity: 0; visibility: hidden; transition: opacity 0s 1.2s, visibility 0s 1.2s; }
.slide.is-active { z-index: 1; opacity: 1; visibility: visible; transition: opacity 1.2s var(--ease); }
.slide img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); }

.hero :focus-visible { outline-color: var(--accent-light); }

/* foot: a row of tiles, one per slide, centred over the Scroll link */
/* phones: tabs only, low on the photo; swiping down needs no Scroll prompt */
.hero__foot { position: absolute; z-index: 3; left: var(--gutter); right: var(--gutter); bottom: 0.25rem; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; pointer-events: none; }
.hero__foot > * { pointer-events: auto; }

/* tiles: short dashes with a taller hit area (24px wide at least, so they
   stay tappable on a phone, shrinking a touch rather than wrapping on the
   narrowest ones); the current one is bright, the rest dim.
   The active tile also runs an invisible fill over the interval, and the end
   of that animation is what advances the show (see js/main.js), so pausing
   the animation pauses the timer. */
/* prev / next arrows over the photo: the Featured page's plain arrows,
   larger and stroked heavier (the arrow glyph comes from a system font, so
   font-weight can't be relied on), in paper with a soft shadow so they read
   on any picture */
.hero__arrow { position: absolute; z-index: 3; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 3.5rem; height: 3.5rem; padding: 0; border: 0; background: none; font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1; -webkit-text-stroke: 1.25px currentColor; color: var(--paper); text-shadow: 0 1px 6px rgba(26,24,21,0.6); cursor: pointer; transition: color 0.3s var(--ease); }
.hero__arrow[hidden] { display: none; }
.hero__arrow--prev { left: 0.5rem; }
.hero__arrow--next { right: 0.5rem; }
.hero__arrow:hover { color: var(--accent-light); }
.hero__arrow .arrow { transition: transform 0.45s var(--ease); }
.hero__arrow--next:hover .arrow { transform: translateX(4px); }
.hero__arrow--prev:hover .arrow { transform: translateX(-4px); }
@media (min-width: 900px) { .hero__arrow { width: 4.5rem; height: 4.5rem; } .hero__arrow--prev { left: 1.5rem; } .hero__arrow--next { right: 1.5rem; } }
.hero__tabs { display: flex; justify-content: center; width: 100%; }
.hero__tabs[hidden] { display: none; }
.hero__tab { position: relative; flex: 0 1 2.25rem; min-width: 0; height: 2.25rem; }
.hero__tab::before, .hero__tab::after { content: ""; position: absolute; left: 0.2rem; right: 0.2rem; top: 50%; height: 3px; margin-top: -1.5px; background: var(--paper); }
.hero__tab::before { opacity: 0.35; transition: opacity 0.4s var(--ease); }
.hero__tab:hover::before { opacity: 0.65; }
.hero__tab[aria-current="true"]::before { opacity: 1; }
.hero__tab::after { opacity: 0; }
.hero__tab.is-running::after { animation: hero-fill var(--interval) linear forwards; }
.hero.is-paused .hero__tab::after { animation-play-state: paused; }
@keyframes hero-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (min-width: 900px) { .hero__tab { flex-basis: 3rem; } .hero__tab::before, .hero__tab::after { left: 0.35rem; right: 0.35rem; } .hero__foot { bottom: clamp(1rem, 3vh, 2rem); } }


/* no autoplay, instant swaps; the tiles still work */
@media (prefers-reduced-motion: reduce) {
  .slide, .slide.is-active { transition: none; }
  .hero__tab.is-running::after { animation: none; }
}

/* ---------- gallery (all page): a row of category filters over a grid of
   project cards, one to three across. Without JS the filter links reload the
   page with ?category= and every card shows; js/main.js filters in place. */
.gallery { scroll-margin-top: calc(var(--header-h) + var(--border)); padding-top: clamp(1.25rem, 2vw, 1.75rem); }
.filter { margin-bottom: clamp(2rem, 4vw, 3rem); }
.filter__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.35rem clamp(1.1rem, 2.5vw, 2rem); list-style: none; margin: 0; padding: 0; }
.filter__list a { display: inline-block; padding: 0.35rem 0; font-family: var(--font-label); font-size: 1rem; font-weight: 500; letter-spacing: var(--track); text-transform: uppercase; color: var(--ink-3); border-bottom: var(--border) solid transparent; transition: color 0.3s, border-color 0.3s; }
.filter__list a:hover { color: var(--ink); }
.filter__list a[aria-current="true"] { color: var(--ink); border-bottom-color: var(--accent); }
@media (max-width: 899.98px) { .filter__list a { font-size: 1.15rem; } }
.shots { display: grid; grid-template-columns: 1fr; gap: clamp(6px, 0.8vw, 12px); }
.shot { margin: 0; position: relative; }
.shot[hidden] { display: none; }
/* Title sits on the picture: a blue wash that fades in on hover or keyboard
   focus. Clicks pass through to the project link underneath. */
.shot figcaption { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 0.2rem; padding: 1rem; text-align: center; background: color-mix(in srgb, var(--accent) 84%, transparent); opacity: 0; transition: opacity 0.35s var(--ease); pointer-events: none; }
.shot:hover figcaption, .shot:focus-within figcaption { opacity: 1; }
.shot figcaption .label { color: var(--on-dark-2); }
.shot__title { font-family: var(--font-label); font-size: 0.95rem; font-weight: 500; letter-spacing: var(--track); text-transform: uppercase; color: var(--paper); }
/* No hover on touch screens: keep the title showing as a strip along the bottom */
@media (hover: none) {
  .shot figcaption { inset: auto 0 0; padding: 0.6rem 1rem; opacity: 1; }
}
@media (min-width: 640px) { .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .shots { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- showcase: one project at a time, stepped by hand ----------
   Every project is in the markup and they simply stack without JS; js/main.js
   hides all but one, un-hides the Previous / Next arrows and moves them
   into the open project, where they sit either side of the picture: the
   project is a three-column grid, the picture in the middle and the arrows'
   bar laid over the whole row with the same columns, each arrow hugging the
   picture's edge however wide the side column is. --side is each arrow's
   box and the least each side column gets. --stage-h is
   the height left under the header (measured by js/main.js into
   --hero-offset), the paddings, heading and slider (5.5rem). The section
   fills that room exactly, so the footer starts at the bottom edge of a
   desktop screen and the whole project is the first view: the picture
   is 3:2 when there's room and, when there isn't, keeps its height to that
   and stays up to twice as wide as it is tall, cropping top and bottom
   rather than shrinking. */
.showcase { display: flex; flex-direction: column; justify-content: center; --side: clamp(2rem, 6vw, 4.5rem); --pad: clamp(1.25rem, 2vw, 1.75rem); --room: calc(100svh - var(--hero-offset, calc(var(--header-h) + var(--border)))); --stage-h: max(15.5rem, calc(var(--room) - 5.5rem - 2 * var(--pad))); min-height: var(--room); --stage-w: min(100% - var(--side) * 2, 1120px, var(--stage-h) * 2); padding-block: var(--pad); }
.project { display: grid; grid-template-columns: minmax(0, 1fr) var(--stage-w) minmax(0, 1fr); scroll-margin-top: calc(var(--header-h) + var(--border)); }
.project > * { grid-column: 1 / -1; }
.project:not([hidden]) + .project:not([hidden]) { margin-top: var(--section); }
.project[hidden] { display: none; }
.project.is-entering > :not(.showcase__nav) { animation: project-in 0.7s var(--ease) both; }
@keyframes project-in { from { opacity: 0; transform: translateY(10px); } }
/* town and name share one line, so every project's head is the same height
   with or without a town, and the picture sits at the same place */
.project__head { max-width: 64rem; margin: 0 auto 0.35rem; display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; column-gap: 0.5em; text-align: center; font-size: 1.3rem; }
.project__head .label + .h1 { margin-top: 0; }
.project__head .label { font-size: inherit; line-height: 1.12; }
.project__head .label::after { content: "\2013"; margin-left: 0.5em; color: var(--ink-3); }
.project__head .h1 { font-size: inherit; letter-spacing: var(--track); text-transform: uppercase; } /* set like the Featured / All subnav, a size up */
.project__title { color: inherit; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.45s var(--ease); }
.project__title:hover, .project__title:focus-visible { background-size: 100% 1px; }
.project .compare { grid-column: 2; grid-row: 2; }
.project .compare__stage { width: 100%; max-height: var(--stage-h); }

.showcase__nav { grid-row: 2; display: grid; grid-template-columns: minmax(0, 1fr) var(--stage-w) minmax(0, 1fr); align-items: center; pointer-events: none; }
.showcase__nav [data-showcase-prev] { grid-column: 1; justify-self: end; margin-right: clamp(0.25rem, 1vw, 0.75rem); }
.showcase__nav [data-showcase-next] { grid-column: 3; justify-self: start; margin-left: clamp(0.25rem, 1vw, 0.75rem); }
.showcase__nav[hidden] { display: none; }
.showcase__btn { pointer-events: auto; display: grid; place-items: center; width: var(--side); height: var(--side); font-size: clamp(1.25rem, 2vw, 1.6rem); color: var(--ink-2); transition: color 0.3s var(--ease); }
.showcase__btn:hover { color: var(--accent); }
.showcase__btn .arrow { transition: transform 0.45s var(--ease); }
.showcase__btn:hover .arrow { transform: translateX(4px); }
.showcase__btn[data-showcase-prev]:hover .arrow { transform: translateX(-4px); }
/* phone and tablet (the burger-menu widths): no room for arrows beside the
   picture, so the picture spans the gutters at 4:3, the town sits over a
   larger name, the slider gets a thumb-sized handle, and the arrows drop
   under the picture to either edge. The page
   is at least the screen's height, so the footer sits on the bottom edge,
   and the project is centred in the room between header and footer. */
@media (max-width: 899.98px) {
  body:has(.showcase) { min-height: 100svh; display: flex; flex-direction: column; }
  body:has(.showcase) > main { flex: 1 0 auto; display: flex; flex-direction: column; justify-content: center; }
  .showcase { --stage-w: 100%; padding-block: 1.75rem; }
  .project { grid-template-columns: minmax(0, 1fr); }
  .project__head { flex-direction: column; align-items: center; margin-bottom: 1.1rem; }
  .project__head .label { font-size: 0.95rem; }
  .project__head .label::after { content: none; }
  .project__head .h1 { font-size: clamp(1.4rem, 5.5vw, 1.75rem); line-height: 1.25; margin-top: 0.35rem; text-wrap: wrap; }
  .project .compare { grid-column: 1; }
  .project .compare__stage { aspect-ratio: 4 / 3; max-height: none; }
  .project .compare__bar { margin-bottom: 0.5rem; }
  .project .compare__end { font-size: 0.9rem; }
  .project .compare__range { --thumb: 1.75rem; height: 2.5rem; }
  .showcase__nav { grid-row: 3; grid-template-columns: auto 1fr auto; margin-top: 0.75rem; pointer-events: auto; }
  .showcase__nav [data-showcase-prev], .showcase__nav [data-showcase-next] { justify-self: auto; margin: 0; }
  .showcase__btn { width: 3rem; height: 3rem; font-size: 1.75rem; }
}

/* ---------- project page: one project post ----------
   The title over a rule (About's intro), then the primary picture at full
   width and its own shape, then the rest two across at 3:2. Every photo is a
   lightbox link, so a click steps through the whole set. Previous / Next
   arrows sit beside the title and walk the project list. */
.project-page { padding-top: clamp(1.25rem, 2vw, 1.75rem); }
.project-page .firm-intro { max-width: 1040px; margin: 0 auto clamp(1.25rem, 2.5vw, 2rem); }
.plates { max-width: 1040px; margin-inline: auto; display: grid; grid-template-columns: 1fr; gap: clamp(6px, 0.8vw, 12px); }
.plate { display: block; overflow: hidden; background: var(--paper-3); cursor: zoom-in; }
.plate img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* a sketch-reveal video can lead instead of a photo: it plays once (js/main.js) and is not a lightbox link */
.plate--video { position: relative; aspect-ratio: 16 / 9; cursor: auto; }
.plate--video video { display: block; width: 100%; height: 100%; object-fit: cover; }
/* town, small, centred over the title */
.project-page .label { text-align: center; margin-bottom: 0.4rem; }
@media (min-width: 640px) {
  .plates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plate--lead { grid-column: 1 / -1; }
}
/* prev / next: bare stroked arrows (the home carousel's shape) either side of
   the title's first line; the title is padded so long names clear them */
.project-title { position: relative; max-width: 1040px; margin-inline: auto; }
.project-title .firm-intro { padding-inline: 3rem; }
.project-pager { position: absolute; top: 0; left: 0; right: 0; height: 1.35em; font-size: clamp(1.25rem, 2.2vw, 1.75rem); display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.project-pager__arrow { pointer-events: auto; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1; -webkit-text-stroke: 1px currentColor; color: var(--ink); transition: color 0.3s var(--ease); }
.project-pager__arrow[rel="next"] { margin-left: auto; }
.project-pager__arrow:hover { color: var(--accent); }
.project-pager__arrow .arrow { transition: transform 0.45s var(--ease); }
.project-pager__arrow[rel="prev"]:hover .arrow { transform: translateX(-4px); }
.project-pager__arrow[rel="next"]:hover .arrow { transform: translateX(4px); }

/* ---------- before / after comparison ----------
   The after photo sits underneath; the before layer on top is cropped at
   --pos, so after shows left of the divider and before to the right.
   touch-action: pan-y leaves vertical swipes to scroll the page.
   JS sets --k (0 = all after, 1 = all before); --pos is derived from it,
   running from the right edge (all after) to the left edge (all before).
   Above the picture, the range input is drawn as a slider bar that moves
   with the divider and carries keyboard and screen-reader use. It overhangs
   the picture by half a thumb each side, so the thumb's centre sits right
   over the divider; the track's drawn line is inset to the picture's
   width, and its fill runs from the thumb's centre to the right end.
   Self-contained, so it can become a block pattern or shortcode. */
.compare { --k: 0.5; --pos: calc(var(--k) * 100%); margin: 0; }
.compare__stage { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--paper-3); cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--obj, 50% 50%); pointer-events: none; -webkit-user-drag: none; }
.compare__before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
/* stand-in until the real before photo arrives: the after shot, washed out */
.compare__before.is-placeholder img { filter: grayscale(1) sepia(0.2) contrast(0.8) brightness(1.08); }
.compare__handle { position: absolute; inset: 0; pointer-events: none; }
.compare__handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--pos) - 0.5px); width: 1px; background: var(--paper); box-shadow: 0 0 8px rgba(16, 21, 27, 0.35); }

.compare__bar { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 0.25rem; }
.compare__bar[hidden] { display: none; }
.compare__end:last-child { justify-self: end; }
.compare__end { font-family: var(--font-label); font-size: 0.72rem; letter-spacing: var(--track); text-transform: uppercase; color: var(--ink-3); }
.compare__range { --thumb: 1.1rem; --fill: calc(var(--thumb) / 2 + (100% - var(--thumb)) * var(--k)); --track-bg: linear-gradient(to right, transparent calc(var(--thumb) / 2), var(--accent) 0 var(--fill), var(--line) 0 calc(100% - var(--thumb) / 2), transparent 0); -webkit-appearance: none; appearance: none; grid-column: 1 / -1; order: 1; display: block; width: calc(100% + var(--thumb)); height: 1.5rem; margin: 0 calc(var(--thumb) / -2); background: transparent; cursor: pointer; }
.compare__range:focus-visible { outline: none; }
.compare__range::-webkit-slider-runnable-track { height: 2px; background: var(--track-bg); }
.compare__range::-webkit-slider-thumb { -webkit-appearance: none; box-sizing: border-box; width: var(--thumb); height: var(--thumb); margin-top: calc(1px - var(--thumb) / 2); border: 1.5px solid var(--accent); border-radius: 50%; background: var(--paper); transition: transform 0.3s var(--ease); }
.compare__range:hover::-webkit-slider-thumb, .compare__range:active::-webkit-slider-thumb { transform: scale(1.15); }
.compare__range:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--accent); outline-offset: 2px; }
.compare__range::-moz-range-track { height: 2px; background: var(--track-bg); }
.compare__range::-moz-range-thumb { box-sizing: border-box; width: var(--thumb); height: var(--thumb); border: 1.5px solid var(--accent); border-radius: 50%; background: var(--paper); transition: transform 0.3s var(--ease); }
.compare__range:hover::-moz-range-thumb, .compare__range:active::-moz-range-thumb { transform: scale(1.15); }
.compare__range:focus-visible::-moz-range-thumb { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .project.is-entering { animation: none; }
  .compare__range::-webkit-slider-thumb { transition: none; }
  .compare__range::-moz-range-thumb { transition: none; }
}

/* ---------- firm pages (About, Services, Contact) ----------
   No page head: the subnav names the page. Layout is in the one-screen
   block further down. */
.firm .container { max-width: calc(66rem + var(--gutter) * 2); }
/* the subnav only shows from 900px, so below that the page names itself, centred over the intro */
.firm__title { margin-bottom: -1rem; font-size: 0.85rem; text-align: center; }
@media (min-width: 900px) { .firm__title { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; } }

/* ---------- firm pages on one screen (About, Services, Contact) ----------
   From 1100px each page is the viewport minus the header (js/main.js
   measures it into --hero-offset), with its content centred in it, so the
   footer starts at the fold. Each opens with a dark band holding the page's
   statement, then columns beneath. Below 1100px everything stacks in
   normal flow. */
.fit { padding-block: clamp(1.5rem, 4vw, 3rem) var(--section); }
.firm-grid { display: grid; gap: 2.5rem; }
.firm-col .h3 { margin-top: 0.7rem; }
.firm-col .h3 + .body { margin-top: 1rem; }
.firm-band { padding: clamp(2rem, 5vw, 3rem); background: var(--deep); color: var(--paper); }
.firm-band .h2 { margin-top: 0.7rem; color: var(--on-dark); }
.firm-band .label { color: var(--accent-light); }
.firm-band .lead { color: var(--on-dark); }
.firm-band .body { color: var(--on-dark-2); }
.firm-band .btn-row { margin-top: 1.5rem; }
@media (min-width: 1100px) {
  .fit { display: flex; flex-direction: column; justify-content: center; min-height: calc(100vh - var(--hero-offset, calc(var(--header-h) + var(--border)))); min-height: calc(100svh - var(--hero-offset, calc(var(--header-h) + var(--border)))); padding-block: clamp(0.9rem, 2vh, 2.5rem); }
  .fit .container { max-width: calc(var(--wrap) + var(--gutter) * 2); }
  .firm-grid { gap: clamp(1.1rem, 2.6vh, 2.5rem) clamp(2rem, 3.5vw, 3.5rem); align-items: start; }
  /* every firm page's content fills the same box (capped on tall screens),
     so About, Services and Contact share one top and bottom edge */
  .fit .firm-grid { min-height: min(calc(100svh - var(--hero-offset, calc(var(--header-h) + var(--border))) - clamp(2.5rem, 47vh - 21rem, 8rem)), 44rem); grid-template-rows: 1fr; align-items: stretch; }
  .firm-band { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(2rem, 3.5vw, 3.5rem); align-items: start; padding: clamp(1.1rem, 2.6vh, 2.5rem) clamp(1.75rem, 2.5vw, 2.5rem); }
  .firm-band .h2 { font-size: clamp(1.8rem, 2.4vw, 2.5rem); }
  .firm-band .lead { font-size: 0.95rem; line-height: 1.55; }
  .firm-band .body { font-size: 0.87rem; line-height: 1.62; }
  .firm-col .body { font-size: 0.87rem; line-height: 1.62; }
  .firm-col .h3 { font-size: clamp(1.25rem, 1.55vw, 1.5rem); }
  .firm-col .h3 + .body { margin-top: 0.7rem; }
}

/* About: a two-line intro, then three beige tiles. Contact opens with the
   same intro (one line); each Services column carries its own. */
.firm-intro { margin: 0; padding-bottom: 1.5rem; font-weight: 500; border-bottom: var(--border) solid var(--line-soft); font-family: var(--font-serif); font-size: clamp(1.25rem, 2.2vw, 1.75rem); line-height: 1.35; color: var(--ink); text-align: center; }
.firm-intro > span { display: block; }
.firm-intro > span + span { margin-top: 0.5rem; font-size: 0.62em; letter-spacing: 0.04em; color: var(--ink-3); }
@media (max-width: 899.98px) { .firm .firm-intro { font-size: 1.5rem; } }
.firm-grid--3 .h3 { margin-top: 0; }
.firm-grid--3 .body { font-size: 1.06rem; }
.firm-tile { padding: clamp(1.75rem, 5vw, 2.5rem); }
.firm-tile--light { background: var(--paper-3); }
.firm-tile--medium { background: var(--surface-blue); color: var(--on-dark);
  /* the home page's blue panel treatment: re-point the tokens so text, rules, fields and buttons read on blue */
  --ink: var(--on-dark); --ink-2: var(--on-dark-2); --ink-3: var(--on-dark-3); --ink-4: rgba(250, 248, 243, 0.62);
  --line: rgba(250, 248, 243, 0.3); --line-soft: rgba(250, 248, 243, 0.16); --field-line: rgba(250, 248, 243, 0.45);
  --accent: var(--accent-light); --error: var(--error-light); }
.firm-tile--medium :focus-visible { outline-color: var(--paper); }
.firm-tile--medium .btn--brand { background: var(--paper); border-color: var(--paper); color: var(--surface-blue); }
.firm-tile--medium .btn--brand:hover { background: transparent; color: var(--paper); }
.firm-tile--medium :is(.contact__defs dt, .contact__form > .label)::after { opacity: 1; }
.firm-tile--medium .copy__tip, .firm-tile--medium .copy--icon.is-copied { background: var(--paper); border-color: var(--paper); color: var(--surface-blue); }
@media (min-width: 1100px) {
  .fit .firm-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(0.75rem, 1vw, 1rem); }
  .fit .firm-grid--3, .fit .firm-grid--intro, .fit .svc__grid { grid-template-rows: auto 1fr; }
  .firm-intro { grid-column: 1 / -1; padding-bottom: clamp(0.9rem, 2vh, 1.5rem); }
  .firm-tile { align-self: stretch; padding: clamp(1.5rem, 3.5vh, 2.75rem) clamp(1.5rem, 2.2vw, 2.5rem); }
  .firm-grid--3 .h3 { font-size: clamp(1.4rem, 1.8vw, 1.8rem); }
  .firm-grid--3 .firm-col .h3 + .body { margin-top: 1rem; }
  .firm-grid--3 .firm-col .body { font-size: clamp(0.88rem, 0.4rem + 1.1vh, 1.08rem); line-height: 1.7; }
}

/* Services: residential and commercial side by side, each an intro over a beige tile, at full reading size */
.svc__col { display: grid; gap: 2.5rem; }
/* the lists run down two columns with no row rules, so a wrapped item never leaves a gap beside it */
.svc__list { margin-top: 1.5rem; padding-top: 1.25rem; border-top: var(--border) solid var(--line-soft); }
.svc__list > li { padding: 0.3rem 0; font-size: 0.95rem; line-height: 1.45; color: var(--ink); break-inside: avoid; }
@media (min-width: 640px) { .svc__list { columns: 2; column-gap: clamp(20px, 2.5vw, 32px); } }
/* Visualization: a slim full-width strip under the two, serving both. Its heading speaks in the
   same serif as the two above, a size down, with a rule dividing it from its three items */
.svc__strip-title { margin: 0; padding-bottom: 1rem; border-bottom: var(--border) solid var(--line-soft); font-family: var(--font-serif); font-weight: 500; font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.3; color: var(--ink); }
.svc__strip-title > span { display: block; margin-top: 0.35rem; font-size: 0.62em; letter-spacing: 0.04em; color: var(--ink-3); }
.svc__list.svc__list--row { margin-top: 1rem; padding-top: 0; border-top: 0; }
@media (min-width: 640px) {
  .svc__list.svc__list--row { display: flex; justify-content: space-between; gap: clamp(20px, 2.5vw, 32px); columns: auto; }
}
@media (min-width: 1100px) {
  .svc__grid { --svc-gap: clamp(0.75rem, 1vw, 1rem); --svc-list-gap: clamp(1.5rem, 2.5vw, 2.5rem); grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--svc-gap); }
  /* both columns share the grid's first three rows (heading, intro, list), so the headings, the
     intros and the rules above the lists all line up; the Visualization strip takes the fourth */
  .fit .svc__grid { grid-template-rows: auto auto 1fr auto; }
  .svc__col { grid-row: span 3; grid-template-rows: subgrid; row-gap: normal; }
  .svc__col > .firm-tile { grid-row: span 2; display: grid; grid-template-rows: subgrid; row-gap: 0; align-content: start; }
  /* the strip sits as close under the cards as the cards sit to each other */
  .svc__col--wide { grid-column: 1 / -1; grid-row: auto; display: block; margin-top: calc(var(--svc-gap) - clamp(1.1rem, 2.6vh, 2.5rem)); }
  .svc__col--wide .firm-tile { padding-block: clamp(0.9rem, 2vh, 1.4rem); }
  /* wide enough for the heading to sit beside its items, a rule between */
  .svc__col--wide .firm-tile.svc__strip { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: clamp(1.5rem, 3vw, 3rem); }
  .svc__strip-title { padding: 0 clamp(1.5rem, 3vw, 3rem) 0 0; border-bottom: 0; border-right: var(--border) solid var(--line-soft); }
  .svc__list.svc__list--row { justify-content: space-around; margin-top: 0; }
  .svc__grid .body { font-size: 1rem; line-height: 1.7; }
  .svc__list { margin-top: clamp(1rem, 2.2vh, 1.75rem); padding-top: clamp(0.8rem, 1.8vh, 1.5rem); column-gap: var(--svc-list-gap); }
  .svc__list > li { padding: clamp(0.2rem, 0.45vh, 0.4rem) 0; font-size: 1rem; }
}

/* Contact: the intro, then two beige tiles — the details, then the form (side by side when wide) */
.contact-band { display: grid; gap: clamp(0.75rem, 1vw, 1rem); }
.contact__defs { display: grid; gap: 1.75rem 0; margin: 0; text-align: center; }
.contact__defs > div { display: flex; flex-direction: column; align-items: center; padding-inline: 1rem; }
.contact__defs dt::after, .contact__form > .label::after { content: ""; display: block; width: 1.5rem; margin: 0.55rem auto 0.7rem; border-top: var(--border) solid var(--accent); opacity: 0.6; }
.contact__defs dd { flex: 1; display: flex; flex-direction: column; align-items: center; margin: 0; font-size: 1rem; line-height: 1.7; color: var(--ink); }
.contact-band .contact__defs dt, .contact-band .contact__form > .label { font-size: 0.9rem; }
.contact__defs dd a:not(.link):hover { color: var(--accent); }
.contact__defs .link, .contact__defs .socials { margin-top: auto; }
.contact__defs dd > :nth-last-child(2) { margin-bottom: 0.7rem; }
.contact__defs .socials { justify-content: center; gap: 0.4rem; }
.contact__defs .socials a, .contact__defs .socials .copy--icon { width: 34px; height: 34px; }
.contact__defs .socials svg { width: 15px; height: 15px; }
@media (max-width: 639px) {
  /* phones: left-aligned, as on desktop */
  .contact__defs { text-align: left; }
  .contact__defs > div, .contact__defs dd { align-items: flex-start; }
  .contact__defs > div { padding-inline: 0; }
  .contact__defs dt::after { margin-inline: 0; }
  .contact__defs .socials { justify-content: flex-start; }
}
@media (min-width: 640px) {
  .contact__defs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact__defs > :nth-child(2) { border-left: var(--border) solid var(--line-soft); }
  .contact__defs > :last-child { grid-column: 1 / -1; }
}
.contact__form > .label::after { margin-inline: 0; }
/* the form, one field per line */
.form { display: grid; gap: 1.5rem; }
.form__foot { display: grid; gap: 1rem; justify-items: start; margin-top: 0.5rem; }
.field { display: grid; gap: 0.2rem; }
.field label { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-size: 0.68rem; font-weight: 500; letter-spacing: var(--track); text-transform: uppercase; color: var(--ink-3); line-height: 1.6; }
.field__opt { font-weight: 400; text-transform: none; letter-spacing: 0.02em; color: var(--ink-4); }
.field input, .field textarea { width: 100%; background: transparent; border: 0; border-bottom: var(--border) solid var(--line); padding: 0.5rem 0; font: inherit; font-size: 1rem; color: var(--ink); border-radius: 0; transition: border-color 0.3s var(--ease); }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-4); }
.field input:focus, .field textarea:focus { border-bottom-color: var(--accent); outline: none; }
.field [aria-invalid="true"] { border-bottom-color: var(--error); }
.field textarea { display: block; min-height: 120px; resize: vertical; }
.form-msg { font-size: 0.85rem; line-height: 1.7; color: var(--ink-3); }
.form-msg a { color: var(--accent); text-decoration: underline; text-underline-offset: 0.2em; }
.form-msg--error { color: var(--error); }
.form-msg--ok { color: var(--accent); }
.form-msg:empty { display: none; }
/* Contact Form 7 (WordPress theme): its message and error tips styled as .form-msg */
.wpcf7 .form__foot .wpcf7-response-output { margin: 0; padding: 0; border: 0; font-size: 0.85rem; line-height: 1.7; color: var(--error); }
.wpcf7 form.sent .form__foot .wpcf7-response-output { color: var(--accent); }
.field .wpcf7-not-valid-tip { font-size: 0.75rem; line-height: 1.6; color: var(--error); margin-top: 0.3rem; }
.contact__form .form { margin-top: 0.5rem; }
.contact-band .field input, .contact-band .field textarea { border-bottom-color: var(--field-line, rgba(44, 42, 38, 0.28)); }
.contact-band .field label { font-size: 0.74rem; color: var(--ink-2); }
.contact-band .label { font-size: 0.78rem; color: var(--ink-2); }
@media (min-width: 1100px) {
  /* wide: details stacked on the left, the form on the right */
  .contact-band { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .contact-band > .firm-tile { padding: clamp(1.1rem, 3vh, 3rem) clamp(2rem, 3.5vw, 3.5rem); }
  .contact__defs { grid-template-columns: none; gap: 0; margin: 0; text-align: left; }
  .contact__defs > div, .contact__defs dd { align-items: flex-start; }
  .contact__defs > div { padding: clamp(0.6rem, 1.6vh, 1.1rem) 0; }
  .contact__defs > :nth-child(n + 2) { border-left: 0; border-top: var(--border) solid var(--line-soft); }
  .contact__defs > :first-child { padding-top: 0; }
  .contact__defs > :last-child { grid-column: auto; padding-bottom: 0; }
  .contact__defs dt::after { margin-inline: 0; }
  /* spacing eases off on shorter screens, so the panel fits the same box as About and Services */
  .contact__defs dt::after, .contact__form > .label::after { margin-top: clamp(0.35rem, 0.8vh, 0.55rem); margin-bottom: clamp(0.4rem, 1vh, 0.7rem); }
  .contact__defs dd > :nth-last-child(2) { margin-bottom: clamp(0.35rem, 1vh, 0.7rem); }
  /* the details stretch to the form's height; the icons sit on the bottom row, level with the Submit button */
  .contact-band__info { display: flex; flex-direction: column; }
  .contact__defs { flex: 1; display: flex; flex-direction: column; }
  .contact__defs > div { flex: 1 1 auto; } /* spare height shared evenly, so each block gains the same space above its divider */
  .contact__defs .socials { justify-content: flex-start; align-items: center; min-height: 46px; } /* the Submit button's height, so the two centre on one line */
  .contact__defs dd { font-size: 1rem; line-height: clamp(1.45rem, 3.3vh, 1.7rem); }
  /* the form fills the column: the message box grows so the button lines up with the details' last row */
  .contact__form, .contact__form .wpcf7, .contact__form .field--wide .wpcf7-form-control-wrap { display: flex; flex-direction: column; }
  .contact__form .wpcf7, .contact__form .field--wide .wpcf7-form-control-wrap { flex: 1; }
  .contact__form .form { flex: 1; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto auto 1fr auto; gap: clamp(0.9rem, 2.4vh, 1.5rem) clamp(1.25rem, 2vw, 2rem); }
  .contact__form .field:first-of-type, .contact__form .field--wide { grid-column: 1 / -1; } /* of-type: CF7 puts a hidden fieldset first */
  .contact__form .field--wide { display: flex; flex-direction: column; }
  .contact__form .field--wide textarea { flex: 1 1 0; height: 0; min-height: 72px; resize: none; }
  .contact__form .form__foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; margin-top: 0; }
}

/* ---------- media ---------- */
.media { display: block; position: relative; overflow: hidden; background: var(--paper-3); }
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--3x2 { aspect-ratio: 3 / 2; }
.media--1x1 { aspect-ratio: 1; }
.media--4x5 { aspect-ratio: 4 / 5; }
a.media:hover img, .media--hover:hover img { transform: scale(1.04); }


/* ---------- feature band: full-bleed image, name beneath ---------- */
.feature { text-align: center; }
.feature__media { display: block; position: relative; overflow: hidden; background: var(--paper-3); aspect-ratio: 16 / 9; }
.feature__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.6s var(--ease); }
.feature__media:hover img { transform: scale(1.03); }
.feature__body { padding: clamp(2rem, 4vw, 3.25rem) var(--gutter) 0; max-width: 46rem; margin-inline: auto; }
.feature__body .lead { margin-top: 1rem; }
.feature__body .btn-row, .feature__body .link { margin-top: 1.75rem; }
@media (min-width: 900px) { .feature__media { aspect-ratio: 21 / 9; } }

/* cards */
.cards { display: grid; grid-template-columns: 1fr; gap: 0; }
.card { padding: 2.25rem 0; border-top: var(--border) solid var(--line-soft); display: grid; gap: 1rem; }
.card:last-child { border-bottom: var(--border) solid var(--line-soft); }
.card .h3 { margin-top: 0.4rem; }
.card .link { justify-self: start; margin-top: 0.5rem; }
@media (min-width: 900px) {
  .cards { grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); column-gap: clamp(32px, 5vw, 72px); border-bottom: var(--border) solid var(--line-soft); }
  .card { padding: 2.5rem 0 2.75rem; border-bottom: 0; }
  .card:last-child { border-bottom: 0; }
}

/* ---------- feature rows: two-thirds photo, one-third coloured panel ----------
   Set in a thin paper mat that also runs between rows and between photo and
   panel. Sides alternate from 900px, text first when stacked. Each row stands
   alone so it can become a block pattern; the tone modifier sets the panel. */
.features { display: grid; gap: var(--mat); padding: var(--mat); background: var(--paper); scroll-margin-top: var(--hero-offset, calc(var(--header-h) + var(--border))); }
.feature { display: grid; gap: var(--mat); }
.feature__media { display: block; position: relative; overflow: hidden; background: var(--paper-3); aspect-ratio: 4 / 3; }
.feature__media :is(img, video) { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); transition: transform 1.6s var(--ease); }
/* a light ink tint that deepens on hover; the link covers the whole media box */
.feature__media::after { content: ""; position: absolute; inset: 0; background: var(--deep); opacity: 0.15; transition: opacity 0.5s var(--ease); pointer-events: none; }
.feature__link { position: absolute; inset: 0; z-index: 1; }
.feature__media:has(.feature__link:hover) :is(img, video) { transform: scale(1.03); }
.feature__media:has(.feature__link:is(:hover, :focus-visible))::after { opacity: 0.55; }
.feature__link:focus-visible { outline: 2px solid var(--paper); outline-offset: -8px; }
/* replay: shown once a video has played through (or straight away under reduced motion) */
.feature__replay { position: absolute; right: 1rem; bottom: 1rem; z-index: 2; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%; background: var(--deep); color: var(--paper); opacity: 0.8; cursor: pointer; transition: opacity 0.3s var(--ease); }
.feature__replay[hidden] { display: none; }
.feature__replay:hover { opacity: 1; }
.feature__replay:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 2px; opacity: 1; }
.feature__replay svg { width: 1.25rem; height: 1.25rem; fill: currentColor; }
.feature__panel { order: -1; display: flex; align-items: center; justify-content: center; text-align: center; padding: clamp(3rem, 9vw, 4.5rem) var(--gutter); }
.feature__content { width: 100%; max-width: 24rem; }
/* short blue ticks above and below a short statement, as on the contact labels */
.feature__statement::before, .feature__statement::after { content: ""; display: block; width: 1.5rem; margin-inline: auto; border-top: var(--border) solid var(--accent); opacity: 0.6; }
:is(.feature--dark, .feature--medium) .feature__statement::before, :is(.feature--dark, .feature--medium) .feature__statement::after { border-top-color: var(--accent-light); opacity: 1; }
.feature__statement::before { margin-bottom: 1.5rem; }
.feature__statement::after { margin-top: 1.5rem; }
.feature__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem 2rem; margin-top: 2rem; }
.feature__links .link { font-size: 0.9rem; }
.feature--light .feature__panel { background: var(--paper-3); }
.feature--dark .feature__panel { background: var(--deep); }
.feature--medium .feature__panel { background: var(--accent); }
:is(.feature--dark, .feature--medium) .feature__panel {
  color: var(--paper);
  /* re-point the ink and line tokens so ordinary components read on the dark panel */
  --ink: var(--on-dark); --ink-2: var(--on-dark-2); --ink-3: var(--on-dark-3); --ink-4: rgba(250, 248, 243, 0.62);
  --line: rgba(250, 248, 243, 0.3); --line-soft: rgba(250, 248, 243, 0.16);
}
:is(.feature--dark, .feature--medium) :is(.h3, .link) { color: var(--on-dark); }
:is(.feature--dark, .feature--medium) .link { border-bottom-color: var(--accent-light); }
:is(.feature--dark, .feature--medium) .link:hover { color: var(--accent-light); }
.feature--dark .label { color: var(--accent-light); }
.feature--medium .label { color: var(--on-dark-3); }
:is(.feature--dark, .feature--medium) :focus-visible { outline-color: var(--paper); }

/* phones: a picture plus the text tile under it fill one screen below the
   header: the hero and the first tile, then each video and the next tile.
   Each tile tops up whatever its picture leaves (hero 3:2, videos 4:3);
   min-height, so longer text grows the tile instead of clipping. */
@media (max-width: 899.98px) {
  .features { --room: calc(100svh - var(--hero-offset, calc(var(--header-h) + var(--border))) - 2 * var(--mat)); --w: calc(100vw - 2 * var(--mat)); }
  .feature__panel { min-height: calc(var(--room) - var(--w) * 3 / 4); }
  /* the hero and the first tile split the screen half and half */
  .hero { aspect-ratio: auto; height: calc(var(--hero-room) / 2); }
  .feature:first-child .feature__panel { min-height: calc(var(--room) / 2); }
  /* tile text sized to the tile's width: "Let's Turn Your Dream" (about
     12.1em in Cinzel) and the two links on one row (about 20.5em) each fill
     the content box, 100vw less the mat and the panel's side pad */
  .feature__panel { padding: 1rem 0.75rem; }
  .feature__content { max-width: none; }
  .feature__panel .h3 { font-size: min(calc((100vw - 2 * var(--mat) - 1.5rem) / 12.4), 3.5rem); }
  .feature__statement::before, .feature__statement::after { width: 2.5rem; }
  .feature__statement::before { margin-bottom: 2.25rem; }
  .feature__statement::after { margin-top: 2.25rem; }
  .feature__links { flex-wrap: nowrap; gap: 0 1.25em; margin-top: 3rem; font-size: min(calc((100vw - 2 * var(--mat) - 1.5rem) / 21), 1.6rem); }
  .feature__links .link { font-size: 1em; }
}

@media (min-width: 900px) {
  :root { --mat: 1vw; }
  .feature { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); min-height: clamp(25rem, 38vw, 56rem); }
  .feature__media { aspect-ratio: auto; }
  .feature:nth-child(even), .feature--flip { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
  :is(.feature:nth-child(even), .feature--flip) .feature__media { order: 2; }
  .feature__panel { order: 0; padding: clamp(2.5rem, 3.5vw, 4rem) clamp(1.75rem, 3vw, 3.5rem); }
}

/* ---------- footer ---------- */
.footer { background: var(--ink); color: var(--on-dark);
  /* re-point the tokens so the shared socials and copy button read on ink, as on the header */
  --ink-2: var(--on-dark-2); --line: rgba(250, 248, 243, 0.3); --accent: var(--accent-light);
  padding: clamp(2.5rem, 5vw, 3.5rem) 0; text-align: center; }
.footer__name { font-family: var(--font-serif); font-size: 1.75rem; font-weight: 500; }
.footer__name::after { content: ""; display: block; width: 1.5rem; margin: 0.8rem auto 0; border-top: var(--border) solid var(--accent); }
.footer__name a:hover, .footer__addr a:hover { color: var(--accent); }
.footer__addr { margin-top: 0.8rem; font-family: var(--font-label); font-size: 0.8rem; letter-spacing: var(--track); text-transform: uppercase; line-height: 2; color: var(--ink-2); }

.socials { display: flex; gap: 0.5rem; }
.socials a { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: var(--border) solid var(--line); color: var(--ink-2); transition: border-color 0.3s, color 0.3s, background-color 0.3s; }
.socials a:hover { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.socials svg { width: 15px; height: 15px; fill: currentColor; }
.footer .socials { justify-content: center; margin-top: 1.5rem; }
/* the email copy button sits in the row at the same size as the icons */
.socials .copy--icon { width: 38px; height: 38px; }
.socials .copy--icon svg { width: 15px; height: 15px; }
.footer .socials { gap: 0.6rem; }
.footer .socials a, .footer .socials .copy--icon { width: 46px; height: 46px; }
.footer .socials svg { width: 19px; height: 19px; }
.footer :focus-visible { outline-color: var(--paper); }
.footer .copy__tip, .footer .copy--icon.is-copied { color: var(--ink); }

/* ---------- reveal on scroll ---------- */
[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
[data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none; } }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(26, 24, 21, 0.97); color: var(--paper); display: none; flex-direction: column; }
.lightbox.is-open { display: flex; }
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; padding: 1.1rem var(--gutter); font-family: var(--font-label); font-size: 0.66rem; font-weight: 400; letter-spacing: var(--track); text-transform: uppercase; }
.lightbox__stage { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0 var(--gutter) 1rem; min-height: 0; }
.lightbox__stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lightbox__foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.85rem var(--gutter) 1.5rem; font-family: var(--font-label); font-size: 0.66rem; font-weight: 400; letter-spacing: var(--track); text-transform: uppercase; color: var(--on-dark-2); }
.lightbox__nav { display: flex; gap: 0.5rem; }
.lightbox button { font-family: var(--font-label); font-size: 0.64rem; font-weight: 400; letter-spacing: var(--track); text-transform: uppercase; color: var(--paper); border: var(--border) solid rgba(250,248,243,0.32); padding: 0.65rem 1rem; transition: border-color 0.3s; }
.lightbox button:hover { border-color: var(--paper); }

/* ---------- utilities ---------- */
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; } .mt-6 { margin-top: 3rem; } .mt-8 { margin-top: 4rem; }
.mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; } .mb-6 { margin-bottom: 3rem; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.stack { display: grid; gap: 1rem; }
.stack--lg { gap: 2rem; }
.hide-mobile { display: none; }
@media (min-width: 900px) { .hide-mobile { display: initial; } .hide-desktop { display: none; } }

/* ---------- copy-to-clipboard (email) ---------- */
.copy { position: relative; display: inline-block; text-align: left; max-width: 100%; color: inherit; transition: color 0.3s; }
.copy .copy__text { overflow-wrap: anywhere; }
.copy:hover .copy__text, .copy:focus-visible .copy__text { text-decoration: underline; text-underline-offset: 0.2em; }
.copy__ic { display: inline-flex; align-items: center; margin-left: 0.4em; vertical-align: -0.16em; opacity: 0.5; transition: opacity 0.3s; }
.copy:hover .copy__ic, .copy:focus-visible .copy__ic { opacity: 1; }
.copy svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.copy__ok { display: none; }
.copy.is-copied .copy__ic { opacity: 1; }
.copy.is-copied .copy__ico { display: none; }
.copy.is-copied .copy__ok { display: block; }
.copy__tip {
  position: absolute; bottom: calc(100% + 0.45rem); left: 0; transform: translateY(4px);
  background: var(--accent); color: var(--paper);
  font-family: var(--font-label); font-size: 0.6rem; font-weight: 400; letter-spacing: var(--track); text-transform: uppercase;
  padding: 0.35rem 0.5rem; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity 0.25s, transform 0.25s var(--ease);
}
.copy.is-copied .copy__tip { opacity: 1; transform: translateY(0); }
/* icon variant: a small bordered copy button beside the address */
.copy--icon { display: inline-flex; align-items: center; justify-content: center; width: 1.9rem; height: 1.9rem; border: var(--border) solid var(--line); color: var(--ink-2); transition: border-color 0.3s, color 0.3s, background-color 0.3s; }
.copy--icon .copy__ic { margin: 0; vertical-align: 0; opacity: 1; }
.copy--icon svg { width: 0.95rem; height: 0.95rem; }
.copy--icon:hover, .copy--icon:focus-visible { border-color: var(--accent); color: var(--accent); }
.copy--icon.is-copied { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.copy--icon .copy__tip { left: 50%; translate: -50% 0; }
@media (prefers-reduced-motion: reduce) { .copy, .copy__ic, .copy__tip, .copy--icon { transition: none; } }
