/* Fonts, served from this site (SIL Open Font License, see assets/fonts) */
@font-face { font-family: 'Cinzel'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/cinzel-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Public Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/public-sans-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Public Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/public-sans-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Public Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/public-sans-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Public Sans'; font-style: normal; font-weight: 800; font-display: swap; src: url('fonts/public-sans-latin-800-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Layout: midnight hero band in three planes (giant Cinzel word behind, thermal house in the middle,
   controls on top), frost sections below. Brand palette: two complementary pairs,
   midnight + champagne and petrol + clay. Champagne (--tap) only ever means "tap"; clay is heat, never a button. */
:root {
  --ink: #0F1A2E;          /* midnight: dark bands in both themes */
  --fg: #0F1A2E;           /* text on the page ground */
  --ink-2: #182540;        /* midnight-2 */
  --ghost: #1A2742;
  --petrol: #1D4D57;
  --petrol-ghost: #245C67;
  --clay: #B5654A;
  --champagne-light: #F1E6C8;
  --thermal-cool: #2A6B77;
  --paper: #F1F2F4;        /* frost */
  --card: #FFFFFF;
  --muted: #4A5268;        /* slate */
  --line: #D3D7E4;
  --field: #9DA3BA;
  --on-ink: #FFFFFF;
  --on-ink-muted: #C3C8D4; /* mist */
  --tap: #D8C08D;          /* champagne: the only colour that means tap */
  --tap-press: #C9AE72;
  --tap-edge: #9C7E45;     /* champagne-deep: tap outlines and underlines on light grounds */
  --tap-ink: #0F1A2E;

  --display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --body: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --radius: 6px;
  /* Motion tokens: the only durations and curves the site uses.
     Durations follow Material 3's short / medium / long steps; the sheet spring follows
     Apple's duration-and-bounce form and is read by app.js. */
  --dur-1: 150ms;   /* press feedback, small colour changes */
  --dur-2: 250ms;   /* fades, icon nudges */
  --dur-3: 400ms;   /* panels and steps changing */
  --dur-4: 600ms;   /* things arriving on screen */
  --dur-5: 900ms;   /* scroll reveals */
  --sheet-duration: 0.5;  /* seconds, spring response */
  --sheet-bounce: 0;      /* iOS sheets settle without overshoot */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);   /* decelerate: entering */
  --ease-in: cubic-bezier(0.3, 0, 0.8, 0.15);   /* accelerate: leaving (M3 emphasized accelerate) */
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);    /* move within the screen */
  /* the sheet spring, sampled for CSS (critically damped, 0.5 s response) */
  --spring-smooth: cubic-bezier(.32, .72, 0, 1);
  color-scheme: light;
}

/* Dark mode: the page ground and cards go dark; bands, header, hero and the tap colour stay the same.
   Follows the device setting, and the header switch overrides it. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0F1A2E; --card: #182540; --fg: #FFFFFF; --muted: #C3C8D4;
    --line: #1A2742; --field: #4A5268; --tap-edge: #D8C08D; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0F1A2E; --card: #182540; --fg: #FFFFFF; --muted: #C3C8D4;
  --line: #1A2742; --field: #4A5268; --tap-edge: #D8C08D; color-scheme: dark;
}
body { transition: background-color var(--dur-3) ease, color var(--dur-3) ease; }
.theme-toggle { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: var(--radius); background: none; color: var(--on-ink); cursor: pointer; }
.theme-toggle svg { width: 20px; height: 20px; transition: transform var(--dur-3) var(--ease-out); }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .theme-toggle .sun { display: none; } :root:not([data-theme]) .theme-toggle .moon { display: block; } }
.theme-toggle:active svg { transform: rotate(40deg) scale(.9); }
.checks svg { color: var(--fg); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(76px + env(safe-area-inset-top, 0px)); scrollbar-gutter: stable; }
html:has(dialog[open]) { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--fg);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}
a, button, summary, label { touch-action: manipulation; }
img, svg { max-width: 100%; }
a { color: inherit; text-decoration-color: var(--tap-edge); text-decoration-thickness: 2px; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--tap-edge); outline-offset: 3px; }
[hidden] { display: none !important; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}
.vh {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--tap); color: var(--tap-ink); padding: 10px 14px; border-radius: var(--radius);
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 18px;
  border: 0; border-radius: var(--radius);
  font: inherit; font-weight: 700; font-size: 17px; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color var(--dur-1) ease, box-shadow var(--dur-1) ease, transform var(--dur-1) var(--ease-out);
}
.btn svg { flex: none; transition: transform var(--dur-2) var(--ease-out); }
.btn:active { transform: scale(0.975); }
.btn-tap { background: var(--tap); color: var(--tap-ink); box-shadow: inset 0 0 0 1.5px var(--tap-edge); }

.btn-line { background: transparent; color: var(--on-ink); box-shadow: inset 0 0 0 2px var(--tap); }

.btn-line.on-paper { color: var(--fg); box-shadow: inset 0 0 0 2px var(--tap-edge); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 15px; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  background: var(--ink); z-index: 30;
}
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: var(--ink); color: var(--on-ink);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.mark { display: inline-flex; align-items: baseline; gap: 6px; color: var(--on-ink); text-decoration: none; }
.mark img { display: block; height: 40px; width: auto; }
.nav { display: none; }
.head-actions { display: flex; align-items: center; gap: 12px; }
.head-actions .btn, .head-phone { display: none; }
.head-link { color: var(--on-ink); font-size: 15px; font-weight: 600; padding: 10px 0; }

/* ---------- Hero, three planes ---------- */
.hero { background: var(--ink); color: var(--on-ink); overflow: hidden; }
.hero-grid {
  display: grid; gap: 20px;
  grid-template-areas: "h1" "visual" "copy";
  padding-block: 20px 44px;
}
.hero-h1 { grid-area: h1; margin: 0; font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--on-ink-muted); max-width: 42ch; }
.hero-visual { grid-area: visual; min-width: 0; }
.hero-copy { grid-area: copy; display: grid; gap: 14px; align-content: start; min-width: 0; }

.stage { --huge: clamp(84px, 24vw, 220px); display: grid; grid-template-columns: minmax(0, 1fr); }
.stage > * { grid-area: 1 / 1; }
.stage-word {
  margin: 0; align-self: start; justify-self: center;
  font-family: var(--display); font-weight: 700; font-size: var(--huge); line-height: 0.85;
  text-transform: uppercase; letter-spacing: 0.01em; color: var(--ghost);
  user-select: none; white-space: nowrap;
  transition: opacity var(--dur-2) ease;
}
.stage-word.is-swapping { opacity: 0; }
.stage-art { align-self: start; margin-top: calc(var(--huge) * 0.32); position: relative; aspect-ratio: 4 / 3; max-width: 100%; }
.house { position: absolute; left: 0; right: 0; bottom: 8%; display: block; width: 100%; height: auto; transition: opacity var(--dur-4) ease; }
.hero-canvas { position: absolute; inset: 0; opacity: 0; transition: opacity var(--dur-5) var(--ease-out); touch-action: pan-y; cursor: grab; }
.hero-canvas:active { cursor: grabbing; }
.hero-canvas canvas { display: block; width: 100% !important; height: 100% !important; }
.stage-art.is-3d .hero-canvas { opacity: 1; }
.stage-art.is-3d .house { opacity: 0; pointer-events: none; }
.hero-hint { margin: 6px 0 0; font-size: 14px; color: var(--on-ink-muted); visibility: hidden; }
.hero-visual:has(.is-3d) .hero-hint { visibility: visible; animation: fade-in var(--dur-3) ease both; }
.house .zone { transition: opacity var(--dur-3) ease; }
.house .zone.is-dim { opacity: 0.3; }

.zone-tabs { position: relative; margin-top: -34px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.zone-tab {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  min-height: 58px; padding: 8px 12px; border: 0; border-radius: var(--radius);
  background: var(--ink); color: var(--on-ink); box-shadow: inset 0 0 0 2px var(--tap);
  font: inherit; text-align: left; cursor: pointer;
}
.zone-tab { align-items: center; text-align: center; min-height: 52px; font-weight: 700; font-size: 16px; }
.zone-tab[aria-pressed="true"] { background: var(--tap); color: var(--tap-ink); }

.heat-key { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; font-size: 14px; color: var(--on-ink-muted); }
.key-bar { display: inline-flex; flex: none; border-radius: 2px; overflow: hidden; }
.key-bar i { display: block; width: 14px; height: 10px; }
.key-bar i:nth-child(1) { background: var(--ink-2); }
.key-bar i:nth-child(2) { background: var(--thermal-cool); }
.key-bar i:nth-child(3) { background: var(--clay); }
.key-bar i:nth-child(4) { background: var(--tap); }
.key-bar i:nth-child(5) { background: var(--champagne-light); }

.zone-msg { margin: 6px 0 0; font-size: 23px; font-weight: 800; line-height: 1.2; text-wrap: balance; }
.zone-sub { margin: 0; font-size: 16px; color: var(--on-ink-muted); max-width: 46ch; }
.trust { margin: 2px 0 0; font-size: 14px; color: var(--on-ink-muted); line-height: 1.6; }

/* ---------- Sections ---------- */
.section { padding-block: 44px; }
.big {
  margin: 0 0 22px;
  font-family: var(--display); font-weight: 700; font-size: clamp(38px, 10.5vw, 76px);
  line-height: 1; letter-spacing: 0.005em; text-wrap: balance;
}
.lede { margin: 0 0 22px; color: var(--muted); max-width: 52ch; }
.col { max-width: 720px; }
.split { display: grid; gap: 56px; }
.split > * { min-width: 0; }

.services { list-style: none; margin: 0; padding: 6px 0; background: var(--card); border-radius: var(--radius); }
.services button {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-height: 62px; padding: 12px 16px;
  border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer;
}

.services strong { display: block; font-size: 17px; }
.services .note { display: block; font-size: 15px; color: var(--muted); }
.services svg { color: var(--tap-edge); flex: none; }

.steps { list-style: none; margin: 0; padding: 0; }
.steps li { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 14px; padding-bottom: 24px; }
.steps li::before { content: ""; width: 14px; height: 14px; margin: 5px 4px 0; border-radius: 50%; background: var(--fg); }
.steps li::after { content: ""; position: absolute; left: 10px; top: 24px; bottom: 4px; width: 2px; background: var(--line); }
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::after { display: none; }
.steps li:last-child::before { background: var(--clay); }
.steps strong { display: block; }
.steps .note { color: var(--muted); font-size: 15px; }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.checks li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; }
.checks svg { margin-top: 2px; }

.qa { display: grid; gap: 8px; }
.qa details { background: var(--card); border-radius: var(--radius); padding: 0 16px; }
.qa summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 56px; padding: 14px 0; font-weight: 700; cursor: pointer; list-style: none;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; flex: none; color: var(--tap-edge); font-size: 26px; font-weight: 700; line-height: 1; }
.qa details[open] summary::after { content: "\2212"; }
.qa details p { margin: 0 0 16px; color: var(--muted); }
.more { display: inline-block; margin-top: 18px; font-weight: 700; padding: 6px 0; }

