/* =========================================================================
   ExteriorLTD — Exterior Finishes Ltd
   Shared stylesheet. Plain CSS, no framework.
   Design tokens + system per DESIGN.md (brief Section 2).
   ========================================================================= */

/* ----------------------------------------------------------------- Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, picture, svg, video { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
ul[role="list"] { list-style: none; padding: 0; }
:focus-visible { outline: 3px solid var(--c-terracotta); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------------------------------------------------------------- Tokens */
:root {
  /* Color — industrial envelope materials, not warm-cream cliché */
  --c-graphite:    #1E1B18;
  --c-graphite-2:  #27231F;
  --c-ink:         #15130F;
  --c-stone:       #E7E3DA;
  --c-stone-2:     #D7D2C6;
  --c-stone-hi:    #F2EFE9;
  --c-terracotta:  #B14F2E;
  --c-terracotta-hi:#C45F3B;
  --c-zinc:        #6B7270;
  --c-zinc-lo:     #9aa09c;

  /* Semantic */
  --bg:        var(--c-stone);
  --surface:   var(--c-stone-hi);
  --text:      var(--c-ink);
  --text-muted:#54514a;
  --text-on-dark-muted:#D4CEC1;
  --line:      var(--c-stone-2);
  --line-on-dark:rgba(231,227,218,.28);
  --accent:    var(--c-terracotta);

  /* Type */
  --font-display: "General Sans", "Archivo", system-ui, sans-serif;
  --font-body:    "Source Sans 3", system-ui, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "Cascadia Mono", monospace;

  --step--1: clamp(0.83rem, 0.80rem + 0.15vw, 0.92rem);
  --step-0:  clamp(1rem, 0.96rem + 0.20vw, 1.12rem);
  --step-1:  clamp(1.20rem, 1.12rem + 0.40vw, 1.45rem);
  --step-2:  clamp(1.50rem, 1.36rem + 0.70vw, 2.00rem);
  --step-3:  clamp(1.95rem, 1.70rem + 1.25vw, 2.90rem);
  --step-4:  clamp(2.45rem, 2.05rem + 2.00vw, 4.10rem);
  --step-5:  clamp(2.90rem, 2.30rem + 3.00vw, 5.00rem);

  /* Spacing — 8px scale */
  --sp-1: 0.5rem; --sp-2: 1rem; --sp-3: 1.5rem; --sp-4: 2rem;
  --sp-5: 3rem;   --sp-6: 4rem; --sp-7: 6rem;   --sp-8: 8rem;

  --maxw: 1200px;
  --maxw-text: 68ch;
  --radius: 2px;
  --radius-lg: 4px;
  --shadow: 0 1px 2px rgba(21,19,15,.06), 0 12px 28px -16px rgba(21,19,15,.28);
  --ease: cubic-bezier(0.16, 1, 0.3, 1); /* ease-out-expo-ish */

  /* z-scale */
  --z-sticky: 100; --z-backdrop: 200; --z-menu: 300; --z-modal: 400;
}

/* --------------------------------------------------------------- Base */
body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
html.is-gallery-locked {
  scroll-behavior: auto;
  scrollbar-gutter: stable;
}
body.is-gallery-locked {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--c-ink);
}
p { text-wrap: pretty; }
.prose p, .prose li { max-width: var(--maxw-text); }
a { text-underline-offset: 3px; }

/* Utilities --------------------------------------------------------- */
.wrap { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2.5rem, 780px); margin-inline: auto; }
.section { padding-block: clamp(3.5rem, 2.5rem + 4vw, 7rem); }
.section--tight { padding-block: clamp(2.5rem, 2rem + 2.5vw, 4.5rem); }
.section--dark { background: var(--c-graphite); color: var(--c-stone); }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: var(--c-stone-hi); }
.section--ink { background: var(--c-graphite-2); color: var(--c-stone); }
.section--ink h2, .section--ink h3 { color: var(--c-stone-hi); }
.eyrow { display:flex; align-items:baseline; gap: var(--sp-3); flex-wrap: wrap; }
.mono { font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: 0.02em; }
.mono-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-terracotta);
}
.section--dark .mono-label, .section--ink .mono-label { color: var(--c-terracotta-hi); }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--text-muted); max-width: 62ch; }
.section--dark .lede, .section--ink .lede { color: var(--text-on-dark-muted); }
.center { text-align: center; }
.stack > * + * { margin-top: var(--sp-3); }
.divider { height: 1px; background: var(--line); border: 0; }
.section--dark .divider, .section--ink .divider { background: var(--line-on-dark); }

/* Buttons ----------------------------------------------------------- */
.btn {
  --_bg: var(--c-terracotta); --_fg: var(--c-stone-hi); --_bd: var(--c-terracotta);
  --_hover-bg: #A84829; --_hover-fg: var(--c-stone-hi); --_hover-bd: #A84829;
  --_hover-shadow: 0 10px 22px -12px rgba(177,79,46,.7);
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--font-display); font-weight: 600; font-size: var(--step-0);
  line-height: 1; letter-spacing: -0.01em;
  padding: 0.85em 1.4em;
  background: var(--_bg); color: var(--_fg);
  border: 1.5px solid var(--_bd); border-radius: var(--radius);
  text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease), background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.btn:hover { background: var(--_hover-bg); color: var(--_hover-fg); border-color: var(--_hover-bd); transform: translateY(-2px); box-shadow: var(--_hover-shadow); }
.btn:active { transform: translateY(0); }
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }
.btn--ghost {
  --_bg: transparent; --_fg: var(--c-ink); --_bd: var(--c-ink);
  --_hover-bg: var(--c-ink); --_hover-fg: var(--c-stone-hi); --_hover-bd: var(--c-ink);
  --_hover-shadow: none;
}
.section--dark .btn--ghost, .section--ink .btn--ghost, .hero .btn--ghost, .page-hero .btn--ghost, .cta-band .btn--ghost {
  --_fg: var(--c-stone-hi); --_bd: rgba(242,239,233,.72);
  --_hover-bg: var(--c-stone-hi); --_hover-fg: var(--c-ink); --_hover-bd: var(--c-stone-hi);
}
.btn--sm { font-size: var(--step--1); padding: 0.62em 1em; }

.link-arrow {
  font-family: var(--font-display); font-weight: 600; text-decoration: none;
  color: var(--c-terracotta); display: inline-flex; align-items: center; gap: .4em;
  border-bottom: 2px solid transparent; padding-bottom: 2px;
  transition: border-color .2s var(--ease), gap .25s var(--ease);
}
.link-arrow:hover { border-color: var(--c-terracotta); gap: .65em; }
.section--dark .link-arrow { color: var(--c-terracotta-hi); }

