/* Architectural Visualisation Scotland — granite stills 1-pager. Cache-bust via ?v= on the link. */
:root {
  --void: #1c262c;
  --slate: #243038;
  --ink: #e8e4dc;
  --ink-soft: #b7b3aa;
  --sand: #c4a574;
  --haar: #8eb4c4;
  --rule: #3a454c;
  --focus: #b7d0d8;
  --max: 72rem;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  overflow-x: hidden;
  overflow-y: scroll;
}

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.58;
}

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

img {
  height: auto;
}

a {
  color: var(--haar);
}

a:hover {
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--ink);
  color: var(--void);
  padding: 0.4rem 0.75rem;
  z-index: 20;
}

.skip:focus {
  top: 0.75rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 6vw;
  background: rgba(28, 38, 44, 0.88);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(10px);
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: Syne, "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

/* Logo lockup: the house mark with the AVS initials underneath. */
.mark-badge {
  display: inline-flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  gap: 0.1em;
  line-height: 1;
}

.mark-badge b {
  font-family: Syne, "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: 0.5em;
  letter-spacing: 0.22em;
  color: var(--sand);
}

.mark-icon {
  flex: 0 0 auto;
  width: 1.9em;
  height: 1.9em;
  color: var(--ink);
}

.footer-mark .mark-icon {
  width: 2.6rem;
  height: 2.6rem;
}

.footer-mark .mark-badge b {
  font-size: 0.6rem;
}

.mark em,
.footer-mark em {
  font-style: normal;
  color: var(--sand);
}

.mark .saltire,
.footer-mark .saltire {
  display: inline-block;
  width: 1.5em;
  height: 0.9em;
  margin-left: 0.15em;
  vertical-align: -0.1em;
  border-radius: 2px;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.2rem;
}

.site-header nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
}

.site-header nav a:hover,
.site-header nav a[aria-current] {
  color: var(--ink);
}

main {
  padding: 0;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
}

/* Parallax opening: one still split into depth layers (sky, street, building, foreground).
   --p 0 = assembled still, 1 = camera pushed in, layers separated on Z. Set by site.js. */
.px {
  --p: 0;
  --out: 0;
  --sep: clamp(0, calc((var(--p) - 0.04) / 0.72), 1);
  --facts: clamp(0, calc((var(--sep) - 0.4) / 0.3), 1);
  position: relative;
  scroll-margin-top: 0;
  background: #10161a;
}

.px-sticky {
  position: relative;
  overflow: hidden;
}

.px-frame {
  position: relative;
  width: 100%;
}

.px-flat img {
  width: 100%;
  height: auto;
}

.px-layer {
  display: none;
}

.px-hint {
  display: none;
}

.hero-caption {
  position: relative;
  padding: 1.4rem 6vw 2rem;
  background: var(--void);
}

.px-title {
  padding: 1.6rem 6vw 0;
}

.px-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sand);
}

.px-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.4rem;
  margin: 0 0 1.1rem;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.px-facts li {
  position: relative;
  padding-left: 0.9rem;
}

.px-facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--sand);
}

/* Fallback without JS: static still, then title and caption in flow (.px-title is not a layer). */
.px:not(.is-ready) .px-title {
  background: var(--void);
}

.px.is-ready {
  height: 300vh;
}

/* Pins under the site header; --nav-h is the header's measured height (site.js). */
.px.is-ready .px-sticky {
  position: sticky;
  top: var(--nav-h, 0px);
  height: calc(100vh - var(--nav-h, 0px));
  perspective: 1400px;
  perspective-origin: 50% calc(50% - var(--sep) * 16%);
  background: #10161a;
}

/* Retain the existing scene description for assistive technology. */
.px.is-ready .px-flat {
  display: block;
}

.px.is-ready .px-flat img {
  opacity: 0;
}

.px.is-ready .px-frame {
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(100vw, calc(100vh * 16 / 9));
  aspect-ratio: 16 / 9;
  transform-style: preserve-3d;
  transform: translate(-50%, -50%) scale(calc(1 + var(--sep) * 0.24));
  will-change: transform;
}

.px.is-ready .px-layer {
  display: block;
  position: absolute;
  inset: 0;
  will-change: transform;
}

.px.is-ready .px-layer picture,
.px.is-ready .px-layer img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.px.is-ready .px-sky {
  transform: translateZ(calc(var(--sep) * -320px));
}

/* Darkens the upper sky under the title from the first frame. */
.px.is-ready .px-sky::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 22, 26, 0.6) 0%, rgba(16, 22, 26, 0.2) 30%, rgba(16, 22, 26, 0) 50%);
}

.px.is-ready .px-street {
  transform: translateZ(0);
}

/* Depth labels: children of their layer, so they travel with it. --t staggers when each appears. */
.px.is-ready .px-tag {
  --vis: clamp(0, calc((var(--sep) - var(--t)) / 0.22), 1);
  position: absolute;
  margin: 0;
  padding: 0.45rem 0.8rem 0.5rem 0.9rem;
  width: max-content;
  max-width: 15rem;
  border-left: 2px solid var(--sand);
  background: rgba(16, 22, 26, 0.72);
  backdrop-filter: blur(6px);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--ink);
  opacity: calc(var(--vis) * (1 - var(--out)));
  transform: translate(var(--tx, 0), calc((1 - var(--vis)) * 1.2rem));
  pointer-events: none;
}

.px.is-ready .px-tag span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.74rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-soft);
}

.px.is-ready .px-street .px-tag {
  left: 18%;
  top: 40%;
}

.px.is-ready .px-building .px-tag {
  --tx: -50%;
  left: 50%;
  top: 20%;
}

.px.is-ready .px-fore .px-tag {
  left: 62%;
  top: 58%;
}

.px.is-ready .px-building {
  transform: translateZ(calc(var(--sep) * 110px));
}

