/* Homepage build story (18 Oct 2026): "Every build starts on paper", scroll-scrubbed floor plan -> frame -> build -> finished
   (story_section.py, js/story-buildup.js). Without JS or with reduced motion: a normal-height section with finished photos. */
.sb { position: relative; background: var(--sand); }
.sb.js.run { height: calc(100svh + var(--sb-n, 1) * 130vh); }   /* one project: about 230% of the screen height */
.sb-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); align-items: center; gap: 3rem; padding: var(--section) clamp(1.25rem, 4vw, 3rem); max-width: 1500px; margin: 0 auto; }
.sb.js.run .sb-stage { position: sticky; top: 0; height: 100svh; padding-top: calc(var(--header-stuck-h, 72px) + 1rem); padding-bottom: 1.5rem; }
.sb-copy h2 { font-family: var(--font-body); font-weight: 500; font-size: clamp(2.6rem, 6vw, 5.5rem); line-height: .9; letter-spacing: -.03em; color: var(--ink); margin: 1rem 0; }
.sb-text { font-size: 1.25rem; max-width: 26rem; }
.sb-steps { padding: 0; margin-top: 1.5rem; list-style: none; }
.sb-steps li { position: relative; font: 500 .8rem var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); padding: .7rem 0; border-top: 1px solid var(--border); opacity: .55; transition: opacity .4s, color .4s; }
.sb-steps li.on { opacity: 1; color: var(--ink); }
.sb-steps li.now::after { content: ""; position: absolute; left: 0; top: -1px; width: 2.4rem; height: 2px; background: #ced54d; }
.sb-steps li span { color: var(--sage-deep); margin-right: 1rem; }
.sb-frame { position: relative; aspect-ratio: 4 / 3; border-radius: 1.2rem; overflow: hidden; box-shadow: 0 30px 60px rgba(58,60,31,.15); isolation: isolate;
  background-color: var(--cream); background-image: linear-gradient(rgba(165,165,142,.16) 1px, transparent 1px), linear-gradient(90deg, rgba(165,165,142,.16) 1px, transparent 1px); background-size: 36px 36px; }
.sb-ph { position: absolute; inset: 0; opacity: 0; z-index: 1; }
.sb-ph picture { display: contents; }
.sb-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.sb.js .sb-ph img { object-fit: fill; max-width: none; }
.sb:not(.js) .sb-ph.is-first { opacity: 1; }
.sb-cv { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; display: block; }
.sb:not(.js) .sb-cv, .sb:not(.js) .sb-ann, .sb:not(.js) .sb-prog, .sb:not(.js) .sb-note { display: none; }
/* No-JS: the finished New builds photo in a 4:3 frame (crop from --op), labels placed by % (story_section.nojs_pos): dot at the point, tag above it (below it near the top) */
.sb:not(.js) .sb-frame { aspect-ratio: 4 / 3; }
.sb:not(.js) .sb-ph img { object-position: var(--op, 50% 50%); }
.sb:not(.js) .sb-ann.is-first { display: block; opacity: 1; }
.sb:not(.js) .sb-ann svg, .sb:not(.js) .sb-lab.sb-edge { display: none; }
.sb:not(.js) .sb-lab { left: var(--x); top: calc(var(--y) - 7%); }
.sb:not(.js) .sb-lab::after { content: ""; position: absolute; left: 0; bottom: -9px; width: 7px; height: 7px; border-radius: 50%; background: var(--cream); border: 1px solid var(--ink); transform: translate(-50%, 50%); }
.sb:not(.js) .sb-lab[style*="--tx:-100%"]::after { left: 100%; }
.sb:not(.js) .sb-lab.sb-below { top: calc(var(--y) + 7%); }
.sb:not(.js) .sb-lab.sb-below::after { bottom: auto; top: -9px; transform: translate(-50%, -50%); }
.sb:not(.js) .sb-steps li { opacity: .55; color: var(--text-muted); }
.sb:not(.js) .sb-steps li:last-child { opacity: 1; color: var(--ink); }
.sb:not(.js) .sb-steps li:last-child::after { content: ""; position: absolute; left: 0; top: -1px; width: 2.4rem; height: 2px; background: #ced54d; }
.sb-ann { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; }
.sb-ann svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sb-ann line { stroke: var(--ink); stroke-width: 1; }
.sb-ann circle { fill: var(--cream); stroke: var(--ink); stroke-width: 1.2; }
.sb-lab { position: absolute; transform: translate(var(--tx, 0), -50%); font: 500 .64rem/1.25 var(--font-head); letter-spacing: .15em; text-transform: uppercase; white-space: nowrap;
  background: var(--cream); color: var(--ink); padding: .5em .8em; border: 1px solid rgba(58,60,31,.35); }
.sb-lab small { display: block; font: 400 .58rem var(--font-head); letter-spacing: .1em; color: #707256; margin-bottom: .2em; }
.sb-note { position: absolute; z-index: 4; right: 1rem; top: .9rem; margin: 0; font: italic 500 1rem/1 var(--font-body); color: #707256; background: rgba(247,245,233,.9); padding: .35em .7em; border-radius: 999px; opacity: 0; transition: opacity .3s; }
.sb-note.on { opacity: 1; }
.sb-cap { position: absolute; z-index: 4; left: 1rem; bottom: 1.6rem; margin: 0; background: rgba(247,245,233,.92); color: #707256; padding: .5em 1em; border-radius: 999px; font: 500 .7rem var(--font-head); letter-spacing: .16em; text-transform: uppercase; max-width: calc(100% - 2rem); }
.sb-cap b { color: var(--ink); font-weight: 500; margin-right: .5em; }
.sb-prog { position: absolute; z-index: 4; left: 1rem; right: 1rem; bottom: .55rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: .35rem; }
.sb-prog button { all: unset; cursor: pointer; height: 3px; padding: 6px 0; background: rgba(58,60,31,.18); background-clip: content-box; position: relative; }
.sb-prog button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.sb-prog i { position: absolute; left: 0; top: 6px; height: 3px; width: 0; background: var(--ink); }
.sb-prog button.on i { background: #ced54d; }
.sb-prog.sb-prog-1 { grid-template-columns: 1fr; }
.sb-prog.sb-prog-1 span { height: 3px; margin: 6px 0; background: rgba(58,60,31,.18); position: relative; }
.sb-prog.sb-prog-1 i { top: 0; background: #ced54d; }
@media (max-width: 760px) {
  .sb-stage { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .sb.js.run .sb-stage { align-content: center; padding-top: calc(var(--header-stuck-h, 64px) + .5rem); }
  .sb-copy h2 { font-size: 2.4rem; margin: .6rem 0; }
  .sb-text { font-size: 1.02rem; line-height: 1.4; }
  .sb-steps { display: flex; gap: .8rem; margin-top: .5rem; }
  .sb-steps li { border: 0; padding: .35rem 0 0; font-size: .64rem; }
  .sb-steps li span { margin-right: .3rem; }
  .sb-frame { aspect-ratio: 4 / 3.7; border-radius: .9rem; }
  .sb-lab { font-size: .56rem; padding: .45em .65em; } .sb-lab small { display: none; }
  .sb-cap { font-size: .6rem; left: .6rem; bottom: 1.3rem; max-width: calc(100% - 1.2rem); }
  .sb-note { font-size: .9rem; right: .6rem; top: .6rem; }
}
@media (max-width: 760px) and (max-height: 700px) { .sb.js.run .sb-text { display: none; } }

/* 19 Oct 2026 (Josh): one illustrative two-storey house, plan -> frame -> build -> pen-and-ink drawing (no photo).
   No JS: a still of the finished drawing (images/story-house/house-ink.webp) with the Illustration tag. */
.sb-ic { z-index: 3; }
.sb-static { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #f7f5e9; z-index: 1; display: none; }
.sb:not(.js) .sb-static { display: block; }
.sb.js .sb-static { display: none; }
.sb-illus { position: absolute; z-index: 4; right: 1rem; top: .9rem; margin: 0; font: 500 .66rem var(--font-head); letter-spacing: .16em; text-transform: uppercase; color: #707256; background: rgba(247,245,233,.92); border: 1px solid rgba(58,60,31,.25); padding: .45em .9em; border-radius: 999px; opacity: 0; }
.sb:not(.js) .sb-illus { opacity: 1; }
@media (max-width: 760px) { .sb-illus { font-size: .56rem; right: .6rem; top: .6rem; } }
