/* Trasi — draft 2. Layout, section structure and hero motion. */

/* FOUR COLOURS, and nothing else paints.
   Every other name below is one of these four, or one of them at reduced opacity. */
:root {
  --night: #1D2124;         /* 1. near-black: dark sections, main text */
  --ground: #F4F4F2;        /* 2. off-white: light sections, text on dark */
  --stone: #6B6E6C;         /* 3. mid grey: secondary text, rules, placeholders */
  --bronze: #5B4A3A;        /* 4. bronze: the accent, used sparingly */

  /* The four, mixed with their background, for rules and quiet fills */
  --bronze-lit: #C7A887;         /* bronze lifted to read on the dark ground */
  --rule: rgba(107, 110, 108, 0.35);       /* mid grey, on light */
  --rule-night: rgba(244, 244, 242, 0.22); /* off-white, on dark */
  --sunk: rgba(107, 110, 108, 0.10);       /* placeholder and quiet fill, on light */
  --sunk-night: rgba(244, 244, 242, 0.06); /* the same, on dark */
  --on-night-2: rgba(244, 244, 242, 0.72); /* secondary text on dark */

  /* Old names kept so nothing breaks; they all resolve to one of the four */
  --band: var(--sunk);
  --ph: var(--sunk);
  --silver: var(--rule);
  --graphite: var(--night);
  --night-2: #21262A;   /* near-black, one step up, for placeholders on dark */
  --on-night: var(--ground);

  --gutter: clamp(20px, 4vw, 56px);
  --col-gap: clamp(16px, 2vw, 32px);
  --block: clamp(4.5rem, 9vw, 8rem);
  --block-tight: clamp(3.25rem, 6vw, 5.5rem);
  --maxw: 1440px;
  --header-h: 108px;

  --font: "Instrument Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 0.8, 0.2, 1);
}

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

html { scroll-behavior: smooth; }
[id] { scroll-margin-top: calc(var(--header-h) + 1rem); }

body {
  margin: 0;
  background: var(--ground);
  color: var(--graphite);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: var(--bronze); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 3px; }