/* Registers the keyed building into the gap site of the street plate (measured on the 1920x1080 plates). */
.px.is-ready .px-building img {
  transform-origin: 48.359% 73.056%;
  transform: translate(0.339%, -0.185%) scale(0.84);
}

.px.is-ready .px-fore {
  transform: translateZ(calc(var(--sep) * 210px));
}

/* Title is on screen from the first frame and rises with the sky as the layers separate. */
.px.is-ready .px-title {
  position: absolute;
  left: 6vw;
  top: 9vh;
  width: min(38vw, 32rem);
  padding: 0;
  z-index: 5;
  transform: translateY(calc(var(--sep) * -6vh));
  opacity: calc(1 - var(--out));
  pointer-events: none;
}

.px.is-ready .px-title h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.7), 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* Scene dims as the summary card slides over it. */
.px.is-ready .px-sticky::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #10161a;
  opacity: calc(var(--out) * 0.6);
  z-index: 4;
  pointer-events: none;
}

.px.is-ready .px-title .px-kicker {
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.8);
}

.px.is-ready .px-hint {
  display: block;
  position: absolute;
  left: 50%;
  bottom: 1.6rem;
  margin: 0;
  padding: 0.35rem 0.9rem 0.35rem 0.9rem;
  border: 1px solid rgba(232, 228, 220, 0.5);
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(16, 22, 26, 0.35);
  transform: translateX(-50%);
  opacity: calc(1 - var(--p) * 10);
  z-index: 5;
  pointer-events: none;
}

.px.is-ready .hero-caption {
  position: absolute;
  inset: auto 0 0;
  z-index: 6;
  padding: 8rem 6vw 2.6rem;
  background: linear-gradient(180deg, rgba(16, 22, 26, 0) 0%, rgba(16, 22, 26, 0.55) 45%, rgba(16, 22, 26, 0.92) 100%);
  opacity: calc(1 - var(--out));
  transform: translateY(calc(var(--sep) * -1.5vh - var(--out) * 3rem));
  pointer-events: none;
}

.px.is-live .hero-caption {
  pointer-events: auto;
}

/* The facts row surfaces once the layers have separated; the lede tightens to make room. */
.px.is-ready .hero-caption .lede {
  margin-bottom: calc(0.9rem - var(--facts) * 0.3rem);
}

.px.is-ready .px-facts {
  max-height: calc(var(--facts) * 5rem);
  margin-bottom: calc(var(--facts) * 1.1rem);
  overflow: hidden;
  opacity: var(--facts);
  transform: translateY(calc((1 - var(--facts)) * 0.8rem));
}

/* The first section after the hero is the card that slides over the hero's bottom edge. */
.px.is-ready + .block {
  margin-top: -14vh;
  border-top: 0;
  border-radius: 1.6rem 1.6rem 0 0;
  box-shadow: 0 -1.5rem 3rem rgba(0, 0, 0, 0.45);
}

.px.is-ready ~ .tldr,
.px.is-ready ~ .block {
  position: relative;
  z-index: 3;
  background: var(--void);
}

h1,
h2,
h3 {
  font-family: Syne, "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--ink);
  scroll-margin-top: 4.75rem;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  margin: 0 0 0.85rem;
  max-width: 14ch;
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  margin: 0 0 0.9rem;
  max-width: 22ch;
}

h3 {
  font-size: 1.15rem;
  margin: 1.5rem 0 0.5rem;
  letter-spacing: -0.02em;
}

.lede,
.tldr,
.block p {
  max-width: min(62ch, calc(100vw - 12vw));
  overflow-wrap: break-word;
}

/* Section intros run the full content width; nested copy keeps the measure. */
.block > .wrap > p {
  max-width: none;
}

.lede {
  font-size: 1.12rem;
  margin: 0 0 0.9rem;
  color: var(--ink);
}

/* Summary paragraph sits on the same content column as the section intros. */
.tldr {
  box-sizing: content-box;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 6vw 2.4rem;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.stage-note {
  margin: 1.2rem 0 1.4rem;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.35rem;
  background: var(--sand);
  color: #1c262c;
  text-decoration: none;
  font-weight: 600;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  transition: background 0.25s, color 0.25s, transform 0.25s;
}

.btn:active {
  transform: translateY(1px);
}

.btn:hover {
  background: var(--ink);
  color: var(--void);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.btn-ghost:hover {
  background: var(--ink);
  color: var(--void);
}

.block,
#rest-of-scotland {
  scroll-margin-top: 4.75rem;
}

.block {
  padding: 4.2rem 6vw;
  border-top: 1px solid var(--rule);
}

.block > .wrap > p + .pack-table,
.block > .wrap > p + .gallery,
.block > .wrap > p + .cities,
.block > .wrap > p + .tabs,
.block > .wrap > p + .gallery-x {
  margin-top: 1.4rem;
}

/* Segmented pill control; wraps into extra rows on narrow screens. */
.tablist {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 1.4rem;
  padding: 0.3rem;
  border: 1px solid var(--rule);
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.035);
}

.tablist [role="tab"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 0 1 auto;
  text-align: center;
  background: transparent;
  border: 0;
  border-radius: 999px;
  box-shadow: none;
  padding: 0.6rem 1.1rem;
  color: var(--ink-soft);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.25s, color 0.25s;
}

.tablist [role="tab"]:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}

.tablist [role="tab"][aria-selected="true"] {
  color: var(--void);
  background: var(--sand);
}

.tabs:not(.is-ready) [role="tablist"] {
  display: none;
}

.tabs:not(.is-ready) .tab-panel[hidden] {
  display: block;
  content-visibility: visible;
}

/* Package card: image and copy inside one rounded panel. */
.pack-stage {
  display: grid;
  gap: 0.6rem;
  padding: 0.6rem;
  border: 1px solid var(--rule);
  border-radius: 1.25rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
}