/* ============================================================= Header */
.site-header {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: color-mix(in srgb, var(--c-graphite) 92%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid rgba(231,227,218,.12);
  color: var(--c-stone);
}
.site-header__bar { display: flex; align-items: center; gap: var(--sp-3); height: 70px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--c-stone-hi); margin-right: auto; }
.brand__mark {
  width: 34px; height: 34px; flex: none;
  border: 1.5px solid var(--c-terracotta);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; color: var(--c-terracotta);
  font-size: 1rem; letter-spacing: -0.04em;
}
.brand__logo { width: 34px; height: 34px; flex: none; display: block; border-radius: 4px; }
.brand__logo--plate { width: auto; height: 40px; border-radius: 6px; background: #fff; padding: 5px 10px; }
.page-hero .page-hero__brand { display: inline-flex; align-items: center; text-decoration: none; margin-top: calc(-1 * var(--sp-5)); margin-bottom: var(--sp-3); }
.page-hero__brand img { display: block; width: auto; height: 62px; }
.hero__meta-logo { display: flex; align-items: center; justify-content: center; }
.hero__meta-logo img { display: block; width: auto; height: 34px; }
.brand__name { font-family: var(--font-display); font-weight: 600; font-size: 1.06rem; line-height: 1.05; letter-spacing: -0.01em; }
.brand__name small { display:block; font-family: var(--font-mono); font-size:.6rem; letter-spacing:.18em; color: var(--c-zinc-lo); text-transform: uppercase; font-weight: 400; }

.nav { display: flex; align-items: center; gap: clamp(.6rem, 1.6vw, 1.6rem); }
.nav a {
  text-decoration: none; color: var(--c-stone);
  font-family: var(--font-display); font-weight: 500; font-size: .98rem;
  padding: .35em 0; position: relative;
}
.nav a::after { content:""; position:absolute; left:0; right:100%; bottom:-2px; height:2px; background: var(--c-terracotta); transition: right .28s var(--ease); }
.nav a:hover::after, .nav a[aria-current="page"]::after { right: 0; }
.nav a[aria-current="page"] { color: var(--c-stone-hi); }

.header__cta { display: flex; align-items: center; gap: var(--sp-2); }
.header__phone {
  text-decoration: none; color: var(--c-stone-hi); white-space: nowrap;
  font-family: var(--font-mono); font-size: .85rem; letter-spacing: .02em;
  display: inline-flex; align-items: center; gap: .45em;
}
.header__phone:hover { color: var(--c-terracotta-hi); }
.header__phone svg { color: var(--c-terracotta); }

.nav-toggle {
  display: none; background: none; border: 1.5px solid rgba(231,227,218,.3);
  border-radius: var(--radius); width: 44px; height: 40px; cursor: pointer;
  color: var(--c-stone-hi); align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 920px) {
  .nav-toggle { display: inline-flex; }
  .brand__name small { display: none; }
  .nav, .header__phone { display: none; }
  .site-header[data-open="true"] .nav {
    display: flex; flex-direction: column; align-items: flex-start;
    position: absolute; left: 0; right: 0; top: 70px;
    background: var(--c-graphite); padding: var(--sp-3) clamp(1.25rem, 5vw, 2rem) var(--sp-4);
    border-bottom: 1px solid rgba(231,227,218,.14); gap: var(--sp-1);
  }
  .site-header[data-open="true"] .nav a { font-size: 1.2rem; padding: .5em 0; width: 100%; }
  .site-header[data-open="true"] .header__phone { display: inline-flex; }
}
@media (max-width: 420px) {
  .header__cta .btn span { display: none; }
}

/* =============================================================== Hero */
.hero {
  position: relative; background: var(--c-graphite); color: var(--c-stone);
  overflow: hidden; display: flex; flex-direction: column;
  min-height: min(84vh, 780px);
  min-height: min(84svh, 780px);
}
/* Full-bleed flyover video "wallpaper" behind the hero copy. */
.hero__bg {
  position: absolute; inset: 0; z-index: 0;
  background: var(--c-graphite) url("/assets/img/hero-bg.webp") center / cover no-repeat;
}
.hero__video {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  display: block;
}
/* Symmetric cinematic scrim for the centered composition: a whisper of dim mid-frame
   (the film stays bright), slightly weighted top (header hand-off) and bottom (stats
   strip). Text shadows carry legibility during the brightest sky moments. */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image: linear-gradient(180deg,
    rgba(21,19,15,.38) 0%,
    rgba(21,19,15,.16) 28%,
    rgba(21,19,15,.16) 56%,
    rgba(21,19,15,.62) 100%);
}
.hero__grid {
  position: relative; z-index: 2;
  flex: 1; display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding-top: clamp(2.5rem, 2rem + 4vw, 5rem); padding-bottom: 0;
}
/* margin-block auto centers the statement in the space the stats strip leaves free */
.hero__content {
  max-width: 46rem; margin-block: auto;
  display: flex; flex-direction: column; align-items: center;
}
.hero h1 {
  font-size: var(--step-5); font-weight: 600; letter-spacing: -0.025em;
  line-height: 1.02; color: var(--c-stone-hi); text-transform: none;
  text-wrap: balance;
  text-shadow: 0 1px 2px rgba(21,19,15,.45), 0 4px 28px rgba(21,19,15,.35);
}
.hero h1 em { font-style: normal; color: var(--c-terracotta-hi); }
.hero__sub {
  margin-top: var(--sp-3); font-size: var(--step-1); line-height: 1.45;
  color: var(--c-stone-hi); max-width: 44ch; text-wrap: balance;
  text-shadow: 0 1px 2px rgba(21,19,15,.5), 0 2px 18px rgba(21,19,15,.4);
}
.hero__cta { margin-top: var(--sp-4); display: flex; gap: var(--sp-2); flex-wrap: wrap; justify-content: center; }
/* Stats strip pinned to the hero's bottom edge — the lower-third. Sits on the darkest
   band of the scrim, so no extra panel chrome is needed. */