.hero :focus-visible, .block--dark :focus-visible, .site-footer :focus-visible, .site-header.on-dark :focus-visible { outline-color: var(--bronze-lit); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip { position: absolute; left: var(--gutter); top: -4rem; background: var(--night); color: var(--ground); padding: .75rem 1rem; z-index: 100; }
.skip:focus { top: 1rem; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Type ---------- */

h1, h2, h3 { margin: 0; font-weight: 400; letter-spacing: -0.015em; }
h3 { font-size: 1.4375rem; line-height: 1.3; font-weight: 500; letter-spacing: -0.005em; }   /* 23 */
p { margin: 0 0 1em; max-width: 62ch; }
.muted { color: var(--stone); }

/* SIX TYPE SIZES: 13, 17, 23, 32, 46, 64. Nothing else is set anywhere. */
.display {
  /* 38 on a phone, so the home headline sets in four lines with "Built to your window"
     whole on the second. The scale's 46 was too wide at 375px. 64 on wide screens. */
  font-size: 2.375rem;

  line-height: 1.04;
  letter-spacing: -0.03em;
  max-width: 18ch;
}
.lede { font-size: 1.0625rem; line-height: 1.5; max-width: 38ch; }   /* 17 */

.figure-num {
  display: block;
  font-size: 1.4375rem;   /* 23, and 32 on wide screens */
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}


/* ---------- Buttons ---------- */

.btn { font-size: 1.0625rem;
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .75rem 1.5rem;
  background: var(--bronze); color: var(--ground); text-decoration: none; border: 1px solid transparent; border-radius: 2px;
  font: inherit; cursor: pointer; transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { filter: brightness(0.88); }
.btn--light { background: var(--on-night); color: var(--night); }
.btn--light:hover { filter: brightness(1.06); }
.btn--ghost-light { background: transparent; color: var(--ground); border-color: var(--rule-night); }
.btn--ghost-light:hover { background: var(--sunk-night); border-color: var(--ground); }
.textlink { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- Header ---------- */

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  color: var(--graphite);
  transition: background-color .35s ease, color .35s ease, box-shadow .35s ease;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 2rem; min-height: var(--header-h); }
.site-header.on-dark { color: var(--on-night); }
.site-header.on-dark.is-scrolled {
  background: rgba(29, 33, 36, 0.94);
  -webkit-backdrop-filter: saturate(1.2) blur(12px); backdrop-filter: saturate(1.2) blur(12px);
  box-shadow: 0 1px 0 var(--rule-night);
}
.site-header.is-solid {
  background: rgba(244, 244, 242, 0.94);
  -webkit-backdrop-filter: saturate(1.2) blur(12px); backdrop-filter: saturate(1.2) blur(12px);
  box-shadow: 0 1px 0 var(--silver);
}

.wordmark {
  position: relative; z-index: 70;
  font-weight: 500; letter-spacing: 0.01em;
  color: inherit; text-decoration: none;
  min-height: 44px; display: inline-flex; align-items: center;
}

/* Logo mark beside the word "Trasi", with TM above its top-right corner.
   Shown once assets/img/logo.png (or .svg) exists; the word stays either way. */
.wordmark { gap: 0.3rem; font-size: 1.4375rem; }
.logo-mark { position: relative; display: none; align-items: center; }
.wordmark.has-logo .logo-mark { display: inline-flex; }
.logo { display: none; height: clamp(64px, 6.4vw, 88px); width: auto; max-width: 16rem; object-fit: contain; }
.wordmark.has-logo .logo--main { display: block; }
/* TM: small, in the logo's top-right corner, like a trademark sign */
.tm {
  position: absolute; top: -0.6rem; right: 0;
  font-size: 0.5rem; font-weight: 700; letter-spacing: 0.02em; line-height: 1;
}
/* An optional light version for the dark hero: assets/img/logo-on-dark.svg */
.site-header.on-dark .wordmark.has-logo.has-dark-logo .logo--main { display: none; }
.site-header.on-dark .wordmark.has-logo.has-dark-logo .logo--on-dark { display: block; }
body.menu-open .site-header .wordmark.has-logo.has-dark-logo .logo--main { display: block; }
body.menu-open .site-header .wordmark.has-logo.has-dark-logo .logo--on-dark { display: none; }

.nav { display: flex; align-items: center; gap: clamp(1.5rem, 3vw, 3rem); }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(1.25rem, 2.4vw, 2.5rem); }
.nav a { color: inherit; text-decoration: none; font-size: .8125rem; display: inline-flex; align-items: center; min-height: 44px; }
.nav ul a:hover { text-decoration: underline; text-underline-offset: .45em; }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--bronze); text-underline-offset: .45em; }
.site-header.on-dark .nav a[aria-current="page"] { text-decoration-color: var(--bronze-lit); }

.nav-cta { border: 1px solid var(--rule); border-radius: 2px; padding-inline: 1rem; transition: border-color .2s ease; }
.nav-cta:hover { border-color: currentColor; }
.site-header.on-dark .nav-cta { border-color: var(--rule-night); }

.menu-btn {
  display: none; position: relative; z-index: 70;
  font: inherit; font-size: .8125rem; color: inherit;
  background: none; border: 0; padding: 0 .25rem; min-height: 44px; min-width: 44px; cursor: pointer;
}

@media (max-width: 900px) {
  .menu-btn { display: inline-flex; align-items: center; }
  .nav { display: none; }
  .nav.is-open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 2rem;
    position: fixed; inset: 0; z-index: 60; overflow-y: auto;
    background: var(--ground); color: var(--graphite);
    padding: calc(var(--header-h) + 1rem) var(--gutter) 2rem;
  }
  /* A blurred header background would trap the full-screen menu inside the header strip,
     so the blur is switched off while the menu is open */
  body.menu-open .site-header,
  body.menu-open .site-header.is-solid,
  body.menu-open .site-header.on-dark.is-scrolled {
    -webkit-backdrop-filter: none; backdrop-filter: none;
    background: var(--ground); box-shadow: none;
  }
  .nav.is-open ul { flex-direction: column; gap: .25rem; }
  .nav.is-open ul a { font-size: 1.4375rem; letter-spacing: -0.02em; }
  body.menu-open .site-header { color: var(--graphite); }
}

/* ---------- Hero ---------- */