.pack-stage > picture,
.pack-stage > .cam {
  overflow: hidden;
  border-radius: 0.85rem;
}

.pack-stage img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.pack-stage:hover > picture img {
  transform: scale(1.035);
}

@media (min-width: 52rem) {
  .pack-stage {
    grid-template-columns: 7fr 5fr;
    align-items: center;
  }
}

/* Quote facts: three short cards in place of a paragraph. */
.pack-facts {
  display: grid;
  gap: 0.6rem;
  margin: 1.2rem 0 0;
}

.pack-facts > div {
  padding: 1.1rem 1.2rem 1.2rem;
  border: 1px solid var(--rule);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.025);
}

.pack-facts dt {
  font-family: Syne, "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.4rem;
}

.pack-facts dd {
  margin: 0;
  color: var(--ink-soft);
}

@media (min-width: 52rem) {
  .pack-facts {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Massing model vs finished still, same camera. --x is the split in percent (range input or drag). */
.compare {
  margin: 1.6rem 0 0.4rem;
}

.compare-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f1518;
  cursor: ew-resize;
  touch-action: pan-y;
  user-select: none;
}

.compare-stage picture,
.compare-stage img,
.cam-layer picture,
.cam-layer img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: auto;
  pointer-events: none;
  -webkit-user-drag: none;
}

.compare-before {
  clip-path: inset(0 calc(100% - var(--x) * 1%) 0 0);
}

.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--x) * 1%);
  width: 2px;
  margin-left: -1px;
  background: var(--ink);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.compare-handle::after {
  content: "\2194";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--void);
  font-size: 1.1rem;
  line-height: 2.6rem;
  text-align: center;
  transform: translate(-50%, -50%);
  box-shadow: 0 0.4rem 1.2rem rgba(0, 0, 0, 0.45);
}

.compare-label {
  position: absolute;
  top: 0.8rem;
  padding: 0.3rem 0.6rem;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(16, 22, 26, 0.72);
  pointer-events: none;
}

.compare-label-a {
  left: 0.8rem;
  color: #1c262c;
  background: rgba(232, 228, 220, 0.82);
}

.compare-label-b {
  right: 0.8rem;
}

.compare-control {
  display: block;
  margin: 0.6rem 0 0;
}

.compare-control input {
  width: 100%;
  margin: 0;
  accent-color: var(--sand);
  cursor: ew-resize;
}

.compare-note {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Camera-path card: the hero's depth layers steered by the pointer (--mx/--my in -1..1, set by site.js). */
.cam {
  --mx: 0;
  --my: 0;
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f1518;
}

.cam-scene {
  position: absolute;
  inset: -6%;
  perspective: 1200px;
  transform-style: preserve-3d;
  transform: rotateY(calc(var(--mx) * 4deg)) rotateX(calc(var(--my) * -3deg));
}

.cam-layer {
  position: absolute;
  inset: 0;
  transform: translate3d(calc(var(--mx) * var(--d) * 1%), calc(var(--my) * var(--d) * 0.7%), 0);
  will-change: transform;
}

.cam-sky {
  --d: -1.4;
}

.cam-street {
  --d: 0;
}

.cam-building {
  --d: 1.6;
}

.cam-building img {
  transform-origin: 48.359% 73.056%;
  transform: translate(0.339%, -0.185%) scale(0.84);
}

.cam-fore {
  --d: 3.4;
}

.cam-hint {
  position: absolute;
  left: 0.85rem;
  bottom: 0.85rem;
  margin: 0;
  padding: 0.3rem 0.6rem;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(16, 22, 26, 0.72);
  pointer-events: none;
  transition: opacity 0.6s;
}

.cam.is-steered .cam-hint {
  opacity: 0;
}

.pack-stage:hover .cam img {
  transform: none;
}

.pack-stage:hover .cam-building img {
  transform: translate(0.339%, -0.185%) scale(0.84);
}

/* Scroll reveal (site.js adds .rv, then .rv-in when the element enters the viewport). */
.rv {
  opacity: 0;
  transform: translateY(1.4rem);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.rv.rv-in {
  opacity: 1;
  transform: none;
}

.steps li.rv:nth-child(2) {
  transition-delay: 0.1s;
}

.steps li.rv:nth-child(3) {
  transition-delay: 0.2s;
}

.steps li.rv:nth-child(4) {
  transition-delay: 0.3s;
}

.pack-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 1rem 1rem 1.2rem;
}

.pack-copy .pack-name,
.pack-copy h3 {
  font-family: Syne, "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem);
  line-height: 1.1;
}

.pack-copy .pack-name::before {
  content: "Package";
  display: block;
  margin-bottom: 0.6rem;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sand);
}

.pack-copy p {
  margin: 0;
  max-width: 52ch;
  color: var(--ink-soft);
}

.pack-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.1rem;
  margin-top: 0.5rem;
}

.pack-copy .btn {
  margin-top: 0;
}

.pack-link {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.1rem;
  transition: border-color 0.25s;
}

.pack-link:hover,
.pack-link:focus-visible {
  border-bottom-color: var(--sand);
}

@media (min-width: 52rem) {
  .pack-copy {
    padding: 1.4rem 1.6rem 1.4rem 1.2rem;
  }
}

/* Work-in-progress runway: one project, seven passes, pinned while the reader scrolls. */
.wip {
  --n: 7;
  padding-bottom: 0;
}

.wip .wrap > p {
  margin-bottom: 0.4rem;
}

.wip-runway {
  position: relative;
  height: calc(var(--n) * 42vh + 100vh);
}

.wip-sticky {
  position: sticky;
  top: var(--nav-h, 4rem);
  height: calc(100vh - var(--nav-h, 4rem));
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.7rem;
  padding: 0.8rem 4vw 1rem;
  box-sizing: border-box;
}

