/* site.css: Blowing Rock Home Co. brand layer on top of the kit's base.css.
   Direction (Nov 2026 redesign): cinematic and dark. Full-bleed photos of the real projects carry the pages,
   huge type in the brand face, and the logo's gold marks the one main action. Night #1B1A17 and stone
   #F3EFE8 alternate down the page.
   Type is Jost (self-hosted, OFL), a geometric face in the same family of shapes as the logo's wide capitals,
   so every visitor sees the same type. Two weights: 400 for display, 500 for small headings and buttons.
   Depth: soft layered shadows under photos, cards and the floating bars (asked for by Evan); hairlines only divide
   lists. Corners: 16px cards, 28px large photos, pill buttons. */

@font-face {
  font-family: "Jost";
  src: url("../fonts/jost-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #1D1B18;
  --ink-2: #3B3833;
  --muted: #615B52;
  --paper: #FFFFFF;
  --stone: #F3EFE8;
  --stone-2: #E8E2D7;
  --rule: #DDD6CA;
  --rule-2: #D2CABC;
  --field: #8A8276;
  --gold: #9C7D2C;
  --gold-ink: #8A6C1E;
  --gold-ink-hover: #735A18;
  --gold-light: #D9C08A;
  --night: #1B1A17;
  --night-2: #24221E;
  --on-night: #F2EEE6;
  --on-night-muted: #BDB5A8;
  --rule-night: rgba(242, 238, 230, 0.16);
  --error: #A3261B;
  --focus: #1D1B18;
  --radius: 16px;
  --radius-lg: 28px;
  --radius-sm: 12px;
  --pill: 999px;
  --sheet: 24px;
  /* four depths: small things, things on light sections, things on dark sections, and section edges */
  --shadow-sm: 0 10px 24px -12px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 2px 6px rgba(18, 17, 15, 0.08), 0 28px 56px -24px rgba(18, 17, 15, 0.46);
  --shadow-night: 0 0 0 1px rgba(242, 238, 230, 0.07), 0 4px 12px rgba(0, 0, 0, 0.5), 0 26px 56px rgba(0, 0, 0, 0.62), 0 56px 110px -16px rgba(0, 0, 0, 0.8);
  --shade: 0 1px 3px rgba(18, 17, 15, 0.12), 0 10px 22px rgba(18, 17, 15, 0.18), 0 30px 60px -8px rgba(18, 17, 15, 0.36), 0 60px 110px -20px rgba(18, 17, 15, 0.42);
  --shadow-sheet: 0 -22px 48px -26px rgba(18, 17, 15, 0.42);
  --measure: 52ch;
  --header-h: 64px;
  --fs-title: clamp(1.5rem, 1.05rem + 1.2vw, 2.25rem);
  --fs-h3: clamp(1.25rem, 1.05rem + 0.5vw, 1.625rem);
  --font: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bg-paper: linear-gradient(180deg, #FFFFFF 0%, #F8F5EF 100%);
  --bg-stone: radial-gradient(130% 100% at 0% 0%, #FAF8F3 0%, #F3EFE8 46%, #ECE6DA 100%);
  --bg-night: radial-gradient(120% 90% at 85% 0%, #2B2824 0%, #1D1B18 46%, #141311 100%);
}

@media (min-width: 744px) {
  :root { --header-h: 76px; --sheet: 40px; }
}

body {
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--night);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}



h1, h2, h3 { margin: 0; font-weight: 500; text-wrap: balance; }
p, ul, ol, dl, dd, figure, address { margin: 0; }
p { text-wrap: pretty; }
ul, ol { padding: 0; }
address { font-style: normal; }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; }
picture { display: block; }
source { display: none; }

h1 { font-size: clamp(2.25rem, 1rem + 3.8vw, 5.5rem); line-height: 1.02; letter-spacing: -0.025em; font-weight: 400; }
h2 { font-size: clamp(1.875rem, 1.1rem + 2.4vw, 4rem); line-height: 1.06; letter-spacing: -0.02em; font-weight: 400; }
h3 { font-size: var(--fs-h3); line-height: 1.15; letter-spacing: -0.015em; }
.lead { font-size: clamp(1.0625rem, 0.98rem + 0.3vw, 1.25rem); line-height: 1.55; color: var(--ink-2); }
figcaption { font-size: 0.875rem; color: var(--muted); }

.band { background: var(--bg-paper); }
.band--stone { background: var(--bg-stone); }
.band--night { background: var(--bg-night); color: var(--on-night); --focus: var(--on-night); }
.band--night .lead, .band--night p { color: var(--on-night-muted); }
.band--night .text-link, .band--night a { color: var(--on-night); }

/* Every section after the first rises over the one before it with rounded top corners, so no edge is hard */
main > :not(:first-child), .site-footer {
  position: relative;
  margin-top: calc(-1 * var(--sheet));
  border-radius: var(--sheet) var(--sheet) 0 0;
}

/* Buttons and links */
.btn {
  gap: 10px;
  min-height: 52px;
  padding: 12px 28px;
  border: 1px solid transparent;
  border-radius: var(--pill);
  background: var(--gold-ink);
  color: #fff;
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  transition: background-color 300ms var(--ease-out), color 300ms var(--ease-out), border-color 300ms var(--ease-out), transform 300ms var(--ease-out), box-shadow 300ms var(--ease-out);
}
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.band--night .btn--ghost, .on-photo .btn--ghost { color: var(--on-night); border-color: var(--on-night); }
.text-link { font-weight: 500; text-decoration: underline; text-underline-offset: 6px; }

@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--gold-ink-hover); transform: translateY(-2px); }
  .btn--ghost:hover { background: var(--ink); color: #fff; }
  .band--night .btn--ghost:hover, .on-photo .btn--ghost:hover { background: var(--on-night); color: var(--ink); }
  .text-link:hover, .link-list a:hover, .direct a:hover { text-decoration-thickness: 2px; }
}

/* Standalone links get a 44px hit area without changing how they look. */
.text-link, .link-list a, .direct a, .jump-list a, .person a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* ---------- Header: dark, and see-through while it sits over a full-bleed photo ---------- */
.site-header {
  padding-top: 10px;
  background: transparent;
  color: var(--on-night);
  --focus: var(--on-night);
  transition: transform 400ms var(--ease-out);
}
.site-header .wrap {
  width: min(100% - 16px, 100% - 2 * var(--gutter) + 40px, var(--wide) + 40px);
  min-height: calc(var(--header-h) - 10px);
  gap: 12px;
  padding-inline: 20px 8px;
  border-radius: var(--pill);
  background: rgba(27, 26, 23, 0.94);
  transition: background-color 450ms var(--ease-out), box-shadow 450ms var(--ease-out);
}
.logo { display: flex; align-items: center; min-height: 48px; margin-right: auto; border-radius: var(--radius); }
.logo img { height: 28px; width: auto; }
.nav a { padding: 12px 10px; font-weight: 500; text-decoration: none; color: var(--on-night); }
.nav a[aria-current="page"] { text-decoration: none; }
/* The second option, Request a consultation: a quiet link beside the gold Call us now */
.hdr-link {
  display: none;
  align-items: center;
  min-height: 48px;
  padding-inline: 12px;
  font-weight: 500;
  color: var(--on-night);
  text-decoration: none;
  white-space: nowrap;
}
.site-header .btn { display: none; min-height: 48px; padding-inline: 20px; white-space: nowrap; }
/* The number inside Call us now: shown where there is room, so people on a computer can dial from their phone */
.call-num { display: none; font-weight: 400; font-variant-numeric: tabular-nums; }
.hero-actions .call-num, .cta-actions .call-num { display: inline; }
/* The help cards sit in narrow columns on some screens, so they size by the card itself */
.help-card { container-type: inline-size; }
@container (min-width: 272px) { .help-actions .call-num { display: inline; } }
.menu-btn {
  padding: 0 18px;
  border: 1px solid var(--rule-night);
  border-radius: var(--pill);
  background: transparent;
  color: var(--on-night);
  font-weight: 500;
  cursor: pointer;
}