.hero {
  position: relative; overflow: hidden;
  background: var(--night); color: var(--on-night);
  padding-top: calc(var(--header-h) + clamp(1rem, 3vw, 2.75rem));
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.hero--stage { min-height: 100svh; display: flex; flex-direction: column; }
.hero--stage > .wrap { width: 100%; }

.hero-copy { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
.hero-place { color: var(--on-night-2); font-size: .8125rem; margin: 0 0 1rem; }
.hero .lede { color: var(--on-night-2); margin-bottom: 1.75rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; }
.hero a:not(.btn) { color: var(--on-night); }
@media (min-width: 901px) {
  .hero-copy { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: end; }
  .hero-copy h1 { grid-column: 1 / span 8; max-width: none; }
  .hero-side { grid-column: 9 / span 4; }
}

/* The stage: animated track illustration */
.stage { margin-top: auto; padding-top: clamp(1.25rem, 2.5vw, 2rem); }
.stage-svg { display: block; width: 100%; height: auto; max-height: 42svh; overflow: visible; touch-action: pan-y; }
.stage-svg text { font-family: var(--font); }

.stage-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem;
  border-top: 1px solid var(--rule-night); margin-top: clamp(.75rem, 1.5vw, 1.25rem); padding-top: 1rem;
}
.stage-caption { margin: 0; color: var(--on-night-2); font-size: .8125rem; min-height: 1.6em; }
.stage-control { display: flex; align-items: center; gap: 1rem; flex: 1 1 22rem; max-width: 30rem; }
.stage-control label { color: var(--on-night-2); font-size: .8125rem; white-space: nowrap; }
.stage-control output { min-width: 6.5em; text-align: right; font-variant-numeric: tabular-nums; }

/* Compact hero (projects, connect) */
.hero--compact { padding-bottom: clamp(3rem, 6vw, 5rem); }
.hero-track { position: relative; height: 7px; margin-top: clamp(2.5rem, 5vw, 4rem); }
.hero-track::before {
  content: ""; position: absolute; left: 0; right: 0; top: 3px; height: 1px; background: var(--rule-night);
  transform-origin: right; animation: track-draw 1.2s var(--ease) both;
}
.hero-track::after {
  content: ""; position: absolute; top: 0; left: 0; width: 32px; height: 7px; background: var(--bronze-lit);
  animation: track-glide 1.8s var(--ease) .35s both;
}
@keyframes track-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes track-glide { from { left: calc(100% - 32px); } to { left: 0; } }

/* ---------- Blocks: titled, divided sections ---------- */

.block { padding-block: var(--block); }
.block--band { background: var(--band); }
.block--dark { background: var(--night); color: var(--on-night); }
.block--dark .muted, .block--dark .block-tag, .block--dark .block-intro { color: var(--on-night-2); }
.block--dark a { color: var(--bronze-lit); }

.block-head { margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }

.rule { position: relative; height: 1px; background: var(--silver); margin-bottom: clamp(1.25rem, 2.2vw, 1.75rem); }
.block--dark .rule { background: var(--rule-night); }
.rule::after {
  content: ""; position: absolute; top: -3px; left: 0; width: 32px; height: 7px;
  background: var(--bronze); transition: left 1.4s var(--ease);
}
.block--dark .rule::after { background: var(--bronze-lit); }
.js .block:not(.in-view) .rule::after,
.js .project:not(.in-view) .rule::after { left: calc(100% - 32px); }

.block-title { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; }
.block-tag { margin: 0; font-size: .8125rem; letter-spacing: .04em; text-transform: none; color: var(--stone); }
.block-title h2 { font-size: 2rem; line-height: 1.08; letter-spacing: -0.025em; max-width: 18ch; }
.block-intro { margin: 0; color: var(--stone); max-width: 36ch; }
@media (min-width: 901px) {
  .block-title { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: end; }
  .block-tag { grid-column: 1 / span 3; align-self: start; padding-top: .55rem; }
  .block-title h2 { grid-column: 4 / span 6; }
  .block-intro { grid-column: 10 / span 3; }
}

/* ---------- Photo placeholders ---------- */

.ph { margin: 0; }
.ph-img {
  aspect-ratio: var(--ar, 4 / 3); width: 100%;
  background: var(--ph);
  display: flex; align-items: flex-end; padding: 1rem 1.25rem;
  color: var(--stone); font-size: .8125rem; line-height: 1.4;
}
.block--dark .ph-img, .onward-dark .ph-img { background: var(--sunk-night); color: var(--on-night-2); }
.ph figcaption { margin-top: .875rem; font-size: 1.0625rem; }
/* ---------- Ours, not to be lifted ---------- */

/* Photographs and video can't be dragged out or long-pressed into a save menu */
img, video { -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }

/* Text can't be selected in bulk, except the details a customer needs to copy:
   phone numbers, the address, and the price they were quoted */
body { -webkit-user-select: none; user-select: none; }
.selectable, [data-field], .est-total, .included, .facts dd, .direct .v, .composer-preview pre,
input, textarea, select { -webkit-user-select: text; user-select: text; }

/* A "Trasi" mark over video, which can't be watermarked in the file itself here */
.ph-img.has-video::after,
.map-frame::after {
  content: "Trasi";
  position: absolute; right: .75rem; bottom: .6rem; z-index: 2;
  font-size: .8125rem; font-weight: 600; letter-spacing: .02em;
  color: var(--ground); text-shadow: 0 1px 3px rgba(29, 33, 36, .65);
  pointer-events: none;
}
.map-frame::after { right: auto; left: .9rem; top: .6rem; bottom: auto; }

/* A photo fills its box exactly, cropped to the box's shape */
.ph-img { position: relative; overflow: hidden; }
.ph-img .ph-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s ease; }
/* A long thin product, like the track itself, has to be shown whole rather than cropped.
   The box keeps its square so it still matches the others; the white matches the photograph. */