/* ---------- Ink band with a back-plane word ---------- */
.band { background: var(--ink); color: var(--on-ink); overflow: hidden; }
.band.petrol { background: var(--petrol); }
.band.petrol .band-word { color: var(--petrol-ghost); }
.band a, .site-footer a { text-decoration-color: var(--tap); }
.band-stage { --huge: clamp(104px, 29vw, 240px); display: grid; grid-template-columns: minmax(0, 1fr); padding-block: 48px 56px; }
.band-stage > * { grid-area: 1 / 1; }
.band-word {
  margin: 0; align-self: start;
  font-family: var(--display); font-weight: 700; font-size: var(--huge); line-height: 0.85;
  text-transform: uppercase; color: var(--ghost); user-select: none; white-space: nowrap;
}
.band-copy { position: relative; padding-top: calc(var(--huge) * 0.52); display: grid; gap: 12px; align-content: start; max-width: 560px; }
.band-copy h1, .band-copy h2 { margin: 0; font-size: 23px; font-weight: 800; line-height: 1.2; text-wrap: balance; }
.band-copy p { margin: 0; color: var(--on-ink-muted); max-width: 46ch; }
.band-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.band-actions .btn { flex: 1 1 200px; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 4px; min-width: 0; }
.field label, .field legend { font-size: 14px; font-weight: 700; padding: 0; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 12px;
  border: 1.5px solid var(--field); border-radius: var(--radius);
  background: var(--card); color: var(--fg); font: inherit; font-size: 16px;
}
.field textarea { resize: vertical; }
fieldset.field { margin: 0; border: 0; }
.choice { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 12px; background: var(--card); border-radius: var(--radius); font-weight: 600; }
.choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--tap-edge); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stack { display: grid; gap: 14px; }
.facts { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 18px; row-gap: 8px; background: var(--card); border-radius: var(--radius); padding: 16px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; }
.small { font-size: 14px; color: var(--muted); }

/* ---------- FAQ page ---------- */
.faq-list { display: grid; gap: 28px; }
.faq-list h2 { margin: 0 0 6px; font-size: 19px; font-weight: 800; line-height: 1.3; }
.faq-list p { margin: 0; color: var(--muted); max-width: 62ch; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--on-ink-muted); }
.foot { display: grid; gap: 18px; padding-block: 40px 128px; font-size: 15px; }
.foot address { font-style: normal; line-height: 1.8; }
.foot a { color: var(--on-ink); }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot nav a { padding: 6px 0; }
.foot .small { color: var(--on-ink-muted); margin: 0; }

/* ---------- Mobile dock: a floating action bar ---------- */
.dock {
  position: fixed; z-index: 20;
  left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px));
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  display: grid; grid-template-columns: 54px minmax(0, 1fr) 54px; gap: 8px; padding: 7px;
  border-radius: 22px; background: rgba(15, 26, 46, .88);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(195, 200, 212, .12), 0 16px 36px -14px rgba(0, 0, 0, .65);
  transition: transform var(--dur-4) var(--spring, var(--ease-out)), opacity var(--dur-2) ease;
}

.dock-round { display: grid; place-items: center; height: 54px; border-radius: 16px; color: var(--on-ink); box-shadow: inset 0 0 0 2px var(--tap); text-decoration: none; transition: transform var(--dur-2) var(--spring, var(--ease-out)), background-color var(--dur-2) ease; }
.dock-round:active { transform: scale(.92); background: rgba(216, 192, 141, .16); }
.dock-main { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 54px; padding: 0 16px; border: 0; border-radius: 16px; background: var(--tap); color: var(--tap-ink); font: inherit; text-align: left; cursor: pointer; transition: transform var(--dur-2) var(--spring, var(--ease-out)); }
.dock-main:active { transform: scale(.96); }
.dock-text { display: grid; line-height: 1.15; }
.dock-text strong { font-size: 17px; font-weight: 800; }
.dock-text small { font-size: 12.5px; font-weight: 600; opacity: .78; }
.dock-arrow { flex: none; transition: transform var(--dur-2) var(--spring, var(--ease-out)); }
.dock-main:active .dock-arrow { transform: translateX(4px); }
/* the brand's thermal scale runs along the bottom edge of the main button, like heat rising */
.dock-heat { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; display: flex; }
.dock-heat b { flex: 1; transform-origin: bottom; }
.dock-heat b:nth-child(1) { background: #182540; } .dock-heat b:nth-child(2) { background: #2A6B77; } .dock-heat b:nth-child(3) { background: #B5654A; } .dock-heat b:nth-child(4) { background: #9C7E45; } .dock-heat b:nth-child(5) { background: #F1E6C8; }
@media (prefers-reduced-motion: no-preference) {
  .dock-heat b { animation: heat-pulse 2.6s ease-in-out infinite; }
  .dock-heat b:nth-child(2) { animation-delay: .15s; } .dock-heat b:nth-child(3) { animation-delay: .3s; } .dock-heat b:nth-child(4) { animation-delay: .45s; } .dock-heat b:nth-child(5) { animation-delay: .6s; }
  @keyframes heat-pulse { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.9); } }
}

/* ---------- Quote sheet ---------- */
dialog.sheet {
  position: fixed; inset: auto 0 0 0; margin: 0 auto;
  width: 100%; max-width: 560px; height: min(88svh, 780px); max-height: none;
  overscroll-behavior: contain;
  padding: 0; border: 0; border-radius: 14px 14px 0 0;
  background: var(--paper); color: var(--fg); overflow: hidden;
}
dialog.sheet[open] { display: flex; flex-direction: column; }

.sheet-head { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px var(--gutter-r) 0 var(--gutter-l); border-bottom: 1px solid var(--line); }
.modes { display: flex; gap: 6px; flex: 1; min-width: 0; }
.mode {
  border: 0; background: none; font: inherit; font-weight: 700; font-size: 16px;
  padding: 14px 6px 11px; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent;
}
.mode[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--tap-edge); }
.close { display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: none; color: var(--fg); cursor: pointer; border-radius: var(--radius); }
.sheet-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 16px var(--gutter-r) calc(28px + env(safe-area-inset-bottom, 0px)) var(--gutter-l); }
.q { display: grid; gap: 16px; align-content: start; }
.q-progress { display: flex; justify-content: space-between; align-items: center; min-height: 36px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.q-back { display: inline-flex; align-items: center; gap: 4px; padding: 6px 0; border: 0; background: none; font: inherit; font-weight: 700; color: var(--fg); cursor: pointer; }
.q-title { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(28px, 7.5vw, 38px); line-height: 1.1; text-wrap: balance; }
.q-title:focus { outline: none; }
.q-sub { margin: 0; font-size: 15px; color: var(--muted); }
.q-opts { display: grid; gap: 10px; }
.q-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 60px; padding: 12px 16px; border: 0; border-radius: var(--radius);
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line);
  font: inherit; color: var(--fg); text-align: left; cursor: pointer;
}

.q-opt strong { display: block; font-size: 17px; line-height: 1.25; }
.q-opt .note { display: block; font-size: 14px; color: var(--muted); }
.q-opt svg { color: var(--tap-edge); flex: none; }
.q-rows { margin: 0; padding: 12px 16px; background: var(--card); border-radius: var(--radius); display: grid; gap: 6px; }
.q-rows div { display: flex; justify-content: space-between; gap: 16px; font-size: 15px; }
.q-rows dt { color: var(--muted); }
.q-rows dd { margin: 0; font-weight: 700; text-align: right; }
.send { display: grid; gap: 10px; }
.preview { width: 100%; min-height: 120px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--muted); font: inherit; font-size: 14px; resize: vertical; }
.status { min-height: 20px; margin: 0; font-size: 14px; color: var(--muted); }
.linkish { justify-self: start; padding: 6px 0; border: 0; background: none; font: inherit; color: var(--muted); text-decoration: underline; text-decoration-color: var(--tap-edge); text-underline-offset: 3px; cursor: pointer; }

/* ---------- Wider screens ---------- */
@media (min-width: 960px) {
  .nav { display: flex; gap: 26px; }
  .nav a { color: var(--on-ink); text-decoration: none; font-size: 15px; font-weight: 600; padding: 8px 0; }
  .head-link { display: none; }
  .nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--tap); text-decoration-thickness: 2px; text-underline-offset: 6px; }
  .head-actions .btn { display: inline-flex; }
  .head-phone { display: inline; color: var(--on-ink); font-size: 15px; font-weight: 700; text-decoration: none; font-variant-numeric: tabular-nums; }

  .hero-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    grid-template-areas: "h1 visual" "copy visual";
    grid-template-rows: auto 1fr;
    column-gap: 64px; row-gap: 24px; padding-block: 56px 72px;
  }
  .hero-copy { align-content: start; }
  .zone-msg { font-size: 30px; }
  .stage { --huge: clamp(140px, 12vw, 190px); }
  .hero-copy .btn-block { width: auto; justify-self: start; padding: 0 26px; }

  .section { padding-block: 84px; }
  .split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; }
  .split .big { margin-bottom: 18px; }
  .band-stage { --huge: clamp(170px, 18vw, 250px); padding-block: 72px 88px; }
  .dock { display: none; }
  .foot { padding-block: 48px; grid-template-columns: 1fr 1fr 1fr; align-items: start; }
  dialog.sheet { inset: 0; margin: auto; border-radius: 14px; height: min(84vh, 720px); }
}


/* =====================================================================
   Motion layer. Everything below animates transform and opacity only,
   so nothing reflows while it moves. Hover styles exist only on devices
   that really hover, so a tap never leaves a stuck highlight.
   ===================================================================== */

@media (hover: hover) and (pointer: fine) {
  .btn-tap:hover { background: var(--tap-press); }
  .btn-line:hover { background: rgba(216, 192, 141, 0.14); }
  .btn:hover svg { transform: translateX(3px); }
  .services button:hover strong { text-decoration: underline; text-decoration-color: var(--tap-edge); text-decoration-thickness: 2px; text-underline-offset: 3px; }
  .services button:hover svg { transform: translateX(3px); }
  .q-opt:hover { box-shadow: inset 0 0 0 2px var(--tap-edge); }
  .nav a:hover { text-decoration: underline; text-decoration-color: var(--tap); }
  .work-card:hover .work-media img, .work-card:hover .ph { transform: scale(1.035); }
}
.services svg, .q-opt svg { transition: transform var(--dur-2) var(--ease-out); }
.services button:active, .q-opt:active { transform: scale(0.985); }
.services button, .q-opt { transition: transform var(--dur-1) var(--ease-out), box-shadow var(--dur-1) ease; }
:focus:not(:focus-visible) { outline: none; }

/* ---------- Page to page: cross-document view transitions ---------- */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
.dock { view-transition-name: dock; }
::view-transition-group(site-header), ::view-transition-group(dock) { animation-duration: 0s; }
::view-transition-old(root) { animation: vt-out var(--dur-2) var(--ease-io) both; }
::view-transition-new(root) { animation: vt-in var(--dur-3) var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-10px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(18px); } }
/* Browsers without cross-page transitions get a matching fade */
html.no-vt main { animation: vt-in var(--dur-3) var(--ease-out) both; }
html.no-vt.is-leaving main { animation: vt-out var(--dur-1) var(--ease-io) both; }