/* The phone and iPad menu opens as a full screen of big links */
.mobile-nav {
  position: fixed;
  inset: calc(var(--header-h) + 8px) 8px calc(88px + env(safe-area-inset-bottom)) 8px;
  overflow-y: auto;
  padding-block: 8px;
  background: var(--night);
  border: 1px solid var(--rule-night);
  border-radius: var(--radius-lg);
}
.mobile-nav a {
  display: flex;
  align-items: center;
  min-height: 64px;
  font-size: var(--fs-title);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--on-night);
  text-decoration: none;
  border-bottom: 1px solid var(--rule-night);
}
.mobile-nav a[aria-current="page"] { color: var(--gold-light); }
.mobile-nav a:last-child { border-bottom: 0; }

@media (hover: hover) and (pointer: fine) {
  .nav a:hover, .hdr-link:hover { text-decoration: none; }
  .menu-btn:hover { border-color: var(--on-night); }
}

@media (min-width: 400px) {
  .logo img { height: 32px; }
}

@media (min-width: 744px) {
  .site-header .wrap { gap: 12px; }
  .logo img { height: 32px; }
  .hdr-link { display: inline-flex; }
  .site-header .btn { display: inline-flex; }
}

@media (min-width: 820px) {
  .site-header .wrap { gap: 16px; }
  .logo img { height: 34px; }
}

/* 1024 to 1179: the full menu needs the room, and its Contact link covers the consultation */
@media (min-width: 1024px) {
  .hdr-link { display: none; }
  .nav { margin-right: 4px; }
}

@media (min-width: 1180px) {
  .hdr-link { display: inline-flex; }
}

@media (min-width: 1280px) {
  .logo img { height: 40px; }
  .nav a { padding-inline: 12px; }
}

@media (min-width: 1440px) {
  .logo img { height: 44px; }
  .site-header .wrap { gap: 24px; }
  .site-header .call-num { display: inline; }
}

/* Over a full-bleed photo the bar turns clear, with a soft dark fade behind it so the links stay readable */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: calc(var(--header-h) * 2.2);
  z-index: -1;
  background: linear-gradient(180deg, rgba(18, 17, 15, 0.8) 0%, rgba(18, 17, 15, 0.46) 55%, rgba(18, 17, 15, 0) 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms var(--ease);
}
.js .has-photo-hero .site-header:not(.is-solid)::before { opacity: 1; }
.js .has-photo-hero .site-header:not(.is-solid) .wrap { background: transparent; box-shadow: none; }
.js .has-photo-hero .site-header:not(.is-solid) .menu-btn { background: rgba(18, 17, 15, 0.45); }

/* With the menu open the bar is always solid */
.js .has-photo-hero .site-header:has([aria-expanded="true"]) .wrap { background: rgba(27, 26, 23, 0.94); }
.js .has-photo-hero .site-header:has([aria-expanded="true"])::before { opacity: 0; }

/* One set of actions on screen at a time. Calling is the main one (gold), Request a consultation the second.
   From iPad width up the header carries both, so the home opening drops its own pair and keeps only the video's pause
   button. On phones (the header shows just Menu) the opening keeps its pair, and the call bar stays down until they
   have scrolled away. */
@media (min-width: 744px) {
  .hero--home .hero-actions > a { display: none; }
  .hero--home .hero-actions { justify-content: flex-end; min-height: 30px; }   /* room held for the pause button, so nothing moves when it appears */
}
@media (max-width: 743px) {
  .callbar { transition: transform 360ms var(--ease-out), visibility 0s linear 0s; }
  .js .has-hero:not(.hero-gone) .callbar {
    transform: translateY(calc(100% + 16px + env(safe-area-inset-bottom)));
    visibility: hidden;
    transition: transform 300ms var(--ease-out), visibility 0s linear 300ms;
  }
}

/* ---------- Full-bleed photo heroes (home and inner pages) ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: end;
  min-height: 88svh;
  margin-top: calc(-1 * var(--header-h));
  padding-block: calc(var(--header-h) + 48px) 40px;
  overflow: clip;
  background: var(--night);
  color: var(--on-night);
  --focus: var(--on-night);
}
.hero--home { min-height: 100svh; }

@media (max-width: 743px) {
  .about-split .portrait { max-width: 300px; }
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media picture, .hero-media img { width: 100%; height: 100%; }
.hero-media img { object-fit: cover; object-position: var(--pos, 50% 55%); }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(18, 17, 15, 0.3) 0%, rgba(18, 17, 15, 0) 26%, rgba(18, 17, 15, 0.34) 46%, rgba(18, 17, 15, 0.88) 100%);
}
.hero--dim::after { background: linear-gradient(180deg, rgba(18, 17, 15, 0.5) 0%, rgba(18, 17, 15, 0.58) 40%, rgba(18, 17, 15, 0.9) 100%); }
.hero-copy { display: grid; gap: 24px; }
.hero .hero-copy h1 { max-width: 14ch; color: var(--on-night); font-size: clamp(2.25rem, 1rem + 3.8vw, 5.5rem); }
.hero--home .hero-copy h1 { font-size: clamp(2.5rem, 1rem + 4.6vw, 6.5rem); line-height: 1; letter-spacing: -0.03em; max-width: 13ch; }
.hero--home .intro-line { padding-bottom: 0.14em; margin-bottom: -0.14em; }
.hero--dim .hero-copy h1 { max-width: 18ch; font-size: clamp(2.125rem, 1rem + 3vw, 4.25rem); }
.hero .lead { color: var(--on-night); max-width: 40ch; }
.hero-foot { display: grid; gap: 20px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.hero .text-link { color: var(--on-night); }
.hero-credit { font-size: 0.875rem; color: var(--on-night-muted); }

@media (min-width: 744px) {
  .hero { padding-block: calc(var(--header-h) + 64px) 56px; }
}

@media (min-width: 744px) {
  .hero--page .hero-foot { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; column-gap: 48px; }
  .hero--page .hero-links { justify-content: flex-end; }
  .hero--page .hero-side { justify-self: end; }
}

@media (min-width: 1024px) {
  .hero-foot { grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: 48px; }
  .hero-actions { justify-content: flex-end; }
}

@media (min-width: 1180px) {
  .hero { padding-bottom: 72px; }
}

/* A row of links inside a hero (work categories, service jumps) */
.hero-links { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(242, 238, 230, 0.5);
  border-radius: var(--pill);
  color: var(--on-night);
  font-weight: 500;
  text-decoration: none;
  background: rgba(18, 17, 15, 0.35);
}
.hero-links .count { color: var(--on-night-muted); font-weight: 400; font-variant-numeric: tabular-nums; }

@media (hover: hover) and (pointer: fine) {
  .hero-links a:hover { border-color: var(--on-night); background: rgba(18, 17, 15, 0.6); }
}

/* Inner pages without a photo open on a dark band that runs on from the header */
.intro-dark { background: var(--bg-night); color: var(--on-night); --focus: var(--on-night); padding-block: 56px 64px; }
.intro-dark .lead { color: var(--on-night-muted); }
.intro-grid { display: grid; gap: 40px; align-items: end; }
.intro-copy { display: grid; gap: 24px; justify-items: start; container-type: inline-size; }
.intro-copy h1 { justify-self: stretch; max-width: 16ch; font-size: min(clamp(2.25rem, 1rem + 3.8vw, 5.5rem), 11cqi); }
.intro-copy .meta { color: var(--on-night-muted); font-size: 0.875rem; }
.hero-side { display: grid; gap: 16px; justify-items: start; max-width: 40ch; }
.hero-side a:not(.btn) { color: var(--on-night); }

@media (min-width: 744px) {
  .intro-dark { padding-block: 88px 96px; }
}

@media (min-width: 1024px) {
  .intro-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); column-gap: 64px; }
}

@media (min-width: 1920px) {
  .intro-dark { padding-block: 120px 128px; }
}

/* ---------- Big photos in a clean grid (home and services): one large photo with two beside it,
   then any others in a row of two. Every edge lines up with the text above. ---------- */
.bento { list-style: none; display: grid; gap: 12px; }
.bento .photo { border-radius: var(--radius-lg); }
.bento .photo img { aspect-ratio: 4 / 3; }