.ph-img--contain { background: #FFFFFF; }
.ph-img--contain .ph-photo { object-fit: contain; padding: 8%; }
.ph-img.has-photo .ph-photo { opacity: 1; }
.ph img { width: 100%; height: auto; display: block; }
/* A project photograph holds its shape before it arrives, so the page does not jump
   and the browser can tell which photographs are still far below the screen */
.project-media .ph > img { aspect-ratio: 4 / 3; object-fit: cover; background: var(--rule); }
.project-media .main img { height: 100%; object-fit: cover; }

.composer-preview { margin-top: 2.25rem; border-top: 1px solid var(--silver); padding-top: 1.25rem; }
.composer-preview pre { font-family: var(--font); font-size: 1.0625rem; line-height: 1.65; white-space: pre-wrap; word-break: break-word; margin: .5rem 0 0; color: var(--stone); max-width: 52ch; }

.prose { max-width: 68ch; display: flex; flex-direction: column; gap: 1.25rem; }
.prose h3 { margin-top: 1.5rem; }
.prose ul { margin: 0; padding-left: 1.15rem; display: flex; flex-direction: column; gap: .4rem; }
.ar-43 { --ar: 4 / 3; } .ar-45 { --ar: 4 / 5; } .ar-32 { --ar: 3 / 2; } .ar-11 { --ar: 1 / 1; } .ar-169 { --ar: 16 / 9; }
.ar-wide { --ar: 4 / 3; }
@media (min-width: 901px) { .ar-wide { --ar: 21 / 9; } }

/* ---------- Workshop: pair + facts ---------- */

.pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
.pair figcaption { font-size: 1.0625rem; }
.pair .b { width: 78%; margin-left: auto; }
@media (min-width: 901px) {
  .pair { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 0; }
  .pair .a { grid-column: 1 / span 7; }
  .pair .b { grid-column: 9 / span 4; width: auto; margin-top: clamp(4rem, 10vw, 9rem); }
}

.facts-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem var(--col-gap); margin-top: clamp(3rem, 6vw, 5rem); }
.facts-row > div { border-top: 1px solid var(--silver); padding-top: 1.25rem; }
.facts-row h3 { font-size: 1.4375rem; font-weight: 400; letter-spacing: -0.02em; margin-bottom: .5rem; }
.facts-row p { color: var(--stone); }
@media (min-width: 700px) { .facts-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Estimator ---------- */

.estimator { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem; }
@media (min-width: 901px) {
  .estimator { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
  .est-inputs { grid-column: 1 / span 6; }
  .est-output { grid-column: 8 / span 5; border-left: 1px solid var(--silver); padding-left: clamp(1.5rem, 3vw, 3rem); }
}

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.lbl { display: block; font-size: .8125rem; color: var(--stone); margin-bottom: .375rem; padding: 0; }
.est-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 2rem 2.5rem; align-items: end; }

input[type="number"], input[type="text"], input[type="tel"], select, textarea {
  font: inherit; color: var(--graphite); background: transparent;
  border: 0; border-bottom: 1px solid var(--silver); border-radius: 0;
  padding: .5rem 0; min-height: 44px; width: 100%;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--bronze); outline-offset: 2px; }
textarea { min-height: 7rem; resize: vertical; }
input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
select {
  -webkit-appearance: none; appearance: none; padding-right: 1.75rem; cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236B6E6C' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right .25rem center;
}