/* ---------- Reveal on scroll ---------- */
html.js [data-reveal] { opacity: 0; transform: translateY(22px); }
html.js [data-stagger] > * { opacity: 0; transform: translateY(18px); }
html.js [data-stagger].in > * { opacity: 1; transform: none; transition: opacity var(--dur-4) var(--ease-out), transform var(--dur-5) var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
.more.on-ink { color: var(--on-ink); text-decoration-color: var(--tap); justify-self: start; margin-top: 0; }
html.js [data-reveal].in {
  opacity: 1; transform: none;
  transition: opacity var(--dur-4) var(--ease-out), transform var(--dur-5) var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}

/* ---------- Hero intro ---------- */
html.js .hero .stage-word { animation: word-in 1.1s var(--ease-out) calc(var(--intro, 0s) + .05s) both; }
html.js .hero .house .zone { animation: part-in var(--dur-5) var(--ease-out) both; }
html.js .hero .house [data-zone-part="crawl"] { animation-delay: calc(var(--intro, 0s) + .15s); }
html.js .hero .house [data-zone-part="walls"] { animation-delay: calc(var(--intro, 0s) + .28s); }
html.js .hero .house [data-zone-part="attic"] { animation-delay: calc(var(--intro, 0s) + .42s); }
html.js .hero .zone-tabs, html.js .hero .heat-key { animation: rise-in var(--dur-5) var(--ease-out) calc(var(--intro, 0s) + .55s) both; }
html.js .hero-copy > * { animation: rise-in var(--dur-5) var(--ease-out) both; animation-delay: calc(var(--intro, 0s) + .35s + var(--i, 0) * 80ms); }
@keyframes word-in { from { opacity: 0.02; transform: translateY(28px); letter-spacing: 0.08em; } }
@keyframes part-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(16px); } }
.house .zone { transform-box: view-box; }

/* Zone copy: all three panels share one grid cell, so the block is always as tall
   as the longest one and nothing below it moves when a tab is tapped. */
.zone-copy { display: grid; }
.zone-panel { grid-area: 1 / 1; display: grid; gap: 14px; align-content: start; transition: opacity var(--dur-2) ease, transform var(--dur-3) var(--ease-out); }
.zone-panel[aria-hidden="true"] { opacity: 0; transform: translateY(8px); visibility: hidden; transition: opacity var(--dur-2) ease, transform var(--dur-2) ease, visibility var(--dur-1) .2s; }
.stage-word { transition: opacity var(--dur-2) ease, transform var(--dur-3) var(--ease-out); }
.stage-word.is-swapping { opacity: 0; transform: translateY(10px); }
.zone-tab { transition: background-color var(--dur-2) ease, color var(--dur-2) ease, transform var(--dur-1) var(--ease-out); }
.zone-tab:active { transform: scale(0.97); }

/* ---------- Quote sheet: fixed height, slides in, steps glide ---------- */
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
.q.step-fwd { animation: step-fwd var(--dur-3) var(--ease-out) both; }
.q.step-back { animation: step-back var(--dur-3) var(--ease-out) both; }
.q.step-fade { animation: fade-in var(--dur-2) ease both; }
@keyframes step-fwd { from { opacity: 0; transform: translateX(28px); } }
@keyframes step-back { from { opacity: 0; transform: translateX(-28px); } }
.mode { transition: color var(--dur-2) ease, border-color var(--dur-2) ease; }
@media (min-width: 960px) {
}

/* ---------- Questions: animated open and close ---------- */
.qa summary::after { content: ""; width: 14px; height: 14px; background:
  linear-gradient(var(--tap-edge), var(--tap-edge)) center / 14px 2.5px no-repeat,
  linear-gradient(var(--tap-edge), var(--tap-edge)) center / 2.5px 14px no-repeat;
  transition: transform var(--dur-2) var(--ease-out); }
.qa details[open] summary::after { content: ""; transform: rotate(90deg); background:
  linear-gradient(var(--tap-edge), var(--tap-edge)) center / 14px 2.5px no-repeat; }
/* opening is animated by the script with a spring, see app.js */

/* ---------- 3D house: see where it goes ---------- */
.inside { background: var(--ink); color: var(--on-ink); position: relative; }
.inside-sticky { position: relative; display: grid; grid-template-rows: auto auto; }
.inside-canvas { position: relative; height: min(52svh, 520px); touch-action: pan-y; cursor: grab; }
.inside-canvas:active { cursor: grabbing; }
.inside-canvas canvas { display: block; width: 100% !important; height: 100% !important; }
.inside-fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; color: var(--on-ink-muted); text-align: center; }
.inside-copy { padding-block: 0 44px; display: grid; gap: 16px; }
.inside-copy .big { margin: 0; color: var(--on-ink); }
.chapters { display: grid; margin: 0; padding: 0; list-style: none; }
.chapter { grid-area: 1 / 1; display: grid; gap: 8px; align-content: start; transition: opacity var(--dur-3) ease, transform var(--dur-4) var(--ease-out); }
.chapter:not(.is-active) { opacity: 0; transform: translateY(10px); visibility: hidden; transition: opacity var(--dur-2) ease, transform var(--dur-2) ease, visibility var(--dur-1) .2s; }
.chapter h3 { margin: 0; font-size: 23px; font-weight: 800; line-height: 1.2; }
.chapter p { margin: 0; color: var(--on-ink-muted); max-width: 40ch; }
.chapter .btn { justify-self: start; margin-top: 8px; }
.inside-nav { display: flex; align-items: center; gap: 10px; }
.inside-nav .btn { min-height: 46px; }
.inside-nav .btn-line { padding: 0 14px; }
.inside-meter { flex: 1; height: 3px; background: var(--ghost); border-radius: 2px; overflow: hidden; }
.inside-meter i { display: block; height: 100%; background: var(--on-ink-muted); transform-origin: left; transform: scaleX(var(--p, 0)); }
.inside-hint { margin: 0; font-size: 14px; color: var(--on-ink-muted); }

@media (min-width: 900px) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .inside.is-pinned { height: 520vh; }
  .inside.is-pinned .inside-sticky { position: sticky; top: calc(60px + env(safe-area-inset-top, 0px)); height: calc(100vh - 60px); display: block; overflow: hidden; }
  .inside.is-pinned .inside-canvas { position: absolute; inset: 0; height: auto; }
  .inside.is-pinned .inside-copy { position: absolute; left: 0; right: 0; bottom: 0; top: 0; padding-block: 72px 56px; pointer-events: none; grid-template-rows: auto 1fr auto; max-width: 1120px; margin: 0 auto; }
  .inside.is-pinned .inside-copy > * { max-width: 400px; pointer-events: auto; }
  .inside.is-pinned .chapters { align-self: center; }
  .inside.is-pinned .chapter h3 { font-size: 30px; }
  .inside.is-pinned .inside-nav .btn { display: none; }
}
@media (min-width: 960px) {
  .inside:not(.is-pinned) .inside-sticky { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); grid-template-rows: none; max-width: 1120px; margin: 0 auto; align-items: center; }
  .inside:not(.is-pinned) .inside-canvas { order: 2; height: 560px; }
  .inside:not(.is-pinned) .inside-copy { padding: 56px var(--gutter-r) 56px var(--gutter-l); }
}

/* ---------- Recent work teaser and work page ---------- */
.work-grid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
.work-card { display: grid; gap: 10px; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.work-card[hidden] { display: none; }
.work-media { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--ink-2); }
.work-media img, .work-media .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-5) var(--ease-out); }
.ph { display: grid; place-items: center; background: var(--ink-2); color: var(--on-ink-muted); font-size: 14px; }
.ph svg { width: 34%; height: auto; opacity: .9; }
.ph.is-before { background: #1F2B45; }
.work-card strong { display: block; font-size: 18px; line-height: 1.25; }
.work-card .note { display: block; font-size: 15px; color: var(--muted); }
.work-filter { display: flex; gap: 22px; overflow-x: auto; margin: 0 0 28px; padding: 0 0 2px; scrollbar-width: none; }
.work-filter::-webkit-scrollbar { display: none; }
.work-filter button { flex: none; border: 0; background: none; font: inherit; font-weight: 700; font-size: 16px; color: var(--muted); padding: 10px 0 8px; border-bottom: 3px solid transparent; cursor: pointer; transition: color var(--dur-2) ease, border-color var(--dur-2) ease; }
.work-filter button[aria-pressed="true"] { color: var(--fg); border-bottom-color: var(--tap-edge); }
.work-grid.is-filtering .work-card { animation: fade-in var(--dur-3) ease both; }
@media (min-width: 640px) { .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .work-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 28px; } }

/* Before and after compare */
.compare { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--ink-2); touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none; --pos: 50%; }
.compare > .layer { position: absolute; inset: 0; }
.compare > .layer img, .compare > .layer .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare > .after { clip-path: inset(0 0 0 var(--pos)); }
.compare .tag { position: absolute; bottom: 10px; font-size: 14px; font-weight: 700; color: var(--on-ink); text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.compare .before .tag { left: 12px; }
.compare .after .tag { right: 12px; }
.compare .handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--tap); pointer-events: none; }
.compare .handle::after { content: ""; position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: var(--tap); box-shadow: 0 2px 10px rgba(0,0,0,.35); }
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; pointer-events: none; }
.compare:has(input:focus-visible) { outline: 3px solid var(--tap-edge); outline-offset: 3px; }