.wip-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  justify-self: center;
  margin: 0;
  padding: 0.3rem;
  list-style: none;
  counter-reset: pass;
  border: 1px solid var(--rule);
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.035);
}

.wip-steps li {
  counter-increment: pass;
  flex: 0 1 auto;
}

.wip-steps button {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}

.wip-steps button::before {
  content: counter(pass) " ";
  color: var(--sand);
}

.wip-steps button:hover {
  color: var(--ink);
}

.wip-steps button[aria-current="step"] {
  background: var(--sand);
  color: var(--void);
}

.wip-steps button[aria-current="step"]::before {
  color: inherit;
}

/* Plate height: what the viewport leaves after the header, step bar and caption, capped at a 16:10 crop of the width. */
.wip-frame {
  --ph: min(calc(100vh - var(--nav-h, 4rem) - 11.5rem), calc(92vw * 10 / 16));
  position: relative;
  min-height: 0;
}

.wip-frame::before {
  content: "";
  position: absolute;
  top: -0.45rem;
  left: 0;
  width: calc(var(--prog, 0) * 100%);
  height: 2px;
  background: var(--sand);
  border-radius: 1px;
  transition: width 0.15s linear;
}

.wip-stage {
  position: absolute;
  inset: 0;
  margin: 0;
  display: grid;
  grid-template-rows: auto auto;
  align-content: center;
  gap: 0.8rem;
  opacity: 0;
  transition: opacity 0.55s ease;
  pointer-events: none;
}

.wip-stage.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

.wip-plate {
  position: relative;
  justify-self: center;
  width: min(100%, calc(var(--ph) * 16 / 9));
  height: var(--ph);
  overflow: hidden;
  border-radius: 0.85rem;
  background: #0f1518;
}

/* The 16:9 artwork stays one piece (image, ink, notes) and is centre-cropped by the plate on narrow screens. */
.wip-art {
  position: absolute;
  top: 0;
  left: 50%;
  height: 100%;
  aspect-ratio: 16 / 9;
  transform: translateX(-50%);
}