.width-pair { display: flex; gap: 1.5rem; }
.unit { display: inline-flex; align-items: baseline; gap: .4rem; color: var(--stone); }
.unit input { width: 2.6em; font-size: 1.4375rem; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }

.choice { display: flex; flex-wrap: wrap; gap: .25rem 1.75rem; }
.choice label { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--stone); }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice input:checked + span { color: var(--graphite); text-decoration: underline; text-decoration-color: var(--bronze); text-underline-offset: .45em; }
.choice input:focus-visible + span { outline: 2px solid var(--bronze); outline-offset: 4px; }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 44px; margin: 0; padding: 0; background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track { height: 1px; background: var(--silver); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -9.5px; border-radius: 50%; background: var(--graphite); border: 0; }
input[type="range"]::-moz-range-track { height: 1px; background: var(--silver); }
input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--graphite); border: 0; }
.est-inputs input[type="range"] { margin-top: 1.75rem; }

.hero input[type="range"]::-webkit-slider-runnable-track { background: rgba(241, 241, 238, 0.3); }
.hero input[type="range"]::-webkit-slider-thumb { background: var(--bronze-lit); }
.hero input[type="range"]::-moz-range-track { background: rgba(241, 241, 238, 0.3); }
.hero input[type="range"]::-moz-range-thumb { background: var(--bronze-lit); }