dialog.viewer { position: fixed; inset: auto 0 0 0; margin: 0 auto; width: 100%; max-width: 760px; height: min(90svh, 820px); padding: 0; border: 0; border-radius: 14px 14px 0 0; background: var(--paper); color: var(--fg); overflow: hidden; overscroll-behavior: contain; }
dialog.viewer[open] { display: flex; flex-direction: column; }
.viewer-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px var(--gutter-r) 8px var(--gutter-l); }
.viewer-head h2 { margin: 0; font-size: 19px; font-weight: 800; line-height: 1.25; }
.viewer-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--gutter-r) calc(28px + env(safe-area-inset-bottom, 0px)) var(--gutter-l); display: flex; flex-direction: column; gap: 16px; }
.viewer-body > * { flex-shrink: 0; margin: 0; }
@media (min-width: 960px) {
  dialog.viewer { inset: 0; margin: auto; border-radius: 14px; height: min(88vh, 860px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-delay: 0s !important; scroll-behavior: auto !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  html.js [data-reveal], html.js [data-stagger] > * { opacity: 1; transform: none; }
}
.inside-foot { display: grid; gap: 10px; }
.inside-nav .btn:disabled { opacity: .4; cursor: default; }
@media (max-width: 959px) {
  .inside-sticky { display: flex; flex-direction: column; padding-block: 40px 44px; }
  .inside-copy { display: contents; }
  .inside-copy > * { padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
  .inside-copy .big { order: 0; margin-bottom: 4px; }
  .inside-canvas { order: 1; height: min(46svh, 460px); }
  .inside-foot { order: 2; margin-bottom: 18px; }
  .chapters { order: 3; }
}

/* ---------- First visit: the logo opening ----------
   Once per browser session, never with reduced motion. The crest fills from the
   bottom like insulation going in, the layer line draws across the mane, SINGH
   wipes in, INSULATION settles under it, then the panel lifts away like a curtain.
   A pure-CSS panel covers the page until the script takes over, and clears
   itself even if the script never runs. Tap or press any key to skip. */
html.intro { --intro: 1.85s; }
html.intro::before { content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; background: var(--ink); animation: intro-out .45s var(--ease-io) 2.8s forwards; }
html.intro-live::before { display: none; }
@keyframes intro-out { to { opacity: 0; visibility: hidden; } }
.intro { position: fixed; inset: 0; z-index: 101; display: grid; place-items: center; background: var(--ink); cursor: pointer; }
.intro-mark { position: relative; display: grid; width: min(250px, 58vw); aspect-ratio: 384 / 357; }
.intro-mark img { grid-area: 1 / 1; width: 100%; height: auto; display: block; }
/* crops of the one logo image: crest 3–59%, SINGH 66–87%, INSULATION 90–98% of its height */
/* crops of the one logo image: crest 3–59%, SINGH 63–88%, INSULATION 89–98% of its height */
.intro-crest { clip-path: inset(0 0 40% 0); opacity: 0; transform: scale(.78); transform-origin: 50% 31%; }
.intro-cover { position: absolute; left: 22%; width: 56%; top: 31%; aspect-ratio: 1; border-radius: 50%; background: var(--ink); transform: translateY(-50%) scale(1.02); }
.intro-singh { clip-path: inset(63% 0 12% 0); opacity: 0; transform: translateY(14px); }
.intro-ins { clip-path: inset(89% 0 0 0); opacity: 0; transform: scaleX(1.18); transform-origin: 50% 94%; }
/* 1. the crest pops out on a spring while 2. the disc over it shrinks, so the mane's tips show
   first and the face fills in last, outside to inside. 3. SINGH rises. 4. INSULATION tracks in. */
.intro.play .intro-crest { animation: crest-pop .75s var(--spring) both; }
.intro.play .intro-cover { animation: cover-shrink .8s cubic-bezier(.55, 0, .25, 1) .12s both; }
.intro.play .intro-singh { animation: rise-up .6s var(--spring) .7s both; }
.intro.play .intro-ins { animation: track-in .6s var(--ease-out) .95s both; }
.intro.leave { animation: curtain .62s var(--ease-io) forwards; }
.intro.leave .intro-mark { animation: mark-up .5s var(--ease-io) forwards; }
@keyframes crest-pop { 0% { opacity: 0; transform: scale(.78); } 25% { opacity: 1; } 100% { opacity: 1; transform: scale(1); } }
@keyframes cover-shrink { from { transform: translateY(-50%) scale(1.02); } to { transform: translateY(-50%) scale(0); } }
@keyframes rise-up { to { opacity: 1; transform: none; } }
@keyframes track-in { to { opacity: 1; transform: none; } }
@keyframes curtain { to { transform: translateY(-100%); } }
@keyframes mark-up { to { transform: translateY(-60px); opacity: 0; } }
@media (max-width: 440px) { .head-actions .head-link[href="work.html"] { display: none; } }

/* ---------- Page-top bands on inner pages ---------- */
html.js main > .band:first-child .band-word { animation: word-in 1.1s var(--ease-out) calc(var(--intro, 0s) + .05s) both; }
html.js main > .band:first-child .band-copy > * { animation: rise-in var(--dur-5) var(--ease-out) both; }
html.js main > .band:first-child .band-copy > :nth-child(1) { animation-delay: calc(var(--intro, 0s) + .2s); }
html.js main > .band:first-child .band-copy > :nth-child(2) { animation-delay: calc(var(--intro, 0s) + .3s); }
html.js main > .band:first-child .band-copy > :nth-child(3) { animation-delay: calc(var(--intro, 0s) + .4s); }
html.js main > .band:first-child .band-copy > :nth-child(4) { animation-delay: calc(var(--intro, 0s) + .5s); }
/* Hero 3D canvas arrives with the rest of the hero */
html.js .hero .stage-art { animation: part-in var(--dur-5) var(--ease-out) calc(var(--intro, 0s) + .1s) both; }
/* the floating bar rises in on the first page of a visit only; after that it is simply there */
@media (max-width: 959px) { html.js:not(.seen) .dock { animation: dock-up var(--dur-4) var(--ease-out) calc(var(--intro, 0s) + .5s) both; } }
@keyframes dock-up { from { transform: translateY(100%); } }

/* ---------- Details that draw themselves when they scroll in ---------- */
html.js .checks[data-stagger] svg path { stroke-dasharray: 22; stroke-dashoffset: 22; }
html.js .checks[data-stagger].in svg path { stroke-dashoffset: 0; transition: stroke-dashoffset var(--dur-4) var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms + .25s); }
html.js .steps[data-stagger] li::after { transform: scaleY(0); transform-origin: top; }
html.js .steps[data-stagger].in li::after { transform: none; transition: transform var(--dur-4) var(--ease-out); transition-delay: calc(var(--i, 0) * 110ms + .2s); }
html.js .steps[data-stagger] li::before { transform: scale(0); }
html.js .steps[data-stagger].in li::before { transform: none; transition: transform var(--dur-3) var(--ease-out); transition-delay: calc(var(--i, 0) * 110ms + .1s); }

/* ---------- Loading tiles ---------- */
.work-media.is-loading::after, .compare .layer.is-loading::after, .inside-canvas.is-loading::after {
  content: ""; position: absolute; inset: 0; background: var(--ghost); animation: tile-pulse 1.3s ease-in-out infinite;
}
.inside-canvas.is-loading::after { inset: 12% 10%; border-radius: var(--radius); background: var(--ink-2); }
.inside-canvas.is-loading::before { content: "Loading the 3D house"; position: absolute; left: 0; right: 0; top: 50%; z-index: 1; text-align: center; font-size: 14px; color: var(--on-ink-muted); }
@keyframes tile-pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.work-media img, .compare .layer img { opacity: 0; transition: opacity var(--dur-4) ease, transform var(--dur-5) var(--ease-out); }
.work-media img.is-in, .compare .layer img.is-in { opacity: 1; }
.work-media .ph, .compare .layer .ph { animation: fade-in var(--dur-3) ease both; }

@media (prefers-reduced-motion: reduce) {
  html.js .checks[data-stagger] svg path { stroke-dashoffset: 0; }
  html.js .steps[data-stagger] li::after, html.js .steps[data-stagger] li::before { transform: none; }
  .work-media.is-loading::after, .compare .layer.is-loading::after, .inside-canvas.is-loading::after { animation: none; opacity: .8; }
}

/* Start again in the 3D steps: a quick fade instead of playing everything backwards */
.inside-canvas { transition: opacity var(--dur-2) ease; }
.inside.is-rewinding .inside-canvas { opacity: 0; transition-duration: .25s; }
.inside.is-rewinding .chapter.is-active { opacity: 0; }
/* Desktop cinematic layer: JS moves these with the separate translate and scale
   properties, so they never fight the CSS entrance animations */
.work-media, .work-frame { transform-style: preserve-3d; transition: transform var(--dur-4) var(--ease-out); }

/* Labels pinned to the 3D model */
.tag3d { position: absolute; left: 0; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; pointer-events: none; opacity: 0; white-space: nowrap;
  font-size: 14px; font-weight: 700; line-height: 18px; color: var(--on-ink); text-shadow: 0 1px 2px rgba(15,26,46,.9), 0 0 12px rgba(15,26,46,.85); will-change: transform, opacity; }
.tag3d i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(195,200,212,.22); transform: translate(var(--dx, 0), var(--dy, 0)); }
.tag3d.is-left { flex-direction: row-reverse; }
@media (max-width: 420px) { .tag3d { font-size: 13px; } }
.inside-canvas { overflow: hidden; }

/* ---------- Guides ---------- */
.guide-list { list-style: none; margin: 0; padding: 6px 0; background: var(--card); border-radius: var(--radius); }
.guide-list a { display: grid; gap: 2px; padding: 14px 16px; text-decoration: none; transition: transform var(--dur-1) var(--ease-out); }
.guide-list a:active { transform: scale(.985); }
.guide-list strong { font-size: 17px; }
.guide-list .note { font-size: 15px; color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .guide-list a:hover strong { text-decoration: underline; text-decoration-color: var(--tap-edge); text-decoration-thickness: 2px; text-underline-offset: 3px; } }
.prose { max-width: 68ch; display: grid; gap: 16px; }
.prose h2 { margin: 24px 0 0; font-size: 23px; font-weight: 800; line-height: 1.25; text-wrap: balance; }
.prose p, .prose ul { margin: 0; }
.prose ul { padding-left: 20px; display: grid; gap: 8px; }
.prose li::marker { color: var(--tap-edge); }
.prose .answer { font-size: 19px; line-height: 1.55; }
.prose .guide-list { padding-left: 0; gap: 0; display: block; }
.prose .qa { margin: 0; }
.table-wrap { overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; background: var(--card); border-radius: var(--radius); overflow: hidden; }
.prose th, .prose td { text-align: left; padding: 10px 14px; }
.prose th { font-size: 14px; color: var(--muted); }
.prose tbody tr + tr td { box-shadow: inset 0 1px 0 var(--line); }
.prose td + td, .prose th + th { text-align: right; }
.prose-cta { display: grid; gap: 12px; justify-items: start; margin-top: 16px; padding: 20px; background: var(--card); border-radius: var(--radius); }
.sources { font-size: 15px; color: var(--muted); }

/* Cards lift off the ground a little more in both themes */
.services, .qa details, .guide-list, .facts, .q-opt, .q-rows, .prose-cta, .prose table, .choice { box-shadow: 0 1px 2px rgba(15,26,46,.08), 0 6px 18px -10px rgba(15,26,46,.25); }
.q-opt { box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px rgba(15,26,46,.06); }

/* ---------- Cinematic layer (MotionSite-style moves, in the brand) ---------- */
/* 1. Headlines arrive word by word, out of a soft blur */
html.js [data-words] .w { display: inline-block; opacity: 0; filter: blur(12px); transform: translateY(.32em); }
html.js [data-words].in .w { opacity: 1; filter: none; transform: none;
  transition: opacity var(--dur-4) var(--ease-out), filter var(--dur-5) var(--ease-out), transform var(--dur-5) var(--ease-out);
  transition-delay: calc(var(--intro-gap, 0s) + var(--wi, 0) * 70ms); }
html.intro [data-words] { --intro-gap: var(--intro); }
/* 2. Frosted header over the page once you scroll */
.site-header { transition: background-color var(--dur-3) ease, box-shadow var(--dur-3) ease; }
.site-header.is-scrolled { background: rgba(15, 26, 46, .78); -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3); box-shadow: 0 1px 0 rgba(195, 200, 212, .12); }
/* 3. Bands open from a framed card to full bleed as they scroll in (desktop, set by script) */
.band.is-framed, .inside.is-framed { will-change: clip-path; }
/* 4. Theme switch: the new theme spreads out from the switch in a circle */
html.theme-morph::view-transition-old(root) { animation: none; }
html.theme-morph::view-transition-new(root) { animation: theme-reveal .8s var(--ease-io) both; }
html.theme-morph::view-transition-group(site-header) { animation-duration: .8s; }
@keyframes theme-reveal { from { clip-path: circle(0 at var(--vx, 50%) var(--vy, 0)); } to { clip-path: circle(150vmax at var(--vx, 50%) var(--vy, 0)); } }
@media (prefers-reduced-motion: reduce) {
  html.js [data-words] .w { opacity: 1; filter: none; transform: none; }
}

/* ---------- Desktop hero: full-bleed and cinematic ----------
   The 3D house fills the whole hero like a film frame. The giant word sits
   behind it, the copy floats over the left, and the zone buttons sit on a
   frosted panel. Letterbox bars open when the page starts. */