@media (min-width: 744px) {
  .bento { grid-template-columns: 1fr 1fr; gap: var(--gap); }
  .bento > li:first-child { grid-column: 1 / -1; }
  .bento > li:first-child .photo img { aspect-ratio: 16 / 9; }
  .bento > li:not(:first-child) .photo img { aspect-ratio: 3 / 2; }
}

@media (min-width: 1180px) {
  .bento { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .bento > li:nth-child(1) { grid-column: 1 / span 7; grid-row: 1 / span 2; }
  .bento > li:nth-child(2) { grid-column: 8 / span 5; grid-row: 1; }
  .bento > li:nth-child(3) { grid-column: 8 / span 5; grid-row: 2; }
  .bento > li:nth-child(4) { grid-column: 1 / span 6; }
  .bento > li:nth-child(5) { grid-column: 7 / span 6; }
  .bento--flip > li:nth-child(1) { grid-column: 6 / span 7; }
  .bento--flip > li:nth-child(2), .bento--flip > li:nth-child(3) { grid-column: 1 / span 5; }
  /* the large photo fills the height of the two beside it */
  .bento > li:first-child .photo { height: 100%; }
  .bento > li:first-child .photo picture { position: absolute; inset: 0; }
  .bento > li:first-child .photo img { height: 100%; aspect-ratio: auto; }
}

/* ---------- Home: what we build, three photo cards with the words on the photo ---------- */
.tiles { list-style: none; display: grid; gap: 12px; }
.tile {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: end;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--night-2);
  color: var(--on-night);
}
.tile picture { position: absolute; inset: 0; z-index: -2; }
.tile img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); transition: transform 450ms var(--ease-out); }
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(18, 17, 15, 0) 28%, rgba(18, 17, 15, 0.6) 56%, rgba(18, 17, 15, 0.94) 100%);
}
.tile-copy { display: grid; gap: 10px; padding: 24px; }
.tile h3 { font-size: var(--fs-title); line-height: 1.08; letter-spacing: -0.015em; font-weight: 400; }
.band--night .tile a { color: var(--on-night); text-decoration: none; }
.tile h3 a { display: block; padding-block: 10px; margin-block: -10px; }
.tile a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.band--night .tile p { color: var(--on-night); max-width: 40ch; }
.tile:has(a:focus-visible) { outline: 3px solid var(--on-night); outline-offset: 4px; }

@media (min-width: 744px) {
  .tiles { grid-template-columns: 1fr 1fr; gap: var(--gap); }
  .tile:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
  .tile-copy { padding: 32px; }
}

@media (min-width: 1180px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tile:first-child { grid-column: auto; aspect-ratio: 4 / 5; }
}

@media (hover: hover) and (pointer: fine) {
  .tile:hover img { transform: scale(1.04); }
  .band--night .tile:hover a { text-decoration: underline; text-decoration-thickness: 1px; }
}

/* ---------- Section heads used on the other bands ---------- */
.section-head { display: grid; gap: 16px 24px; margin-bottom: 48px; justify-items: start; }
.section-head h2 { max-width: 15ch; justify-self: stretch; }
.section-head p { color: var(--ink-2); max-width: 44ch; }
.section-head--night p { color: var(--on-night-muted); }

@media (min-width: 1180px) {
  .section-head { grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr); align-items: end; margin-bottom: 72px; }
  .section-head h2 { grid-column: 1; grid-row: 1 / span 2; }
  .section-head p { grid-column: 2; }
  .section-head .text-link { grid-column: 2; }
}

/* Photos */
.photo { position: relative; display: block; overflow: hidden; border-radius: var(--radius); background: var(--stone-2); }
.photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform 450ms var(--ease-out); }

@media (hover: hover) and (pointer: fine) {
  .photo:hover img { transform: scale(1.04); }
}

/* Offices: two cards */
.offices { display: grid; gap: var(--gap); }
.office {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-md);
}
.band--night .office { background: rgba(242, 238, 230, 0.05); border: 1px solid var(--rule-night); box-shadow: var(--shadow-night); }
.office { grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; }
.office > * { grid-column: 1 / -1; }
.office > h2, .office > h3 { grid-column: 1; grid-row: 1; }
.office .office-elev { grid-column: 2; grid-row: 1; align-self: center; font-size: var(--fs-h3); color: var(--gold-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.band--night .office .office-elev { color: var(--gold-light); }
.office address { margin-top: 8px; }
.office .link-list { margin-top: 8px; }

@media (min-width: 744px) {
  .office { padding: 40px; }
}
.office h2, .office h3 { font-size: var(--fs-title); line-height: 1; letter-spacing: -0.03em; }
.office p { color: var(--muted); }
.band--night .office p { color: var(--on-night-muted); }
.link-list { list-style: none; display: grid; justify-items: start; margin-top: 4px; }
.link-list a { font-weight: 500; text-decoration: underline; }

@media (min-width: 744px) {
  .offices { grid-template-columns: 1fr 1fr; gap: 48px var(--gap); }
}

/* About (home): the words beside one big photo, Adam's photo small next to his name */
.about-split { display: grid; gap: 40px; align-items: center; }
.about-copy { display: grid; gap: 20px; justify-items: start; }
.about-copy h2 { justify-self: stretch; max-width: 14ch; }
.about-media { overflow: hidden; border-radius: var(--radius-lg); background: var(--stone-2); }
.about-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.byline { display: flex; align-items: center; gap: 16px; margin-top: 4px; }
.byline picture { flex: none; width: 64px; height: 64px; overflow: hidden; border-radius: 50%; }
.byline img { width: 100%; height: 100%; object-fit: cover; }
.byline p { display: grid; line-height: 1.35; }
.byline-name { font-weight: 500; color: var(--ink); }
.byline-role { color: var(--muted); font-size: 0.9375rem; }
.portrait { display: grid; gap: 12px; align-content: start; max-width: 360px; }
.portrait img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-lg); }

@media (min-width: 744px) {
  .about-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--gap); }
  .about-media img { aspect-ratio: 4 / 5; }
}

@media (min-width: 1180px) {
  .about-split { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .about-copy { grid-column: 1 / span 5; }
  .about-media { grid-column: 6 / span 7; }
  .about-media img { aspect-ratio: 4 / 3; }
}

/* Steps: a real sequence, so big numbers are fine here */
.steps { list-style: none; display: grid; gap: 40px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; gap: 12px; align-content: start; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-size: clamp(1.875rem, 1.1rem + 2.4vw, 4rem);
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  color: var(--gold-ink);
}
.band--night .steps li::before { color: var(--gold-light); }
.steps h3 { font-size: var(--fs-h3); }
.steps p { color: var(--ink-2); max-width: 40ch; }
.band--night .steps p { color: var(--on-night-muted); }
.steps--row li { padding-top: 24px; border-top: 1px solid var(--rule-2); }
.band--night .steps--row li { border-top-color: var(--rule-night); }

@media (min-width: 744px) {
  .steps--row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
}

.steps--compact { margin-top: 28px; gap: 16px; }
.steps--compact li { grid-template-columns: 36px minmax(0, 1fr); gap: 0; color: var(--on-night-muted); }
.steps--compact li::before { grid-row: 1 / span 2; font-size: 1rem; line-height: 1.6; letter-spacing: 0; color: var(--gold-light); }
.step-title { display: block; color: var(--on-night); font-weight: 500; }

/* ---------- The closing band on every page: a full-bleed photo with the ask on top ---------- */
.cta-photo {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 64svh;
  padding-block: 80px;
  overflow: clip;
  background: var(--night);
  color: var(--on-night);
  text-align: center;
  --focus: var(--on-night);
}
.cta-media { position: absolute; inset: 0; z-index: -2; }
.cta-media picture, .cta-media img { width: 100%; height: 100%; }
.cta-media img { object-fit: cover; }
.cta-photo::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(18, 17, 15, 0.68); }
.cta-inner { display: grid; gap: 24px; justify-items: center; }
.cta-inner h2 { max-width: 14ch; }
.cta-inner .lead { color: var(--on-night); max-width: 40ch; }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 28px; margin-top: 8px; }
.cta-photo .text-link { color: var(--on-night); }

