:root {
  --ink: #2b2420;
  --muted: #6f6359;
  --paper: #fbf8f3;
  --card: #ffffff;
  --line: #e6ddd2;
  --accent: #9a5b3c;
  --accent-ink: #ffffff;
  --soft: #f3ebe1;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f1e9df; --muted: #bcae9f; --paper: #1d1916; --card: #262019; --line: #3a3129;
    --accent: #d99a76; --accent-ink: #1d1916; --soft: #2d251e;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--sans); }
a { color: var(--accent); }
img { max-width: 100%; display: block; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

header.site { border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.brand { font: 600 26px/1 var(--serif); letter-spacing: .02em; color: var(--ink); text-decoration: none; }
.brand b { color: var(--accent); font-weight: 600; }
nav a { color: var(--muted); text-decoration: none; margin-left: 18px; font-size: 15px; }
nav a:hover { color: var(--ink); }

.hero { padding: 72px 0 56px; }
.hero h1 { font: 500 clamp(40px, 7vw, 68px)/1.05 var(--serif); margin: 0 0 18px; }
.hero p.lede { font-size: 20px; color: var(--muted); max-width: 620px; margin: 0 0 28px; }
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); padding: 13px 22px; border-radius: 999px; text-decoration: none; font-weight: 600; border: 0; font-size: 16px; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

section { padding: 56px 0; border-top: 1px solid var(--line); }
section h2 { font: 500 clamp(30px, 4.5vw, 40px)/1.15 var(--serif); margin: 0 0 14px; }
section p.intro { color: var(--muted); max-width: 680px; margin: 0 0 32px; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.card h3 { font: 600 22px/1.25 var(--serif); margin: 0 0 8px; }
.card p { margin: 0; color: var(--muted); }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px 18px 64px; position: relative; }
.steps li::before { content: counter(step); position: absolute; left: 20px; top: 16px; width: 30px; height: 30px; border-radius: 50%; background: var(--soft); color: var(--accent); font-weight: 700; display: grid; place-items: center; }

.optin { background: var(--soft); }
form.signup { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: grid; gap: 14px; max-width: 560px; }
form.signup label { font-size: 14px; font-weight: 600; display: grid; gap: 6px; }
form.signup input[type=text], form.signup input[type=tel], form.signup input[type=email] {
  font: inherit; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); width: 100%;
}
.consent { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; font-size: 14px !important; color: var(--muted); }
.consent input { margin-top: 4px; flex: none; width: 18px; height: 18px; }
.fineprint { font-size: 13px; color: var(--muted); margin: 0; }
.status { font-size: 15px; margin: 0; min-height: 1.4em; }

.prose { max-width: 760px; }
.prose h1 { font: 500 clamp(34px, 5vw, 48px)/1.1 var(--serif); margin: 48px 0 8px; }
.prose h2 { font: 600 24px/1.3 var(--serif); margin: 32px 0 8px; }
.prose p, .prose li { color: var(--ink); }
.prose .updated { color: var(--muted); margin-top: 0; }

footer.site { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: 14px; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
footer.site a { color: var(--muted); }
@media (max-width: 560px) { nav a { margin-left: 12px; font-size: 14px; } .hero { padding-top: 48px; } }

/* ---- Home redesign (Oct 19): dark hero, tilting phone, before/after slider ---- */
body.home { --espresso: var(--hero); --cream: var(--on-dark); --terracotta: var(--brand); --sage: #8a9a7b; }
header.site.dark { background: var(--hero); border-bottom-color: var(--hero-line); }
header.site.dark .brand { color: var(--on-dark); }
header.site.dark .brand b { color: var(--brand-on-dark); }
header.site.dark nav a { color: var(--on-dark-muted); }
header.site.dark nav a:hover { color: #fff; }
.hero-dark { background: radial-gradient(1200px 500px at 80% 10%, var(--hero-glow) 0%, var(--hero) 60%); color: var(--on-dark); padding: 64px 0 80px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: 12px; color: var(--brand-on-dark); margin: 0 0 14px; font-weight: 700; }
.hero-dark h1 { font: 500 clamp(44px, 7.5vw, 84px)/1 var(--serif); margin: 0 0 22px; }
.hero-dark h1 em { color: var(--brand-on-dark); font-style: italic; }
.hero-dark .lede { color: var(--on-dark-muted); font-size: 19px; max-width: 560px; margin: 0 0 30px; }
.hero-dark .btn { background: var(--brand); color: #fff; }
.btn.ghost.light { background: transparent; color: var(--on-dark); border: 1px solid var(--hero-line2); }
.phone-stage { perspective: 1100px; display: grid; justify-items: center; gap: 14px; }
.phone { --rx: 6deg; --ry: -14deg; --pan: 0%; width: min(270px, 70vw); aspect-ratio: 9 / 19; border-radius: 40px; background: var(--hero-deep); padding: 12px; position: relative;
  box-shadow: 0 40px 80px rgba(0,0,0,.55), inset 0 0 0 2px var(--hero-line); transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .25s ease-out; }
.notch { position: absolute; top: 18px; left: 50%; width: 76px; height: 20px; border-radius: 12px; background: var(--hero-deep); transform: translateX(-50%); z-index: 2; }
.screen { position: relative; height: 100%; border-radius: 30px; overflow: hidden; background: #e9dccb; }
.pan { position: absolute; inset: 0 -45%; transform: translateX(var(--pan)); transition: transform .25s ease-out; }
.pan svg, .layer svg { width: 100%; height: 100%; display: block; }
.pill { position: absolute; left: 12px; font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 999px; backdrop-filter: blur(6px); }
.pill.live { top: 46px; background: rgba(31,23,18,.7); color: #fff; }
.pill.hint { bottom: 18px; background: rgba(255,255,255,.8); color: var(--hero); }
.phone-caption { color: var(--on-dark-muted); font-size: 14px; text-align: center; max-width: 280px; margin: 0; }

.stats { background: var(--brand); color: #fff; padding: 36px 0 18px; border-top: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.stats strong { display: block; font: 600 54px/1 var(--serif); }
.stats span { font-size: 15px; opacity: .95; }
.stats .source { font-size: 12px; opacity: .85; margin-top: 18px; }
.stats .source a { color: #fff; }

.two-col { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { padding-left: 30px; position: relative; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.compare { position: relative; aspect-ratio: 400 / 260; border-radius: 18px; overflow: hidden; box-shadow: 0 24px 50px rgba(60,35,20,.18); border: 1px solid var(--line); }
.compare .layer { position: absolute; inset: 0; }
.compare .after { clip-path: inset(0 0 0 var(--pos)); }
.compare .handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; background: #fff; transform: translateX(-50%); box-shadow: 0 0 0 1px rgba(0,0,0,.08); pointer-events: none; }
.compare .handle::after { content: "⟷"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--hero); display: grid; place-items: center; font-weight: 700; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.compare input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.tag { position: absolute; top: 12px; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: rgba(31,23,18,.72); color: #fff; pointer-events: none; }
.tag-before { left: 12px; } .tag-after { right: 12px; background: var(--brand); }

section.soft { background: var(--soft); }
section.soft .steps { margin-bottom: 28px; }
.services .card { position: relative; }
.card .num { font: 600 15px/1 var(--sans); color: var(--accent); letter-spacing: .1em; display: block; margin-bottom: 10px; }

@media (max-width: 860px) {
  .hero-grid, .two-col { grid-template-columns: 1fr; }
  .phone-stage { margin-top: 12px; }
  .stats-grid { grid-template-columns: 1fr; gap: 16px; }
  .stats strong { font-size: 44px; }
}
@media (prefers-reduced-motion: reduce) { .phone, .pan { transition: none; } }

/* ---- Declutter toggle (Oct 19) ---- */
.compare-wrap { display: grid; gap: 12px; }
.mode-toggle { display: inline-flex; background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 4px; justify-self: start; }
.mode-toggle button { font: 600 14px/1 var(--sans); border: 0; background: transparent; color: var(--muted); padding: 10px 16px; border-radius: 999px; cursor: pointer; min-height: 44px; }
.mode-toggle button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.compare-note { font-size: 13px; color: var(--muted); margin: 0; }
.compare { touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: ew-resize; }
/* the range input is for keyboards only now; dragging is handled on the picture itself */
.compare input[type=range] { inset: auto; left: 0; bottom: 0; width: 100%; height: 1px; pointer-events: none; }
.compare input[type=range]:focus-visible { opacity: 1; height: 24px; pointer-events: auto; }

/* ---- iPhone / mobile (Oct 19) ---- */
html { -webkit-tap-highlight-color: transparent; }
body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
header.site.dark { padding-top: env(safe-area-inset-top); }
footer.site { padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
.btn { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; }
/* 16px+ inputs stop iOS Safari zooming in on focus */
form.signup input[type=text], form.signup input[type=tel], form.signup input[type=email] { font-size: 16px; min-height: 48px; }
.consent input { width: 22px; height: 22px; }
.pill.hint { cursor: pointer; }
.phone.drift .pan { animation: drift 9s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translateX(14%); } to { transform: translateX(-14%); } }
@media (max-width: 860px) {
  .hero-dark { padding: 40px 0 56px; }
  .hero-dark h1 { font-size: clamp(42px, 12vw, 60px); }
  .hero-dark .lede { font-size: 17px; }
  .cta-row .btn { flex: 1 1 100%; }
  .phone { width: min(230px, 62vw); --rx: 4deg; --ry: -8deg; }
  section { padding: 44px 0; }
  .mode-toggle { justify-self: stretch; }
  .mode-toggle button { flex: 1; padding: 10px 8px; }
}
@media (max-width: 560px) {
  header.site nav a:not(.nav-cta) { display: none; }
  header.site nav a.nav-cta { padding: 8px 14px; margin-left: 0; }
  .brand { font-size: 23px; }
  .stats strong { font-size: 40px; }
  form.signup { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { .phone.drift .pan { animation: none; } }

/* Services: 4 across on desktop, 2x2 on tablets, stacked on phones (no orphan card) */
.grid.services { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .grid.services { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid.services { grid-template-columns: 1fr; } }

/* Nav: one-word items, spaced caps, and a pill CTA */
header.site nav { display: flex; align-items: center; gap: 28px; }
header.site nav a { margin-left: 0; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
header.site nav a.nav-cta { background: var(--brand); color: #fff; padding: 10px 20px; border-radius: 999px; letter-spacing: .12em; }
header.site nav a.nav-cta:hover { background: var(--brand-hover); color: #fff; }
@media (max-width: 560px) {
  header.site nav { gap: 0; }
  header.site nav a:not(.nav-cta) { display: none; }
  header.site nav a.nav-cta { padding: 9px 18px; }
}

/* Sign-up: top-aligned columns, sticky pitch, paired fields (no dead space) */
.signup-grid { align-items: start; grid-template-columns: 1fr 1.15fr; }
.signup-pitch { position: sticky; top: 24px; }
.signup-pitch .intro { margin-bottom: 24px; }
.gets { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.gets li { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.gets li span { font: 600 15px/1 var(--sans); color: var(--accent); letter-spacing: .1em; padding-top: 3px; }
.gets li strong { display: block; font: 600 20px/1.25 var(--serif); margin-bottom: 2px; }
.gets li div { color: var(--muted); font-size: 15px; }
form.signup { max-width: none; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 860px) {
  .signup-grid { grid-template-columns: 1fr; }
  .signup-pitch { position: static; }
}
@media (max-width: 560px) { .pair { grid-template-columns: 1fr; } }

.status:empty { display: none; }

/* Sign-up v2: equal-height columns, aligned tops and bottoms, numbers on the title line */
.signup-grid { align-items: stretch; }
.signup-pitch { position: static; display: flex; flex-direction: column; }
.signup-pitch h2 { margin-top: -6px; }
.gets { flex: 1; grid-auto-rows: 1fr; }
.gets li { align-content: center; }
.gets li span { line-height: 25px; padding-top: 0; }
form.signup { display: flex; flex-direction: column; gap: 14px; height: 100%; }
form.signup .fineprint { margin-top: auto; }
@media (max-width: 860px) { .gets { grid-auto-rows: auto; } form.signup { height: auto; } }

/* ---- Ask Debz chat (Oct 19) ---- */
.chat-fab { position: fixed; right: calc(18px + env(safe-area-inset-right)); bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 50;
  background: var(--hero); color: var(--on-dark); border: 1px solid var(--hero-line2); border-radius: 999px; padding: 14px 20px; min-height: 52px;
  font: 600 15px/1 var(--sans); box-shadow: 0 14px 34px rgba(31,23,18,.35); cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.chat-fab span { color: var(--brand-on-dark); font-size: 16px; }
.chat-fab:hover { background: var(--hero-hover); }
.chat-panel { position: fixed; right: 18px; bottom: 18px; z-index: 60; width: min(380px, calc(100vw - 36px)); height: min(560px, calc(100vh - 36px));
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 30px 70px rgba(31,23,18,.35); display: flex; flex-direction: column; overflow: hidden; }
.chat-panel[hidden] { display: none; }
.chat-head { background: var(--hero); color: var(--on-dark); padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; }
.chat-head strong { display: block; font: 600 20px/1.1 var(--serif); }
.chat-head span { font-size: 12px; color: var(--on-dark-muted); }
.chat-close { background: transparent; border: 0; color: var(--on-dark); font-size: 18px; width: 44px; height: 44px; cursor: pointer; border-radius: 50%; }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--paper); -webkit-overflow-scrolling: touch; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; }
.msg.assistant { background: var(--card); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 6px; }
.msg.user { background: var(--brand); color: #fff; align-self: flex-end; border-bottom-right-radius: 6px; }
.msg.typing { color: var(--muted); font-style: italic; }
.msg-cta { align-self: flex-start; font-weight: 600; font-size: 14px; color: var(--accent); text-decoration: none; padding: 4px 2px; }
.chat-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px; background: var(--paper); }
.chat-chips[hidden] { display: none; }
.chat-chips button { font: 600 13px/1 var(--sans); background: var(--card); border: 1px solid var(--line); color: var(--ink); padding: 10px 12px; border-radius: 999px; cursor: pointer; min-height: 40px; }
.chat-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--card); }
.chat-form input { flex: 1; font: 16px var(--sans); padding: 12px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); min-width: 0; }
.chat-form button { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; font-size: 18px; cursor: pointer; flex: none; }
.chat-foot { margin: 0; padding: 0 12px 10px; font-size: 11px; color: var(--muted); background: var(--card); text-align: center; }
.chat-foot a { color: var(--muted); }
@media (max-width: 560px) {
  .chat-fab { padding: 13px 18px; }
  /* Full-screen sheet on phones, clear of the notch and home bar */
  .chat-panel { inset: 0; width: 100%; height: 100dvh; border-radius: 0; border: 0; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
  body.chat-open { overflow: hidden; }
}

/* ---- Palettes (Oct 19): default "warm"; ?palette=coastal|gallery|luxe or the switcher ---- */
:root {
  --hero: #1f1712; --hero-deep: #0f0b09; --hero-glow: #4a2f22; --hero-line: #3a2c22; --hero-line2: #4a3a2f; --hero-hover: #2c211a;
  --brand: #c8734e; --brand-hover: #b5643f; --brand-on-dark: #e0916b; --on-dark: #f6efe6; --on-dark-muted: #cdbba8;
}
:root[data-palette="coastal"] {
  --hero: #0f2a3d; --hero-deep: #08182a; --hero-glow: #1f5168; --hero-line: #24445a; --hero-line2: #2e5670; --hero-hover: #163a52;
  --brand: #1f7f80; --brand-hover: #176a6b; --brand-on-dark: #7fd3cf; --on-dark: #f4f8f8; --on-dark-muted: #b9cfd6;
  --paper: #fbfcfb; --soft: #eaf3f1; --card: #ffffff; --line: #d7e5e3; --ink: #13283a; --muted: #56707d; --accent: #1f7a7a; --accent-ink: #ffffff;
}
:root[data-palette="gallery"] {
  --hero: #18181b; --hero-deep: #0c0c0e; --hero-glow: #3a3a40; --hero-line: #2e2e33; --hero-line2: #3f3f46; --hero-hover: #26262b;
  --brand: #d9481f; --brand-hover: #bf3d18; --brand-on-dark: #ff8a65; --on-dark: #f5f5f4; --on-dark-muted: #b5b5bb;
  --paper: #fafaf9; --soft: #f1f0ee; --card: #ffffff; --line: #e4e2df; --ink: #18181b; --muted: #5d5d66; --accent: #c9411b; --accent-ink: #ffffff;
}
:root[data-palette="luxe"] {
  --hero: #121212; --hero-deep: #080808; --hero-glow: #3b3222; --hero-line: #2a2620; --hero-line2: #3a342a; --hero-hover: #1d1b18;
  --brand: #8f6d2e; --brand-hover: #7a5c25; --brand-on-dark: #d8b46a; --on-dark: #f7f3ea; --on-dark-muted: #c9bfab;
  --paper: #faf8f4; --soft: #f1ece3; --card: #ffffff; --line: #e5ddcf; --ink: #1b1916; --muted: #6a6255; --accent: #8f6d2e; --accent-ink: #ffffff;
}
.hero-dark { background: radial-gradient(1200px 500px at 80% 10%, var(--hero-glow) 0%, var(--hero) 60%); }

/* Palette switcher (review aid): bottom-left, clear of the chat button */
.palette-switch { position: fixed; left: calc(14px + env(safe-area-inset-left)); bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 40;
  display: flex; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 8px 6px 12px;
  box-shadow: 0 10px 26px rgba(0,0,0,.18); font: 600 12px/1 var(--sans); color: var(--muted); }
.palette-switch button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; background: var(--sw); box-shadow: inset 0 0 0 3px var(--sw2); }
.palette-switch button[aria-pressed="true"] { border-color: var(--ink); }
body.chat-open .palette-switch { display: none; }
@media (max-width: 560px) { .palette-switch span { display: none; } .palette-switch { padding: 6px; } .palette-switch button { width: 28px; height: 28px; } }

/* honeypot: off-screen, never seen by people */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- Phone menu (Oct 19): ☰ beside Start opens the links as a dropdown ---- */
.menu-btn { display: none; }
@media (max-width: 560px) {
  header.site { position: relative; z-index: 30; }
  header.site nav { gap: 10px; }
  header.site nav a.nav-cta { order: 2; }
  .menu-btn { order: 3; display: inline-grid; place-content: center; gap: 4px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: transparent; cursor: pointer; padding: 0; }
  .menu-btn span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
  header.site.dark .menu-btn { border-color: var(--hero-line2); }
  header.site.dark .menu-btn span { background: var(--on-dark); }
  header.site.menu-open .menu-btn span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  header.site.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
  header.site.menu-open .menu-btn span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  /* the dropdown: every link except Start, full width under the header */
  header.site.menu-open nav a:not(.nav-cta) { display: block; }
  header.site nav a:not(.nav-cta) { position: absolute; left: 0; right: 0; padding: 16px calc(20px + env(safe-area-inset-left)); font-size: 14px;
    background: var(--card); color: var(--ink); border-bottom: 1px solid var(--line); }
  header.site.dark nav a:not(.nav-cta) { background: var(--hero); color: var(--on-dark); border-bottom-color: var(--hero-line); }
  header.site nav a:not(.nav-cta):nth-of-type(1) { top: 100%; }
  header.site nav a:not(.nav-cta):nth-of-type(2) { top: calc(100% + 51px); }
  header.site nav a:not(.nav-cta):nth-of-type(3) { top: calc(100% + 102px); }
  header.site nav a:not(.nav-cta):nth-of-type(4) { top: calc(100% + 153px); }
  header.site.menu-open { box-shadow: 0 1px 0 var(--line); }
  header.site nav a:not(.nav-cta) { z-index: 2; }
  header.site.menu-open::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 100vh; background: rgba(0,0,0,.3); z-index: 1; }
}

/* ---- 3D showcase (Oct 19): homes.html grid, home.html tour ---- */
.homes-hero { padding: 56px 0 64px; }
.homes-hero h1 { font: 500 clamp(40px, 7vw, 72px)/1.02 var(--serif); margin: 0 0 18px; }
.homes-hero h1 em { color: var(--brand-on-dark); font-style: italic; }
.homes-hero .lede { color: var(--on-dark-muted); max-width: 600px; margin: 0; font-size: 18px; }
.home-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.home-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; color: var(--ink); text-decoration: none; transition: transform .2s, box-shadow .2s; }
.home-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0,0,0,.12); }
.home-card-img { position: relative; aspect-ratio: 4 / 3; background: var(--soft); }
.home-card-img img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; left: 12px; top: 12px; font: 700 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; background: var(--hero); color: var(--on-dark); padding: 7px 10px; border-radius: 999px; }
.badge.demo { left: auto; right: 12px; background: var(--brand); color: #fff; }
.home-card-body { padding: 16px 18px 18px; }
.home-card-body h3 { font: 600 22px/1.2 var(--serif); margin: 0 0 4px; }
.home-card-body p { margin: 0; color: var(--muted); font-size: 14px; }
@media (max-width: 900px) { .home-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .home-grid { grid-template-columns: 1fr; } }

.tour-hero { background: var(--hero); color: var(--on-dark); padding: 36px 0 44px; border-top: 0; }
.tour-hero h1 { font: 500 clamp(34px, 5vw, 54px)/1.08 var(--serif); margin: 0 0 6px; }
.tour-facts { color: var(--on-dark-muted); margin: 0 0 20px; }
.tour-facts a { color: var(--brand-on-dark); }
.tour { display: grid; gap: 10px; }
.tour-stage { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #111; touch-action: none; }
.tour-stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
.tour-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tour-go { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--brand); color: #fff; box-shadow: 0 12px 30px rgba(0,0,0,.35); z-index: 2; }
.tour-progress { position: absolute; left: 20%; right: 20%; bottom: 24px; height: 6px; border-radius: 6px; background: rgba(255,255,255,.25); z-index: 2; overflow: hidden; }
.tour-progress span { display: block; height: 100%; width: 0; background: var(--brand-on-dark); transition: width .2s; }
.tour-msg { position: absolute; left: 16px; right: 16px; bottom: 16px; margin: 0; color: #fff; background: rgba(0,0,0,.55); padding: 10px 14px; border-radius: 12px; font-size: 14px; z-index: 2; }
.tour-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.tour-rooms, .tour-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.tour-rooms button, .tour-tools button { font: 600 13px/1 var(--sans); min-height: 40px; padding: 10px 14px; border-radius: 999px; cursor: pointer; border: 1px solid var(--hero-line2); background: transparent; color: var(--on-dark); }
.tour-rooms button[aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.tour-hint { margin: 0; color: var(--on-dark-muted); font-size: 13px; }
.ba-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.ba-item { margin: 0; display: grid; gap: 8px; }
.ba-item figcaption { color: var(--muted); font-size: 14px; }
.compare.photo { aspect-ratio: 4 / 3; }
.compare.photo img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.qr-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: grid; gap: 10px; justify-items: start; }
.qr-card img { width: 160px; height: 160px; image-rendering: pixelated; }
.qr-card p { margin: 0; color: var(--muted); font-size: 14px; }
.qr-card .agent { color: var(--ink); }
@media (max-width: 860px) { .ba-grid { grid-template-columns: 1fr; } .tour-stage { aspect-ratio: 4 / 5; } }

/* ---- 360° room in the hero phone (Oct 19) ---- */
.pano { position: absolute; inset: 0; perspective: calc(var(--w, 246px) / 2); overflow: hidden; cursor: grab; touch-action: pan-y; background: #f3ece2; }
.pano:active { cursor: grabbing; }
.cube { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; will-change: transform; }
.face { position: absolute; width: var(--w, 246px); height: var(--w, 246px); left: calc(var(--w, 246px) / -2); top: calc(var(--w, 246px) / -2); backface-visibility: hidden; }
.face svg { width: 100%; height: 100%; display: block; }
.face.front { transform: translateZ(calc(var(--w, 246px) / -2)); }
.face.right { transform: rotateY(-90deg) translateZ(calc(var(--w, 246px) / -2)); }
.face.back { transform: rotateY(180deg) translateZ(calc(var(--w, 246px) / -2)); }
.face.left { transform: rotateY(90deg) translateZ(calc(var(--w, 246px) / -2)); }
.face.floor { transform: rotateX(90deg) translateZ(calc(var(--w, 246px) / -2)); }
.face.ceiling { transform: rotateX(-90deg) translateZ(calc(var(--w, 246px) / -2)); }
.phone .pill { z-index: 3; }
