/* Lindell Custom Homes (concept by Quvlo).
   Fonts, self-hosted from npm @fontsource-variable 5.3.0 (SIL OFL 1.1, licences in fonts/):
   Newsreader (display serif), Public Sans (body), Red Hat Mono (dimensions). */
@font-face { font-family: 'Newsreader'; src: url('fonts/newsreader-opsz.woff2') format('woff2'); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Newsreader'; src: url('fonts/newsreader-italic.woff2') format('woff2'); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: 'Public Sans'; src: url('fonts/public-sans.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Red Hat Mono'; src: url('fonts/red-hat-mono.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }

:root {
  --blue: #1d4b8f;        /* blueprint blue: linework and labels */
  --blue-d: #102d58;      /* the sheet */
  --blue-l: #cfe0ff;      /* linework drawn over footage */
  --stone: #e2e5e3;       /* cool limestone grey */
  --stone-2: #d0d5d4;
  --paper: #eef0ef;
  --ink: #23282d;         /* graphite */
  --ink-2: #545c63;
  --flag: #ff2e88;        /* survey-flag pink: lines, bars and fills only */
  --flag-ink: #c4105f;    /* the same pink dark enough for text and buttons on light (5.9:1 with white) */
  --flag-hi: #a50c50;
  --flag-lt: #ff8cc0;     /* pink text on the dark blue (6.3:1) */
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Public Sans', system-ui, sans-serif;
  --mono: 'Red Hat Mono', ui-monospace, monospace;
  --pad: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; background: var(--stone); color: var(--ink); font: 400 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--flag-ink); color: #fff; padding: 10px 14px; border-radius: 6px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--flag-ink); outline-offset: 3px; }
.film :focus-visible, .bar:not(.is-solid) :focus-visible, .sec--plans :focus-visible, .sec--walk :focus-visible, .foot :focus-visible { outline-color: var(--flag-lt); }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: min(1240px, 100% - 2 * var(--pad) - var(--safe-l) - var(--safe-r)); margin-inline: auto; }
.show-s { display: none; }
.fine { font: 400 12px/1.5 var(--mono); color: var(--ink-2); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 999px; background: var(--flag-ink); color: #fff; white-space: nowrap; font: 600 15px/1 var(--sans); text-decoration: none; border: 0; cursor: pointer; transition: transform .2s var(--ease), background .2s; }
.btn:hover { background: var(--flag-hi); }
.btn:active { transform: scale(.97); }
.btn--sm { min-height: 44px; padding: 0 16px; font-size: 14px; }
.btn--ghost { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5); backdrop-filter: blur(6px); }
.btn--ghost:hover { background: rgba(255, 255, 255, .26); }