/* ---------- Services page ---------- */
.band--night .photo { background: var(--night-2); }

.jump-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0 24px; }
.jump-list a { font-weight: 500; }

/* ---------- Work page ---------- */
.gallery-band { padding-block: 0 var(--section); scroll-margin-top: calc(var(--header-h) + 16px); background: none; }
.gallery-band:first-child { padding-top: var(--section); }
.gallery-band h2 { margin-bottom: 32px; padding-top: 28px; border-top: 1px solid var(--rule-night); font-size: var(--fs-title); line-height: 1; letter-spacing: -0.03em; }
.gallery { column-gap: var(--gap); }
.gallery figure { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; break-inside: avoid; }
.gallery .photo { border-radius: var(--radius-lg); }
.gallery .photo img { aspect-ratio: var(--ar, auto); }
.gallery figcaption { color: var(--on-night-muted); }
.gallery-wrap { background: var(--bg-night); color: var(--on-night); --focus: var(--on-night); }

@media (min-width: 744px) {
  .gallery { columns: 2; }
}

@media (min-width: 1180px) {
  .gallery figure { margin-bottom: 40px; }
}

@media (min-width: 1920px) {
  .gallery { columns: 3; }
}

/* ---------- About page ---------- */
.portrait--intro { max-width: 380px; width: 100%; }

@media (min-width: 744px) {
  .intro-grid:has(.portrait--intro) { grid-template-columns: minmax(0, 1fr) minmax(200px, 300px); column-gap: 40px; }
  .intro-grid > .portrait--intro { justify-self: end; }
}

@media (min-width: 1024px) {
  .intro-grid:has(.portrait--intro) { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); column-gap: 64px; }
}
.portrait--intro figcaption { color: var(--on-night-muted); }
.story { display: grid; gap: 48px; align-items: start; }
.story > div { display: grid; gap: 20px; }
.story > div h2 { max-width: 12ch; margin-bottom: 8px; }
.facts { display: grid; gap: 0; border-top: 1px solid var(--rule-2); }
.facts > div { display: grid; gap: 4px; padding-block: 20px; border-bottom: 1px solid var(--rule-2); }
.facts dt { font-size: 0.875rem; color: var(--muted); }
.facts dd { font-size: var(--fs-h3); font-weight: 500; line-height: 1.25; letter-spacing: -0.01em; }
.facts a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; }
.facts--card { padding: 8px 28px; background: var(--night-2); border-top: 0; border-radius: var(--radius-lg); }
.facts--card > div { border-bottom-color: var(--rule-night); }
.facts--card > div:last-child { border-bottom: 0; }
.facts--card dt { color: var(--on-night-muted); }
.facts--card dd, .facts--card a { color: var(--on-night); }

@media (min-width: 1024px) {
  .story { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); column-gap: 96px; }
}

.team-grid { list-style: none; display: grid; gap: var(--gap); }
.person { display: grid; gap: 8px; align-content: start; padding-top: 24px; border-top: 1px solid var(--rule-2); }
.person h3 { font-size: var(--fs-title); line-height: 1.05; letter-spacing: -0.025em; }
.person p { color: var(--muted); }
.person a { font-weight: 500; text-decoration: underline; justify-self: start; overflow-wrap: anywhere; }

@media (min-width: 744px) {
  .team-grid { grid-template-columns: 1fr 1fr; row-gap: 48px; }
}

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

/* ---------- Offices page ---------- */
.areas { list-style: none; display: grid; gap: var(--gap); }
.areas li { display: grid; gap: 12px; align-content: start; padding-top: 24px; border-top: 1px solid var(--rule-2); }
.areas h3 { font-size: var(--fs-title); line-height: 1.1; letter-spacing: -0.02em; }
.areas p { color: var(--ink-2); }
.areas a { text-decoration: underline; font-weight: 500; }

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

/* ---------- FAQ page ---------- */
.help-card { display: grid; gap: 12px; padding: 28px; background: var(--night-2); color: var(--on-night); border-radius: var(--radius-lg); align-content: start; --focus: var(--on-night); }
.help-card h2 { font-size: var(--fs-h3); letter-spacing: -0.01em; line-height: 1.2; }
.help-card p { color: var(--on-night-muted); }
.help-card a:not(.btn) { text-decoration: underline; font-weight: 500; color: var(--on-night); }
.help-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }

@media (min-width: 744px) {
  .help-card { padding: 36px; }
}

.faq-split { display: grid; gap: 24px; }
.faq-note { color: var(--muted); }
.faq details { border-top: 1px solid var(--rule-2); }
.faq details:last-child { border-bottom: 1px solid var(--rule-2); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 48px;
  padding-block: 24px;
  font-size: var(--fs-h3);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 24px; height: 24px; flex: none; transition: transform 200ms var(--ease); }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq .answer { padding-bottom: 28px; max-width: var(--measure); color: var(--ink-2); }
.faq .answer a { text-decoration: underline; font-weight: 500; }

@media (min-width: 744px) {
  .faq-split { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); column-gap: 48px; }
}

/* ---------- Contact page ---------- */
.contact-band { background: var(--bg-night); color: var(--on-night); --focus: var(--on-night); padding-block: 56px var(--section); }
.contact-split { display: grid; gap: 48px; align-items: start; }
.contact-intro { display: grid; gap: 20px; }
.contact-intro .lead { color: var(--on-night-muted); }
.direct { list-style: none; display: grid; gap: 4px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--rule-night); }
.direct li { display: grid; gap: 0; color: var(--on-night); }
.direct span { color: var(--on-night-muted); font-size: 0.875rem; }
.direct a { font-weight: 500; text-decoration: underline; color: var(--on-night); }

@media (min-width: 480px) {
  .direct li { grid-template-columns: 136px minmax(0, 1fr); align-items: center; gap: 16px; }
}

@media (min-width: 744px) {
  .contact-band { padding-top: 88px; }
}

@media (min-width: 1024px) {
  .contact-split { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: 64px; }
}

.form { display: grid; gap: 24px; padding: 24px 20px; background: var(--stone); color: var(--ink); border-radius: var(--radius-lg); --focus: var(--ink); }
.field { display: grid; gap: 8px; align-content: start; }
.field label, fieldset.field legend { font-weight: 500; }
.field .opt { font-weight: 400; color: var(--muted); }
.field .hint { color: var(--muted); font-size: 0.875rem; }
.field input, .field textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--field);
  border-radius: var(--radius-sm);
}
.field textarea { min-height: 136px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { border-color: var(--ink); }
.field [aria-invalid="true"] { border-color: var(--error); border-width: 2px; }
.field-error { color: var(--error); font-weight: 500; }
.field-error[hidden] { display: none; }
fieldset.field { margin: 0; padding: 0; border: 0; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: 8px; }
.choices { display: grid; gap: 8px; }
.field .choice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 12px 16px;
  background: var(--paper);
  border: 1px solid var(--field);
  border-radius: var(--radius-sm);
  font-weight: 400;
  line-height: 1.35;
  cursor: pointer;
}
.choice input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--gold-ink); }
.choice:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
fieldset[aria-invalid="true"] .choice { border-color: var(--error); }
.two-up { display: grid; gap: 24px; }
.form .btn { width: 100%; }
.form .btn[aria-disabled="true"] { opacity: 0.72; cursor: progress; }
.form-note { color: var(--muted); font-size: 0.875rem; }
.form-note a { color: var(--ink); text-decoration: underline; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

@media (min-width: 640px) {
  .form { padding: 40px; }
  .form .btn { width: auto; justify-self: start; }
  .two-up, .choices { grid-template-columns: 1fr 1fr; }
}

/* Thank-you, 404 */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }

/* ---------- Reading pages: the contents list stays in view while the text scrolls ---------- */
.toc { display: grid; align-content: start; }
.toc-title { font-size: 0.875rem; color: var(--muted); padding-bottom: 4px; }
.doc > nav a { padding-block: 12px; text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--rule); }