.est-total { font-size: 2.875rem; line-height: 1; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; margin: 0; }
.est-label { color: var(--stone); margin: .625rem 0 1.5rem; }
.included { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.included li { display: flex; justify-content: space-between; gap: 1rem; padding-block: .5rem; border-top: 1px solid var(--silver); font-variant-numeric: tabular-nums; }
.included li span:last-child { color: var(--stone); white-space: nowrap; }
details { margin-top: 1.25rem; }
summary { cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; color: var(--bronze); }
details p { color: var(--stone); margin-top: .5rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; margin-top: 2rem; }

/* ---------- Parts ---------- */

.parts { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 3rem var(--col-gap); }
.parts h3 { margin: 1.25rem 0 .5rem; }
.parts p { color: var(--stone); }

/* ---------- Choosing: four spans ---------- */

.four { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem var(--col-gap); }
.four .figure-num { margin-bottom: .875rem; }
.four h3 { margin-bottom: .75rem; }
@media (min-width: 600px) { .four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.span-bar { position: relative; display: block; height: 30px; margin-bottom: 1.5rem; }
.span-bar::before {
  content: ""; position: absolute; left: 0; top: 11px; height: 8px; width: var(--w, 50%);
  background: linear-gradient(#ECEEEF, #A9AEB1);
  transition: width 1.3s var(--ease);
}
.span-bar::after {
  content: ""; position: absolute; left: 0; top: 0; height: 30px; width: var(--w, 50%);
  border-inline: 1px solid var(--stone);
  transition: width 1.3s var(--ease);
}
.span-bar i {
  position: absolute; top: 11px; left: calc(var(--w, 50%) - 8px); width: 8px; height: 19px;
  background: linear-gradient(90deg, #ECEEEF, #A9AEB1);
  transition: opacity .4s ease 1.1s;
}
.js .block:not(.in-view) .span-bar::before,
.js .block:not(.in-view) .span-bar::after { width: 0; }
.js .block:not(.in-view) .span-bar i { opacity: 0; transition-delay: 0s; }

/* ---------- Problem / what we do ---------- */

.pairs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 var(--col-gap); margin: 0; }
.pairs > div { border-top: 1px solid var(--silver); padding-block: 1.5rem 2.25rem; }
.block--dark .pairs > div { border-top-color: var(--rule-night); }
.pairs dt { font-size: 1.4375rem; line-height: 1.3; letter-spacing: -0.015em; margin-bottom: .5rem; }
.pairs dd { margin: 0; color: var(--stone); max-width: 44ch; }
.block--dark .pairs dd { color: var(--on-night-2); }
@media (min-width: 800px) { .pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Steps on a track ---------- */

.track-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); position: relative; }
.track-steps li { position: relative; padding: 0 0 2rem 2.5rem; }
.track-steps li::before { content: ""; position: absolute; left: 5px; top: .5rem; bottom: -.5rem; width: 1px; background: var(--silver); }
.track-steps li:last-child::before { display: none; }
.track-steps li::after {
  content: ""; position: absolute; left: 0; top: .3rem; width: 11px; height: 11px; background: var(--bronze);
  transition: transform .8s var(--ease), opacity .8s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.track-steps .n { display: block; color: var(--stone); font-size: .8125rem; margin-bottom: .25rem; font-variant-numeric: tabular-nums; }
.js .block:not(.in-view) .track-steps li::after { transform: translateY(-14px); opacity: 0; }
@media (min-width: 901px) {
  .track-steps { grid-template-columns: repeat(var(--n, 7), minmax(0, 1fr)); column-gap: var(--col-gap); }
  .track-steps::before { content: ""; position: absolute; left: 0; right: 0; top: 5px; height: 1px; background: var(--silver); }
  .track-steps li { padding: 2.25rem 0 0; }
  .track-steps li::before { display: none; }
  .track-steps li::after { top: 0; width: 20px; }
  .js .block:not(.in-view) .track-steps li::after { transform: translateX(-30px); }
}

/* ---------- Two columns ---------- */

.split-2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem var(--col-gap); }
.split-2 > div { border-top: 1px solid var(--silver); padding-top: 1.5rem; }
.block--dark .split-2 > div { border-top-color: var(--rule-night); }
.split-2 h3 { margin-bottom: .75rem; }
.split-2 ul { margin: 0; padding-left: 1.1rem; }
.split-2 li { padding-block: .25rem; }
@media (min-width: 800px) { .split-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.statement-line { font-size: 1.4375rem; line-height: 1.15; letter-spacing: -0.02em; margin: .25rem 0 1rem; max-width: 20ch; }

/* ---------- Onward panels ---------- */

.onward { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--col-gap); }
@media (min-width: 800px) { .onward { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.onward a { display: flex; flex-direction: column; text-decoration: none; color: var(--graphite); background: var(--band); overflow: hidden; }
.onward a.onward-dark { background: var(--night); color: var(--on-night); }
.onward .ph { overflow: hidden; }
.onward .ph-img { --ar: 16 / 10; transition: transform .8s var(--ease); }
.onward a:hover .ph-img { transform: scale(1.025); }
.onward .txt { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; padding: 1.5rem clamp(1.25rem, 2.5vw, 2rem) 1.75rem; }
.onward h3 { font-size: 1.4375rem; font-weight: 400; letter-spacing: -0.02em; line-height: 1.15; }
.onward .go { font-size: .8125rem; color: var(--stone); white-space: nowrap; }
.onward-dark .go { color: var(--on-night-2); }
.onward a:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }

/* ---------- Projects ---------- */

/* The two halves of the projects page */
.group-head { border-top: 2px solid var(--night); padding-top: 1.25rem; margin-bottom: var(--block-tight); }
.group-head + .project { margin-top: 0; }
.project + .group-head { margin-top: var(--block); }
.group-tag { font-size: 1.4375rem; margin: 0; }
.group-note { font-size: .8125rem; color: var(--stone); margin: .375rem 0 0; max-width: 52ch; }

.project + .project { margin-top: var(--block); }
.project-media { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
@media (min-width: 901px) {
  .project-media { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: var(--col-gap); }
  .project-media .main { grid-column: 1 / span 8; grid-row: 1 / span 2; }
  .project-media .support-a { grid-column: 9 / span 4; grid-row: 1; }
  .project-media .support-b { grid-column: 9 / span 4; grid-row: 2; align-self: end; }
  .project.flip .project-media .main { grid-column: 5 / span 8; }
  .project.flip .project-media .support-a,
  .project.flip .project-media .support-b { grid-column: 1 / span 4; }
}
.project-media .main .ph-img { height: 100%; }
.more-photos {
  font: inherit; color: var(--bronze); background: none; cursor: pointer;
  border: 1px solid var(--rule); padding: .875rem 1.5rem; border-radius: 2px; min-height: 44px; justify-self: start;
}
.more-photos:hover { border-color: var(--bronze); }
@media (min-width: 901px) { .project-media .more-photos { grid-column: 1 / span 12; } }

/* ---------- Connect ---------- */

.direct { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem var(--col-gap); margin-top: clamp(2.5rem, 5vw, 4rem); }
.direct a { color: var(--on-night); text-decoration: none; display: block; border-top: 1px solid var(--rule-night); padding-top: 1.25rem; }
.direct .k { display: block; color: var(--on-night-2); font-size: .8125rem; margin-bottom: .375rem; }
.direct .v { font-size: 2rem; line-height: 1.15; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.direct a:hover .v { text-decoration: underline; text-decoration-color: var(--bronze-lit); text-decoration-thickness: 1px; text-underline-offset: .2em; }
@media (min-width: 700px) { .direct { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.visit { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem var(--col-gap); }
.facts { margin: 0; }
.facts div { padding-block: .75rem; border-top: 1px solid var(--silver); }
.facts dt { color: var(--stone); font-size: .8125rem; }
.facts dd { margin: .125rem 0 0; }
@media (min-width: 901px) {
  .visit { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .visit .ph { grid-column: 1 / span 7; grid-row: 1; }
  .visit .details { grid-column: 9 / span 4; grid-row: 1; align-self: center; }
  .visit .map { grid-column: 1 / -1; grid-row: 2; }
}

/* Live map: the map itself is not draggable; any click opens the Google Business Profile */
.map-link { display: block; color: inherit; text-decoration: none; }
.map-frame { position: relative; display: block; width: 100%; max-width: 100%; aspect-ratio: var(--ar, 21 / 9); background: var(--ph); overflow: hidden; }
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }
.map-cta { font-size: .8125rem; line-height: 1;
  position: absolute; left: 1rem; bottom: 1rem;
  background: var(--night); color: var(--ground);
  padding: .7rem 1.1rem; border-radius: 2px; transition: background-color .2s ease;
}
.map-link:hover .map-cta, .map-link:focus-visible .map-cta { background: var(--bronze); }

.form-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
@media (min-width: 901px) { .form-layout { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); } .form-layout form { grid-column: 4 / span 9; } }
.form-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.75rem 2.5rem; }
.form-fields .full { grid-column: 1 / -1; }
@media (min-width: 700px) { .form-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.optional { color: var(--stone); font-weight: 400; }

/* ---------- Footer ---------- */

.site-footer { background: var(--night); color: var(--on-night); padding-block: clamp(4rem, 8vw, 6rem) 2rem; }
.site-footer .grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
.site-footer p { margin: 0; }
.site-footer .statement { font-size: 1.4375rem; line-height: 1.12; letter-spacing: -0.025em; max-width: 16ch; }
.foot-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
.foot-h { font-size: .8125rem; font-weight: 400; color: var(--on-night-2); letter-spacing: 0; margin-bottom: .5rem; }
.site-footer a { color: var(--on-night); }
.site-footer .fine { color: var(--on-night-2); font-size: .8125rem; border-top: 1px solid var(--rule-night); padding-top: 1.5rem; }
@media (min-width: 600px) { .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 901px) {
  .site-footer .grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: clamp(3rem, 6vw, 5rem); }
  .site-footer .statement { grid-column: 1 / span 5; }
  .foot-cols { grid-column: 7 / span 6; }
  .site-footer .fine { grid-column: 1 / -1; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-delay: 0s !important;
    transition-duration: .01ms !important; transition-delay: 0s !important;
  }
}

/* ---------- Spacing by role ----------
   Two neighbours of the same colour need less air between them than a colour change does. */
.block:not(.block--dark) + .block:not(.block--dark) { padding-top: var(--block-tight); }
.block:not(.block--dark):has(+ .block:not(.block--dark)) { padding-bottom: var(--block-tight); }

/* ---------- Empty media slots ----------
   A slot with no photograph or video takes no space at all. Add ?slots to any address
   to see the grey boxes again, with the filename each one is waiting for. */
.ph-img:not(.has-photo) { display: none; }
.ph:not(:has(.has-photo)):not(:has(img)):not(:has(video)) { display: none; }
.show-slots .ph-img:not(.has-photo) { display: flex; }
.show-slots .ph { display: block; }

/* ---------- Connect us: the number is the loudest thing ----------
   Section headings step down so they do not compete with it. */
body.page-connect .block-title h2 { font-size: 2rem; }

/* ---------- Local area pages: nearby links are a footnote, not a section ---------- */
.nearby { border-top: 1px solid var(--rule); padding-top: 1.25rem; margin-top: var(--block-tight); }
.nearby .lbl { margin-bottom: .5rem; }
.nearby p { font-size: .8125rem; color: var(--stone); max-width: none; }
.nearby a { color: var(--stone); }
.nearby a:hover { color: var(--bronze); }
/* ---------- The scale's upper step ----------
   Six sizes only: 13, 17, 23, 32, 46, 64. Small screens use the lower five;
   wide screens step the headline sizes up by one. */
@media (min-width: 901px) {
  .display { font-size: 4rem; }            /* 64 */
  .est-total { font-size: 4rem; }          /* 64 */
  .block-title h2 { font-size: 2.875rem; } /* 46 */
  body.page-connect .block-title h2 { font-size: 2rem; }  /* 32, so the number wins */
  .direct .v { font-size: 2.875rem; }      /* 46 */
  .figure-num, .statement-line, .onward h3, .site-footer .statement { font-size: 2rem; }  /* 32 */
}
/* ---------- Project clips: wait for a click ----------
   The browser reads only each file's header and draws the first frame; the clip itself
   downloads when someone presses play. Ten clips cost a few hundred KB, not forty MB. */
.ph-img.is-ondemand .ph-photo { opacity: 1; }
.play-badge {
  position: absolute; left: 1rem; bottom: 1rem; z-index: 3;
  font: inherit; font-size: .8125rem; letter-spacing: .02em;
  min-height: 44px; padding: .6rem 1.1rem;
  background: var(--night); color: var(--ground);
  border: 0; border-radius: 2px; cursor: pointer;
  transition: background-color .2s ease;
}
.play-badge:hover, .play-badge:focus-visible { background: var(--bronze); }
.ph-img.is-ondemand.is-playing .play-badge { opacity: 0; }
.ph-img.is-ondemand.is-playing:hover .play-badge,
.ph-img.is-ondemand.is-playing:focus-within .play-badge { opacity: 1; }
/* Clips beyond the first three sit in a row under the project */
@media (min-width: 901px) {
  .project-media .extra { grid-column: span 4; grid-row: auto; }
  .project.flip .project-media .extra { grid-column: span 4; }
}
/* ---------- Pricing several windows ---------- */

.room-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.room-row input { flex: 1 1 12rem; }
.rooms-said { margin-top: 1rem; }

.rooms { margin-top: var(--block-tight); border-top: 1px solid var(--rule); padding-top: 1.5rem; }
/* The add row sits between the price and the list it feeds, so a window visibly lands below it */
.rooms-add { padding-bottom: 1.75rem; }
.rooms-add .lbl { display: block; margin-bottom: .625rem; }
.rooms--empty .rooms-add { padding-bottom: 0; } /* nothing added yet: just the field, no empty shelf */
.rooms-head { border-top: 1px solid var(--rule); padding-top: 1.5rem; }
.rooms-list { list-style: none; margin: 1rem 0 0; padding: 0; counter-reset: room; }
.rooms-list li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto;
  gap: .5rem 1.25rem; align-items: baseline;
  padding-block: .875rem; border-top: 1px solid var(--rule);
}
.rooms-item { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.rooms-name { counter-increment: room; }
.rooms-name::before { content: counter(room) ". "; color: var(--stone); }
.rooms-spec { font-size: .8125rem; color: var(--stone); }
/* A pasted name with no spaces in it must wrap rather than push the page sideways.
   The name is echoed in three places, so all of them wrap. */
.rooms-name, .rooms-spec, .rooms-said, .rooms-item { overflow-wrap: anywhere; min-width: 0; }
.rooms-amount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rooms-remove {
  font: inherit; font-size: .8125rem; color: var(--stone);
  background: none; border: 0; padding: .35rem 0 .35rem .5rem; cursor: pointer; min-height: 44px;
}
.rooms-remove:hover { color: var(--bronze); text-decoration: underline; }

.rooms-foot { margin-top: 1.5rem; }
.rooms-total {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  border-top: 2px solid var(--night); padding-top: 1rem; margin: 0;
  font-size: 1.4375rem; font-variant-numeric: tabular-nums; max-width: none;
}
.rooms-send { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.5rem; }
.rooms-send .textlink { font: inherit; background: none; border: 0; color: var(--bronze); cursor: pointer; padding: 0; }
.rooms-fabric { font-size: .8125rem; margin-top: 1.125rem; max-width: 52ch; }
.rooms-minimum { font-size: .8125rem; margin-top: .75rem; max-width: 52ch; }

/* Areas we work in: a plain list, set quietly so it reads as information, not a link farm */
.area-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem 2rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.area-list a { font-size: .8125rem; color: var(--stone); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.area-list a:hover { color: var(--bronze); text-decoration: underline; text-underline-offset: .35em; }
.rooms-minimum:empty { display: none; }
@media (min-width: 901px) { .rooms-total { font-size: 2rem; } }