.wip-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wip-stage figcaption {
  max-width: 62ch;
  margin: 0 auto;
  padding: 0 0.2rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* Switch caption text immediately while the stage artwork crossfades. */
.wip.is-ready .wip-stage:not(.is-active) figcaption {
  visibility: hidden;
}

.wip-stage figcaption b {
  color: var(--ink);
}

/* Red-pencil review marks. Paths carry pathLength="100" so one dash rule draws any length. */
.wip-ink {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke: #e2412d;
  stroke-width: 0.32;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.92;
  filter: url(#pencil);
}

.wip-ink path {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}

.wip-ink .wip-dash {
  stroke-dasharray: 2.4 1.6;
  stroke-dashoffset: 0;
  opacity: 0;
}

.wip-stage.is-active .wip-ink path {
  animation: wip-draw 0.9s cubic-bezier(0.3, 0, 0.2, 1) 0.35s forwards;
}

.wip-stage.is-active .wip-ink .wip-dash {
  animation: wip-fade 0.5s ease 0.6s forwards;
}

.wip-note {
  position: absolute;
  left: clamp(8%, var(--x), 72%);
  top: var(--y);
  margin: 0;
  max-width: 17ch;
  transform: rotate(var(--r, 0deg)) translateY(0.4rem);
  font-family: "Bradley Hand", "Segoe Print", "Marker Felt", "Comic Sans MS", cursive;
  font-size: clamp(0.72rem, 0.55rem + 0.9vw, 1.2rem);
  line-height: 1.15;
  color: #e2412d;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.45s ease 0.75s, transform 0.45s ease 0.75s;
}

.wip-note-big {
  font-size: clamp(0.95rem, 0.6rem + 1.3vw, 1.7rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.wip-stage.is-active .wip-note {
  opacity: 1;
  transform: rotate(var(--r, 0deg)) translateY(0);
}

@keyframes wip-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes wip-fade {
  to { opacity: 1; }
}

/* No JS or reduced motion: the seven passes stack as a plain sequence. */
.wip:not(.is-ready) .wip-runway {
  height: auto;
}

.wip:not(.is-ready) .wip-sticky {
  position: static;
  height: auto;
  display: block;
}

.wip:not(.is-ready) .wip-steps {
  display: none;
}

.wip:not(.is-ready) .wip-stage {
  position: static;
  opacity: 1;
  pointer-events: auto;
  margin: 0 auto 2.2rem;
  max-width: var(--max);
}

.wip:not(.is-ready) .wip-plate {
  width: 100%;
}

.wip:not(.is-ready) .wip-ink path,
.wip:not(.is-ready) .wip-ink .wip-dash {
  animation: none;
  stroke-dashoffset: 0;
  opacity: 1;
}

.wip:not(.is-ready) .wip-note {
  opacity: 1;
  transform: rotate(var(--r, 0deg));
  transition: none;
}

@media (max-width: 40rem) {
  .wip-plate {
    width: 100%;
  }
}

@media (max-width: 64rem) {
  .wip-steps {
    max-height: 25vh;
    overflow-y: auto;
  }

  .wip-stage {
    align-content: start;
    overflow-y: auto;
  }

  .wip-plate {
    height: auto;
    aspect-ratio: auto;
    background: #0a0e12;
  }

  .wip-art {
    position: relative;
    left: auto;
    height: auto;
    aspect-ratio: auto;
    transform: none;
  }

  .wip-art picture {
    display: block;
    aspect-ratio: 16 / 9;
  }

  .wip-ink {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .wip-note,
  .wip-stage.is-active .wip-note,
  .wip:not(.is-ready) .wip-note {
    position: static;
    max-width: none;
    margin: 0.6rem 0.8rem;
    transform: none;
    font-size: 0.875rem;
    line-height: 1.4;
  }

  .wip-stage figcaption {
    text-align: left;
    font-size: 0.875rem;
    line-height: 1.5;
  }
}


/* Filterable stills gallery + lightbox */
.gallery-x {
  margin: 1.5rem 0 1.6rem;
}

.g-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.g-jump a {
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.38rem 0.85rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
  text-decoration: none;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}

.g-jump a:hover {
  color: var(--ink);
  border-color: var(--ink-soft);
}

.g-set {
  --gallery-row-gap: 1.4rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 1.2rem;
  margin-top: 3rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
}

.g-set > h3,
.g-set > p,
.g-set > .facade-grid {
  grid-column: 1 / -1;
}

.g-set > h3 {
  margin: 0 0 0.35rem;
  font-size: 1.3rem;
}

/* Set intros run the full row, one sentence per line. */
.g-set > p {
  max-width: none;
  margin: 0 0 0.45rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

.g-set > p:last-of-type {
  margin-bottom: 0;
}

.g-set > .g-item:nth-of-type(-n+3) {
  margin-top: 1.2rem;
}

/* Facade renovation pairs: compare sliders, existing photo on the left of the handle.
   One column until the cards are wide enough for both labels and a readable split. */
.facade-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem 1.2rem;
  margin-top: 1.2rem;
}

@media (min-width: 64rem) {
  .facade-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.4rem 1.2rem;
  }
}

.compare-facade {
  margin: 0;
}

.compare-facade .compare-label {
  top: 0.6rem;
  padding: 0.22rem 0.5rem;
  font-size: 0.66rem;
}

.compare-facade .compare-label-a {
  left: 0.6rem;
}

.compare-facade .compare-label-b {
  right: 0.6rem;
}

.compare-facade .compare-handle::after {
  width: 2rem;
  height: 2rem;
  font-size: 0.9rem;
  line-height: 2rem;
}

.compare-facade .compare-note {
  font-size: 0.875rem;
}

.compare-zoom {
  position: absolute;
  right: 0.6rem;
  bottom: 0.6rem;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid rgba(232, 228, 220, 0.35);
  border-radius: 999px;
  background: rgba(16, 22, 26, 0.72);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: zoom-in;
  transition: background 0.25s, color 0.25s;
}

.compare-zoom:hover,
.compare-zoom:focus-visible {
  background: var(--sand);
  color: #1c262c;
  outline: none;
}

/* Full-size comparison dialog */
.lb-cmp-body {
  display: grid;
  justify-items: center;
}

.compare-full {
  width: min(96vw, calc((100vh - 14rem) * 16 / 9));
  margin: 0;
}

.compare-full .compare-stage {
  box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.6);
}

.compare-full .compare-label-b {
  right: 3.8rem;
}

.compare-full .compare-note {
  margin-inline: auto;
  text-align: left;
  color: var(--ink);
}

.g-item {
  margin: var(--gallery-row-gap) 0 0;
}

.g-open {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: start;
  width: 100%;
  color: inherit;
  text-decoration: none;
  cursor: zoom-in;
  overflow: hidden;
}

/* Same zoom pill as the facade compare cards, so every still reads as openable. */
.g-open::after {
  content: "\26F6";
  grid-column: 1;
  grid-row: 1;
  align-self: end;
  justify-self: end;
  z-index: 1;
  margin: 0.6rem;
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(232, 228, 220, 0.35);
  border-radius: 999px;
  background: rgba(16, 22, 26, 0.72);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1;
  pointer-events: none;
  transition: background 0.25s, color 0.25s;
}

.g-open:hover::after,
.g-open:focus-visible::after {
  background: var(--sand);
  color: #1c262c;
}

.g-open img {
  grid-column: 1;
  grid-row: 1;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.4s;
}

.g-open:hover img,
.g-open:focus-visible img {
  transform: scale(1.04);
}

.g-open:focus-visible {
  outline: 2px solid var(--sand);
  outline-offset: 2px;
}

/* Collapsed under the thumbnail; the lightbox shows the full caption. */
.g-item .g-caption {
  grid-column: 1;
  grid-row: 2;
  max-width: none;
  margin-top: 0.5rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.lb {
  width: min(96vw, 1600px);
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.lb::backdrop {
  background: rgba(10, 14, 17, 0.92);
}

.lb-fig {
  width: min(96vw, calc(82vh * var(--lb-ratio, 1.777778)));
  margin: 0 auto;
  display: table;
}

.lb-pic img {
  display: block;
  max-width: 96vw;
  max-height: 82vh;
  width: 100%;
  height: auto;
  box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.6);
}

/* Caption runs under the still at its width; the counter sits on its own muted line. */
.lb-cap {
  display: table-caption;
  caption-side: bottom;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  margin-top: 0;
  padding: 0.65rem 3.5rem 0;
  text-align: left;
  color: var(--ink);
  line-height: 1.5;
}

.lb-count {
  display: block;
  margin-top: 0.35rem;
  text-align: center;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.lb-close,
.lb-nav {
  position: fixed;
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: rgba(28, 38, 44, 0.85);
  color: var(--ink);
  width: 2.8rem;
  height: 2.8rem;
  font: inherit;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 2;
}

.lb-close {
  top: 1rem;
  right: 1rem;
}

.lb-nav {
  top: 50%;
  transform: translateY(-50%);
}

.lb-prev {
  left: 1rem;
}

.lb-next {
  right: 1rem;
}

.lb-close:hover,
.lb-nav:hover {
  background: var(--sand);
  color: #1c262c;
}

.pack-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.4rem 0 1.6rem;
}

.pack-table caption {
  caption-side: bottom;
  text-align: left;
  padding-top: 0.75rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.pack-table th,
.pack-table td {
  text-align: left;
  vertical-align: top;
  padding: 1rem 1.1rem 1rem 0;
  border-bottom: 1px solid var(--rule);
}

.pack-table th {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.pack-table td:first-child {
  font-family: Syne, "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  width: 26%;
}

.brief-list {
  margin: 0.4rem 0 0;
  padding-left: 1.15rem;
}

.gallery {
  display: grid;
  gap: 1.1rem 1.2rem;
  grid-template-columns: 1fr;
  margin: 1.3rem 0 1.5rem;
}

@media (min-width: 44rem) {
  .gallery {
    grid-template-columns: 1fr 1fr;
  }
}

figure {
  margin: 0;
}

.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

figcaption,
.g-caption {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-top: 0.55rem;
  max-width: 42ch;
}

/* Process film: click-to-play, poster carries the first paint; sized to the content width. */
.film-block {
  padding-bottom: 3.4rem;
}

.film {
  margin: 1.6rem 0 0;
}

.film-video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 0.85rem;
  background: #0f1518;
  box-shadow: 0 1.4rem 3rem -1.6rem rgba(0, 0, 0, 0.7);
  outline-offset: 0.25rem;
}

.film-video:focus-visible {
  outline: 2px solid var(--sand);
}

.film-stage {
  position: relative;
  border-radius: 0.85rem;
}

/* The whole poster is the hit area; the ring and label are the visible control. */
.film-play {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: rgba(10, 14, 18, 0.18);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: background 0.25s ease;
}

.film-play[hidden] {
  display: none;
}

.film-play:hover,
.film-play:focus-visible {
  background: rgba(10, 14, 18, 0.34);
}

.film-play:focus-visible {
  outline: 2px solid var(--sand);
  outline-offset: 0.25rem;
}

.film-play-ring {
  width: clamp(3.4rem, 7vw, 5rem);
  height: clamp(3.4rem, 7vw, 5rem);
  border-radius: 50%;
  background: rgba(28, 38, 44, 0.82);
  box-shadow: inset 0 0 0 1.5px var(--sand), 0 1rem 2.4rem -0.8rem rgba(0, 0, 0, 0.8);
  display: grid;
  place-items: center;
  transition: transform 0.25s ease;
}

.film-play:hover .film-play-ring {
  transform: scale(1.06);
}

.film-play-ring::after {
  content: "";
  border-style: solid;
  border-width: 0.55em 0 0.55em 0.9em;
  border-color: transparent transparent transparent var(--sand);
  margin-left: 0.2em;
  font-size: clamp(0.8rem, 1.5vw, 1.1rem);
}

.film-play-label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.film-play-label small {
  font-size: inherit;
  font-weight: 400;
  color: var(--sand);
  margin-left: 0.4em;
}

@media (max-width: 40rem) {
  .film-play-label {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
  }
}

.film figcaption {
  max-width: none;
  margin-top: 0.8rem;
}

.film figcaption a {
  color: var(--sand);
}

.cities {
  display: grid;
  gap: 1.6rem 2rem;
  margin: 1.5rem 0 1.2rem;
}

.cities article {
  padding-top: 1rem;
  border-top: 1px solid var(--sand);
}

.cities h3 {
  margin-top: 0;
}

@media (min-width: 52rem) {
  .cities {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.quote-block {
  background: #161e22;
}

.quote-grid {
  display: grid;
  gap: 2rem 3rem;
  margin-top: 1.4rem;
}

@media (min-width: 52rem) {
  .quote-grid {
    grid-template-columns: 1fr 1.2fr;
    align-items: start;
  }
}

.steps {
  display: grid;
  gap: 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: 0.15rem 1rem;
  padding: 1rem 0 1.1rem;
  border-top: 1px solid var(--rule);
  counter-increment: step;
}

.steps li::after {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  right: 0;
  top: 1rem;
  font-family: Syne, "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--sand);
}

.steps svg {
  grid-row: span 2;
  width: 2.2rem;
  height: 2.2rem;
  fill: none;
  stroke: var(--sand);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.steps p {
  margin: 0;
  max-width: 36ch;
}

.steps .step-name {
  font-family: Syne, "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
}

.steps li p:last-child {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.quote-form {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  position: relative;
  display: grid;
  gap: 0.9rem;
  max-width: 36rem;
}

.quote-form label {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.quote-form input,
.quote-form select,
.quote-form textarea {
  min-width: 0;
  max-width: 100%;
  font: inherit;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--rule);
  background: #2e3c44;
  color: var(--ink);
}

.quote-form textarea {
  min-height: 7.5rem;
  resize: vertical;
}

.form-note {
  margin: 1.1rem 0 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.quote-form input[type="file"] {
  padding: 0.5rem 0.6rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.quote-form input[type="file"]::file-selector-button {
  font: inherit;
  font-weight: 600;
  margin-right: 0.8rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--sand);
  border-radius: 999px;
  background: transparent;
  color: var(--sand);
  cursor: pointer;
}

.file-hint {
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.quote-form .hp {
  position: absolute;
  left: -200vw;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* quote.php redirects back to #quote-sent or #quote-failed; only the targeted status shows. */
.form-status {
  display: none;
  margin: 1.1rem 0 0;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--sand);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  scroll-margin-top: 6rem;
}

.form-status:target {
  display: block;
}

#quote-failed {
  border-left-color: #e2412d;
}

.site-footer {
  padding: 3.6rem 6vw 2rem;
  border-top: 1px solid var(--rule);
  background: #12181c;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.footer-top {
  display: grid;
  gap: 2.4rem;
}

.footer-brand p {
  margin: 0;
  max-width: 34ch;
}

.footer-mark {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  max-width: none !important;
  font-family: Syne, "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 0.8rem !important;
}

.footer-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1.2rem;
  margin-top: 1.4rem;
}

.footer-mail {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.footer-mail:hover {
  border-bottom-color: var(--sand);
}

.footer-company {
  display: grid;
  align-content: start;
  gap: 0.7rem;
  max-width: 28rem;
}

.footer-company p {
  margin: 0;
}

.footer-company > p a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}

.footer-part {
  display: grid;
  gap: 0.15rem;
}

.footer-part span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sand);
}

.footer-part a {
  font-family: Syne, "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  border-bottom: 0;
  width: fit-content;
}

.footer-part a:hover {
  border-bottom: 0;
  color: var(--sand);
}

.footer-company > p a:hover {
  border-bottom-color: var(--sand);
}

.footer-company ul {
  margin: 0.2rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.footer-company li a {
  color: var(--ink-soft);
  text-decoration: none;
}

.footer-company li a:hover,
.footer-company li a:focus-visible {
  color: var(--ink);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 1.8rem 1.4rem;
}

.footer-h {
  margin: 0 0 0.8rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sand);
}

.footer-cols ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.footer-cols a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-cols a:hover,
.footer-cols a:focus-visible {
  color: var(--ink);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem 2rem;
  margin-top: 2.8rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
}

.footer-bottom p {
  margin: 0;
  max-width: 60ch;
}

.footer-top-link {
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.footer-top-link:hover {
  color: var(--sand);
}

@media (min-width: 56rem) {
  .footer-top {
    grid-template-columns: minmax(34rem, 1.45fr) minmax(15rem, 0.7fr);
    align-items: start;
  }

  .footer-cols {
    grid-column: 1 / -1;
  }
}

@media (min-width: 72rem) {
  .footer-top {
    grid-template-columns: minmax(36rem, 1.35fr) minmax(16rem, 0.65fr);
    gap: 2.4rem 3rem;
  }

  .footer-cols {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 40rem) {
  .site-header {
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.8rem;
  }

  .mark {
    min-width: 0;
    max-width: 100%;
    font-size: 0.8rem;
    white-space: normal;
  }

  .site-header .mark > span:last-child {
    min-width: 0;
  }

  .site-header nav {
    width: 100%;
  }

  .px.is-ready {
    height: 240vh;
  }

  /* Portrait: the still is a wide band mid-screen; the title floats above it, the caption below. */
  .px.is-ready .px-frame {
    width: 178vw;
    top: 46%;
  }

  .px.is-ready .px-sky {
    transform: translateZ(calc(var(--sep) * -220px));
  }

  .px.is-ready .px-building {
    transform: translateZ(calc(var(--sep) * 70px));
  }

  .px.is-ready .px-fore {
    transform: translateZ(calc(var(--sep) * 170px));
  }

  .px.is-ready .px-title {
    left: 5vw;
    top: 7vh;
    width: 90vw;
    transform: translateY(calc(var(--sep) * -3vh));
  }

  .px.is-ready .px-title h1 {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
  }

  .px.is-ready .px-tag,
  .px.is-ready .px-facts {
    display: none;
  }

  .px.is-ready .hero-caption {
    padding: 4.5rem 5vw 1.6rem;
  }

  .px.is-ready + .block {
    margin-top: -10vh;
    border-radius: 1.2rem 1.2rem 0 0;
  }

  .lede {
    font-size: 1rem;
    max-width: 74vw;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    text-align: center;
  }

  .g-set {
    --gallery-row-gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 0.7rem;
  }

  .g-set > .g-item:nth-of-type(3) {
    margin-top: var(--gallery-row-gap);
  }

  .g-item .g-caption {
    font-size: 0.875rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .lb-nav {
    top: auto;
    bottom: 1rem;
    transform: none;
  }

  .lb-cap {
    max-width: 96vw;
    padding: 0.7rem 0.75rem 4.4rem;
    font-size: 0.9rem;
  }

  .compare-handle::after {
    width: 2.1rem;
    height: 2.1rem;
    line-height: 2.1rem;
  }

  .pack-table,
  .pack-table thead,
  .pack-table tbody,
  .pack-table tr,
  .pack-table th,
  .pack-table td {
    display: block;
  }

  .pack-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .pack-table td {
    border: 0;
    padding: 0.25rem 0;
    width: auto;
  }

  .pack-table tr {
    padding: 1rem 0;
    border-bottom: 1px solid var(--rule);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  /* site.js never adds .is-ready under reduced motion; the static still + flow layout applies. */

  .pack-stage img,
  .cam-hint,
  .rv {
    transition: none;
  }

  .pack-stage:hover img {
    transform: none;
  }
}

/* Approved homepage navigation, gallery disclosures and responsive layout. */
.home .site-header { gap: 1.5rem; }
.home .phone-menu { margin-left: auto; }
.home .phone-menu > summary { display: none; }
.home .phone-menu nav { width: auto; }
.home .header-quote {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .45rem 1.2rem;
  border: 1px solid var(--sand);
  border-radius: 999px;
  background: var(--sand);
  color: var(--slate, #1c262c);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
}
.home .header-quote:hover { background: var(--ink); }
.home .px.is-ready { height: 220vh; }
.home .hero-actions a[href="#quote"] { order: -1; }
.home .hero-caption .lede { max-width: 66ch; }
.home .g-jump { gap: .5rem; padding-bottom: 1.8rem; }
.home .g-jump a { min-height: 40px; display: inline-flex; align-items: center; }
.home .gallery-category { scroll-margin-top: 6rem; }
.home .gallery-disclosure { border-top: 1px solid var(--rule); }
.home .gallery-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  cursor: pointer;
  list-style: none;
}
.home .gallery-disclosure > summary::-webkit-details-marker { display: none; }
.home .gallery-disclosure > summary::after {
  content: "+";
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  height: 36px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  color: var(--sand);
  font-size: 1.35rem;
  font-weight: 400;
}
.home .gallery-disclosure[open] > summary::after { content: "−"; }
.home .gallery-disclosure > summary h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.15rem, 1.5vw, 1.45rem);
  line-height: 1.3;
}
.home .gallery-category-content.g-set {
  margin: 0;
  padding: 0 0 2.5rem;
  border: 0;
}
.home .gallery-category-content > p { max-width: 76ch; }
.home .g-item .g-caption {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  font-size: .9375rem;
  line-height: 1.5;
}
.home .quote-form {
  padding: clamp(1rem, 2.4vw, 2rem);
  max-width: none;
  background: #26353d;
  border: 1px solid var(--rule);
  border-radius: 1rem;
}
.home .quote-form .btn { width: 100%; }
.home .steps li::after { display: none; }
.home .steps li { padding-right: 0; }
.home .quote-dock-hidden { visibility: hidden; pointer-events: none; }

@media (max-width: 52rem), (max-width: 64rem) and (max-height: 36rem) {
  .home { padding-bottom: 5.5rem; }
  .home .site-header {
    flex-wrap: nowrap;
    min-height: 68px;
    padding: .7rem 5vw;
    gap: .6rem;
    background: #1c262c;
    backdrop-filter: none;
  }
  .home .mark {
    flex: 1 1 auto;
    min-width: 0;
    max-width: min(260px, calc(100% - 54px));
    font-size: .82rem;
    line-height: 1.25;
  }
  .home .mark-badge { flex-shrink: 0; }
  .home .mark > span:last-child { min-width: 0; }
  .home .mark .saltire { white-space: nowrap; width: 1.3em; }
  .home .phone-menu { flex: 0 0 44px; margin-left: auto; }
  .home .phone-menu > summary {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--rule);
    border-radius: 50%;
    cursor: pointer;
    list-style: none;
  }
  .home .phone-menu > summary::-webkit-details-marker { display: none; }
  .home .menu-lines,
  .home .menu-lines::before,
  .home .menu-lines::after {
    display: block;
    width: 18px;
    height: 1px;
    background: var(--ink);
  }
  .home .menu-lines { position: relative; }
  .home .menu-lines::before { content: ""; position: absolute; top: -5px; }
  .home .menu-lines::after { content: ""; position: absolute; top: 5px; }
  .home .phone-menu[open] nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 5vw;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 210px;
    padding: .65rem;
    border: 1px solid var(--rule);
    border-radius: .75rem;
    background: #26353d;
    box-shadow: 0 12px 30px #0005;
  }
  .home .phone-menu nav a { min-height: 44px; padding: .65rem; }
  .home .header-quote {
    position: fixed;
    z-index: 15;
    inset: auto 1rem calc(1rem + env(safe-area-inset-bottom));
    min-height: 52px;
    background: var(--sand);
    box-shadow: 0 5px 24px #0008;
    font-size: 1rem;
  }
  .home .px,
  .home .px.is-ready { height: auto; }
  .home .px .px-sticky,
  .home .px.is-ready .px-sticky {
    position: relative;
    top: auto;
    display: grid;
    grid-template-areas: "title" "scene" "caption";
    height: auto;
    overflow: visible;
    perspective: none;
  }
  .home .px .px-title,
  .home .px.is-ready .px-title {
    grid-area: title;
    position: relative;
    inset: auto;
    width: auto;
    padding: 1.6rem 5vw 1.1rem;
    background: #10161a;
    transform: none;
    opacity: 1;
  }
  .home .px .px-title h1,
  .home .px.is-ready .px-title h1 {
    max-width: 16ch;
    font-size: clamp(1.9rem, 7.8vw, 2.6rem);
    line-height: 1.08;
    text-shadow: none;
  }
  .home .px-kicker { font-size: .75rem; letter-spacing: .11em; }
  .home .px .px-frame,
  .home .px.is-ready .px-frame {
    grid-area: scene;
    position: relative;
    inset: auto;
    width: 100%;
    aspect-ratio: 4 / 3;
    transform: none;
  }
  .home .px .px-flat,
  .home .px.is-ready .px-flat { display: block; height: 100%; }
  .home .px-flat img { width: 100%; height: 100%; object-fit: cover; }
  .home .px.is-ready .px-flat img { opacity: 1; }
  .home .px.is-ready .px-layer { display: none; }
  .home .px .hero-caption,
  .home .px.is-ready .hero-caption {
    grid-area: caption;
    position: relative;
    inset: auto;
    display: flex;
    flex-direction: column;
    padding: 1.2rem 5vw 1.8rem;
    background: #10161a;
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
  .home .hero-caption .lede { max-width: none; font-size: 1rem; line-height: 1.6; }
  .home .hero-actions { order: -1; gap: .45rem; margin: 0 0 1rem; }
  .home .hero-actions a[href="#b1"] {
    border-color: transparent;
    min-height: 44px;
    padding: .5rem;
    text-decoration: underline;
    text-underline-offset: 4px;
  }
  .home .px-hint,
  .home .px.is-ready .px-hint,
  .home .px.is-ready .px-facts,
  .home .px.is-ready .px-sticky::after { display: none; }
  .home .px.is-ready + .block { margin-top: 0; border-radius: 0; }
  .home .gallery-category { scroll-margin-top: 5.5rem; }
  .home .g-jump { gap: .4rem; }
  .home .g-jump a { font-size: .875rem; padding: .4rem .7rem; }
  .home .gallery-disclosure > summary { padding: 1.15rem 0; }
  .home .gallery-category-content.g-set { padding-bottom: 1.8rem; }
  .home .quote-form { order: -1; }
  .home .cam-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .home .px.is-ready { height: auto; }
}

/* Keep process notes and captions readable on short landscape screens. */
@media (max-width: 64rem) and (max-height: 36rem) {
  .home .wip-plate { width: 100%; }
  .home .wip-stage { grid-template-rows: max-content max-content; padding-bottom: 6.5rem; box-sizing: border-box; }
}