@media (min-width: 744px) {
  .doc > nav { position: static; align-self: stretch; }
  .toc { position: sticky; top: calc(var(--header-h) + 24px); }
}

.doc-text { display: grid; gap: 12px; }
.doc-text .meta { color: var(--muted); font-size: 0.875rem; }
.doc-text h2 { font-size: var(--fs-h3); letter-spacing: -0.015em; line-height: 1.15; margin-top: 28px; scroll-margin-top: calc(var(--header-h) + 16px); }
.doc-text h2:first-of-type { margin-top: 0; }
.doc-text a { text-decoration: underline; }
.doc > aside { align-self: start; }

@media (hover: hover) and (pointer: fine) {
  .doc > nav a:hover { text-decoration: underline; }
}

@media (max-width: 743px) {
  .doc > nav { order: 2; }
  .doc > aside { order: 3; }
}

/* ---------- Footer: office details, then the logo across the full width ---------- */
.site-footer { background: var(--bg-night); color: var(--on-night); padding-block: 72px 32px; --focus: var(--on-night); }
.footer-grid { display: grid; gap: 32px var(--gap); padding-bottom: 48px; }
.footer-grid h2 { font-size: 0.875rem; font-weight: 500; letter-spacing: 0; line-height: 1.4; color: var(--on-night-muted); margin-bottom: 8px; }
.footer-grid address { color: var(--on-night); }
.site-footer a:not(.btn) { min-width: 44px; color: var(--on-night); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.site-footer .footer-mark { display: block; padding-block: 24px; text-decoration: none; border-radius: var(--radius); }
.footer-mark img { width: 100%; height: auto; }
.legal { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 32px; padding-top: 16px; border-top: 1px solid var(--rule-night); font-size: 1rem; color: var(--on-night-muted); }
.legal p { max-width: 64ch; }
.legal a + a { margin-left: 24px; }

@media (min-width: 744px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1180px) {
  .site-footer { padding-block: 104px 40px; }
  .footer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); padding-bottom: 72px; }
  .site-footer .footer-mark { padding-block: 32px 40px; }
}

/* Phone call bar: Consultation (read out as Request a consultation) outlined, Call us now solid gold and taking the rest of the bar */
.callbar {
  inset: auto 8px calc(8px + env(safe-area-inset-bottom)) 8px;
  padding: 8px;
  border-radius: var(--pill);
  background: rgba(27, 26, 23, 0.96);
  --focus: var(--on-night);
}