.hero__meta {
  width: 100%; margin-top: var(--sp-5);
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: var(--sp-3) clamp(2.5rem, 8vw, 7rem);
  border-top: 1px solid rgba(231,227,218,.22);
  padding-block: var(--sp-3) clamp(1.25rem, 1rem + 2vw, 2.25rem);
}
.hero__meta { align-items: flex-start; }
.hero__meta div { line-height: 1.2; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero__meta div > b, .hero__meta div > .hero__meta-logo { min-height: 34px; display: flex; align-items: center; justify-content: center; margin: 0 0 .4rem; }
.hero__meta b { font-family: var(--font-display); font-size: 1.05rem; color: var(--c-stone-hi); font-weight: 600; }
.hero__meta span { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: #B9B4A6; }

/* hero entrance — single orchestrated load-in */
.hero__content > * { opacity: 0; transform: translateY(14px); animation: rise .9s var(--ease) forwards; }
.hero__content > *:nth-child(1) { animation-delay: .05s; }
.hero__content > *:nth-child(2) { animation-delay: .14s; }
.hero__content > *:nth-child(3) { animation-delay: .23s; }
.hero__meta { opacity: 0; animation: rise .9s var(--ease) .38s forwards; }
.hero__bg { opacity: 0; animation: fadein 1.1s var(--ease) .25s forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes fadein { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .hero__content > *, .hero__meta, .hero__bg { opacity: 1; transform: none; animation: none; }
  /* No motion in the wallpaper — fall back to the static poster frame. */
  .hero__video { display: none; }
}
/* On phones/tablets, skip the multi-MB video download entirely and show the
   static hero image (the .hero__bg webp) — keeps the hero fast on mobile data. */
@media (max-width: 820px) {
  .hero__video { display: none; }
}

/* ====================================================== Placeholder blocks */
.ph {
  position: relative; width: 100%; aspect-ratio: var(--ar, 16/9);
  background-color: var(--c-stone-2);
  background-image:
    repeating-linear-gradient(135deg, transparent 0 11px, rgba(107,114,112,.10) 11px 12px);
  border: 1px solid rgba(107,114,112,.35);
  border-radius: var(--radius-lg);
  display: grid; place-content: center; place-items: center;
  text-align: center; overflow: hidden; color: var(--c-zinc);
  gap: .5rem; padding: 1rem;
}
.ph--dark { background-color: #211e1a; background-image: repeating-linear-gradient(135deg, transparent 0 11px, rgba(231,227,218,.06) 11px 12px); border-color: rgba(231,227,218,.18); color: var(--c-zinc-lo); }
.ph::before, .ph::after {
  content: ""; position: absolute; width: 14px; height: 14px;
  border: 1.5px solid currentColor; opacity: .5;
}
.ph::before { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.ph::after { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }
.ph__icon { width: 28px; height: 28px; opacity: .6; }
.ph__cap {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .04em;
  line-height: 1.4; max-width: 26ch;
}
.ph__cap b { color: inherit; font-weight: 600; }
.ph__ar {
  position: absolute; top: 10px; right: 12px;
  font-family: var(--font-mono); font-size: .62rem; letter-spacing: .1em;
  opacity: .75;
}
/* aspect ratio modifiers */
.ph--16x9 { --ar: 16/9; }
.ph--4x3  { --ar: 4/3; }
.ph--3x2  { --ar: 3/2; }
.ph--1x1  { --ar: 1/1; }
.ph--3x4  { --ar: 3/4; }
.ph--21x9 { --ar: 21/9; }
.ph--hero { --ar: 4/5; }
@media (max-width: 820px) { .ph--hero { --ar: 16/10; } }
.media-img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  background: var(--c-stone-2);
}
.media-img--16x9 { aspect-ratio: 16/9; }
.media-img--4x3 { aspect-ratio: 4/3; }
.media-img--3x4 { aspect-ratio: 3/4; }
.media-img--1x1 { aspect-ratio: 1/1; }

/* ============================================ Wall-assembly diagram (signature) */
.assembly {
  display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,0.85fr);
  gap: clamp(1.5rem, 3vw, 3rem); align-items: center;
}
@media (max-width: 760px) { .assembly { grid-template-columns: 1fr; } }
.assembly__fig {
  background: var(--c-graphite-2); border: 1px solid rgba(231,227,218,.14);
  border-radius: var(--radius-lg); padding: clamp(1rem,2.5vw,2rem);
}
.section--dark .assembly__fig { background: rgba(231,227,218,.03); }
.assembly__svg { width: 100%; height: auto; }
.assembly__caption { margin-top: .75rem; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em; color: var(--c-zinc-lo); text-transform: uppercase; }

.assembly__map {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(30,27,24,.14);
  isolation: isolate;
}
.assembly__img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(1) contrast(1.05);
}
.assembly__zone,
.assembly__hotspot {
  position: absolute;
  left: var(--zone-x);
  top: var(--zone-y);
  width: var(--zone-w);
  height: var(--zone-h);
  border-radius: 2px;
}
.assembly__zone {
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transform: scale(.995);
  background: rgba(177,79,46,.20);
  border: 2px solid rgba(177,79,46,.82);
  box-shadow: inset 0 0 0 1px rgba(242,239,233,.28), 0 0 0 rgba(177,79,46,0);
  mix-blend-mode: multiply;
  transition: opacity .22s var(--ease), transform .22s var(--ease), box-shadow .22s var(--ease);
}
.assembly__zone.is-active {
  opacity: 1;
  transform: none;
  box-shadow: inset 0 0 0 1px rgba(242,239,233,.36), 0 0 0 3px rgba(177,79,46,.18);
}
.assembly[data-active] .assembly__zone.layer:not(.is-active) { opacity: 0; }
.assembly[data-active] .assembly__zone.is-active { opacity: 1; }
.assembly__hotspot {
  z-index: 2;
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.assembly__hotspot:focus-visible {
  outline: 2px solid var(--c-terracotta);
  outline-offset: 2px;
}
.assembly__map > [data-layer="1"] { --zone-x: 8.12%; --zone-y: 0.63%; --zone-w: 8.42%; --zone-h: 98.43%; }
.assembly__map > [data-layer="2"] { --zone-x: 17.52%; --zone-y: 2.32%; --zone-w: 22.48%; --zone-h: 96.75%; }
.assembly__map > [data-layer="3"] { --zone-x: 52.67%; --zone-y: 0.34%; --zone-w: 1.10%; --zone-h: 99.32%; }
.assembly__map > [data-layer="4"] { --zone-x: 39.71%; --zone-y: 0.52%; --zone-w: 13.50%; --zone-h: 99.30%; }
.assembly__map > [data-layer="5"] { --zone-x: 54.89%; --zone-y: 0; --zone-w: 45.11%; --zone-h: 100%; }

/* svg theming tokens */
.assembly__svg {
  --l-edge: rgba(231,227,218,.45);
  --l-fill: rgba(231,227,218,.10);
  --l-line: rgba(231,227,218,.26);
  --l-accent: var(--c-terracotta-hi);
  --l-text: var(--c-zinc-lo);
}
.assembly--light .assembly__svg {
  --l-edge: rgba(30,27,24,.40);
  --l-fill: rgba(30,27,24,.055);
  --l-line: rgba(30,27,24,.20);
  --l-accent: var(--c-terracotta);
  --l-text: var(--c-zinc);
}
.assembly__svg .edge { fill: none; stroke: var(--l-edge); stroke-width: 1.4; }
.assembly__svg .fillband { fill: var(--l-fill); stroke: none; }
.assembly__svg .hatch { stroke: var(--l-line); stroke-width: 1; fill: none; }
.assembly__svg .accent { stroke: var(--l-accent); fill: none; }
.assembly__svg .accent-fill { fill: var(--l-accent); stroke: none; }
.assembly__svg .leader { stroke: var(--l-edge); stroke-width: 1; stroke-dasharray: 2 3; }
.assembly__svg .axislabel { fill: var(--l-text); font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; }

/* svg layer interactivity */
.assembly__svg .layer { transition: opacity .25s var(--ease); }
.assembly__svg .layer__fill { transition: fill .25s var(--ease); }
.assembly[data-active] .assembly__svg .layer:not(.is-active) { opacity: .38; }
.assembly__svg .layer.is-active .layer__edge { stroke: var(--c-terracotta-hi); stroke-width: 2.4; }
.marker { cursor: pointer; }
.marker__dot { fill: var(--c-graphite); stroke: var(--c-zinc-lo); stroke-width: 1.5; transition: fill .2s var(--ease), stroke .2s var(--ease); }
.marker__num { fill: var(--c-stone); font-family: var(--font-mono); font-weight: 600; font-size: 13px; }
.marker.is-active .marker__dot { fill: var(--c-terracotta); stroke: var(--c-terracotta); }
.marker.is-active .marker__num { fill: var(--c-stone-hi); }

.assembly__legend { display: grid; gap: .25rem; }
.leg {
  display: grid; grid-template-columns: 2rem 1fr; gap: .75rem; align-items: start;
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: .7rem .75rem; border-radius: var(--radius);
  border-left: 0; transition: background-color .2s var(--ease);
  color: inherit;
}
.leg:hover, .leg.is-active { background: rgba(231,227,218,.06); }
.leg__n {
  font-family: var(--font-mono); font-weight: 600; font-size: .95rem;
  width: 2rem; height: 2rem; display: grid; place-items: center;
  border: 1.5px solid var(--c-zinc); border-radius: 50%; color: var(--c-stone);
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.leg.is-active .leg__n, .leg:hover .leg__n { background: var(--c-terracotta); border-color: var(--c-terracotta); color: var(--c-stone-hi); }
.leg__t { font-family: var(--font-display); font-weight: 600; font-size: 1rem; color: var(--c-stone-hi); line-height: 1.2; }
.leg__d { font-size: .92rem; color: #cfcabb; margin-top: .15rem; line-height: 1.45; }

/* light-bg variant of assembly */
.assembly--light .assembly__fig { background: var(--c-stone-hi); border-color: var(--line); }
.assembly--light .marker__dot { fill: var(--c-stone-hi); stroke: var(--c-zinc); }
.assembly--light .marker__num { fill: var(--c-ink); }
.assembly--light .leg:hover, .assembly--light .leg.is-active { background: rgba(30,27,24,.05); }
.assembly--light .leg__n { color: var(--c-ink); }
.assembly--light .leg__t { color: var(--c-ink); }
.assembly--light .leg__d { color: var(--text-muted); }
.assembly--light .assembly__caption { color: var(--c-zinc); }

/* ===================================================== Benefits (editorial) */
.benefits { display: grid; gap: clamp(1.5rem,3vw,3rem); grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .benefits { grid-template-columns: 1fr; } }
.benefit { border-top: 2px solid var(--c-terracotta); padding-top: var(--sp-2); }
.benefit h3 { font-size: var(--step-1); margin-bottom: .5rem; }
.benefit p { color: var(--text-muted); }
.section--dark .benefit p { color: #cfcabb; }
.benefit__n { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .14em; color: var(--c-zinc); text-transform: uppercase; display:block; margin-bottom: .4rem; }

/* ===================================================== Services grid (varied) */
.services { display: grid; gap: 1.25rem; grid-template-columns: repeat(6, 1fr); }
.svc {
  position: relative; text-decoration: none; color: inherit;
  background: var(--c-stone-hi); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.svc:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--c-zinc); }
.svc__body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.svc__code { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--c-terracotta); }
.svc h3 { font-size: 1.18rem; letter-spacing: -0.01em; }
.svc p { font-size: .94rem; color: var(--text-muted); }
.svc__go { margin-top: auto; padding-top: .6rem; font-family: var(--font-display); font-weight: 600; font-size: .9rem; color: var(--c-ink); display: inline-flex; align-items: center; gap: .4em; }
.svc:hover .svc__go { color: var(--c-terracotta); }
.svc:hover .svc__go .arr { transform: translateX(3px); }
.svc__go .arr { transition: transform .25s var(--ease); }
/* spans: first two larger */
.svc--wide { grid-column: span 3; }
.svc--std  { grid-column: span 2; }
@media (max-width: 980px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .svc--wide, .svc--std { grid-column: span 1; }
}
@media (max-width: 560px) { .services { grid-template-columns: 1fr; } }

/* ===================================================== Featured projects */
.proj-grid { display: grid; gap: 1rem; grid-template-columns: repeat(4, 1fr); }
.proj-grid figure { grid-column: span 1; }
.proj-grid figure:first-child,
.proj-grid figure.is-home-featured { grid-column: span 2; grid-row: span 2; }
.proj-grid figcaption { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .04em; color: var(--c-zinc-lo); margin-top: .5rem; }
.proj-grid figure { overflow: hidden; border-radius: var(--radius-lg); }
.proj-img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 1/1; transition: transform .4s var(--ease); }
.proj-grid .media-img { height: 100%; aspect-ratio: 1/1; transition: transform .4s var(--ease); }
.proj-grid figure:first-child .proj-img,
.proj-grid figure.is-home-featured .proj-img { aspect-ratio: auto; }
.proj-grid figure:first-child .media-img,
.proj-grid figure.is-home-featured .media-img { aspect-ratio: auto; }
.proj-grid figure:hover .proj-img { transform: scale(1.03); }
.proj-grid figure:hover .media-img { transform: scale(1.03); }

/* When homepage project photos are removed, use complete, balanced grids
   instead of leaving the original five-tile feature pattern half empty. */
.proj-grid[data-visible-count="1"] { grid-template-columns: minmax(0, 1fr); }
.proj-grid[data-visible-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.proj-grid[data-visible-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.proj-grid[data-visible-count="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.proj-grid[data-visible-count="1"] figure:first-child,
.proj-grid[data-visible-count="1"] figure.is-home-featured,
.proj-grid[data-visible-count="2"] figure:first-child,
.proj-grid[data-visible-count="2"] figure.is-home-featured,
.proj-grid[data-visible-count="3"] figure:first-child,
.proj-grid[data-visible-count="3"] figure.is-home-featured,
.proj-grid[data-visible-count="4"] figure:first-child,
.proj-grid[data-visible-count="4"] figure.is-home-featured { grid-column: span 1; grid-row: auto; }
.proj-grid[data-visible-count="1"] figure .proj-img,
.proj-grid[data-visible-count="1"] figure .media-img { height: auto; aspect-ratio: 16 / 9; }
.proj-grid[data-visible-count="2"] figure .proj-img,
.proj-grid[data-visible-count="2"] figure .media-img,
.proj-grid[data-visible-count="3"] figure .proj-img,
.proj-grid[data-visible-count="3"] figure .media-img,
.proj-grid[data-visible-count="4"] figure .proj-img,
.proj-grid[data-visible-count="4"] figure .media-img { height: auto; aspect-ratio: 4 / 3; }
.split__img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; border-radius: var(--radius-lg); }
@media (max-width: 760px) {
  .proj-grid { grid-template-columns: repeat(2, 1fr); }
  .proj-grid figure:first-child,
  .proj-grid figure.is-home-featured { grid-column: span 2; grid-row: auto; }
  .proj-grid figure:first-child .proj-img,
  .proj-grid figure:first-child .media-img,
  .proj-grid figure.is-home-featured .proj-img,
  .proj-grid figure.is-home-featured .media-img { height: auto; aspect-ratio: 16 / 9; }
  .proj-grid[data-visible-count="1"],
  .proj-grid[data-visible-count="2"] { grid-template-columns: minmax(0, 1fr); }
  .proj-grid[data-visible-count="3"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proj-grid[data-visible-count="1"] figure:first-child,
  .proj-grid[data-visible-count="1"] figure.is-home-featured,
  .proj-grid[data-visible-count="2"] figure:first-child,
  .proj-grid[data-visible-count="2"] figure.is-home-featured,
  .proj-grid[data-visible-count="4"] figure:first-child,
  .proj-grid[data-visible-count="4"] figure.is-home-featured { grid-column: span 1; }
  .proj-grid[data-visible-count="3"] figure:first-child,
  .proj-grid[data-visible-count="3"] figure.is-home-featured { grid-column: span 2; }
  .proj-grid[data-visible-count="1"] figure .proj-img,
  .proj-grid[data-visible-count="1"] figure .media-img,
  .proj-grid[data-visible-count="2"] figure .proj-img,
  .proj-grid[data-visible-count="2"] figure .media-img { aspect-ratio: 16 / 9; }
  .proj-grid[data-visible-count="4"] figure .proj-img,
  .proj-grid[data-visible-count="4"] figure .media-img { aspect-ratio: 4 / 3; }
}

/* Managed page-image states. Removed service/resource photos leave their text
   and links intact; homepage project tiles and split layouts also reflow. */
img[data-home-image][hidden],
img[data-material-image][hidden] { display: none !important; }
.proj-grid figure:has(> img[data-home-image][hidden]) { display: none; }
[data-home-images-empty="hide-section"]:not(:has(img[data-home-image]:not([hidden]))) { display: none; }
.split:has(> .split__img[data-home-image][hidden]),
.split.split--no-home-image { grid-template-columns: minmax(0, 1fr); }

/* ===================================================== Why us / split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem,4vw,4rem); align-items: center; }
.split--rev > :first-child { order: 2; }
.split--credentials { grid-template-columns: 1.08fr .92fr; }
.split--credentials .split__img { aspect-ratio: 4/3; max-height: 430px; object-position: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } .split--rev > :first-child { order: 0; } }
.cred-list { display: grid; gap: .9rem; margin-top: var(--sp-3); }
.cred-list li { display: grid; grid-template-columns: auto 1fr; gap: .8rem; align-items: start; list-style: none; }
.cred-list svg { color: var(--c-terracotta); margin-top: .2rem; flex: none; }
.cred-list b { font-family: var(--font-display); }

/* ===================================================== Service area */
.area-counties { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: var(--sp-3); }
.area-counties span {
  font-family: var(--font-mono); font-size: .8rem; letter-spacing: .02em;
  border: 1px solid var(--line); border-radius: 999px; padding: .4em .9em;
  background: var(--c-stone-hi); color: var(--text-muted);
}

/* ===================================================== Blog teasers */
.posts { display: grid; gap: 1.5rem; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .posts { grid-template-columns: 1fr; } }
.post { text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: .75rem; }
.post:hover h3 { color: var(--c-terracotta); }
.post__tag { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--c-zinc); }
.post h3 { font-size: var(--step-1); transition: color .2s var(--ease); }
.post time { font-family: var(--font-mono); font-size: .72rem; color: var(--c-zinc-lo); }

/* ===================================================== CTA band + form */
.cta-band { background: var(--c-terracotta); color: var(--c-stone-hi); }
.cta-band h2 { color: var(--c-stone-hi); }
.cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem,5vw,4.5rem); align-items: start; }
@media (max-width: 820px) { .cta-grid { grid-template-columns: 1fr; } }
.cta-band .lede { color: rgba(242,239,233,.9); }
.cta-band .phone-big {
  font-family: var(--font-display); font-weight: 600; font-size: var(--step-2);
  color: var(--c-stone-hi); text-decoration: none; display: inline-block; margin-top: var(--sp-2);
}
.cta-band .phone-big:hover { text-decoration: underline; text-decoration-thickness: 2px; }

.qform { display: grid; gap: 1rem; background: var(--c-graphite); padding: clamp(1.5rem,3vw,2.25rem); border-radius: var(--radius-lg); }
.qform label { display: grid; gap: .4rem; font-family: var(--font-display); font-weight: 500; font-size: .9rem; color: var(--c-stone); }
.qform input, .qform textarea {
  background: var(--c-graphite-2); border: 1.5px solid rgba(231,227,218,.2);
  border-radius: var(--radius); padding: .75em .85em; color: var(--c-stone-hi);
  font-family: var(--font-body); font-size: 1rem;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.qform input::placeholder, .qform textarea::placeholder { color: #8b8f8a; }
.qform input:focus, .qform textarea:focus { outline: none; border-color: var(--c-terracotta); background: #2d2924; }
.qform textarea { resize: vertical; min-height: 110px; }
.qform .btn { justify-content: center; margin-top: .25rem; }
.qform__hp { position: absolute; left: -9999px; }
.qform__note { font-size: .78rem; color: var(--c-zinc-lo); font-family: var(--font-mono); letter-spacing: .02em; }

/* ===================================================== FAQ */
.faq { display: grid; gap: .75rem; max-width: 800px; }
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--c-stone-hi); padding: 0 1.2rem;
  transition: border-color .2s var(--ease);
}
.faq details[open] { border-color: var(--c-zinc); }
.faq summary {
  list-style: none; cursor: pointer; padding: 1.1rem 0;
  font-family: var(--font-display); font-weight: 600; font-size: var(--step-1);
  color: var(--c-ink);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .pm { flex: none; width: 22px; height: 22px; position: relative; transition: transform .3s var(--ease); }
.faq summary .pm::before, .faq summary .pm::after { content:""; position:absolute; inset:0; margin:auto; background: var(--c-terracotta); }
.faq summary .pm::before { width: 100%; height: 2px; }
.faq summary .pm::after { width: 2px; height: 100%; }
.faq details[open] summary .pm { transform: rotate(135deg); }
.faq__a { padding-bottom: 1.2rem; color: var(--text-muted); }
.faq__a p + p { margin-top: .8rem; }

/* ===================================================== Page hero (interior) */
.page-hero {
  position: relative;
  overflow: hidden;
  background: var(--c-graphite);
  color: var(--c-stone);
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(100deg, rgba(21,19,15,.94) 0%, rgba(21,19,15,.82) 42%, rgba(21,19,15,.5) 100%),
    linear-gradient(0deg, rgba(21,19,15,.65) 0%, rgba(21,19,15,0) 40%),
    url("/assets/img/hero-bg.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.page-hero__inner { position: relative; z-index: 1; padding-block: clamp(3rem, 2rem + 5vw, 5.5rem); }
.page-hero h1 { font-size: var(--step-4); color: var(--c-stone-hi); max-width: 24ch; }
.page-hero .lede { color: var(--text-on-dark-muted); margin-top: var(--sp-3); }
@media (max-width: 820px) {
  .page-hero::before {
    background-image:
      linear-gradient(100deg, rgba(21,19,15,.96) 0%, rgba(21,19,15,.88) 62%, rgba(21,19,15,.72) 100%),
      linear-gradient(0deg, rgba(21,19,15,.74) 0%, rgba(21,19,15,0) 48%),
      url("/assets/img/hero-bg.webp");
    background-position: center right;
  }
}
.breadcrumb { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--c-zinc-lo); margin-bottom: var(--sp-3); display: flex; gap: .5em; align-items: center; }
.breadcrumb a { color: var(--c-zinc-lo); text-decoration: none; }
.breadcrumb a:hover { color: var(--c-terracotta-hi); }

/* ===================================================== Types of systems */
.systems { display: grid; gap: 1.25rem; grid-template-columns: repeat(3,1fr); }
@media (max-width: 820px) { .systems { grid-template-columns: 1fr; } }
.system {
  background: var(--c-stone-hi); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.5rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: .6rem;
}
.system__h { display: flex; align-items: baseline; gap: .6rem; }
.system h3 { font-size: var(--step-1); }
.system__tag { font-family: var(--font-mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--c-terracotta); }
.system p { color: var(--text-muted); font-size: .98rem; }
.system ul { margin: .3rem 0 0; padding-left: 1.1rem; color: var(--text-muted); font-size: .95rem; }
.system li { margin-bottom: .3rem; }

/* components list */
.comp-grid { display: grid; gap: 1rem 2rem; grid-template-columns: repeat(2,1fr); margin-top: var(--sp-3); }
@media (max-width: 640px) { .comp-grid { grid-template-columns: 1fr; } }
.comp { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; padding: 1rem 0; border-top: 1px solid var(--line); }
.comp__n { font-family: var(--font-mono); font-weight: 600; color: var(--c-terracotta); font-size: .95rem; }
.comp b { font-family: var(--font-display); display: block; margin-bottom: .15rem; }
.comp p { color: var(--text-muted); font-size: .95rem; }
.section--dark .comp, .section--ink .comp { border-color: var(--line-on-dark); }
.section--dark .comp__n, .section--ink .comp__n { color: var(--c-terracotta-hi); }
.section--dark .comp b, .section--ink .comp b { color: var(--c-stone-hi); }
.section--dark .comp p, .section--ink .comp p { color: var(--text-on-dark-muted); }

/* callout */
.callout {
  background: var(--c-graphite); color: var(--c-stone); border-radius: var(--radius-lg);
  padding: clamp(1.5rem,3vw,2.5rem); display: grid; gap: 1rem;
}
.callout h3 { color: var(--c-stone-hi); font-size: var(--step-2); }
.callout p { color: #cfcabb; max-width: 60ch; }
.callout .mono-label { color: var(--c-terracotta-hi); }

/* material chips row linking to service pages */
.mat-links { display: grid; gap: 1rem; grid-template-columns: repeat(3,1fr); }
@media (max-width: 760px) { .mat-links { grid-template-columns: 1fr; } }
.mat {
  text-decoration: none; color: inherit; border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden; background: var(--c-stone-hi);
  display: flex; flex-direction: column;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.mat:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--c-zinc); }
.mat__body { padding: 1rem 1.2rem 1.2rem; }
.mat h3 { font-size: 1.12rem; }
.mat span { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--c-terracotta); }

/* ===================================================== Installation steps */
.steps { list-style: none; padding: 0; margin: var(--sp-3) 0 0; counter-reset: step; }
.steps li {
  display: grid; grid-template-columns: auto 1fr; gap: 1.25rem;
  padding: 1.3rem 0; border-top: 1px solid var(--line); align-items: start;
}
.steps li:first-child { border-top: 0; }
.steps li::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono); font-weight: 600; font-size: 1.05rem;
  color: var(--c-terracotta); padding-top: .15rem;
}
.steps b { font-family: var(--font-display); font-size: var(--step-1); display: block; margin-bottom: .25rem; }
.steps p { color: var(--text-muted); max-width: 60ch; }
.section--dark .steps li, .section--ink .steps li { border-color: rgba(231,227,218,.16); }
.section--dark .steps p, .section--ink .steps p { color: #cfcabb; }
.section--dark .steps b, .section--ink .steps b { color: var(--c-stone-hi); }

/* ===================================================== Chips (brands, tags) */
.chips { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: var(--sp-3); }
.chips span, .chips a {
  font-family: var(--font-mono); font-size: .8rem; letter-spacing: .02em;
  border: 1px solid var(--line); border-radius: 999px; padding: .4em .9em;
  background: var(--c-stone-hi); color: var(--text-muted); text-decoration: none;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.chips a:hover { border-color: var(--c-terracotta); color: var(--c-terracotta); }
.section--dark .chips span, .section--dark .chips a,
.section--ink .chips span, .section--ink .chips a {
  background: rgba(231,227,218,.05); border-color: rgba(231,227,218,.18); color: #cfcabb;
}
.section--dark .chips a:hover, .section--ink .chips a:hover { color: var(--c-terracotta-hi); border-color: var(--c-terracotta-hi); }

/* ===================================================== Footer */
.site-footer {
  /* Skyline band - a transparent photo-derived silhouette strip
     (assets/img/skyline/skyline-strip.webp, 2711x400). The displayed tile
     width derives from the strip's exact aspect ratio so the loop is seamless. */
  --skyline-h: 215px;
  --skyline-tile: calc(var(--skyline-h) * 6.7775);
  --skyline-seam-cover: 3px;
  /* Sky above the skyscrapers = the colour of the section sitting above the
     footer on that page. Terracotta matches the .cta-band that precedes the
     footer on most pages; pages that end on a stone section override this
     via .site-footer--sky-stone. */
  --sky: var(--c-terracotta);

  position: relative;
  overflow: hidden;
  color: var(--c-stone);
  padding-block: calc(var(--skyline-h) + var(--sp-4)) var(--sp-4);
  /* Two flat colours only: the sky, and the graphite shared by the
     skyscrapers and the footer body so they read as one continuous mass. */
  background: linear-gradient(to bottom,
    var(--sky) 0 calc(var(--skyline-h) - var(--skyline-seam-cover)),
    var(--c-graphite) calc(var(--skyline-h) - var(--skyline-seam-cover)));
}
/* pages whose last section is stone (contact, blog index) */
.site-footer--sky-stone { --sky: var(--c-stone); }
/* keep footer content above the animated skyline layers */
.site-footer > .wrap { position: relative; z-index: 2; }

/* Skyline strip (silhouettes cut from three Manhattan photos, recoloured to
   footer graphite) tiled with repeat-x and drifted exactly one tile width per
   loop, so the reset point is pixel-identical - a seamless infinite scroll. */
.site-footer::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: var(--skyline-h);
  pointer-events: none;
  z-index: 1;
  background-image: url("/assets/img/skyline/skyline-strip.webp");
  background-repeat: repeat-x;
  background-position: 0 bottom;
  background-size: var(--skyline-tile) 100%;
  animation: skyline-drift 90s linear infinite;
  will-change: background-position;
}
@keyframes skyline-drift {
  to { background-position: calc(-1 * var(--skyline-tile)) bottom; }
}
@media (max-width: 820px) { .site-footer { --skyline-h: 145px; } }
@media (max-width: 480px) { .site-footer { --skyline-h: 112px; } }
@media (prefers-reduced-motion: reduce) {
  .site-footer::after { animation: none; }
}
.footer__grid { display: grid; gap: 2.5rem; grid-template-columns: 1.4fr 1fr 1fr 1fr; }
@media (max-width: 820px) { .footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }
@media (max-width: 480px) { .footer__grid { grid-template-columns: 1fr; } }
.footer__grid h4 { font-family: var(--font-display); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--c-zinc-lo); margin-bottom: var(--sp-2); font-weight: 600; }
.footer__grid a { color: var(--c-stone); text-decoration: none; display: inline-block; padding: .25rem 0; font-size: .95rem; }
.footer__grid > div:not(.footer__brand) > a { display: block; width: fit-content; }
.footer__grid a:hover { color: var(--c-terracotta-hi); }
.footer__brand > .brand--footer { gap: 0; display: block; width: fit-content; margin-left: 12px; margin-right: auto; }
.footer__logo { width: 130px; height: auto; display: block; background: #fff; padding: 8px; border-radius: 8px; }
.footer__brand p { color: var(--c-zinc-lo); font-size: .95rem; margin-top: .75rem; max-width: 34ch; }
.footer__brand .tagline { font-family: var(--font-display); color: var(--c-stone-hi); font-style: normal; font-size: 1.05rem; margin-top: 1rem; }
.footer__bottom { margin-top: var(--sp-5); padding-top: var(--sp-3); border-top: 1px solid rgba(231,227,218,.14); display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; }
.footer__bottom p, .footer__bottom a { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .03em; color: var(--c-zinc-lo); }
.footer__np { font-family: var(--font-mono); font-size: .82rem; color: var(--c-stone); line-height: 1.7; }
.footer__np a { padding: 0; }

/* skip link */
.skip { position: absolute; left: -9999px; top: 0; background: var(--c-terracotta); color: #fff; padding: .6em 1em; z-index: var(--z-modal); border-radius: 0 0 var(--radius) 0; }
.skip:focus { left: 0; }

/* generic two-col prose + aside */
.lead-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: clamp(1.5rem,4vw,3.5rem); align-items: start; }
@media (max-width: 860px) { .lead-grid { grid-template-columns: 1fr; } }
.aside-card { background: var(--c-stone-hi); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.5rem; }
.aside-card h4 { font-family: var(--font-display); font-size: 1rem; margin-bottom: .75rem; }
.aside-card .mono { display: block; color: var(--c-zinc); margin-bottom: .25rem; }
.aside-card dl { display: grid; gap: .5rem; }
.aside-card dt { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--c-zinc); }
.aside-card dd { font-family: var(--font-display); font-weight: 600; margin: 0 0 .5rem; }

.section-head { max-width: 56ch; margin-bottom: var(--sp-4); }
.section-head h2 { font-size: var(--step-3); }
.section-head p { margin-top: var(--sp-2); color: var(--text-muted); font-size: var(--step-1); }
.section--dark .section-head p, .section--ink .section-head p { color: var(--text-on-dark-muted); }

/* ===================================================== Gallery filter + grid */
.gallery-controls { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: var(--sp-4); }
.filter-btn {
  font-family: var(--font-display); font-weight: 600; font-size: .9rem;
  background: transparent; color: var(--text-muted);
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: .55em 1.05em;
  cursor: pointer; transition: color .2s var(--ease), border-color .2s var(--ease), background-color .2s var(--ease);
}
.filter-btn:hover { color: var(--c-ink); border-color: var(--c-zinc); }
.filter-btn[aria-pressed="true"] { background: var(--c-ink); color: var(--c-stone-hi); border-color: var(--c-ink); }
.filter-btn .count { font-family: var(--font-mono); font-size: .72rem; opacity: .65; margin-left: .4em; }

/* Masonry via CSS multi-columns — images keep their natural aspect ratio. */
.gallery-grid { column-count: 3; column-gap: 1rem; }
@media (max-width: 860px) { .gallery-grid { column-count: 2; } }
@media (max-width: 520px) { .gallery-grid { column-count: 1; } }
.gal-item { margin: 0 0 1rem; break-inside: avoid; -webkit-column-break-inside: avoid; }
.gal-item[hidden] { display: none; }
.gal-btn {
  position: relative;
  display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer;
  border-radius: var(--radius-lg); overflow: hidden; text-align: left;
  isolation: isolate;
}
.gal-btn::after {
  content: ""; position: absolute; inset: auto 0 0; height: 44%;
  background: linear-gradient(to top, rgba(21,19,15,.62), rgba(21,19,15,0));
  z-index: 1; pointer-events: none;
}
.gal-btn .ph, .gal-btn .gal-img { transition: transform .4s var(--ease); }
.gal-btn:hover .ph, .gal-btn:hover .gal-img { transform: scale(1.03); }
.gal-count {
  position: absolute; right: .75rem; bottom: .75rem; z-index: 2;
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--c-stone-hi);
  background: rgba(21,19,15,.72); border: 1px solid rgba(231,227,218,.28);
  border-radius: 999px; padding: .45em .7em;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.gal-btn:hover .gal-count,
.gal-btn:focus-visible .gal-count { background: rgba(177,79,46,.94); border-color: var(--c-terracotta); transform: translateY(-2px); }
.gal-item figcaption { display: grid; gap: .18rem; margin-top: .65rem; }
.gal-item figcaption b { font-family: var(--font-display); font-size: 1rem; line-height: 1.15; letter-spacing: -0.01em; color: var(--c-ink); font-weight: 600; }
.gal-item figcaption span { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .07em; text-transform: uppercase; color: var(--c-zinc); }
.gallery-empty { padding: var(--sp-5) 0; color: var(--text-muted); font-family: var(--font-mono); font-size: .9rem; }
.gallery-loading {
  display: grid;
  place-items: center;
  min-height: 220px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: .84rem;
  letter-spacing: .04em;
}

/* ===================================================== Featured project film */
.film { margin: 0; }
.film__stage {
  position: relative; aspect-ratio: 3840 / 1608; /* native cinematic crop */
  border-radius: var(--radius-lg); overflow: hidden; background: #0e0d0b;
  border: 1px solid rgba(231,227,218,.16);
}
.film__video { width: 100%; height: 100%; object-fit: cover; display: block; }
.film__open {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; cursor: pointer;
  display: flex; align-items: flex-end; justify-content: flex-start;
  padding: clamp(1rem, 3vw, 2rem); color: var(--c-stone-hi);
  background: linear-gradient(to top, rgba(21,19,15,.5) 0%, rgba(21,19,15,0) 42%);
  transition: background-color .3s var(--ease);
}
.film__open:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--c-terracotta-hi); }
.film__badge {
  display: inline-flex; align-items: center; gap: .6em;
  font-family: var(--font-display); font-weight: 600; font-size: .9rem; line-height: 1;
  background: rgba(21,19,15,.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border: 1px solid rgba(231,227,218,.28); border-radius: 999px; padding: .7em 1.15em;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.film__open:hover .film__badge,
.film__open:focus-visible .film__badge { background: rgba(177,79,46,.92); border-color: var(--c-terracotta); transform: translateY(-2px); }
.film__play {
  display: inline-grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 999px;
  background: var(--c-terracotta); color: var(--c-stone-hi); font-size: .62em; padding-left: .12em;
}
/* Mobile + tablet: the full "Click to watch with sound" pill is too heavy, so drop the
   label and show a compact round play button. Laptops/desktops keep the full pill. */
@media (max-width: 1024px) {
  .film__badge { gap: 0; padding: .55em; border-radius: 999px; }
  .film__badge-text { display: none; }
  .film__play { font-size: 1rem; width: 1.9em; height: 1.9em; }
}
.film__cap {
  margin-top: var(--sp-2); font-family: var(--font-mono); font-size: .74rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--c-zinc-lo);
}

/* Film enlarged in the lightbox <dialog> */
.filmbox__video {
  max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
  border-radius: 4px; background: #0e0d0b; box-shadow: 0 24px 70px rgba(0,0,0,.55);
}

/* Lightbox (native <dialog>, full-screen viewer) */
.lightbox {
  width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh;
  margin: 0; padding: 0; border: 0; background: transparent; overflow: hidden;
}
.lightbox::backdrop { background: rgba(21,19,15,.92); backdrop-filter: blur(4px); }

/* Controls live in a top bar / side gutters / bottom caption — never over the image. */
.lb-frame {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  padding: clamp(.6rem, 1.6vw, 1.1rem); gap: .7rem;
}
.lb-top { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.lb-count { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .1em; color: var(--c-zinc-lo); }
.lb-actions { display: flex; gap: .5rem; }
.lb-btn {
  font-family: var(--font-display); font-weight: 600; font-size: .8rem; line-height: 1;
  color: var(--c-stone-hi); background: rgba(231,227,218,.12);
  border: 1px solid rgba(231,227,218,.22); border-radius: 5px;
  padding: .55em .85em; cursor: pointer; text-decoration: none;
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.lb-btn:hover { background: rgba(177,79,46,.92); border-color: var(--c-terracotta); }

.lb-main { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; gap: clamp(.4rem, 1.5vw, 1rem); }
.lb-nav {
  flex: none; width: 46px; height: 74px; border-radius: 6px; cursor: pointer;
  color: var(--c-stone-hi); background: rgba(231,227,218,.12);
  border: 1px solid rgba(231,227,218,.22); display: grid; place-items: center;
  font-size: 1.9rem; line-height: 1;
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.lb-nav:hover { background: rgba(177,79,46,.92); border-color: var(--c-terracotta); }
.lb-nav[hidden] { display: none; }

.lb-imgwrap { flex: 1 1 auto; min-width: 0; height: 100%; display: flex; align-items: center; justify-content: center; }
.lb-img {
  max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
  border-radius: 4px; background: #0e0d0b; box-shadow: 0 24px 70px rgba(0,0,0,.55);
}
.lb-cap { flex: none; text-align: center; color: var(--c-stone); font-family: var(--font-mono); font-size: .82rem; letter-spacing: .02em; }

.projectbox__frame { gap: clamp(.9rem, 1.8vw, 1.35rem); }
.projectbox__top {
  align-items: flex-start;
  padding-bottom: .85rem;
  border-bottom: 1px solid rgba(231,227,218,.18);
}
.projectbox__heading { min-width: 0; display: grid; gap: .35rem; }
.projectbox__title {
  color: var(--c-stone-hi);
  font-size: clamp(1.6rem, 1.2rem + 1.8vw, 3rem);
  letter-spacing: -0.02em;
}
.projectbox__scroller {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: .15rem .15rem 1rem;
  scrollbar-color: rgba(231,227,218,.45) rgba(231,227,218,.10);
}
.projectbox__grid {
  column-count: 3;
  column-gap: 1rem;
}
.projectbox__tile {
  margin: 0 0 1rem;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  overflow: hidden;
  border: 1px solid rgba(231,227,218,.18);
  border-radius: var(--radius-lg);
  background: rgba(231,227,218,.06);
}
.projectbox__tile img {
  width: 100%;
  height: auto;
  display: block;
  background: #0e0d0b;
}
.projectbox__tile figcaption {
  padding: .65rem .75rem .75rem;
  color: var(--c-stone);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .02em;
}

@media (max-width: 560px) {
  .lb-nav { width: 38px; height: 58px; font-size: 1.5rem; }
  .lb-btn { padding: .5em .7em; font-size: .74rem; }
  .projectbox__top { align-items: stretch; gap: .75rem; }
  .projectbox__grid { column-count: 1; }
  .projectbox .lb-actions { justify-content: flex-start; }
}
@media (min-width: 561px) and (max-width: 920px) {
  .projectbox__grid { column-count: 2; }
}

/* ===================================================== Blog article */
.article { width: min(100% - 2.5rem, 720px); margin-inline: auto; }
.article > * + * { margin-top: 1.4rem; }
.article h2 { font-size: var(--step-2); margin-top: var(--sp-5); }
.article h3 { font-size: var(--step-1); margin-top: var(--sp-4); }
.article p { font-size: 1.08rem; line-height: 1.7; color: var(--c-ink); }
.article ul, .article ol { padding-left: 1.3rem; color: var(--c-ink); }
.article li { margin-bottom: .5rem; line-height: 1.65; }
.article li::marker { color: var(--c-terracotta); }
.article figure { margin: var(--sp-4) 0; }
.article figcaption { font-family: var(--font-mono); font-size: .72rem; color: var(--c-zinc); margin-top: .6rem; text-align: center; }
.article blockquote {
  margin: var(--sp-4) 0; padding: .25rem 0 .25rem 1.4rem;
  border-left: 3px solid var(--c-terracotta);
  font-family: var(--font-display); font-size: var(--step-1); line-height: 1.4; color: var(--c-ink);
}
.article blockquote cite { display: block; margin-top: .6rem; font-family: var(--font-mono); font-size: .75rem; font-style: normal; color: var(--c-zinc); }
.article a:not(.btn) { color: var(--c-terracotta); text-decoration: underline; text-decoration-thickness: 1.5px; }
.article a:not(.btn):hover { color: var(--c-terracotta-hi); }
.article-meta { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; font-family: var(--font-mono); font-size: .76rem; letter-spacing: .04em; color: var(--c-zinc-lo); }
.article-meta .tag { color: var(--c-terracotta-hi); text-transform: uppercase; }

/* ===================================================== CMS-generated images */
/* Real photos injected by scripts/build-from-supabase.js (drop-in for .ph). */
.gal-img {
  width: 100%; height: auto; display: block;
  border: 1px solid rgba(107,114,112,.35); border-radius: var(--radius-lg);
}
.post__cover { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; border: 1px solid rgba(107,114,112,.35); border-radius: var(--radius-lg); }
.article figure img { width: 100%; height: auto; display: block; border-radius: var(--radius-lg); }

/* ===================================================== SPEC / COMPARISON TABLE */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.spec-table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: var(--step--1); }
.spec-table th, .spec-table td { text-align: left; padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table thead th {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--c-terracotta); background: var(--surface); white-space: nowrap;
}
.spec-table tbody th { font-weight: 600; color: var(--c-ink); white-space: nowrap; }
.spec-table tbody tr:last-child th, .spec-table tbody tr:last-child td { border-bottom: 0; }
.spec-table tbody tr:hover { background: rgba(177,79,46,.04); }