/* Loader */
.loader { position: fixed; inset: 0; z-index: 90; display: grid; place-content: center; justify-items: center; gap: 10px; background: var(--blue-d); color: var(--blue-l); transition: clip-path 1.1s var(--ease), opacity .3s; clip-path: inset(0 0 0 0); }
.loader__stake { width: 34px; height: 100px; }
.loader__stake line { stroke: var(--blue-l); stroke-width: 3; }
.loader__flag { fill: var(--flag); transform-origin: 20px 10px; animation: flap 1.4s ease-in-out infinite alternate; }
@keyframes flap { to { transform: skewY(-10deg) scaleX(.86); } }
.loader__num { margin: 0; font: 500 46px/1 var(--mono); color: #fff; }
.loader__line { margin: 0; font: 400 13px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.loader.is-open { clip-path: inset(0 0 100% 0); }
.loader.is-gone { display: none; }

/* Header */
.bar { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; gap: 14px; padding: 14px calc(var(--pad) + var(--safe-r)) 14px calc(var(--pad) + var(--safe-l)); color: #fff; transition: background .3s, color .3s, box-shadow .3s; }
.bar.is-solid { background: rgba(226, 229, 227, .92); color: var(--ink); backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(16, 45, 88, .12); }
.brand { white-space: nowrap; display: inline-flex; align-items: center; min-height: 44px; gap: 10px; font: 500 21px/1 var(--serif); text-decoration: none; letter-spacing: -.01em; }
.brand__mark { width: 14px; height: 14px; border: 2px solid currentColor; border-radius: 2px; position: relative; }
.brand__mark::after { content: ''; position: absolute; right: -6px; top: -6px; width: 6px; height: 6px; background: var(--flag); border-radius: 1px; }
.tag { white-space: nowrap; font: 500 12px/1 var(--mono); letter-spacing: .02em; padding: 6px 9px; border-radius: 4px; background: var(--flag-ink); color: #fff; }
.bar__nav { margin-left: auto; display: flex; align-items: center; gap: 22px; font: 500 14px/1 var(--sans); }
.bar__nav a:not(.btn) { text-decoration: none; opacity: .9; display: inline-flex; align-items: center; min-height: 44px; }
.bar__nav a:not(.btn):hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

/* Film */
.film { position: relative; height: 760vh; background: var(--blue-d); }
/* the stage's own color is what iPhone Safari tints its toolbars with while the film is pinned */
.film__stage { position: sticky; top: 0; height: 100vh; height: 100lvh; overflow: hidden; overflow: clip; background: #0a182e; }
.film__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.film__stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 42% 42% at 14% 16%, rgba(10, 24, 46, .42), rgba(10, 24, 46, 0)), linear-gradient(90deg, rgba(10, 24, 46, .52) 0, rgba(10, 24, 46, .2) 36%, rgba(10, 24, 46, 0) 52%), linear-gradient(180deg, rgba(10, 24, 46, .5) 0, rgba(10, 24, 46, 0) 22%, rgba(10, 24, 46, 0) 58%, rgba(10, 24, 46, .62) 100%); }

/* Blueprint linework over the footage */
.print { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; opacity: 0; }
.print .ln { fill: none; stroke: var(--blue-l); stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 3px rgba(29, 75, 143, .9)); }
.print .ln--thin { stroke-width: 4.5; opacity: .9; }
.print .dim { fill: none; stroke: var(--flag); stroke-width: 5; }
.print .dimt { fill: #fff; font: 500 var(--dimt, 30px)/1 var(--mono); letter-spacing: .02em; paint-order: stroke; stroke: rgba(16, 45, 88, .85); stroke-width: 6px; }
.print .lab { fill: var(--blue-l); font: 500 var(--lab, 24px)/1 var(--mono); letter-spacing: .14em; paint-order: stroke; stroke: rgba(16, 45, 88, .85); stroke-width: 6px; }

/* Build schedule tracker */
.sched { position: absolute; z-index: 4; left: calc(var(--pad) + var(--safe-l)); bottom: 28px; width: min(560px, calc(100% - 2 * var(--pad))); color: #fff; font-family: var(--mono); transition: opacity .4s; }
.sched__day { margin: 0 0 10px; display: flex; align-items: baseline; gap: 8px; }
.sched__k { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; opacity: .8; }
.sched__n { font: 500 44px/1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.sched__of { font-size: 15px; opacity: .7; }
.sched__bar { position: relative; height: 4px; background: rgba(255, 255, 255, .22); border-radius: 2px; overflow: hidden; }
.sched__fill { position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: var(--flag); }
.sched__phases { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.sched__phases li { color: #d5deeb; transition: color .3s; white-space: nowrap; text-shadow: 0 1px 6px rgba(10, 24, 46, .9), 0 0 2px rgba(10, 24, 46, .8); }
.sched__phases li + li::before { content: '› '; opacity: .6; }
.sched__phases li.is-done { color: #fff; }
.sched__phases li.is-on { color: var(--flag-lt); font-weight: 600; }

/* Captions. On wide screens they sit top left, kept left of the house: in the locked street shots the
   house's left wall is at 34% of the source frame, which on a cover-fitted screen is
   min(50vw - 28.44vh, 34vw) from the left. Portrait and phone landscape are below. */
.caps { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
/* The opening shot is bright cloud: while the hero words show, the top left of the picture is shaded */
.shade { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .5s var(--ease); background: radial-gradient(ellipse 66% 64% at 20% 27%, rgba(10, 24, 46, .84), rgba(10, 24, 46, .66) 50%, rgba(10, 24, 46, 0) 90%); }
.cap--hero .cap__k { color: #fff; }
.film__stage.is-hero .shade { opacity: 1; }
.cap { --wall: min(50vw - 28.44vh, 34vw); position: absolute; left: calc(var(--pad) + var(--safe-l)); top: 84px; width: clamp(250px, calc(var(--wall) - var(--pad) - 14px), 560px); transform: translateY(10px); color: #fff; opacity: 0; transition: opacity .5s var(--ease), transform .7s var(--ease); text-shadow: 0 1px 18px rgba(10, 24, 46, .6); text-wrap: pretty; }
.cap.is-on { opacity: 1; transform: none; pointer-events: auto; }
.cap__k { margin: 0 0 10px; font: 500 13px/1.2 var(--mono); letter-spacing: .02em; color: var(--blue-l); }
.cap__h { margin: 0; font: 400 clamp(30px, 2.9vw, 52px)/1.02 var(--serif); letter-spacing: -.02em; font-variation-settings: 'opsz' 60; text-wrap: balance; }
.cap__p { margin: 12px 0 0; max-width: 40ch; font-size: 16px; line-height: 1.45; }
.cap__hint { margin-top: 28px; font: 500 12px/1 var(--mono); letter-spacing: .04em; opacity: .85; }
.cap__hint::after { content: ''; display: block; width: 1px; height: 40px; margin-top: 10px; background: currentColor; animation: hint 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes hint { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
.cap--hero { top: 22%; width: min(620px, calc(100% - 2 * var(--pad))); }
.cap--hero .cap__h { font-size: clamp(40px, 5.2vw, 80px); line-height: .98; }
.cap--hero .cap__p { font-size: 18px; }
.cap__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; text-shadow: none; }

/* Sections */
.sec { position: relative; padding: clamp(80px, 11vw, 150px) 0; }
.sec__head { max-width: 680px; margin-bottom: clamp(32px, 5vw, 56px); }
/* Section labels read like a drawing set's title block: the sheet number boxed, then the sheet name */
.kicker { margin: 0 0 16px; display: inline-flex; align-items: stretch; font: 500 14px/1 var(--mono); color: var(--blue); border: 1.5px solid currentColor; border-radius: 3px; }
.kicker__no { display: inline-flex; align-items: center; padding: 6px 9px; border-right: 1.5px solid currentColor; font-weight: 600; }
.kicker > :not(.kicker__no), .kicker { white-space: nowrap; }
.kicker { padding-right: 10px; gap: 10px; align-items: center; }
.sec__h { margin: 0; font: 400 clamp(36px, 5vw, 66px)/1.02 var(--serif); letter-spacing: -.022em; font-variation-settings: 'opsz' 72; text-wrap: balance; }
.sec__p { margin: 18px 0 0; font-size: 18px; color: var(--ink-2); max-width: 56ch; }

/* Plans: a blueprint sheet */
.sec--plans { background-color: var(--blue-d); color: #fff; background-image: linear-gradient(rgba(207, 224, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(207, 224, 255, .07) 1px, transparent 1px); background-size: 32px 32px; }
.sec--plans .kicker { color: var(--blue-l); }
.sec--plans .sec__p { color: rgba(255, 255, 255, .78); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 22px; }
.plan-tab { text-align: left; padding: 16px 18px; border-radius: 10px; border: 1.5px solid rgba(207, 224, 255, .45); background: rgba(16, 45, 88, .6); cursor: pointer; display: grid; gap: 4px; transition: border-color .2s, background .2s; }
.plan-tab:hover { border-color: rgba(207, 224, 255, .7); }
.plan-tab[aria-checked="true"] { border-color: var(--flag); background: rgba(255, 46, 136, .1); }
.plan-tab__n { font: 500 22px/1.1 var(--serif); }
.plan-tab__s { font: 400 12px/1.3 var(--mono); color: var(--blue-l); letter-spacing: .02em; }
.sheet { display: grid; grid-template-columns: 1.55fr 1fr; gap: clamp(16px, 3vw, 36px); align-items: start; }
.sheet__plan { margin: 0; padding: clamp(12px, 2vw, 24px); border: 1.5px solid rgba(207, 224, 255, .35); border-radius: 12px; background: rgba(10, 32, 64, .55); }
.plan { width: 100%; height: auto; display: block; overflow: visible; }
.plan .wall { fill: none; stroke: #fff; stroke-width: 3.5; stroke-linejoin: miter; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s var(--ease) forwards; }
.plan .outline { stroke-width: 7; }
.plan .porch-ln { stroke-dasharray: 10 8; stroke-dashoffset: 0; stroke: var(--blue-l); stroke-width: 2.5; opacity: 0; animation: fadein .6s .7s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }
.plan .rm { fill: rgba(207, 224, 255, 0); transition: fill .25s; }
.plan .tap { cursor: pointer; outline: none; }
.plan .tap .rm { fill: rgba(207, 224, 255, .06); }
.plan .hit { fill: transparent; }
.plan .nm--short { display: none; }
.plan .tap:hover .rm { fill: rgba(207, 224, 255, .16); }
.plan .tap:focus-visible .rm { fill: rgba(207, 224, 255, .2); stroke: var(--flag); stroke-width: 2; vector-effect: non-scaling-stroke; }
.plan .tap.is-on .rm { fill: rgba(255, 46, 136, .28); }
.plan .nm { fill: #fff; font: 500 17px/1 var(--sans); text-anchor: middle; pointer-events: none; opacity: 0; animation: fadein .5s .6s forwards; }
.plan .sz { fill: var(--blue-l); font: 400 13px/1 var(--mono); text-anchor: middle; pointer-events: none; opacity: 0; animation: fadein .5s .75s forwards; }
.plan .dull .nm { fill: rgba(207, 224, 255, .65); font-size: 13.5px; }
.plan .tap.is-on .nm { fill: #fff; }
.plan .dimln { stroke: var(--flag); stroke-width: 1.2; vector-effect: non-scaling-stroke; fill: none; }
.plan .dimtx { fill: var(--flag-lt); font: 500 15px/1 var(--mono); text-anchor: middle; }
.plan .door { fill: none; stroke: var(--blue-l); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: .7; }
.plan .north { fill: none; stroke: var(--blue-l); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.plan .northt { fill: var(--blue-l); font: 500 15px/1 var(--mono); text-anchor: middle; }
.sheet__cap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; font: 400 12px/1.3 var(--mono); color: var(--blue-l); letter-spacing: .04em; }
.room { position: sticky; top: 90px; border-radius: 12px; background: var(--paper); color: var(--ink); overflow: hidden; }
.room__ph { position: relative; aspect-ratio: 4 / 3; background: var(--stone-2); overflow: hidden; }
.room__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s var(--ease); }
.room__img.is-on { opacity: 1; z-index: 1; }
/* a slow photo: the old one dims and a thin bar runs along the bottom until the new one is ready */
.room__ph.is-loading .room__img.is-on { opacity: .45; }
.room__ph.is-loading::after { content: ''; position: absolute; z-index: 2; left: 0; bottom: 0; height: 3px; width: 40%; background: var(--blue); animation: roomload 1s ease-in-out infinite alternate; }
@keyframes roomload { from { transform: translateX(-10%); } to { transform: translateX(160%); } }
.room__src { margin: 10px 20px 0; font: 400 12.5px/1.4 var(--mono); color: var(--ink-2); }
.room__k { margin: 14px 20px 6px; font: 500 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--blue); }
.room__h { margin: 0 20px; font: 400 32px/1.05 var(--serif); letter-spacing: -.015em; }
.room__dim { margin: 8px 20px 0; font: 500 16px/1 var(--mono); color: var(--flag-ink); }
.room__fin { list-style: none; margin: 16px 20px 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.room__fin li { display: grid; grid-template-columns: 96px 1fr; gap: 10px; }
.room__fin b { font: 500 11px/1.9 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.room__fin { margin-bottom: 20px !important; }
.plans__up { margin: 18px 0 0; font: 400 13px/1.5 var(--mono); color: var(--blue-l); }

/* Estimator */
.sec--est { background: var(--paper); }
.est { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 90px); align-items: start; }
.est .sec__head { grid-column: 1 / -1; margin-bottom: 0; }
.est__form { display: grid; gap: 30px; }
.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.field label, .field legend { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; width: 100%; padding: 0; margin-bottom: 12px; font: 600 15px/1.2 var(--sans); }
.field__v { font: 500 15px/1 var(--mono); color: var(--blue); }
.field__hint { margin: 10px 0 0; font: 400 12px/1.3 var(--mono); color: var(--ink-2); }
input[type="range"] { width: 100%; height: 44px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(var(--blue), var(--blue)) 0 0 / var(--fill, 50%) 100% no-repeat, var(--stone-2); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--stone-2); }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--blue); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -10px; border-radius: 50%; background: #fff; border: 2px solid var(--blue); box-shadow: 0 2px 8px rgba(16, 45, 88, .25); }
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--blue); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; min-width: 0; }
.seg label { margin: 0; display: block; min-width: 0; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: grid; gap: 4px; min-width: 0; min-height: 52px; align-content: center; padding: 10px 12px; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--stone-2); font: 600 15px/1.2 var(--sans); text-align: center; transition: box-shadow .2s, background .2s; }
.seg small { font: 400 11.5px/1.25 var(--mono); color: var(--ink-2); overflow-wrap: anywhere; }
.seg input:checked + span { box-shadow: inset 0 0 0 2px var(--blue); background: #f4f8ff; }
.seg input:focus-visible + span { outline: 2px solid var(--flag-ink); outline-offset: 2px; }
.est__out { padding: clamp(22px, 3vw, 36px); border-radius: 14px; background: var(--blue-d); color: #fff; background-image: linear-gradient(rgba(207, 224, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(207, 224, 255, .07) 1px, transparent 1px); background-size: 24px 24px; }
.est__k { margin: 0; font: 500 12px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--blue-l); }
.est__num { margin: 14px 0 22px; font: 400 clamp(32px, 4.2vw, 54px)/1.05 var(--serif); letter-spacing: -.02em; font-variant-numeric: tabular-nums lining-nums; }
.est__to { font-style: italic; font-size: .6em; color: var(--blue-l); }
.est__rows { margin: 0; display: grid; gap: 10px; font: 400 13.5px/1.4 var(--mono); }
.est__rows div { display: flex; justify-content: space-between; gap: 16px; padding-top: 10px; border-top: 1px dashed rgba(207, 224, 255, .3); }
.est__rows dt { color: var(--blue-l); }
.est__rows dd { margin: 0; min-width: 0; text-align: right; font-variant-numeric: tabular-nums; }
.est__rows dt { min-width: 0; }
.est__lot { margin: 18px 0 6px; font-size: 15px; }
.est__out .fine { color: var(--blue-l); }

/* Schedule: a Gantt chart on the film's day count (Day 1 to 330) */
.sec--how { background: var(--stone); }
.gantt { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.gantt li, .gantt__axis { display: grid; grid-template-columns: 240px 1fr; align-items: center; gap: 18px; }
.gantt__t { display: grid; gap: 3px; }
.gantt__t b { font: 400 21px/1.15 var(--serif); }
.gantt__t span { font: 500 13px/1.2 var(--mono); color: var(--ink-2); }
.gantt__track { position: relative; height: 26px; border-radius: 4px; background: linear-gradient(90deg, rgba(16, 45, 88, .12) 1px, transparent 1px) 0 0 / calc(100% / 3.3) 100%, var(--paper); }
.gantt__bar { position: absolute; top: 4px; bottom: 4px; left: calc(var(--a) / 330 * 100%); width: max(6px, calc((var(--b) - var(--a)) / 330 * 100%)); border-radius: 3px; background: var(--blue); }
.gantt__keys .gantt__bar { background: var(--flag-ink); width: 10px; left: calc(100% - 10px); }
.gantt__axis { margin: 8px 0 0; font: 400 12px/1 var(--mono); color: var(--ink-2); }
.gantt__ticks { display: grid; grid-template-columns: repeat(3, calc(100% / 3.3)) 1fr; }
.gantt__notes { margin: 34px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; color: var(--ink-2); font-size: 16px; }
.gantt__notes li { padding-top: 12px; border-top: 2px solid var(--blue); }

/* Warranty */
.sec--war { background: var(--paper); }
.war { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(28px, 6vw, 90px); align-items: center; }
.war .sec__head { margin-bottom: 0; }
.war__chart { display: grid; gap: 16px; }
.war__row { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 14px; }
.war__track { position: relative; }
.war__l { font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
/* bar length is exactly years / 10 of the axis; the label sits just past the end of the bar */
.war__bar { display: block; height: 42px; width: calc(var(--y) * 10%); border-radius: 6px; background: var(--blue); transform-origin: 0 50%; transform: scaleX(0); transition: transform 1.1s var(--ease); }
.war__bar--k { background: var(--flag-ink); }
.war__n { position: absolute; left: calc(var(--y) * 10% + 10px); top: 50%; transform: translateY(-50%); font: 500 13px/1 var(--mono); color: var(--ink); white-space: nowrap; }
.war__bar--k + .war__n { left: auto; right: 10px; color: #fff; }
.war__axis span { position: absolute; top: 8px; }
.war__axis span:nth-child(2) { left: 50%; transform: translateX(-50%); }
.war__axis span:last-child { right: 0; }
.war__chart.is-in .war__bar { transform: scaleX(1); }
.war__chart.is-in .war__row:nth-child(2) .war__bar { transition-delay: .15s; }
.war__chart.is-in .war__row:nth-child(3) .war__bar { transition-delay: .3s; }
.war__axis { margin-left: 110px; position: relative; height: 26px;  display: flex; justify-content: space-between; font: 400 11px/1 var(--mono); color: var(--ink-2); padding-top: 8px; border-top: 1.5px solid var(--stone-2); }

/* FAQ */
.sec--faq { background: var(--stone); }
.faq { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(28px, 6vw, 90px); }
.faq__list { display: grid; gap: 10px; }
.faq details { border-radius: 10px; background: var(--paper); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 52px 20px 22px; font: 400 22px/1.25 var(--serif); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font: 400 22px/1 var(--mono); color: var(--blue); transition: transform .25s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); color: var(--flag-ink); }
.faq details p { margin: 0; padding: 0 22px 22px; color: var(--ink-2); }

/* Lot walk */
.sec--walk { background: var(--blue-d); color: #fff; background-image: linear-gradient(rgba(207, 224, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(207, 224, 255, .07) 1px, transparent 1px); background-size: 32px 32px; }
.sec--walk .kicker { color: var(--blue-l); }
.sec--walk .sec__p { color: rgba(255, 255, 255, .78); }
.walk { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 90px); }
.walk__form { display: grid; gap: 20px; align-content: start; }
.walk__form input[type="text"], .walk__form input[type="email"] { width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 10px; border: 1.5px solid rgba(207, 224, 255, .35); background: rgba(10, 32, 64, .6); color: #fff; font-size: 16px; }
.walk__form input::placeholder { color: rgba(207, 224, 255, .5); }
.walk__form input:focus { border-color: var(--blue-l); outline: none; }
.walk__form .field label, .walk__form .field legend { font-weight: 500; color: var(--blue-l); font-size: 14px; }
.walk__form .btn { justify-self: start; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid rgba(207, 224, 255, .35); background: transparent; cursor: pointer; font: 500 13px/1.2 var(--mono); }
.chip[aria-checked="true"] { border-color: var(--flag); background: rgba(255, 46, 136, .16); }
.walk__msg { margin: 0; min-height: 1.5em; font: 400 14px/1.5 var(--mono); color: var(--blue-l); }
.walk__msg.is-err { color: #ffb3d1; }

/* Footer */
.foot { padding: 56px 0 64px; background: var(--ink); color: rgba(255, 255, 255, .82); }
.foot__grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px; }
.foot__h { margin: 0; font: 400 28px/1.1 var(--serif); color: #fff; }
.foot__s { margin: 8px 0 0; font: 400 13px/1.4 var(--mono); color: var(--blue-l); }
.foot__small p { margin: 0 0 10px; font-size: 14px; }

/* Phones and tablets */
@media (max-width: 980px) {
  /* the plan and its room card stay side by side down to 760 px, so a tap never changes something out of sight */
  .sheet { grid-template-columns: 1.6fr 1fr; }
  /* the plan is drawn smaller here, so room names get bigger, short names and no sizes */
  .plan .nm { font-size: 38px; }
  .plan .dull .nm { font-size: 32px; fill: rgba(207, 224, 255, .85); }
  .plan .nm--long { display: none; }
  .plan .nm--short { display: inline; }
  .plan .sz { display: none; }
  .plan .dimtx, .plan .northt { font-size: 28px; }
  .plan .wall { stroke-width: 5; }
  .plan .outline { stroke-width: 9; }
  .room { top: 76px; }
  .room__fin li { grid-template-columns: 84px 1fr; }
  .est, .war, .faq, .walk { grid-template-columns: minmax(0, 1fr); }
  .gantt__notes { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .hide-s, .bar__nav a.hide-s { display: none; }
  .show-s { display: inline; }
  .bar { padding: 10px calc(16px + var(--safe-r)) 10px calc(16px + var(--safe-l)); gap: 10px; }
  .brand { font-size: 18px; }
  /* the full name stacks: Lindell over CUSTOM HOMES in the plan-sheet mono */
  .brand__sub { display: block; white-space: nowrap; margin-top: 3px; font: 500 9px/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; }
  .tag { font-size: 11px; padding: 5px 7px; }
  .bar__nav { gap: 0; }
  .bar .btn--sm { padding: 0 14px; }
  .wrap { width: calc(100% - 32px - var(--safe-l) - var(--safe-r)); }
  .sheet { grid-template-columns: 1fr; }
  .room { position: static; }
  .film { height: 700vh; }
  /* plans: tabs in one row, the plan, then a compact room card right under it */
  .plans { gap: 6px; }
  .plan-tab { padding: 10px 10px; gap: 2px; }
  .plan-tab__n { font-size: 16px; }
  .plan-tab__s { font-size: 10.5px; letter-spacing: 0; }
  .room { display: grid; grid-template-columns: 42% 1fr; column-gap: 14px; align-items: start; padding: 12px; }
  .room__ph { grid-row: 1 / span 4; border-radius: 8px; }
  .room__src { grid-column: 1 / -1; grid-row: 5; margin: 10px 0 0; }
  .room__k, .room__h, .room__dim { margin-left: 0; margin-right: 0; }
  .room__k { margin-top: 2px; font-size: 11px; line-height: 1.3; }
  .room__h { font-size: 24px; }
  .room__dim { font-size: 13.5px; line-height: 1.3; }
  .room__fin { grid-column: 1 / -1; grid-row: 6; margin: 12px 0 0 !important; font-size: 14.5px; }
  .room__fin li { grid-template-columns: 84px 1fr; }
  .gantt li, .gantt__axis { grid-template-columns: 1fr; gap: 6px; }
  .gantt__axis > span:first-child { display: none; }
  .gantt li { margin-bottom: 6px; }
  .gantt__t { grid-template-columns: 1fr auto; align-items: baseline; }
  .gantt__t b { font-size: 19px; }
  .seg span { padding: 10px 6px; font-size: 14px; }
  .war__row { grid-template-columns: 80px 1fr; }
  .war__axis { margin-left: 94px; }
  .foot__grid { grid-template-columns: 1fr; }
}
@media (max-width: 340px) { .tag { display: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-delay: 0s !important; transition-duration: .001s !important; }
}

/* Portrait (phones and tablets): the day count moves up into the sky under the header and the caption
   sits at the bottom, under the house. On a tablet in portrait the film is a band in the middle, so the
   caption sits below the band and the count above it. */
@media (orientation: portrait) {
  .shade { background: linear-gradient(180deg, rgba(10, 24, 46, .6) 0, rgba(10, 24, 46, .4) 22%, rgba(10, 24, 46, 0) 40%); }
  .sched { top: calc(68px + env(safe-area-inset-top, 0px)); bottom: auto; left: 16px; right: 16px; width: auto; }
  .sched__day { margin-bottom: 8px; }
  .sched__n { font-size: 30px; }
  .sched__phases { font-size: 11px; letter-spacing: 0; }
  .sched__phases li + li::before { content: ''; }
  .film__stage::after { background: linear-gradient(180deg, rgba(10, 24, 46, .74) 0, rgba(10, 24, 46, .5) 19%, rgba(10, 24, 46, 0) 38%, rgba(10, 24, 46, 0) 62%, rgba(10, 24, 46, .78) 86%, rgba(10, 24, 46, .85) 100%); }
  .cap, .cap--hero { top: auto; bottom: 22px; left: calc(16px + var(--safe-l)); width: calc(100% - 32px); max-width: 640px; transform: translateY(10px); }
  .cap__h, .cap--hero .cap__h { font-size: clamp(28px, 7.6vw, 46px); }
  .cap__p, .cap--hero .cap__p { margin-top: 8px; font-size: 15px; line-height: 1.4; max-width: 46ch; }
  .cap__k { margin-bottom: 6px; font-size: 12px; }
  .cap__hint { display: none; }
  .cap__cta { margin-top: 12px; }
}
@media (orientation: portrait) and (min-width: 600px) {
  .sched { left: var(--pad); right: auto; width: min(560px, calc(100% - 2 * var(--pad))); top: 84px; }
  .cap, .cap--hero { left: var(--pad); bottom: 30px; }
  .cap__h, .cap--hero .cap__h { font-size: clamp(34px, 5vw, 48px); }
}
/* phones in portrait: the house stands low in the frame, so the caption stays compact under it */
@media (orientation: portrait) and (max-width: 599px) {
  .cap, .cap--hero { bottom: 14px; }
  .cap__h, .cap--hero .cap__h { font-size: clamp(25px, 6.9vw, 30px); line-height: 1.04; }
  .cap__p, .cap--hero .cap__p { font-size: 14.5px; }
  /* over the house shots the paragraph would reach the house once Safari's toolbar lifts the caption, so
     phones show the day range and headline there; the hero and the interior keep it */
  .cap--end .cap__p, .cap[data-shot="1"] .cap__p, .cap[data-shot="2"] .cap__p, .cap[data-shot="3"] .cap__p { display: none; }
  /* the last shot: the count above already reads Day 330 and Keys, so the caption is the headline and the buttons */
  .cap--end .cap__k { display: none; }
  .cap--end .cap__cta { margin-top: 8px; }
  .cap--end .cap__cta .btn { min-height: 44px; }
}
@media (orientation: portrait) and (max-height: 600px) {
  .sched__phases { display: none; }
  .cap__p, .cap--hero .cap__p { display: none; }
}

/* Phones in landscape: the screen is too short to put words anywhere over the house, so the film takes
   the right 62% and the captions and day count sit in a drawing-sheet panel on the left. */
@media (orientation: landscape) and (max-height: 500px) {
  .shade { display: none; }
  .bar { padding-top: 6px; padding-bottom: 6px; }
  .bar.is-solid { background: rgba(226, 229, 227, .95); }
  .film__stage { background-color: var(--blue-d); background-image: linear-gradient(rgba(207, 224, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(207, 224, 255, .07) 1px, transparent 1px); background-size: 24px 24px; }
  .film__canvas, .print { left: 38%; width: 62%; }
  .film__stage::after { left: 38%; background: linear-gradient(90deg, rgba(10, 24, 46, .45) 0, rgba(10, 24, 46, 0) 14%), linear-gradient(180deg, rgba(10, 24, 46, .45) 0, rgba(10, 24, 46, 0) 24%); }
  .cap, .cap--hero, .cap--end { top: 56px; bottom: auto; left: calc(14px + var(--safe-l)); width: calc(38% - 28px - var(--safe-l)); max-width: none; transform: translateY(8px); text-shadow: none; }
  .cap.is-on { transform: none; }
  .cap__k { margin-bottom: 6px; font-size: 11.5px; }
  .cap__h, .cap--hero .cap__h { font-size: clamp(20px, 3.2vw, 28px); line-height: 1.05; }
  .cap__p, .cap--hero .cap__p { margin-top: 7px; font-size: 13px; line-height: 1.4; }
  .cap__hint { display: none; }
  .cap__cta { margin-top: 10px; gap: 6px; }
  .cap__cta .btn { min-height: 44px; padding: 0 14px; font-size: 13.5px; }
  .sched { left: calc(14px + var(--safe-l)); right: auto; bottom: 10px; top: auto; width: calc(38% - 28px - var(--safe-l)); }
  .sched__day { margin-bottom: 6px; }
  .sched__n { font-size: 24px; }
  .sched__phases { display: none; }
  /* the plan and its room card side by side, the plan no taller than the screen */
  .sheet { grid-template-columns: 1.25fr 1fr; }
  .plan { max-height: calc(100svh - 84px); }
  .room { position: sticky; top: 60px; display: block; padding: 0; }
  .plans { grid-template-columns: repeat(3, 1fr); }
}