@media (max-width: 743px) {
  body { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
}
.callbar .btn { min-height: 48px; padding-inline: 12px; }
.callbar .btn:first-child { flex: 0 0 auto; padding-inline: 16px; background: transparent; color: var(--on-night); border-color: var(--on-night); }

/* Photo viewer */
.lightbox { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: #121110; color: var(--on-night); --focus: var(--on-night); }
.lightbox::backdrop { background: #121110; }
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: 12px var(--gutter); }
.lb-count { color: var(--on-night-muted); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.lb-stage { position: relative; display: grid; place-items: center; min-height: 0; padding-inline: var(--gutter); }
.lb-img { max-width: 100%; max-height: calc(100dvh - 152px); width: auto; height: auto; object-fit: contain; border-radius: var(--radius); }
.lb-cap { padding: 12px var(--gutter) calc(16px + env(safe-area-inset-bottom)); text-align: center; color: var(--on-night-muted); }
.lb-btn { display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: rgba(27, 26, 23, 0.72); color: var(--on-night); cursor: pointer; }
.lb-btn svg { width: 24px; height: 24px; }
.lb-btn:active { transform: scale(0.97); }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-nav:active { transform: translateY(-50%) scale(0.97); }
.lb-prev { left: 8px; }
.lb-next { right: 8px; }

@media (min-width: 1024px) {
  .lb-prev { left: 24px; }
  .lb-next { right: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .photo:hover img { transform: none; }
}

/* While a page's opening photo is still arriving, a few lines of script put .hold on <html> (gen.py HOLD) and the big
   photos further down are kept from starting, so they can't slow the first screen on a weak connection. A browser
   starts a lazy photo when its box comes near the screen; shifting the unloaded photo far out of its own clipped
   frame (above the top of the page, where nothing can scroll to) keeps it from counting as near, and because the
   photo's box stays in the layout nothing moves when it is let go. */
html.hold :is(.photo, .tile, .about-media, .cta-media) img[loading="lazy"] { transform: translateY(-100000px); }

/* A lazy photo shows a tiny blurred copy of itself (set inline by gen.py) until the real file arrives */
picture[style*="background-image"] { background-size: cover; background-position: center; }

/* ---------- Motion. Transform, clip-path and color only; everything starts visible, the hero photo is never
   hidden, and none of it runs with reduced motion. ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* Opening: the headline rises line by line (base.css runs the lines). The home picture itself holds still: it is the
     first frame of the drone footage, which brings the motion, and a zoom here would run against the footage's own. */
  .hero--home .intro-media { animation: none; }

  /* Entrances let go once they finish. Left to fill forwards, Chrome keeps every finished element on a layer of its
     own for the life of the page, and the opening photo was drawn from an enlarged copy scaled back down, which
     softened it. Each entrance ends at the element's own resting style, so letting go changes nothing else. */
  .intro-media, .intro-line > span, .intro-fade, .page-intro h1, .page-intro .lead { animation-fill-mode: backwards; }

  /* On pages that open with words instead of a photo, the first paragraph is the largest thing on screen, so it
     rises into place fully visible instead of fading in from nothing (which held back the largest-paint timing). */
  .page-intro:not(.hero) .lead { animation-name: lead-rise; }

  @supports (animation-timeline: view()) {
    /* Heroes: the photo drifts slower than the page and the headline moves off a little faster. The inset is 0 so the
       page's scroll-padding (there for the sticky header) can't start the drift early: on heroes shorter than the
       screen it did, and the photo sat 23px low with a dark strip above it. */
    .hero { view-timeline-name: --hero; view-timeline-inset: 0px; }
    .hero-media { animation: hero-recede linear both; animation-timeline: --hero; animation-range: exit 0% exit 100%; }
    .hero-media::after { animation: hero-dusk linear both; animation-timeline: --hero; animation-range: exit 0% exit 100%; }
    .hero-copy { animation: copy-rise linear both; animation-timeline: --hero; animation-range: exit 0% exit 90%; }

    /* Big headings and cards rise into place as they scroll in. Photos are left alone: a scroll effect would hold each
       one on its own layer, drawn from an enlarged copy, which costs sharpness and makes scrolling heavier. */
    .section-head h2, .office, .steps--row li, .person, .areas li, .about-copy h2, .gallery-band h2, .tile {
      animation: soft-rise var(--ease-out) both;
      animation-timeline: view();
      animation-range: entry 0% cover 25%;
    }

    /* The closing photo starts as a rounded card inside the band and opens out to the edges as it arrives */
    .cta-media { animation: cta-open var(--ease-out) both; animation-timeline: view(); animation-range: entry 0% cover 45%; }

    /* The big logo in the footer rises out of the ground as the footer comes up */
    .footer-mark img { animation: mark-rise var(--ease-out) both; animation-timeline: view(); animation-range: entry 0% entry 100%; }

    /* Cards in the same row arrive one after another */
    .tile:nth-child(2), .steps--row li:nth-child(2), .areas li:nth-child(2), .person:nth-child(2) { animation-range: entry 4% cover 29%; }
    .tile:nth-child(3), .steps--row li:nth-child(3), .areas li:nth-child(3), .person:nth-child(3) { animation-range: entry 8% cover 33%; }
    .person:nth-child(4) { animation-range: entry 12% cover 37%; }

  }

  /* Page to page: the header holds still while the page drops out and the next one rises in */
  ::view-transition-old(root) { animation: page-out 200ms var(--ease) both; }
  ::view-transition-new(root) { animation: page-in 460ms var(--ease-out) 80ms both; }
  .callbar { view-transition-name: callbar; }
}

@keyframes lead-rise { from { transform: translateY(12px); } }
@keyframes soft-rise { from { transform: translateY(32px); } }
@keyframes hero-recede { to { transform: translateY(25%); } }
@keyframes hero-dusk { to { opacity: 0.35; } }
@keyframes copy-rise { to { transform: translateY(-12vh); opacity: 0.3; } }

@keyframes cta-open { from { transform: scale(0.88); } }
@keyframes mark-rise { from { transform: translateY(72%); } }
@keyframes page-out { to { opacity: 0; transform: translateY(-12px); } }
@keyframes page-in { from { opacity: 0; transform: translateY(24px); } }

/* ---------- Polish: every state change eases, nothing snaps (all of it off with reduced motion via base.css) ---------- */
:root { interpolate-size: allow-keywords; }
a { transition: text-decoration-thickness 300ms var(--ease-out), text-underline-offset 300ms var(--ease-out), color 300ms var(--ease-out); }

/* Main nav: no underline. A soft rounded highlight fades in behind the link; the current page keeps a light one */
.nav a {
  position: relative;
  padding-inline: 14px;
  border-radius: var(--pill);
  text-decoration: none;
  transition: background-color 300ms var(--ease-out), color 300ms var(--ease-out);
}
.nav a[aria-current="page"] { text-decoration: none; background-color: rgba(242, 238, 230, 0.12); }
.hdr-link { border-radius: var(--pill); transition: background-color 300ms var(--ease-out); }
.hdr-link[aria-current="page"] { background-color: rgba(242, 238, 230, 0.12); }

@media (hover: hover) and (pointer: fine) {
  .nav a:hover, .hdr-link:hover { text-decoration: none; background-color: rgba(242, 238, 230, 0.1); }
  .nav a[aria-current="page"]:hover, .hdr-link[aria-current="page"]:hover { background-color: rgba(242, 238, 230, 0.16); }
}

.hero-links a, .menu-btn, .motion-toggle, .field .choice, .field input, .field textarea {
  transition: background-color 300ms var(--ease-out), border-color 300ms var(--ease-out), box-shadow 300ms var(--ease-out), color 300ms var(--ease-out);
}
.lb-btn { transition: background-color 300ms var(--ease-out), transform 300ms var(--ease-out); }
.faq summary svg { transition: transform 400ms var(--ease-out); }


@media (prefers-reduced-motion: no-preference) {
  /* Phone menu: the panel eases down and the links follow one after another */
  .mobile-nav:not([hidden]) { animation: menu-in 420ms var(--ease-out) both; }
  .mobile-nav:not([hidden]) a { animation: menu-link 560ms var(--ease-out) both; animation-delay: calc(40ms + var(--n, 0) * 35ms); }
  .mobile-nav a:nth-child(2) { --n: 1; }
  .mobile-nav a:nth-child(3) { --n: 2; }
  .mobile-nav a:nth-child(4) { --n: 3; }
  .mobile-nav a:nth-child(5) { --n: 4; }
  .mobile-nav a:nth-child(6) { --n: 5; }
  .mobile-nav a:nth-child(7) { --n: 6; }

  /* Questions open and close smoothly instead of jumping */
  .faq details::details-content {
    block-size: 0;
    overflow-y: clip;
    transition: block-size 450ms var(--ease-out), content-visibility 450ms var(--ease-out) allow-discrete;
  }
  .faq details[open]::details-content { block-size: auto; }
}

@keyframes soft-in { from { opacity: 0; } }
@keyframes menu-in { from { opacity: 0; transform: translateY(-10px) scale(0.985); } }
@keyframes menu-link { from { transform: translateY(14px); } }

/* ---------- Cards: the process steps, the team, the areas, the questions and the contents list sit on
   rounded white cards instead of ruled lists ---------- */
.steps--row li, .person, .areas li { padding: 28px; border-top: 0; border-radius: var(--radius-lg); background: var(--paper); }
.band--night .steps--row li { background: rgba(242, 238, 230, 0.05); border: 1px solid var(--rule-night); }
.faq { display: grid; gap: 12px; align-content: start; }
.faq details, .faq details:last-child { padding-inline: 24px; border: 0; border-radius: var(--radius); background: var(--paper); }
.toc { padding: 12px 24px 16px; border-radius: var(--radius); background: var(--stone); }
.doc > nav .toc a:last-child { border-bottom: 0; }

@media (min-width: 744px) {
  .steps--row li, .person, .areas li { padding: 32px; }
  .faq details, .faq details:last-child { padding-inline: 32px; }
}

/* ---------- Shading: every photo and every card sits on a soft shadow, deeper on the dark sections ---------- */
/* every photo sits on a clear shadow all the way around, deepest underneath */
.photo, .about-media { box-shadow: var(--shade); }
.portrait img, .office, .person, .areas li, .steps--row li, .faq details, .toc, .band .help-card { box-shadow: var(--shadow-md); }
.band--night .photo, .gallery-wrap .photo, .band--night .office, .band--night .steps--row li, .intro-dark .portrait img,
.tile, .form, .help-card, .facts--card, .lb-img { box-shadow: var(--shadow-night); }
.band .help-card { box-shadow: var(--shadow-md); }
.hero-links a, .btn, .byline picture, .callbar, .js .site-header.is-solid .wrap, .js body:not(.has-photo-hero) .site-header .wrap { box-shadow: var(--shadow-sm); }

/* Each section casts a soft shadow up onto the one it slides over */
main > :not(:first-child), .site-footer { box-shadow: var(--shadow-sheet); }

@media (hover: hover) and (pointer: fine) {
  .photo, .tile { transition: transform 450ms var(--ease-out), box-shadow 450ms var(--ease-out); }
  .photo:hover { box-shadow: 0 2px 4px rgba(18, 17, 15, 0.14), 0 14px 30px rgba(18, 17, 15, 0.22), 0 40px 76px -8px rgba(18, 17, 15, 0.42), 0 72px 130px -20px rgba(18, 17, 15, 0.48); }
  .band--night .photo:hover, .gallery-wrap .photo:hover, .tile:hover { box-shadow: 0 0 0 1px rgba(242, 238, 230, 0.1), 0 6px 16px rgba(0, 0, 0, 0.55), 0 32px 68px rgba(0, 0, 0, 0.7), 0 70px 130px -16px rgba(0, 0, 0, 0.85); }
  .btn:hover { box-shadow: 0 14px 28px -12px rgba(18, 17, 15, 0.65); }
}

/* ---------- Finishing touches ---------- */
::selection { background: var(--gold-light); color: var(--ink); }

/* The closing photo opens from a rounded card; the footer logo rises inside its own frame */
.cta-media { border-radius: var(--sheet); overflow: hidden; }
.site-footer .footer-mark { overflow: clip; }

/* A round "view larger" mark appears on a photo under the pointer or keyboard focus */
.photo-zoom {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(18, 17, 15, 0.64);
  color: var(--on-night);
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
  transition: opacity 300ms var(--ease-out), transform 450ms var(--ease-out);
}
.photo-zoom svg { width: 20px; height: 20px; }
.photo:focus-visible .photo-zoom { opacity: 1; transform: none; }

@media (hover: hover) and (pointer: fine) {
  .photo:hover .photo-zoom { opacity: 1; transform: none; }
}

/* Photos develop: a lazy photo fades in over its blurred placeholder once it has loaded (js/brhc.js) */
.develop picture[style*="background-image"] > img { opacity: 0; transition: opacity 480ms var(--ease-out), transform 450ms var(--ease-out); }
.develop picture[style*="background-image"] > img.is-in { opacity: 1; }

/* Main menu: one highlight glides between the links (js/brhc.js); the links' own highlights step aside */
.nav { position: relative; }
.nav-pill {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: var(--pill);
  background: rgba(242, 238, 230, 0.12);
  opacity: 0;
  pointer-events: none;
  transition: transform 450ms var(--ease-out), width 450ms var(--ease-out), opacity 250ms var(--ease-out);
}
.nav.has-pill a { z-index: 1; }
.nav.has-pill a, .nav.has-pill a:hover, .nav.has-pill a[aria-current="page"], .nav.has-pill a[aria-current="page"]:hover { background-color: transparent; }

/* Photo viewer: the page shows through while the photo grows out of its thumbnail (js/brhc.js) */
.lightbox::backdrop { background: transparent; }
html { scrollbar-gutter: stable; }
html:has(.lightbox[open]) { overflow: hidden; }
.lb-stage { touch-action: none; }
.lb-img { width: min(100%, calc((100dvh - 152px) * var(--ar, 1.5))); height: auto; max-height: none; aspect-ratio: var(--ar, 1.5); object-fit: cover; }
.lb-top, .lb-cap, .lb-nav { transition: opacity 300ms var(--ease-out); }
.lightbox.is-entering { background-color: transparent; }
.lightbox.is-entering .lb-img, .lightbox.is-entering .lb-top, .lightbox.is-entering .lb-cap, .lightbox.is-entering .lb-nav { opacity: 0; }
.lightbox.is-clean .lb-top, .lightbox.is-clean .lb-cap, .lightbox.is-clean .lb-nav { opacity: 0; pointer-events: none; }

/* ---------- Home opening ---------- */
.hero-media { overflow: hidden; }
/* The home photo stops 1px short of the bottom of the opening screen (that row sits under the next section's rounded
   edge, so nothing shows). A photo that fills the screen exactly is left out of the browser's largest-paint timing as
   a presumed background, and on iPads and Macs the timing then fell to the sentence under the headline, which the
   logo intro holds back for almost three seconds. */
.hero--home .hero-media { bottom: 1px; }
.hero-media::after { content: ""; position: absolute; inset: 0; z-index: 3; background: #121110; opacity: 0; pointer-events: none; }

/* ---------- Scrolling is entirely the browser's own, edges included: on a Mac trackpad that is the native soft bounce
   at the top and the bottom. (A custom ease into the edges ran here until Nov 10; it fought trackpad momentum at the
   bottom of the page and was taken out.) ---------- */

/* Every photo and block has its size reserved, so nothing above the screen changes height and the browser has no
   need to "anchor" the scroll. Safari's new scroll anchoring also misreads the scroll-driven photo effects as moved
   content and shifts the page (a jump past the opening photo landed 752px low in its engine), so it is off. */
html { overflow-anchor: none; }

/* ---------- Home opening, on arrival or reload (gen.py intro(); js/brhc.js measures the logo's flight and lets any key,
   click, tap or scroll skip it). The logo builds itself on a dark screen and a band of light crosses it; a gold horizon line
   draws out beneath it; the dark parts along that line in one move onto the drone footage while the logo flies up into
   the header. About two seconds. Transforms and opacity only, so it all runs off the main thread. Off with reduced
   motion. ---------- */
.intro { display: none; }

@media (prefers-reduced-motion: no-preference) {
  html:not(.intro-off) .intro {
    --r: 28px;
    --open: cubic-bezier(0.62, 0, 0.3, 1);   /* the dark halves part in one unbroken, even glide */
    position: fixed;
    inset: 0;
    z-index: 300;
    display: block;
    overflow: hidden;
    animation: intro-done 1ms linear 2050ms both;
  }
  .intro-shade {
    position: absolute;
    left: 0;
    right: 0;
    height: calc(50% + var(--r));
    overflow: hidden;
    will-change: transform;
  }
  .intro-shade--top { top: 0; border-radius: 0 0 var(--r) var(--r); animation: shade-top 1000ms var(--open) 1000ms both; }
  .intro-shade--bottom { bottom: 0; border-radius: var(--r) var(--r) 0 0; animation: shade-bottom 1000ms var(--open) 1000ms both; }
  /* both halves show their part of one full-screen backdrop, so the seam can't be seen while they are closed */
  .intro-shade::before { content: ""; position: absolute; left: 0; right: 0; height: calc(200% - 2 * var(--r)); background: var(--bg-night); }
  .intro-shade--top::before { top: 0; }
  .intro-shade--bottom::before { bottom: 0; }

  .intro-horizon {
    position: absolute;
    left: 6%;
    right: 6%;
    top: 50%;
    height: 2px;
    margin-top: -1px;
    background: linear-gradient(90deg, rgba(217, 192, 138, 0), #D9C08A 22%, #FFF4D6 50%, #D9C08A 78%, rgba(217, 192, 138, 0));
    box-shadow: 0 0 14px 1px rgba(217, 192, 138, 0.45);
    transform: scaleX(0);
    animation: horizon-draw 600ms var(--ease-out) 380ms forwards, horizon-out 220ms ease-in 1000ms forwards;
  }

  .intro-logo {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(50% - min(70vw, 980px) * 0.1365 - 6svh);
    display: flex;
    align-items: center;
    gap: 3.1%;
    width: min(70vw, 980px);
    margin-inline: auto;
    transform-origin: 0 0;
    filter: drop-shadow(0 2px 14px rgba(0, 0, 0, 0.5));
    animation: logo-fly 800ms cubic-bezier(0.6, 0, 0.25, 1) 930ms both;   /* leaves just ahead of the opening, so it stays over the dark */
  }
  .intro-mark { flex: none; width: 13.1%; min-width: 0; height: auto; overflow: visible; animation: intro-mark 600ms var(--ease-out) 40ms both; }
  .intro-word { flex: 1 1 0; min-width: 0; height: auto; overflow: visible; }
  .intro-word .l1 { animation: intro-glyph 480ms var(--ease-out) both; animation-delay: calc(170ms + var(--i) * 20ms); }
  .intro-word .l2 { animation: intro-track 600ms var(--ease-out) 450ms both; }

  /* the header's own logo waits under the flying one and takes over the moment it lands (brhc.js adds logo-fly) */
  html.logo-fly:not(.intro-off) .site-header .logo img { animation: logo-wait 2000ms steps(1, end) both; }

  /* the headline rises as the dark halves pass the middle of their opening */
  .intro-on .hero--home .intro-line > span { animation-delay: calc(1450ms + var(--i, 0) * 90ms); }
  .intro-on .hero--home .intro-fade { animation-delay: calc(1650ms + var(--i, 0) * 80ms); }

  /* skipped: the frame opens straight away and the hero comes in right behind it */
  html.intro-skip .intro { animation: intro-done 1ms linear 560ms both; }
  html.intro-skip .intro-shade--top { animation: shade-top-skip 540ms cubic-bezier(0.76, 0, 0.24, 1) both; }
  html.intro-skip .intro-shade--bottom { animation: shade-bottom-skip 540ms cubic-bezier(0.76, 0, 0.24, 1) both; }
  html.intro-skip:not(.intro-off) .intro-horizon, html.intro-skip:not(.intro-off) .intro-logo { animation: intro-logo-out 260ms ease-in both; }
  html.intro-skip.logo-fly:not(.intro-off) .site-header .logo img { animation: none; }
  html.intro-skip .hero--home .intro-line > span { animation-delay: calc(250ms + var(--i, 0) * 80ms); }
  html.intro-skip .hero--home .intro-fade { animation-delay: calc(400ms + var(--i, 0) * 80ms); }
}

@media (max-width: 743px) {
  /* phones: the logo stacks (house over the name) and rises away instead of flying into the smaller header */
  html:not(.intro-off) .intro-logo { flex-direction: column; gap: 22px; width: 84vw; top: calc(50% - min(30vw, 128px) - 22px - 84vw * 0.108 - 5svh); }
  /* it sits on the top half of the dark screen and leaves with it */
  html:not(.intro-off) .intro-logo { animation: logo-ride 1000ms var(--open) 1000ms both; }
  .intro-mark { flex: none; width: 30vw; max-width: 128px; }
  .intro-word { flex: none; width: 100%; }
}

@keyframes intro-done { to { visibility: hidden; } }
@keyframes intro-mark { from { clip-path: inset(100% 0 0 0); transform: translateY(16px); opacity: 0.3; } to { clip-path: inset(0 0 0 0); transform: none; opacity: 1; } }
@keyframes intro-glyph { from { translate: 0 64px; opacity: 0; } }
@keyframes intro-track { from { translate: calc(var(--o) * 24px) 0; opacity: 0; } }
@keyframes intro-logo-out { to { transform: translateY(-36px); opacity: 0; } }
/* hidden until 50ms before the opening ends, so the two logos overlap for a moment and never both vanish */
@keyframes logo-wait { from { opacity: 0; } }
@keyframes horizon-draw { to { transform: scaleX(1); } }
@keyframes horizon-out { to { opacity: 0; } }
/* with no measurements (phones, or before the script has run) the logo rises and fades instead of flying */
@keyframes logo-fly { to { transform: translate(var(--fx, 0px), var(--fy, -48px)) scale(var(--fs, 0.94)); opacity: var(--fo, 0); } }
/* the dark halves part from the horizon line in one move and leave the screen */
@keyframes shade-top { to { transform: translateY(calc(-100% - 60px)); } }
@keyframes shade-bottom { to { transform: translateY(calc(100% + 60px)); } }
@keyframes logo-ride { to { transform: translateY(-100svh); } }
@keyframes shade-top-skip { to { transform: translateY(calc(-100% - 60px)); } }
@keyframes shade-bottom-skip { to { transform: translateY(calc(100% + 60px)); } }

/* ---------- Home opening footage: drone clips made from the project photos (gen.py DRONE; js/brhc.js plays them).
   The picture underneath is the first clip's first frame: the clip cuts in on it (usually behind the opening), then the
   clips cross-fade into one another. Not loaded with reduced motion, Save-Data or a slow connection. ---------- */
.drone { position: absolute; inset: 0; pointer-events: none; }
.drone video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos, 50% 50%);
  transition: opacity 1400ms cubic-bezier(0.4, 0, 0.2, 1);
}
/* Clips are never hidden while they play (iPhones may refuse to play a video they consider invisible): the next clip
   starts underneath and the one on top fades away to reveal it. */
.drone video.top { z-index: 1; }
.drone video.out { opacity: 0; }
.drone video.instant { transition: none; }
/* no play button drawn over the footage when a phone's power saving holds it back until the first tap */
.drone video::-webkit-media-controls, .drone video::-webkit-media-controls-start-playback-button { display: none !important; -webkit-appearance: none; }

/* Pause and play for the footage (WCAG 2.2.2: moving content over five seconds needs a way to stop it). Shown only once
   the footage is playing, or when it is paused, at the end of the opening's actions. */
.drone-toggle {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  margin: -7px -7px -7px 0;   /* the disc, not the tap area, lines up with the text edge */
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: rgba(244, 239, 230, 0.86);
  cursor: pointer;
}
.drone-toggle::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(244, 239, 230, 0.28);
  border-radius: 50%;
  background: rgba(18, 17, 15, 0.3);
  transition: background-color 200ms ease, border-color 200ms ease;
}
.drone-toggle:focus-visible { outline-offset: -4px; }
.drone-toggle[hidden] { display: none; }
.drone-toggle svg { position: relative; width: 10px; height: 10px; fill: currentColor; }
.drone-toggle .i-play, .drone-toggle[data-state="paused"] .i-pause { display: none; }
.drone-toggle[data-state="paused"] .i-play { display: block; }
@media (max-width: 743px) { .hero--home .drone-toggle { margin-left: auto; } }   /* phones: off to the far edge, apart from the call link */
@media (hover: hover) and (pointer: fine) {
  .drone-toggle:hover::before { background: rgba(18, 17, 15, 0.6); border-color: rgba(244, 239, 230, 0.55); }
}

@media (prefers-reduced-motion: reduce) { .drone { display: none; } }

/* ---------- Raised buttons: every button has a light top edge, a darker bottom edge and a shadow under it, lifts a
   touch under the pointer and presses in when clicked. Gold stays dark enough behind the words for 4.5:1. ---------- */
:root {
  --raise: inset 0 1px 0 rgba(255, 244, 214, 0.42), inset 0 -2px 0 rgba(0, 0, 0, 0.24), 0 1px 2px rgba(18, 17, 15, 0.3), 0 10px 20px -8px rgba(18, 17, 15, 0.6);
  --raise-up: inset 0 1px 0 rgba(255, 244, 214, 0.5), inset 0 -2px 0 rgba(0, 0, 0, 0.24), 0 2px 4px rgba(18, 17, 15, 0.3), 0 16px 28px -10px rgba(18, 17, 15, 0.66);
  --raise-press: inset 0 2px 6px rgba(0, 0, 0, 0.34), inset 0 -1px 0 rgba(255, 244, 214, 0.12), 0 1px 2px rgba(18, 17, 15, 0.3);
  --glass: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 22px -10px rgba(0, 0, 0, 0.75);
  --glass-up: inset 0 1px 0 rgba(255, 255, 255, 0.38), inset 0 -1px 0 rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.38), 0 16px 30px -12px rgba(0, 0, 0, 0.8);
  --glass-press: inset 0 2px 6px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.3);
  --paper-raise: inset 0 1px 0 #fff, inset 0 -2px 0 rgba(18, 17, 15, 0.07), 0 1px 2px rgba(18, 17, 15, 0.14), 0 8px 18px -8px rgba(18, 17, 15, 0.38);
}

