/* DM Insulations and Rendering, first look. Colours come from Danny's real work. */
@font-face {
  font-family: "Geist";
  src: url("../fonts/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --char: #2B2D30;      /* page */
  --deep: #1F2123;      /* deeper panels */
  --white: #E9E8E4;     /* render white */
  --slate: #3D4650;     /* plinth slate */
  --sky: #86A9D4;       /* the one sparing accent */
  --t2: rgba(233, 232, 228, .72);
  --t3: rgba(233, 232, 228, .6);
  --hair: rgba(233, 232, 228, .14);
  --line: rgba(233, 232, 228, .8);
  --pad: 16px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
}
@media (min-width: 700px) { :root { --pad: 32px; } }
@media (min-width: 1100px) { :root { --pad: 56px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--char); }
body {
  margin: 0;
  background: var(--char);
  color: var(--white);
  font-family: "Geist", "Helvetica Neue", Arial, sans-serif;
  font-weight: 350;
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -.005em;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
::selection { background: var(--sky); color: var(--deep); }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--sky); color: var(--deep); padding: 12px 16px; text-decoration: none; }
.skip:focus { top: 8px; }

/* ---------- OPENER: the big white house ---------- */
.open { position: relative; }
.open-photo { position: relative; margin: 0; overflow: hidden; background: var(--deep); height: clamp(520px, 80svh, 900px); }
.open-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; transform-origin: 50% 70%; }
.open-trace { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.tr { fill: none; stroke: #cfe0f5; stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linecap: square; stroke-linejoin: miter; }
.open-text { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 140px var(--pad) 34px;
  background: linear-gradient(to top, var(--char) 0%, rgba(43, 45, 48, .88) 38%, rgba(43, 45, 48, 0) 100%); }
.stage-h { margin: 0; }
.stage-meta { margin: 18px 0 0; display: grid; gap: 4px; }
.lead { margin: 0; max-width: 40ch; color: var(--t2); font-size: clamp(1rem, 1.3vw, 1.2rem); font-weight: 300; }
h1 { margin: 0; font-weight: 240; font-size: clamp(2.5rem, 7vw, 7.6rem); line-height: .95; letter-spacing: -.04em; }
.hl { display: block; overflow: hidden; padding: .06em 0 .12em; margin: -.06em 0 -.12em; }
.hw { display: inline-block; will-change: transform; }
.place { margin: 0; font-size: clamp(1.25rem, 1.7vw, 1.7rem); font-weight: 250; color: var(--white); letter-spacing: -.01em; }

/* SVG drawing vocabulary (hero and tool share it) */
.ln { fill: none; stroke: var(--line); stroke-width: var(--sw, 1); stroke-linecap: square; }
.ln-f { fill: none; stroke: var(--line); stroke-width: var(--sw, 1); opacity: .42; }
.ln-d { fill: none; stroke: var(--line); stroke-width: var(--sw, 1); opacity: .38; stroke-dasharray: 4 5; }
.fill-slate { fill: var(--slate); fill-opacity: .85; stroke: var(--line); stroke-width: var(--sw, 1); }
.fill-door { fill: var(--deep); fill-opacity: .9; stroke: var(--line); stroke-width: var(--sw, 1); }
.gr { stroke: var(--white); stroke-width: var(--sw, 1); opacity: .06; }
.gr5 { stroke: var(--white); stroke-width: var(--sw, 1); opacity: .13; }
.dm { fill: none; stroke: var(--sky); stroke-width: var(--sw, 1); }
.dm-d { fill: none; stroke: var(--sky); stroke-width: var(--sw, 1); opacity: .5; stroke-dasharray: 2 4; }
.dm-t { fill: var(--sky); font-family: "Geist", sans-serif; font-weight: 400; font-size: var(--fs, 10px); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.rl-t { fill: var(--white); opacity: .6; font-family: "Geist", sans-serif; font-weight: 300; font-size: var(--fs, 10px); font-variant-numeric: tabular-nums; }
svg .lit-wrap { --line: #cfe0f5; }
.cross { stroke: var(--sky); stroke-width: var(--sw, 1); opacity: .85; fill: none; }
.cross-t { fill: var(--white); font-family: "Geist", sans-serif; font-weight: 400; font-size: var(--fs2, 11px); font-variant-numeric: tabular-nums; }
.cross-bg { fill: var(--deep); fill-opacity: .85; }

/* WhatsApp button */
.wa-btn { display: inline-flex; align-items: center; gap: 14px; min-height: 56px; padding: 0 24px; background: var(--sky); color: var(--deep); text-decoration: none; font-weight: 500; font-size: 17px; letter-spacing: -.005em; border-radius: 14px; transition: background-color .3s var(--ease), transform .3s var(--ease); }
.wa-btn:hover { background: #a6c0e2; }
.wa-btn:active { transform: translateY(1px); }
.wa-btn.has-icon { padding: 4px 24px 4px 4px; }
.wa-btn img { width: 48px; height: 48px; flex: none; transition: transform .45s var(--ease); }
.wa-btn:hover img { transform: rotate(-6deg) scale(1.04); }
.wa-big { min-height: 64px; }
.wa-big img { width: 56px; height: 56px; }

/* finished work, drifting by itself */
.drift { overflow: hidden; padding: 18px 0 30px; pointer-events: none; user-select: none; -webkit-user-select: none; }
.drift-track { list-style: none; margin: 0; padding: 0; display: flex; gap: 12px; width: max-content; will-change: transform; }
.drift-track li { --jh: clamp(170px, 28svh, 300px); height: var(--jh); overflow: hidden; flex: none; background: var(--deep); }
.drift-track img { height: 100%; width: auto; max-width: none; -webkit-user-drag: none; }

/* ---------- WALL BUILD AND COLOURS ---------- */
.wall { padding: 24px var(--pad) 72px; }
.wall-grid { max-width: 1240px; margin: 0 auto; display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .wall-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 64px; align-items: center; } }
.wall-stage { position: relative; width: 100%; aspect-ratio: 1 / 1; background: radial-gradient(120% 90% at 50% 25%, #6d7278 0%, #43474c 55%, #2f3236 100%); overflow: hidden; }
@media (min-width: 700px) { .wall-stage { aspect-ratio: 5 / 4; } }
.wall-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.wall-stage.no-gl { display: none; }
.wall-cap { margin: 0; min-height: 2.6em; color: var(--white); font-size: clamp(1.05rem, 1.5vw, 1.25rem); font-weight: 300; letter-spacing: -.01em; }
@media (min-width: 1000px) { .wall-grid { grid-template-areas: "stage side" "cap side"; align-items: start; } .wall-stage { grid-area: stage; } .wall-cap { grid-area: cap; } .wall-side { grid-area: side; align-self: center; } }
.wall-side h2 { margin: 0; font-weight: 220; font-size: clamp(2.2rem, 4.6vw, 4rem); line-height: 1; letter-spacing: -.04em; }
.wall-p { margin: 16px 0 24px; max-width: 42ch; color: var(--t2); font-size: 17px; }
.sw { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; }
@media (min-width: 560px) { .sw { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.sw-b { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 0; background: none; border: 0; cursor: pointer; text-align: left; min-width: 0; width: 100%; }
.sw-c { display: block; width: 100%; height: 0; padding-bottom: 66%; box-shadow: inset 0 0 0 1px rgba(233, 232, 228, .12); transition: box-shadow .25s var(--ease); }
.sw-b[aria-pressed="true"] .sw-c { box-shadow: inset 0 0 0 3px var(--sky); }
.sw-b:hover .sw-c { box-shadow: inset 0 0 0 2px var(--t3); }
.sw-b[aria-pressed="true"]:hover .sw-c { box-shadow: inset 0 0 0 3px var(--sky); }
.sw-n { font-size: 13px; line-height: 1.2; color: var(--t2); overflow-wrap: anywhere; }
.sw-now { margin: 22px 0 0; font-size: 20px; font-weight: 300; letter-spacing: -.01em; }
.wall-note { margin: 8px 0 0; color: var(--t2); font-size: 15px; }
@media (max-width: 859px) { .wall { padding-bottom: 56px; } }

/* ---------- PRICE TOOL ---------- */
.tool { background: var(--deep); padding: 72px var(--pad) 96px; }
.tool-head { max-width: 1240px; margin: 0 auto 56px; display: grid; gap: 28px; }
.tool-head-text { display: grid; gap: 20px; align-content: end; }
.lead-draw { position: relative; width: 100%; aspect-ratio: 740 / 475; background: var(--char); }
.lead-draw svg { width: 100%; height: 100%; display: block; overflow: visible; }
.tool-head h2 { margin: 0; font-weight: 220; font-size: clamp(2.2rem, 5vw, 4.4rem); line-height: 1; letter-spacing: -.04em; }
.tool-head p { margin: 0; max-width: 46ch; color: var(--t2); font-size: 18px; }
@media (min-width: 1000px) { .tool-head { grid-template-columns: 1.2fr 1fr; align-items: end; gap: 56px; } }

.tool-grid { max-width: 1240px; margin: 0 auto; display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "draw" "in" "price" "send"; }
@media (min-width: 1000px) {
  .tool-grid { grid-template-columns: minmax(340px, 5fr) minmax(0, 7fr); column-gap: 64px; row-gap: 28px; grid-template-rows: auto auto 1fr;
    grid-template-areas: "in draw" "in price" "in send"; }
}
.tool-in { grid-area: in; display: grid; gap: 34px; align-content: start; }
.draw-box { grid-area: draw; position: relative; background: var(--char); aspect-ratio: 4 / 3; display: grid; overflow: hidden; }
@media (min-width: 1000px) { .draw-box { aspect-ratio: 7 / 5; } }
.price { grid-area: price; }
.send { grid-area: send; display: grid; gap: 10px; justify-items: start; }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 14px; font-size: 20px; font-weight: 300; letter-spacing: -.02em; }
.note { margin: 12px 0 0; font-size: 15px; color: var(--t3); }
.types { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.types button, .seg button { min-height: 48px; padding: 0 14px; background: var(--char); border: 0; border-radius: 0; cursor: pointer; text-align: left; font-weight: 350; transition: background-color .25s var(--ease), color .25s var(--ease); }
.types button:hover, .seg button:hover, .ghost:hover { background: #34373b; }
.types button[aria-pressed="true"], .seg button[aria-pressed="true"] { background: var(--white); color: var(--deep); font-weight: 450; }
.ghost { min-height: 44px; padding: 0 16px; background: var(--char); color: var(--sky); border: 0; border-radius: 0; cursor: pointer; transition: background-color .25s var(--ease); }
.text-btn { justify-self: start; min-height: 44px; padding: 0 2px; background: none; border: 0; color: var(--t2); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; cursor: pointer; }
.text-btn:hover { color: var(--white); }

.rows { display: grid; gap: 10px; margin-bottom: 12px; }
.row { display: grid; grid-template-columns: 1fr 44px; gap: 8px; align-items: end; }
.fld { display: grid; gap: 6px; font-size: 14px; color: var(--t2); min-width: 0; }
.fld > span { line-height: 1.2; }
input[type="number"], input[type="text"], input[type="tel"], select {
  width: 100%; min-height: 48px; padding: 0 12px; background: var(--char); color: var(--white); border: 0; border-radius: 0;
  font-size: 17px; font-weight: 350; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--t2) 50%), linear-gradient(135deg, var(--t2) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
input::placeholder { color: rgba(233, 232, 228, .38); }
input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input:focus-visible, select:focus-visible { outline-offset: 0; }
.rm { width: 44px; height: 48px; display: grid; place-items: center; background: none; border: 0; color: var(--t3); cursor: pointer; transition: color .2s var(--ease); }
.rm:hover { color: var(--white); }
.rm svg { width: 18px; height: 18px; }
.row-size { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.seg { display: grid; grid-auto-flow: column; gap: 4px; }
.seg button { text-align: center; padding: 0; }

.op { display: grid; gap: 8px; padding: 12px; background: rgba(43, 45, 48, .55); transition: background-color .3s var(--ease); }
.op.is-active { background: rgba(134, 169, 212, .14); }
.op-top { display: flex; align-items: center; justify-content: space-between; font-size: 16px; }
.op-top .rm { height: 44px; }
.op-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.op-grid .fld.wide { grid-column: 1 / -1; }
@media (min-width: 420px) { .op-grid.three { grid-template-columns: 1fr 1fr 1fr; } }
.add-row { display: flex; flex-wrap: wrap; gap: 8px; }

.switch-row { display: flex; align-items: center; gap: 14px; font-size: 18px; }
.switch { position: relative; width: 60px; height: 34px; padding: 0; flex: none; background: var(--char); border: 0; border-radius: 17px; cursor: pointer; transition: background-color .3s var(--ease); }
.switch::before { content: ""; position: absolute; inset: -6px -2px; } /* bigger tap area */
.switch .knob { position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%; background: var(--t2); transition: transform .35s var(--ease), background-color .3s var(--ease); }
.switch[aria-checked="true"] { background: var(--sky); }
.switch[aria-checked="true"] .knob { transform: translateX(26px); background: var(--deep); }

/* drawing panel */
.draw-box svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.draw-hint { grid-area: 1 / 1; align-self: center; justify-self: center; margin: 0; padding: 0 24px; max-width: 34ch; text-align: center; color: var(--t2); font-size: 17px; font-weight: 300; transition: opacity .4s var(--ease); pointer-events: none; }
.draw-hint.is-hidden { opacity: 0; }
.draw-warn { grid-area: 1 / 1; align-self: end; margin: 0; padding: 8px 14px; font-size: 14px; color: var(--sky); }
.draw-warn:empty { display: none; }

/* price lines */
.lines { margin: 0; display: grid; }
.line { display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--hair); }
.line dt { font-size: 17px; }
.line dt small { display: block; font-size: 14px; color: var(--t3); font-variant-numeric: tabular-nums; }
.line dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-size: 18px; }
.line.is-off dt, .line.is-off dd { color: var(--t3); }
.line .tick { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; margin: -10px 0; }
.line input[type="checkbox"] { appearance: none; width: 24px; height: 24px; margin: 0; background: var(--char); display: grid; place-items: center; cursor: pointer; flex: none; }
.line input[type="checkbox"]:checked { background: var(--sky); }
.line input[type="checkbox"]:checked::after { content: ""; width: 12px; height: 6px; border-left: 2px solid var(--deep); border-bottom: 2px solid var(--deep); transform: translateY(-1px) rotate(-45deg); }
.total { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding-top: 22px; }
.total span { font-size: 20px; font-weight: 300; }
.total strong { font-weight: 220; font-size: clamp(2.4rem, 5.5vw, 3.8rem); letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.total strong.is-empty { font-size: 1.3rem; letter-spacing: -.01em; color: var(--t3); font-weight: 300; }
.send-note { margin: 0; color: var(--t2); font-size: 15px; }

.foot { padding: 40px var(--pad) 56px; display: flex; flex-wrap: wrap; gap: 8px 32px; color: var(--t2); font-size: 15px; }
.foot p { margin: 0; }
.foot .plain { display: inline-flex; align-items: center; min-height: 44px; margin: -12px 0; color: var(--t2); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.foot .plain:hover { color: var(--white); }

/* ---------- initial states (only with JS; the page is complete without it) ---------- */
.js .hw { visibility: hidden; }
.js .stage-meta { opacity: 0; }
.js .open-photo { clip-path: inset(100% 0 0 0); }

/* ---------- PHONE / NARROW ---------- */
@media (max-width: 859px) {
  .open-photo { height: 80vw; min-height: 300px; }
  .open-text { position: relative; padding: 26px var(--pad) 8px; background: none; }
  h1 { font-size: clamp(2.5rem, 11.6vw, 4.6rem); }
  .drift-track li { --jh: clamp(150px, 34vw, 230px); }
  .tool { padding-top: 56px; padding-bottom: 72px; }
  .wa-btn { max-width: 100%; }
}
@media (max-width: 400px) {
  .wa-btn { font-size: 16px; }
  .wa-btn.has-icon { padding-right: 18px; }
  .types { grid-template-columns: 1fr 1fr; }
}

/* ---------- no GSAP (fallback) and REDUCED MOTION: calm version, fades only ---------- */
.no-anim .hw { visibility: visible !important; }
.no-anim .stage-meta { opacity: 1 !important; }
.no-anim .open-photo { clip-path: none !important; }
@media (prefers-reduced-motion: reduce) {
  .wa-btn img, .switch .knob { transition-duration: .01ms; }
  .wa-btn:hover img { transform: none; }
}

/* ---------- FINISHED WORK PAGE ---------- */
.wk-open { display: grid; grid-template-columns: minmax(0, 1fr); }
.wk-photo { margin: 0; overflow: hidden; background: var(--deep); height: min(120vw, 760px); }
.wk-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.wk-text { padding: 28px var(--pad) 8px; }
.wk-place { margin-top: 16px; color: var(--t2); font-size: clamp(1rem, 1.3vw, 1.2rem); }
@media (min-width: 860px) {
  .wk-open { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .wk-photo { grid-column: 2; grid-row: 1; height: min(92svh, 900px); }
  .wk-text { grid-column: 1; grid-row: 1; align-self: end; padding: 0 var(--pad) 64px; }
  .wk-open h1 { font-size: clamp(4rem, 9vw, 9.5rem); }
}
.wk-wall { overflow: hidden; padding: 28px 0; display: grid; gap: 12px; pointer-events: none; user-select: none; -webkit-user-select: none; }
.drift-row { --jh: clamp(190px, 34svh, 340px); }
.drift-row li { height: var(--jh); }
.drift-row img { height: 100%; width: auto; max-width: none; display: block; -webkit-user-drag: none; }
.quotes { max-width: 900px; margin: 0 auto; padding: 56px var(--pad) 24px; min-height: 12em; }
.q { margin: 0; font-weight: 240; font-size: clamp(1.8rem, 4.2vw, 3.4rem); line-height: 1.12; letter-spacing: -.03em; }
.q-by { margin: 18px 0 0; color: var(--t2); font-size: 17px; }
.wk-send { padding: 48px var(--pad) 40px; display: grid; gap: 14px; justify-items: start; }
.js .wk-photo { clip-path: inset(100% 0 0 0); }
.no-anim .wk-photo { clip-path: none !important; }

/* quote request form */
.quote-form { display: grid; gap: 12px; width: 100%; max-width: 440px; margin-bottom: 20px; }
.qf-h { margin: 0; font-size: 22px; font-weight: 300; letter-spacing: -.02em; }
.qf-send { border: 0; cursor: pointer; justify-content: center; font-family: inherit; }
.qf-send:disabled { opacity: .55; cursor: default; }
.qf-status { margin: 0; min-height: 1.4em; font-size: 15px; color: var(--t2); }
.qf-status.is-bad { color: var(--sky); }
.quote-form.is-sent input, .quote-form.is-sent .qf-send { display: none; }

/* copy my quote */
.copybox { display: grid; gap: 12px; width: 100%; max-width: 520px; margin-bottom: 20px; }
.copybox textarea { width: 100%; padding: 14px 12px; background: var(--char); color: var(--white); border: 0; border-radius: 0; font: inherit; font-size: 15px; line-height: 1.5; resize: none; min-height: 190px; }
.copybox textarea::placeholder { color: rgba(233, 232, 228, .38); }
.copy-btn { justify-self: start; min-width: 160px; }
.copy-btn:disabled { opacity: .45; cursor: default; }