@media (min-width: 960px) {
  .hero { position: relative; }
  .hero-grid { position: static; min-height: min(calc(100svh - 60px), 900px); grid-template-columns: minmax(0, 440px) minmax(0, 1fr); grid-template-areas: "h1 ." "copy ."; grid-template-rows: auto 1fr; align-content: stretch; padding-block: 64px 72px; }
  .hero-visual { position: absolute; inset: 0; z-index: 0; grid-area: auto; }
  .hero-h1, .hero-copy { position: relative; z-index: 2; }
  .hero-copy { align-self: end; }
  .stage { position: absolute; inset: 0; --huge: clamp(180px, 21vw, 340px); }
  .stage-word { align-self: center; justify-self: end; margin-right: 3vw; line-height: .8; }
  .stage-art { position: absolute; inset: 0; margin: 0; aspect-ratio: auto; grid-area: auto; align-self: stretch; justify-self: stretch; width: auto; height: auto; }
  .stage-art .house { left: auto; right: 6%; bottom: 18%; width: min(46%, 560px); }
  .zone-tabs { position: absolute; z-index: 2; right: max(24px, calc((100vw - 1120px) / 2 + 16px)); bottom: 72px; margin: 0; width: 420px;
    padding: 8px; border-radius: 12px; background: rgba(15, 26, 46, .55); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
    box-shadow: 0 1px 0 rgba(195, 200, 212, .1) inset, 0 10px 30px -12px rgba(0, 0, 0, .5); }
  .heat-key { position: absolute; z-index: 2; right: max(24px, calc((100vw - 1120px) / 2 + 16px)); bottom: 32px; width: 420px; margin: 0; }
  .hero-hint { position: absolute; z-index: 2; right: max(24px, calc((100vw - 1120px) / 2 + 16px)); top: 28px; margin: 0; }
}
@media (min-width: 960px) and (prefers-reduced-motion: no-preference) {
  .hero::before, .hero::after { content: ""; position: absolute; left: 0; right: 0; z-index: 5; height: 10vh; background: #060b16; pointer-events: none; animation: bar-out 1.15s var(--ease-io) calc(var(--intro, 0s) + .15s) both; }
  .hero::before { top: 0; transform-origin: top; }
  .hero::after { bottom: 0; transform-origin: bottom; }
  @keyframes bar-out { from { transform: scaleY(1); } to { transform: scaleY(0); } }
}

/* ---------- Hero follows the theme ----------
   Light: a pale frost ground, so the thermal house reads like a printed thermal image.
   Dark: the original midnight. Header and bands stay midnight in both. */
:root { --hero-bg: #F1F2F4; --hero-fg: #0F1A2E; --hero-muted: #4A5268; --hero-ghost: #D3D7E4; --hero-tab: #FFFFFF; --hero-glass: rgba(255, 255, 255, .62); --hero-ground: #DCE1EA; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --hero-bg: #0F1A2E; --hero-fg: #FFFFFF; --hero-muted: #C3C8D4; --hero-ghost: #1A2742; --hero-tab: #0F1A2E; --hero-glass: rgba(15, 26, 46, .55); --hero-ground: #131E35; } }
:root[data-theme="dark"] { --hero-bg: #0F1A2E; --hero-fg: #FFFFFF; --hero-muted: #C3C8D4; --hero-ghost: #1A2742; --hero-tab: #0F1A2E; --hero-glass: rgba(15, 26, 46, .55); --hero-ground: #131E35; }
.hero { background: var(--hero-bg); color: var(--hero-fg); transition: background-color var(--dur-3) ease, color var(--dur-3) ease; }
.hero .stage-word { color: var(--hero-ghost); }
.hero-h1, .hero .zone-sub, .hero .trust, .hero .heat-key, .hero .hero-hint { color: var(--hero-muted); }
.hero .zone-tab { background: var(--hero-tab); color: var(--hero-fg); }
.hero .zone-tab[aria-pressed="true"] { background: var(--tap); color: var(--tap-ink); }
.hero .more.on-ink { color: var(--hero-fg); text-decoration-color: var(--tap-edge); }
@media (min-width: 960px) { .hero .zone-tabs { background: var(--hero-glass); } }

/* ---------- Each theme designed, not just darkened ----------
   Light: the 3D steps sit on a clean white studio ground, so the wood and insulation read
   like a scale model. Dark: they stay on midnight with a cool rim light for drama. Cards in
   dark lift with a soft top highlight instead of a shadow, which would vanish there. */
:root { --inside-bg: #0F1A2E; --inside-fg: #FFFFFF; --inside-muted: #C3C8D4; --inside-line: #1A2742; --tag-halo: rgba(15, 26, 46, .92); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --inside-bg: #182540; --inside-fg: #FFFFFF; --inside-muted: #C3C8D4; --inside-line: #0F1A2E; --tag-halo: rgba(24, 37, 64, .92); } }
:root[data-theme="dark"] { --inside-bg: #182540; --inside-fg: #FFFFFF; --inside-muted: #C3C8D4; --inside-line: #0F1A2E; --tag-halo: rgba(24, 37, 64, .92); }
.inside { background: var(--inside-bg); color: var(--inside-fg); transition: background-color var(--dur-3) ease, color var(--dur-3) ease; }
.inside-copy .big { color: var(--inside-fg); }
.chapter p, .inside-hint, .inside-fallback, .inside-canvas.is-loading::before { color: var(--inside-muted); }
.inside-meter { background: var(--inside-line); }
.inside-meter i { background: var(--inside-muted); }
.inside .btn-line { color: var(--inside-fg); box-shadow: inset 0 0 0 2px var(--tap-edge); }
.inside-canvas.is-loading::after { background: var(--inside-line); }
.tag3d { color: var(--inside-fg); text-shadow: 0 0 2px var(--tag-halo), 0 0 10px var(--tag-halo), 0 0 18px var(--tag-halo); }
.tag3d i { box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 18%, transparent); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .services, :root:not([data-theme="light"]) .qa details, :root:not([data-theme="light"]) .guide-list,
  :root:not([data-theme="light"]) .facts, :root:not([data-theme="light"]) .q-rows, :root:not([data-theme="light"]) .prose-cta,
  :root:not([data-theme="light"]) .prose table { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 10px 24px -14px rgba(0, 0, 0, .7); }
  :root:not([data-theme="light"]) .site-header { box-shadow: 0 1px 0 rgba(195, 200, 212, .08); }
  :root:not([data-theme="light"]) .ph { background: #1F2B47; }
}
:root[data-theme="dark"] .services, :root[data-theme="dark"] .qa details, :root[data-theme="dark"] .guide-list,
:root[data-theme="dark"] .facts, :root[data-theme="dark"] .q-rows, :root[data-theme="dark"] .prose-cta,
:root[data-theme="dark"] .prose table { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 10px 24px -14px rgba(0, 0, 0, .7); }
:root[data-theme="dark"] .site-header { box-shadow: 0 1px 0 rgba(195, 200, 212, .08); }
:root[data-theme="dark"] .ph { background: #1F2B47; }

/* Focus rings for keyboard users only: a tap never leaves a box around a button or title */
html.using-pointer :focus-visible { outline: none; }
html.using-pointer .compare:has(input:focus-visible) { outline: none; }

/* ---------- The rhythm between dark and light grounds ----------
   Light mode: midnight header, frost hero, midnight 3D band, frost sections, petrol bids band,
   midnight footer. Dark mode keeps the same alternation one step darker: midnight page and hero,
   midnight-2 for the 3D band, plain bands and the footer, so sections still read as separate.
   Every colour here is a design-system token. */
.band:not(.petrol), .site-footer { --band-ground: #0F1A2E; --band-ghost: #1A2742; }
.band:not(.petrol) { background: var(--band-ground); }
.band:not(.petrol) .band-word { color: var(--band-ghost); }
.site-footer { background: var(--band-ground); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .band:not(.petrol), :root:not([data-theme="light"]) .site-footer { --band-ground: #182540; --band-ghost: #0F1A2E; }
  :root:not([data-theme="light"]) .services, :root:not([data-theme="light"]) .guide-list, :root:not([data-theme="light"]) .qa details { background: #182540; }
}
:root[data-theme="dark"] .band:not(.petrol), :root[data-theme="dark"] .site-footer { --band-ground: #182540; --band-ghost: #0F1A2E; }
.dock { background: #0F1A2E; }

/* ---------- Guide illustrations (original, drawn in the brand's thermal scale) ---------- */
.fig { margin: 8px 0 0; display: grid; gap: 10px; }
.fig svg { display: block; width: 100%; height: auto; }
.fig figcaption { font-size: 14px; color: var(--muted); }
.fig .f-bg { fill: var(--card); }
.fig .f-lab { fill: var(--fg); font: 700 15px var(--body); }
.fig .f-sub { fill: var(--muted); font: 400 13px var(--body); }
.fig .f-wood { fill: #9C7E45; }
.fig .f-wood2 { fill: #D8C08D; }
.fig .f-ins { fill: #F1E6C8; stroke: #D8C08D; stroke-width: 1; }
.fig .f-dry { fill: var(--line); }
.fig .f-roof { fill: #182540; }
.fig .f-wall { fill: #1D4D57; }
.fig .f-found, .fig .f-ground { fill: #4A5268; }
.fig .f-heat { fill: #B5654A; } .fig .f-heat-s { stroke: #B5654A; stroke-width: 3; fill: none; stroke-linecap: round; }
.fig .f-cool { fill: #2A6B77; } .fig .f-cool-s { stroke: #2A6B77; stroke-width: 3; fill: none; stroke-linecap: round; }
.fig .f-lead, .fig .f-line { stroke: var(--muted); stroke-width: 1.5; fill: none; }
.fig .f-line { stroke-width: 3; }
.fig .f-dot { fill: var(--fg); }
.fig .f-hotdot { fill: #B5654A; } .fig .f-gooddot { fill: #2A6B77; }
.fig .f-node { fill: var(--paper); stroke: var(--line); stroke-width: 1.5; }
.fig .f-warn { stroke: #D8C08D; stroke-width: 2; } .fig .f-hot { stroke: #B5654A; stroke-width: 2; } .fig .f-good { stroke: #2A6B77; stroke-width: 2; }
.fig .f-flow { stroke: var(--muted); stroke-width: 2; fill: none; } .fig .f-arrowhead { fill: var(--muted); }
/* the heat arrows drift up gently once the figure is on screen */
@media (prefers-reduced-motion: no-preference) {
  .fig.in .f-heat-s, .fig.in .f-heat { animation: heat-rise 2.4s ease-in-out infinite; }
  @keyframes heat-rise { 0%, 100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(-6px); opacity: .7; } }
}

/* ---------- Scroll-driven details ---------- */
.site-header { position: sticky; }
.scroll-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--on-ink-muted); transform-origin: left; transform: scaleX(0); pointer-events: none; opacity: .7; }
/* the "How a job goes" line fills as you read down it */
.steps { position: relative; }
.steps::after { content: ""; position: absolute; left: 10px; top: 24px; bottom: 28px; width: 2px; background: var(--fg); transform-origin: top; transform: scaleY(var(--fill, 0)); pointer-events: none; }

/* ---------- Spring motion ---------- */
:root { --spring: cubic-bezier(.22, 1.2, .36, 1); }
@supports (transition-timing-function: linear(0, 1)) {
  :root { --spring: linear(0, .06 3%, .22 7%, .45 12%, .68 18%, .85 25%, .95 32%, 1.01 40%, 1.025 48%, 1.02 56%, 1.005 70%, 1); }
}
/* a sheet that grows out of the button you tapped skips its slide-up */
dialog.is-morph > * { animation: morph-content var(--dur-3) var(--ease-out) var(--dur-1) both; }
@keyframes morph-content { from { opacity: 0; transform: translateY(10px); } }
/* guide cards grow into the guide's header on the next page */
::view-transition-group(*) { animation-duration: .6s; animation-timing-function: var(--spring); }
::view-transition-old(root) { animation: vt-out var(--dur-1) ease both; }
::view-transition-new(root) { animation: vt-in var(--dur-3) var(--ease-out) .06s both; }
/* on a page-to-page navigation the hero doesn't replay its entrance under the transition */
html.vt-nav .hero .stage-word, html.vt-nav .hero .house .zone, html.vt-nav .hero .zone-tabs, html.vt-nav .hero .heat-key,
html.vt-nav .hero-copy > *, html.vt-nav .hero .stage-art, html.vt-nav main > .band:first-child .band-word, html.vt-nav main > .band:first-child .band-copy > * { animation: none !important; }
/* the 2D drawing is only a fallback: hidden while the 3D loads, shown only if 3D can't run */
html.js .stage-art .house { opacity: 0; }
html.js .stage-art.no-3d .house { opacity: 1; }
/* question answers open and close with a spring (script sets the height) */
.qa details { overflow: hidden; }

/* ---------- Heat check: the closing call to action ---------- */
.heatcheck { background: var(--band-ground, #0F1A2E); color: var(--on-ink); padding-block: 64px 72px; }
.heatcheck .big { color: var(--on-ink); margin: 0 0 12px; max-width: 16ch; }
.hc-lede { margin: 0 0 28px; color: var(--on-ink-muted); max-width: 46ch; }
.hc-grid { display: grid; gap: 12px; }
.hc-card { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr) 24px; grid-template-rows: auto auto; column-gap: 16px; align-items: center; padding: 14px 16px 14px 12px; border: 0; border-radius: 16px; background: #182540; color: var(--on-ink); font: inherit; text-align: left; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(195, 200, 212, .1); transition: transform var(--dur-3) var(--spring), box-shadow var(--dur-2) ease; }
.hc-card .hc-house { grid-row: 1 / span 2; width: 96px; height: auto; }
.hc-card strong { font-size: 20px; font-weight: 800; align-self: end; }
.hc-card span { font-size: 15px; color: var(--on-ink-muted); align-self: start; }
.hc-card .hc-arrow { grid-row: 1 / span 2; grid-column: 3; color: var(--tap); transition: transform var(--dur-3) var(--spring); }
.hc-card:active { transform: scale(.97); }
.hc-house .hc-cool { fill: #2A6B77; } .hc-house .hc-hot { fill: #D8C08D; } .hc-house .hc-win { fill: #0F1A2E; opacity: .55; }
@media (prefers-reduced-motion: no-preference) {
  .hc-house .hc-hot { animation: hc-glow 2.2s ease-in-out infinite; }
  @keyframes hc-glow { 0%, 100% { fill: #B5654A; } 50% { fill: #F1E6C8; } }
}
@media (hover: hover) and (pointer: fine) {
  .hc-card:hover { transform: translateY(-4px); box-shadow: inset 0 1px 0 rgba(195, 200, 212, .14), inset 0 0 0 2px var(--tap); }
  .hc-card:hover .hc-arrow { transform: translateX(5px); }
}
.hc-alt { margin: 22px 0 0; color: var(--on-ink-muted); }
.hc-alt a { color: var(--on-ink); text-decoration-color: var(--tap); }
@media (min-width: 720px) {
  .hc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .hc-card { grid-template-columns: minmax(0, 1fr) 24px; grid-template-rows: auto auto auto; padding: 20px; row-gap: 6px; }
  .hc-card .hc-house { grid-row: 1; grid-column: 1 / span 2; width: 100%; max-width: 160px; margin-bottom: 10px; }
  .hc-card strong, .hc-card span { grid-column: 1; }
  .hc-card .hc-arrow { grid-row: 2 / span 2; grid-column: 2; }
}
@media (min-width: 960px) { .heatcheck { padding-block: 96px 104px; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .heatcheck { --band-ground: #182540; } :root:not([data-theme="light"]) .hc-card { background: #0F1A2E; } }
:root[data-theme="dark"] .heatcheck { --band-ground: #182540; }
:root[data-theme="dark"] .hc-card { background: #0F1A2E; }

/* ---------- Guide pages: more contrast ----------
   Light: the article reads on white, with figures and tables on frost.
   Dark: the article reads on midnight, with figures and tables on midnight-2. */
article.section { background: var(--article-bg, #FFFFFF); }
article .fig .f-bg { fill: var(--article-panel, #F1F2F4); }
article .prose table, article .qa details, article .guide-list { background: var(--article-panel, #F1F2F4); box-shadow: none; }
article .prose .answer { padding: 18px 20px; border-radius: 12px; background: #0F1A2E; color: #FFFFFF; font-weight: 500; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --article-bg: #0F1A2E; --article-panel: #182540; } :root:not([data-theme="light"]) article .prose .answer { background: #182540; } }
:root[data-theme="dark"] { --article-bg: #0F1A2E; --article-panel: #182540; }
:root[data-theme="dark"] article .prose .answer { background: #182540; }
@media (min-width: 720px) {
  .hc-card { align-content: start; align-items: start; }
  .hc-card strong, .hc-card span { align-self: start; }
  .hc-card .hc-arrow { align-self: end; margin-bottom: 2px; }
}

/* ---------- Timeline states: upcoming, current, done ----------
   The reading line sits at 62% of the screen. Each step's line fills as you pass it,
   its dot fills and draws a check when it's done, and the current step pulses. */
.steps.has-states::after { display: none; }
.steps.has-states li::before { display: none; }
.steps.has-states li::after { background: var(--line); }
.st-dot { position: absolute; left: 3px; top: 5px; z-index: 1; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%;
  background: var(--paper); box-shadow: inset 0 0 0 2px var(--line); transition: background-color var(--dur-3) ease, box-shadow var(--dur-3) ease, transform var(--dur-4) var(--spring); }
.st-dot svg { width: 12px; height: 12px; fill: none; stroke: var(--paper); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset var(--dur-3) var(--ease-out) .1s; }
.st-seg { position: absolute; left: 10px; top: 24px; bottom: 4px; width: 2px; background: var(--fg); transform-origin: top; transform: scaleY(var(--seg, 0)); pointer-events: none; }
.steps.has-states li:last-child .st-seg { display: none; }
.steps.has-states li > div { transition: opacity var(--dur-3) ease, transform var(--dur-4) var(--spring); opacity: .85; }   /* .85, not .45: the waiting steps keep 4.5:1 contrast (axe, 22 Nov 2026) */
.steps.has-states li.is-active > div, .steps.has-states li.is-done > div { opacity: 1; }
.steps.has-states li.is-active > div { transform: translateX(4px); }
.steps.has-states li.is-active .st-dot { box-shadow: inset 0 0 0 2px var(--fg); transform: scale(1.25); }
.steps.has-states li.is-active .st-dot::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; box-shadow: 0 0 0 2px var(--fg); opacity: 0; animation: st-ping 1.8s ease-out infinite; }
@keyframes st-ping { 0% { transform: scale(.6); opacity: .5; } 100% { transform: scale(1.5); opacity: 0; } }
.steps.has-states li.is-done .st-dot { background: var(--fg); box-shadow: inset 0 0 0 2px var(--fg); }
.steps.has-states li.is-done .st-dot svg { stroke-dashoffset: 0; }
/* the last step, the install, finishes in thermal-cool: heat kept in */
.steps.has-states li:last-child.is-done .st-dot { background: #2A6B77; box-shadow: inset 0 0 0 2px #2A6B77; }
.band .steps.has-states .st-dot, .band .steps.has-states .st-seg { --paper: #0F1A2E; --fg: #FFFFFF; --line: #1A2742; }

/* ---------- Quote flow tracker ---------- */
.q-track { display: flex; align-items: center; margin: 2px 0 18px; padding: 0; list-style: none; }
.qt-node { display: flex; align-items: center; flex: 1; }
.qt-node:last-child { flex: none; }
.qt-dot { position: relative; display: grid; place-items: center; flex: none; width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line); background: var(--paper); transition: background-color var(--dur-2) ease, box-shadow var(--dur-2) ease; }
.qt-dot svg { width: 12px; height: 12px; fill: none; stroke: var(--paper); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.qt-link { position: relative; flex: 1; height: 2px; margin: 0 4px; background: var(--line); overflow: hidden; border-radius: 1px; }
.qt-link::after { content: ""; position: absolute; inset: 0; background: var(--fg); transform-origin: left; transform: scaleX(0); }
.qt-link.is-full::after { transform: scaleX(1); }
.qt-node.done .qt-dot { background: var(--fg); box-shadow: inset 0 0 0 2px var(--fg); }
.qt-node.done .qt-dot svg { stroke-dashoffset: 0; }
.qt-node.active .qt-dot { box-shadow: inset 0 0 0 2px var(--tap-edge); transform: scale(1.15); }
.qt-node.active .qt-dot::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; box-shadow: 0 0 0 2px var(--tap-edge); opacity: 0; animation: st-ping 1.8s ease-out infinite; }
@media (prefers-reduced-motion: no-preference) {
  .qt-link.just-filled::after { animation: qt-fill var(--dur-3) var(--ease-out) both; }
  @keyframes qt-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  .qt-node.just-done .qt-dot { animation: qt-pop var(--dur-4) var(--spring) .3s both; }
  .qt-node.just-done .qt-dot svg { animation: qt-check var(--dur-3) var(--ease-out) .45s both; }
  @keyframes qt-pop { 0% { background: var(--paper); transform: scale(.7); } 100% { background: var(--fg); transform: scale(1); } }
  @keyframes qt-check { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
  .qt-node.active .qt-dot { animation: qt-arrive var(--dur-4) var(--spring) .55s both; }
  @keyframes qt-arrive { from { transform: scale(.6); } to { transform: scale(1.15); } }
}
@media (prefers-reduced-motion: reduce) {
  .steps.has-states li > div { opacity: 1; transform: none; }
  .steps.has-states li.is-active .st-dot::after, .qt-node.active .qt-dot::after { animation: none; }
}
.steps.has-states li > div { grid-column: 2; }

/* ---------- Dock: compact on the way down, label rolls with the section ---------- */
.dock-text { position: relative; display: grid; overflow: hidden; height: 38px; align-content: center; }
.dock-roll { grid-area: 1 / 1; display: grid; line-height: 1.15; transition: transform var(--dur-3) var(--spring), opacity var(--dur-2) ease; }
.dock-roll strong { font-size: 17px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-roll small { font-size: 12.5px; font-weight: 600; opacity: .78; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity var(--dur-2) ease, max-height var(--dur-3) var(--spring); max-height: 18px; }
.dock-roll.is-in { animation: roll-in var(--dur-3) var(--spring) both; }
.dock-roll.is-out { animation: roll-out var(--dur-2) ease both; }
@keyframes roll-in { from { transform: translateY(105%); opacity: 0; } }
@keyframes roll-out { to { transform: translateY(-105%); opacity: 0; } }
.dock { transition: transform var(--dur-4) var(--spring), padding var(--dur-3) var(--spring), left var(--dur-3) var(--spring), right var(--dur-3) var(--spring), border-radius var(--dur-3) var(--spring); }
.dock-main, .dock-round { transition: height var(--dur-3) var(--spring), transform var(--dur-2) var(--spring), border-radius var(--dur-3) var(--spring); }
.dock.is-compact { padding: 5px; left: max(28px, env(safe-area-inset-left, 0px)); right: max(28px, env(safe-area-inset-right, 0px)); grid-template-columns: 44px minmax(0, 1fr) 44px; border-radius: 18px; }
.dock.is-compact .dock-main, .dock.is-compact .dock-round { height: 44px; border-radius: 13px; }
.dock.is-compact .dock-text { height: 24px; }
.dock.is-compact .dock-roll small { opacity: 0; max-height: 0; }
.dock.is-compact .dock-roll strong { font-size: 16px; }
.steps.has-states li::after { z-index: 0; } .steps.has-states .st-seg { z-index: 1; } .steps.has-states .st-dot { z-index: 2; }

/* ---------- Steady scrolling ----------
   The dock squeezes with a transform only, so nothing around it reflows. The header keeps
   one look while scrolling. Looping decorations are gone. */
.dock, .dock.is-compact { left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); grid-template-columns: 54px minmax(0, 1fr) 54px; padding: 7px; border-radius: 22px; }
.dock { transform-origin: 50% 100%; transition: transform var(--dur-4) var(--spring); will-change: transform; }
.dock.is-compact { transform: scale(.9) translateY(6px); }
.dock.is-compact .dock-main, .dock.is-compact .dock-round { height: 54px; border-radius: 16px; }
.dock.is-compact .dock-text { height: 38px; }
.dock.is-compact .dock-roll strong { font-size: 17px; }
.dock.is-compact .dock-roll small { opacity: 1; max-height: 18px; }
.dock-heat b { animation: none !important; }
.site-header, .site-header.is-scrolled { background: rgba(15, 26, 46, .9); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.hc-house .hc-hot { animation: none !important; fill: #D8C08D; }
.fig.in .f-heat-s, .fig.in .f-heat { animation: none !important; }
.steps.has-states li.is-active .st-dot::after { animation: none; display: none; }

/* ---------- What do you need? ---------- */
.tasks { display: grid; gap: 10px; margin-top: 8px; }
.task { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 76px; padding: 14px 18px; border: 0; border-radius: 14px; background: var(--card); color: var(--fg); font: inherit; text-align: left; text-decoration: none; cursor: pointer;
  box-shadow: 0 1px 2px rgba(15,26,46,.08), 0 6px 18px -10px rgba(15,26,46,.25); transition: transform var(--dur-2) var(--spring); }
.task:active { transform: scale(.98); }
.task-text { display: grid; gap: 2px; }
.task-text strong { font-size: 19px; font-weight: 800; }
.task-text span { font-size: 15px; color: var(--muted); }
.task-arrow { flex: none; color: var(--tap-edge); transition: transform var(--dur-2) var(--spring); }
.task-main { background: var(--tap); color: var(--tap-ink); min-height: 96px; }
.task-main .task-text span { color: var(--tap-ink); opacity: .8; }
.task-main .task-arrow { color: var(--tap-ink); }
@media (hover: hover) and (pointer: fine) { .task:hover .task-arrow { transform: translateX(4px); } .task:not(.task-main):hover strong { text-decoration: underline; text-decoration-color: var(--tap-edge); text-decoration-thickness: 2px; text-underline-offset: 4px; } }
@media (min-width: 760px) { .tasks { grid-template-columns: 1fr 1fr; gap: 14px; } .task-main { grid-column: 1 / -1; } }
.steps-go { margin-top: 28px; }
.qt-node.active .qt-dot::after { animation: none; display: none; }

/* ---------- Jobs without photos: a thermal house drawing ---------- */
.work-media.is-art { display: grid; place-items: center; background: #182540; }
.work-media .job-art { width: 62%; height: auto; transition: transform var(--dur-5) var(--ease-out); }
.job-art .j-cool { fill: #2A6B77; } .job-art .j-hot { fill: #D8C08D; } .job-art .j-win { fill: #0F1A2E; opacity: .55; } .job-art .j-door { fill: #0F1A2E; opacity: .4; }
@media (hover: hover) and (pointer: fine) { .work-card:hover .job-art { transform: scale(1.04); } }
.media-tag { position: absolute; left: 10px; bottom: 10px; padding: 0; font-size: 13px; font-weight: 700; color: #FFFFFF; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.viewer-media { display: grid; gap: 8px; }
.viewer-media .work-media { border-radius: var(--radius); }
.work-media img { opacity: 0; transition: opacity var(--dur-4) ease, transform var(--dur-5) var(--ease-out); }
.work-media img.is-in, .compare img.is-in { opacity: 1; }
/* the dock label: old words leave quickly, new words arrive just after, never both at once */
.dock-roll.is-out { animation: roll-out var(--dur-1) ease both; }
.dock-roll.is-in { animation: roll-in var(--dur-3) var(--spring) .12s both; }

/* closing morph: the backdrop fades with the shrinking panel */


/* ---------- Sheet presentation (driven by the spring in app.js) ---------- */
@supports (transition-timing-function: linear(0, 1)) {
  :root { --spring-smooth: linear(0, .055 5%, .175 10%, .312 15%, .445 20%, .562 25%, .66 30%, .74 35%, .803 40%, .852 45%, .89 50%, .919 55%, .94 60%, .956 65%, .968 70%, .977 75%, .983 80%, .988 85%, .991 90%, .994 95%, 1); }
}
dialog.sheet::backdrop, dialog.viewer::backdrop { background: transparent; }
/* the dim layer: under the sheet, over the page; app.js sets its opacity every frame */
.sheet-scrim { position: fixed; inset: 0; z-index: 2147483000; background: #000; opacity: 0; pointer-events: none; }
dialog.sheet, dialog.viewer { will-change: transform; transform: translate3d(0, 100%, 0); }
@media (min-width: 960px) { dialog.sheet, dialog.viewer { transform: none; opacity: 0; } }
dialog.is-presented { transform: none; }
dialog.is-morph { opacity: 1 !important; transform: none !important; }
/* the page recedes behind a phone sheet, over a darker ground, as on iOS */
html.sheet-on { background: #04070d; }
html.sheet-on body { background: transparent; }
html.sheet-on main, html.sheet-on .site-footer { background-color: var(--paper); }
html.sheet-on .dock { pointer-events: none; transition: none; }
/* grabber: the native cue that the sheet can be pulled down */
.grabber { display: none; }
@media (max-width: 959px) {
  .grabber { display: block; position: absolute; top: 5px; left: 50%; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: var(--muted); opacity: .45; }
  .sheet-head, .viewer-head { touch-action: none; cursor: grab; }
  .viewer-head { position: relative; padding-top: 14px; }
  dialog.is-dragging, dialog.is-dragging .sheet-head { cursor: grabbing; }
  dialog.sheet, dialog.viewer { box-shadow: 0 -1px 0 var(--line), 0 -12px 40px rgba(0, 0, 0, .18); }
}
@media (prefers-reduced-motion: reduce) {
  dialog.sheet, dialog.viewer { transform: none; opacity: 0; }
}

/* placeholder job cards, replaced by assets/work.js as soon as it runs */
.work-card.is-ghost { cursor: default; pointer-events: none; }
.work-card.is-ghost strong, .work-card.is-ghost .note { display: block; color: transparent; }

/* ---------- Quote: last step form, photos, fallback ---------- */
.q-form { display: grid; gap: 14px; }
.q-photos { display: grid; gap: 10px; }
.q-photo-add { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 12px 14px; border: 1.5px dashed var(--field); border-radius: var(--radius); color: var(--fg); font-weight: 600; cursor: pointer; transition: border-color var(--dur-1) var(--ease-out), background-color var(--dur-1) var(--ease-out); }
.q-photo-add::before { content: "+"; display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: var(--radius); background: var(--tap); color: var(--tap-ink); font-size: 20px; line-height: 1; }
.q-photo-add:hover { border-color: var(--tap-edge, var(--tap)); }
.q-photos input:focus-visible + .q-photo-add { outline: 3px solid var(--tap); outline-offset: 2px; }
.q-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.q-thumbs:empty { display: none; }
.q-thumb { position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--card); }
.q-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.q-thumb-x { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border: 0; border-radius: var(--radius); background: rgba(15, 26, 46, .78); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.q-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.q-fallback { display: grid; gap: 12px; padding-top: 6px; }
.q-form .btn[disabled] { opacity: .7; cursor: progress; }

/* ---------- Reviews (only real ones, from assets/reviews.js) ---------- */
.reviews { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); margin-block: 24px; }
.review { margin: 0; display: grid; gap: 14px; align-content: start; padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.review blockquote { margin: 0; font-size: 1.06rem; line-height: 1.55; }
.review figcaption { display: grid; gap: 2px; }
.review figcaption span { color: var(--muted); font-size: .92rem; }

/* ---------- Cost guide ---------- */
.fig .f-range { fill: #2A6B77; } .fig .f-range-hot { fill: #B5654A; }
.price-table { width: 100%; border-collapse: collapse; font-size: .98rem; }
.price-table th, .price-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.price-table thead th { font-size: .9rem; color: var(--muted); font-weight: 600; }
.price-table tbody th { font-weight: 700; }
.price-table td:nth-child(2) { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
/* ---------- Areas we serve ---------- */
.areas { display: grid; gap: 28px 40px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); margin-bottom: 32px; }
.area-group h2 { font-size: 1.15rem; margin: 0 0 10px; }
.area-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.area-list li { padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.price-table tbody th span { display: block; margin-top: 3px; color: var(--muted); font-weight: 400; font-size: .9rem; }
.price-table td:nth-child(2) { text-align: right; }
.price-table thead th:nth-child(2) { text-align: right; }

/* Still of the first 3D frame, shown while three.js loads, then crossfaded into the live house */
.hero-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; transition: opacity var(--dur-5) var(--ease-out); }
html:not(.js) .hero-poster, .stage-art.is-3d .hero-poster, .stage-art.no-3d .hero-poster { opacity: 0; }

/* ---------- Notched job cards: the corner of the photo is cut out and holds the job type ---------- */
.work-frame { position: relative; --notch-bg: var(--paper); --nr: 14px; }
.work-notch { position: absolute; right: 0; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 10px;
  padding: 10px 0 0 14px; background: var(--notch-bg); border-top-left-radius: var(--nr); font-size: 14px; font-weight: 700; color: var(--fg); }
.work-notch::before, .work-notch::after { content: ""; position: absolute; width: var(--nr); height: var(--nr); pointer-events: none;
  border-bottom-right-radius: var(--nr); box-shadow: calc(var(--nr) / 2) calc(var(--nr) / 2) 0 calc(var(--nr) / 2) var(--notch-bg); }
.work-notch::before { right: 0; top: calc(var(--nr) * -1); }
.work-notch::after { left: calc(var(--nr) * -1); bottom: 0; }
.work-notch i { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--tap); color: var(--tap-ink); transition: transform var(--dur-2) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .work-card:hover .work-notch i { transform: translate(2px, -2px); } }
.work-card:active .work-notch i { transform: scale(.94); }
.work-media .media-tag { right: auto; }
@media (prefers-reduced-motion: reduce) { .work-notch i { transition: none; } }

/* ---------- Rising R-value bars (R-value guide) ---------- */
.rbars { margin: 28px 0; --fibre: #D9CFBB; --fibre-edge: #C4B89F; --heat: #B5654A; --heat-glow: 181, 101, 74; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rbars { --fibre: #8D8574; --fibre-edge: #A59C88; --heat: #D8C08D; --heat-glow: 216, 192, 141; } }
:root[data-theme="dark"] .rbars { --fibre: #8D8574; --fibre-edge: #A59C88; --heat: #D8C08D; --heat-glow: 216, 192, 141; }
.rbars-plot { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; align-items: end;
  height: 280px; padding: 0 4px; border-bottom: 3px solid var(--fg); }
.rb { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; }
.rb-col { position: relative; display: block; height: calc(var(--d) / 16 * 210px * var(--grow, 1)); min-height: 2px;
  background: var(--fibre); border-radius: 4px 4px 0 0; box-shadow: inset 0 2px 0 var(--fibre-edge); transition: height var(--dur-2) linear; }
.rb-heat { position: absolute; left: 0; right: 0; top: -3px; height: 5px; border-radius: 3px; background: var(--heat);
  opacity: calc((0.15 + var(--loss) * 0.85) * var(--grow, 1)); box-shadow: 0 -2px calc(20px * var(--loss)) calc(5px * var(--loss)) rgba(var(--heat-glow), calc(.65 * var(--loss))); }
.rb-col em { position: absolute; left: 0; right: 0; bottom: calc(100% + 10px); text-align: center; font-style: normal; font-size: 13px; font-weight: 700; color: var(--muted); opacity: var(--grow, 1); }
.rb b { position: absolute; left: 0; right: 0; bottom: -30px; text-align: center; font-size: 15px; }
.rb small { position: absolute; left: 0; right: 0; bottom: -48px; text-align: center; font-size: 12.5px; color: var(--muted); }
.rbars-joist { position: absolute; left: 0; right: 0; bottom: calc(var(--d) / 16 * 210px); border-top: 2px dashed var(--muted); z-index: 1; pointer-events: none; }
.rbars-joist span { position: absolute; right: 0; top: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--paper); padding: 0 4px; }
.rbars figcaption { margin-top: 64px; }

/* a page opened through a view transition shows its top headline already in place, so it doesn't build a second time */
html.vt-nav .hero [data-words] .w, html.vt-nav main > .band:first-child [data-words] .w { opacity: 1; filter: none; transform: none; transition: none; }

/* ---------- Motion polish ---------- */
/* everyday UI settles without overshoot; only the quote sheet (its own spring) and drags keep a natural spring */
:root { --spring: cubic-bezier(.22, 1, .36, 1); }
/* things moving from one place to another ease in and out */
::view-transition-group(*) { animation-timing-function: var(--ease-io); }
::view-transition-group(site-header), ::view-transition-group(dock) { animation-duration: 0s; }
/* list rows arrive 35ms apart */
html.js [data-stagger].in > * { transition-delay: calc(var(--i, 0) * 35ms); }
html.js [data-reveal].in { transition-delay: calc(var(--i, 0) * 35ms); }
html.js .hero-copy > * { animation-delay: calc(var(--intro, 0s) + .35s + var(--i, 0) * 40ms); }
html.js .checks[data-stagger].in svg path { transition-delay: calc(var(--i, 0) * 35ms + .2s); }
html.js .steps[data-stagger].in li::after { transition-delay: calc(var(--i, 0) * 45ms + .15s); }
html.js .steps[data-stagger].in li::before { transition-delay: calc(var(--i, 0) * 45ms + .08s); }
/* one press: everything tapped shrinks to 0.97 */
.btn:active, .dock-main:active, .dock-round:active, .services button:active, .q-opt:active, .zone-tab:active,
.guide-list a:active, .hc-card:active, .task:active { transform: scale(.97); }
/* sent: a check draws in and one ring pulses out to confirm */
.q-done { position: relative; display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 4px; border-radius: 50%; background: var(--fg); color: var(--paper); }
.q-done svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: done-draw var(--dur-3) var(--ease-out) .12s forwards; }
.q-done { animation: done-in var(--dur-2) var(--ease-out) both; }
.q-done::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 2px var(--fg); opacity: 0; animation: done-pulse var(--dur-5) var(--ease-out) .3s; }
@keyframes done-in { from { transform: scale(.6); opacity: 0; } }
@keyframes done-draw { to { stroke-dashoffset: 0; } }
@keyframes done-pulse { from { opacity: .55; transform: scale(1); } to { opacity: 0; transform: scale(1.7); } }
/* theme icon: sun and moon crossfade with a little blur instead of swapping */
.theme-toggle { position: relative; }
.theme-toggle svg { grid-area: 1 / 1; display: block !important; transition: opacity var(--dur-2) ease, filter var(--dur-2) ease, transform var(--dur-3) var(--ease-out); }
.theme-toggle .moon { opacity: 0; filter: blur(4px); transform: scale(.6) rotate(-30deg); }
:root[data-theme="dark"] .theme-toggle .sun { opacity: 0; filter: blur(4px); transform: scale(.6) rotate(30deg); }
:root[data-theme="dark"] .theme-toggle .moon { opacity: 1; filter: none; transform: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle .sun { opacity: 0; filter: blur(4px); transform: scale(.6) rotate(30deg); }
  :root:not([data-theme]) .theme-toggle .moon { opacity: 1; filter: none; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .q-done, .q-done::after { animation: none; }
  .q-done svg { animation: none; stroke-dashoffset: 0; }
}
/* 3D labels sit on a quiet backing so they stay readable over the framing and the heat */
.tag3d span { padding: 3px 7px; border-radius: 4px; background: color-mix(in srgb, var(--tag-halo) 84%, transparent); text-shadow: none; }
.tag3d i { position: relative; z-index: 1; }
/* a task card left alone on the last row takes the full width */
@media (min-width: 760px) { .tasks > .task-main ~ .task:last-child:nth-child(even) { grid-column: 1 / -1; } }
/* the big background word builds in every time a page opens, through the page fade too (it plays once: the skip class never comes off, so it can't replay) */
@media (prefers-reduced-motion: no-preference) {
  html.vt-nav main > .band:first-child .band-word, html.vt-nav .hero .stage-word { animation: word-in 1.1s var(--ease-out) .05s both !important; }
}

/* Claims Singh hasn't confirmed yet: shown plainly on the preview, removed or kept at launch */
.tbc { font-weight: 600; color: #9a3412; white-space: nowrap; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tbc { color: #fdba74; } }
:root[data-theme="dark"] .tbc { color: #fdba74; }
.hero .tbc { color: #9a3412; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero .tbc { color: #fdba74; } }
:root[data-theme="dark"] .hero .tbc { color: #fdba74; }

/* ---------- The seal: page-to-page "layers" (inspired by the MGnetic studio site's wipe) ----------
   Tapping a link to another page slides two insulation panels shut from the sides. Where they meet, the seam glows
   clay (heat escaping), then on contact turns petrol (sealed) and the crest sets. The next page opens them again.
   Panels move with transform only; the glow is an opacity change on a pseudo-element, so it stays on the GPU. */
.seal { position: fixed; inset: 0; z-index: 2000; pointer-events: none; display: grid; grid-template-columns: 1fr 1fr; }
.seal > i { position: relative; overflow: hidden;
  background:
    repeating-linear-gradient(115deg, rgba(255,255,255,.035) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(65deg, rgba(255,255,255,.025) 0 1px, transparent 1px 7px),
    var(--ink);
  translate: calc(-100% - 16px) 0; transition: translate .55s var(--ease-out); }
.seal > i:first-child { margin-right: -1px; }
.seal > i + i { translate: calc(100% + 16px) 0; }
/* the seam: two layers so the colour change is a cross-fade, not a repaint of a big shadow */
.seal > i::before, .seal > i::after { content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: 5px; }
.seal > i + i::before, .seal > i + i::after { right: auto; left: 0; }
.seal > i::before { background: var(--clay); box-shadow: 0 0 48px 8px rgba(181,101,74,.45); }
.seal > i::after { background: var(--thermal-cool); box-shadow: 0 0 40px 6px rgba(42,107,119,.35); opacity: 0; transition: opacity .3s var(--ease-out); }
.seal .crest { position: absolute; left: 50%; top: 50%; width: 76px; height: auto; translate: -50% -50%; opacity: 0; scale: .7;
  transition: opacity .2s, scale .45s var(--spring-smooth); }
.seal.shut { pointer-events: auto; }
.seal.shut > i { translate: 0 0; transition: translate .34s var(--ease-io); }
.seal.shut .crest { opacity: 1; scale: 1; transition-delay: .22s; }
.seal.shut.sealed > i::after { opacity: 1; }
.seal.shut.sealed > i::before { animation: seal-flash .3s var(--ease-out); }
@keyframes seal-flash { 0% { filter: brightness(1.8); } 100% { filter: none; } }
html.seal-in .seal > i { translate: 0 0; transition: none; }
html.seal-in .seal .crest { opacity: 1; scale: 1; transition: none; }
html.seal-in .seal > i::after { opacity: 1; transition: none; }
html:not(.js) .seal { display: none; }
@media (prefers-reduced-motion: reduce) { .seal { display: none; } }

/* ---------- Thermal develop: job pictures arrive as a heat-camera image ----------
   Insulators read houses with thermal cameras. Each job picture comes on screen first as a heat map in the site's own
   heat key (midnight, petrol, clay, champagne-light), then the real picture develops through it from the top, once.
   The heat copy is a clone with an SVG gradient-map filter; only its mask moves. Off under Reduce Motion. */
@property --dev { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
.thermal { position: absolute; inset: 0; z-index: 2; pointer-events: none; filter: url(#si-thermal);
  -webkit-mask-image: linear-gradient(to bottom, transparent calc(var(--dev) - 30%), #000 var(--dev));
          mask-image: linear-gradient(to bottom, transparent calc(var(--dev) - 30%), #000 var(--dev)); }
.thermal > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 1 !important; transform: none !important; }
.thermal.go { --dev: 130%; transition: --dev 1.6s var(--ease-io) .35s; }
@media (prefers-reduced-motion: reduce) { .thermal { display: none; } }

/* ---------- Heat on touch: service cards show a heat bloom where the pointer or finger is ----------
   A thermal-camera spot in the heat key, behind the card's words (z-index -1 inside the card's own layer). */
.task, .hc-card { position: relative; isolation: isolate; overflow: hidden; }
.task > .heat, .hc-card > .heat { position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit; opacity: 0;
  background: radial-gradient(160px circle at var(--hx, 50%) var(--hy, 50%), rgba(241,230,200,.55), rgba(181,101,74,.32) 38%, rgba(42,107,119,.16) 64%, transparent 78%);
  transition: opacity var(--dur-2) var(--ease-out); }
.hc-card > .heat { background: radial-gradient(190px circle at var(--hx, 50%) var(--hy, 50%), rgba(241,230,200,.42), rgba(181,101,74,.46) 34%, rgba(42,107,119,.32) 60%, transparent 78%); }
@media (hover: hover) { .task:hover > .heat, .hc-card:hover > .heat { opacity: 1; } }
.task.is-warm > .heat, .hc-card.is-warm > .heat { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .task > .heat, .hc-card > .heat { transition: none; } }
/* the card's own ".hc-card span" rule (align-self: start, grid-column: 1) would collapse the heat layer to 0px tall */
.hc-card > span.heat, .task > span.heat { align-self: stretch; justify-self: stretch; grid-column: auto; grid-row: auto; font-size: 0; }