/* gold */
.btn { background: linear-gradient(180deg, #917226 0%, #8A6C1E 50%, #765A17 100%); text-shadow: 0 1px 1px rgba(0, 0, 0, 0.28); box-shadow: var(--raise); }

/* clear buttons on dark sections and photos: smoked glass with a lit top edge */
.band--night .btn--ghost, .on-photo .btn--ghost,
.callbar .btn:first-child,
.hero-links a, .menu-btn, .lb-btn, .photo-zoom {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.05) 100%), rgba(18, 17, 15, 0.42);
  border-color: rgba(242, 238, 230, 0.55);
  color: var(--on-night);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
  box-shadow: var(--glass);
}
.lb-btn, .photo-zoom { border: 1px solid rgba(242, 238, 230, 0.3); }

/* clear buttons on light sections */
.btn--ghost { background: linear-gradient(180deg, #FFFFFF 0%, #F1ECE3 100%); border-color: rgba(29, 27, 24, 0.4); color: var(--ink); text-shadow: none; box-shadow: var(--paper-raise); }

/* the project-type choices on the form */
.field .choice { background: linear-gradient(180deg, #FFFFFF 0%, #F6F2EB 100%); box-shadow: var(--paper-raise); }
.choice:has(input:checked) { background: #F1ECE3; box-shadow: inset 0 0 0 1px var(--ink), inset 0 2px 5px rgba(18, 17, 15, 0.14); }

.hero-links a, .menu-btn, .lb-btn, .field .choice { transition: background-color 300ms var(--ease-out), border-color 300ms var(--ease-out), box-shadow 300ms var(--ease-out), transform 300ms var(--ease-out); }

@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: linear-gradient(180deg, #8A6C1E 0%, #7D6119 50%, #6A5013 100%); transform: translateY(-1px); box-shadow: var(--raise-up); }
  .band--night .btn--ghost:hover, .on-photo .btn--ghost:hover,
  .hero-links a:hover, .menu-btn:hover, .lb-btn:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0.08) 100%), rgba(18, 17, 15, 0.5);
    border-color: var(--on-night);
    color: var(--on-night);
    transform: translateY(-1px);
    box-shadow: var(--glass-up);
  }
  .btn--ghost:hover { background: linear-gradient(180deg, #FFFFFF 0%, #EAE3D7 100%); color: var(--ink); transform: translateY(-1px); }
  .field .choice:hover { transform: translateY(-1px); }
  .lb-nav:hover { transform: translateY(calc(-50% - 1px)); }
}

.btn:active { transform: translateY(1px); box-shadow: var(--raise-press); }
.band--night .btn--ghost:active, .on-photo .btn--ghost:active,
.callbar .btn:first-child:active, .hero-links a:active, .menu-btn:active, .lb-btn:active { transform: translateY(1px); box-shadow: var(--glass-press); }
.btn--ghost:active, .field .choice:active { transform: translateY(1px); box-shadow: inset 0 2px 5px rgba(18, 17, 15, 0.16); }
.lb-nav:active { transform: translateY(calc(-50% + 1px)); }
