/* Funnel page + 3D tour styles. Mood: a dark villa in the sunny mountains — charcoal
   surfaces, warm off-white type, brushed-bronze accents, hairline lines, square corners.
   Two themes: dark (default) and light, picked by html[data-theme] (set in index.html's <head>
   from the saved choice or the system preference; toggled by #themeToggle, page.js). The hero
   and the 3D tour sit on photos/renders, so they keep the dark palette in both themes. */
:root,
:root[data-theme="light"] :is(.hero, #tour) {
  color-scheme: dark;
  --bg: #0f1011;
  --surface: #16181a;
  --surface-2: #1d2023;
  --ink: #ece8e1;
  --muted: #a19d95;
  --line: rgba(236, 232, 225, .12);
  --accent: #b8986a;         /* brushed bronze */
  --accent-hover: #cbab7b;
  --on-accent: #14120f;
  --warm: #c9a877;
  --danger: #e8907a;
  --header-bg: rgba(15, 16, 17, .8);
  --header-bg-solid: rgba(15, 16, 17, .93);
  --bar-bg: rgba(15, 16, 17, .96);
}
/* Light: warm paper and charcoal ink; bronze darkened so text and buttons keep ≥ 4.5:1. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f2ec;
  --surface: #fdfbf7;
  --surface-2: #ebe6dd;
  --ink: #1c1b19;
  --muted: #5e5950;
  --line: rgba(28, 27, 25, .13);
  --accent: #83643a;
  --accent-hover: #6f5330;
  --on-accent: #ffffff;
  --warm: #80602f;
  --danger: #a63d26;
  --header-bg: rgba(245, 242, 236, .82);
  --header-bg-solid: rgba(245, 242, 236, .95);
  --bar-bg: rgba(245, 242, 236, .97);
}
:root {
  /* Hanken Grotesk (OFL, Google Fonts): open-source stand-in for Typodermic's Movatif — round,
     tightly spaced neo-grotesque; headings use its light weight like Movatif's display cuts. */
  --sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display: var(--sans);
  --gut: 24px;
  --maxw: 1280px;
  --sec: clamp(72px, 10vw, 160px);
}
@media (min-width: 900px) { :root { --gut: 48px; } }

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2 { font-family: var(--display); font-weight: 300; line-height: 1.02; letter-spacing: -0.025em; }
h3 { font-family: var(--sans); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
img { max-width: 100%; display: block; }
a { color: inherit; }
code { font: 12px ui-monospace, Menlo, monospace; background: var(--surface-2); padding: 1px 6px; border-radius: 3px; }
body.fs-lock { overflow: hidden; }

/* small all-caps labels */
.eyebrow { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none;
  font: 600 12px/1.2 var(--sans); text-transform: uppercase; letter-spacing: 0.12em;
  padding: 16px 28px; border-radius: 2px; transition: opacity .15s ease;
}
.btn-primary { background: var(--accent); color: var(--on-accent); transition: background .15s ease; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-light { background: var(--ink); color: var(--bg); }
.btn-light:hover { opacity: .88; }
.btn-secondary { background: none; color: inherit; text-decoration: underline; text-underline-offset: 4px; padding: 16px 4px; }
.btn-secondary:hover { opacity: .65; }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: default; }

/* ---------- tour frame ---------- */
.tour-section { padding: 0; }
#tour {
  position: relative;
  display: flex; flex-direction: column;
  width: 100%;
  background: #0b0d0e;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2px;
}
/* the 3D view; every overlay below is positioned inside it */
.tour-stage { position: relative; flex: 0 0 auto; aspect-ratio: 16 / 9; overflow: hidden; }
#tour:fullscreen, #tour.pseudo-fullscreen {
  width: 100vw; height: 100vh; border: 0; border-radius: 0;
}
:is(#tour:fullscreen, #tour.pseudo-fullscreen) .tour-stage { flex: 1 1 auto; min-height: 0; aspect-ratio: auto; }
#tour.pseudo-fullscreen { position: fixed; inset: 0; z-index: 2147483000; height: 100dvh; padding-bottom: env(safe-area-inset-bottom); }
#renderCanvas { display: block; width: 100%; height: 100%; outline: none; touch-action: pan-y; }
#tour.captured #renderCanvas { touch-action: none; }
@media (max-width: 700px) { .tour-stage { aspect-ratio: 4 / 3; } }

/* poster shown until the tour is ready */
.tour-poster {
  position: absolute; inset: 0; z-index: 8; display: flex; align-items: center; justify-content: center;
  text-align: center; color: #e8ecf4;
  background: radial-gradient(120% 120% at 50% 0%, #1d2735 0%, #0b0d12 70%);
}
.tour-poster[hidden] { display: none; }
.poster-inner { max-width: 420px; padding: 24px; }
.poster-inner h2 { font-size: clamp(24px, 4vw, 34px); margin-bottom: 8px; }
.poster-inner p { color: #93a0b4; font-size: 14px; margin-bottom: 18px; }
.bar { height: 4px; background: rgba(255, 255, 255, .14); border-radius: 99px; overflow: hidden; opacity: 0; transition: opacity .2s; }
.tour-poster.loading .bar { opacity: 1; }
.bar > i { display: block; height: 100%; width: 0%; background: var(--accent); transition: width .25s; }
.load-msg { font-size: 12px; color: #93a0b4; min-height: 18px; margin: 8px 0 0; }

/* HUD (only visible once .ready) */
#tour:not(.ready) :is(#badge, #fsBtn, #anchorBar) { display: none; }
#badge {
  position: absolute; top: 12px; left: 12px; z-index: 6; pointer-events: none;
  background: rgba(13, 16, 22, .72); border: 1px solid rgba(255, 255, 255, .14); border-radius: 99px;
  padding: 6px 14px; color: #c7cfdb; font-size: 12px; backdrop-filter: blur(6px);
}
#badge b { color: #fff; }
#tourHint {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 6; pointer-events: none;
  background: rgba(13, 16, 22, .78); border: 1px solid rgba(255, 255, 255, .16); border-radius: 99px;
  padding: 10px 20px; color: #fff; font-size: 13px; backdrop-filter: blur(6px);
}
#tourHint[hidden] { display: none; }
#crosshair {
  position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%;
  background: rgba(255, 255, 255, .85); box-shadow: 0 0 6px rgba(0, 0, 0, .8); z-index: 6; pointer-events: none;
}
#crosshair[hidden] { display: none; }

#fsBtn {
  position: absolute; top: 12px; right: 12px; z-index: 7; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(13, 16, 22, .72); border: 1px solid rgba(255, 255, 255, .14); border-radius: 99px;
  color: #fff; font: 600 11px/1 var(--sans); text-transform: uppercase; letter-spacing: 0.12em;
  padding: 9px 14px; backdrop-filter: blur(6px); transition: background .15s;
}
#fsBtn:hover { background: rgba(13, 16, 22, .92); }
/* phones: icon-only fullscreen button, and the badge wraps in the space left of it */
@media (max-width: 560px) {
  #badge { right: 68px; max-width: max-content; font-size: 12px; line-height: 1.35; padding: 7px 12px; border-radius: 14px; }
  #fsBtn { width: 44px; height: 44px; padding: 0; justify-content: center; }
  #fsLabel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  #fsBtn svg { width: 18px; height: 18px; }
}

/* zoom + / −: touch screens only, once the tour is ready */
#zoomCtl {
  display: none; position: absolute; right: 12px; bottom: 12px; z-index: 7; flex-direction: column;
  background: rgba(13, 16, 22, .72); border: 1px solid rgba(255, 255, 255, .14); border-radius: 99px;
  backdrop-filter: blur(6px); overflow: hidden;
}
#tour.touch.ready #zoomCtl { display: flex; }
.zoom-btn {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0; cursor: pointer;
  background: none; border: 0; color: #fff; touch-action: manipulation;
}
.zoom-btn + .zoom-btn { border-top: 1px solid rgba(255, 255, 255, .14); }
.zoom-btn:disabled, .zoom-btn[disabled] { color: rgba(255, 255, 255, .3); cursor: default; }
.zoom-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.zoom-btn:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }

/* ---------- room dock (under the 3D view; built by main.js) ---------- */
.room-dock {
  flex: 0 0 auto;
  background: var(--surface); border-top: 1px solid var(--line);
  color: var(--ink);
}
/* tour-collapsible lays the dock out: single-column grid; the head spans the full width
   and reserves the toggle's measured width (--dock-toggle-w, kept in sync by main.js) as
   right padding, while #dockToggle — the invoker, a direct child of the collapsible —
   shares the head's cell, bottom-right, exactly where it sat inside .dock-actions. */
.dock-collapse {
  display: grid; grid-template-columns: 1fr;
  border: 0; border-radius: 0; background: none;
}
.dock-collapse > .dock-head { grid-area: 1 / 1; min-width: 0; padding-right: calc(var(--dock-toggle-w, 128px) + 28px); }
.room-dock:not(.collapsed) .dock-head { border-bottom: 1px solid var(--line); }
.dock-collapse > #dockToggle { grid-area: 1 / 1; justify-self: end; align-self: end; margin: 0 20px 12px 0; }
.dock-collapse > #dockBody { grid-area: 2 / 1; }
.dock-head {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px 20px 12px;
}
.dock-now { flex: 1 1 280px; min-width: 0; display: flex; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; }
.dock-now-label { font: 600 11px/1 var(--sans); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.dock-now-name { font: 600 18px/1.2 var(--sans); letter-spacing: -.01em; color: var(--ink); }
.dock-now-cap { flex-basis: 100%; font-size: 14px; line-height: 1.4; color: var(--muted); }
@media (min-width: 900px) { .dock-now-cap { flex-basis: auto; } }

.dock-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.dock-count { font: 500 13px/1 var(--sans); font-variant-numeric: tabular-nums; color: var(--muted); margin-right: 6px; }
.dock-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; min-width: 44px; padding: 0 16px; cursor: pointer;
  background: transparent; color: var(--ink); border: 1px solid rgba(236, 232, 225, .4); border-radius: 99px;
  font: 600 13px/1 var(--sans); letter-spacing: .02em;
  transition: background .15s, border-color .15s;
}
.dock-btn:hover { background: var(--surface-2); border-color: rgba(236, 232, 225, .6); }
.dock-btn svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#dockPrev { padding-left: 10px; }
#dockNext { padding-right: 10px; }
.dock-toggle svg { transition: transform .2s ease; }
.room-dock.collapsed .dock-toggle svg { transform: rotate(180deg); }

.dock-body { position: relative; }
.dock-track { position: relative; } /* offsetLeft of pills is measured against the row */
.dock-track {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 18px 36px;
  padding: 16px 20px 20px;
}
.pill-set { display: flex; flex-direction: column; gap: 10px; }
.pill-group { font: 600 12px/1 var(--sans); text-transform: uppercase; letter-spacing: .14em; color: #c4bfb6; }
.pill-row { display: flex; gap: 8px; }
.pill {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  min-height: 44px; padding: 0 18px; white-space: nowrap;
  background: var(--surface-2); color: var(--ink);
  border: 1px solid rgba(236, 232, 225, .4); border-radius: 99px;
  font: 500 15px/1 var(--sans); letter-spacing: .01em;
  transition: background .15s, border-color .15s, color .15s;
}
.pill:hover { background: #2a2e32; border-color: rgba(236, 232, 225, .75); }
/* current room: filled bronze + a check, so the state isn't carried by colour alone */
.pill[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 600; padding-left: 14px; }
.pill[aria-pressed="true"]::before {
  content: ""; width: 16px; height: 16px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pill[aria-pressed="true"]:hover { background: var(--accent-hover); }
:is(.pill, .dock-btn, #fsBtn):focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* scrolling row: narrow screens and fullscreen (where the dock must stay one row tall) */
.dock-scroll { display: none; }
@media (max-width: 899px) {
  .dock-track { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding-bottom: 18px; }
}
:is(#tour:fullscreen, #tour.pseudo-fullscreen) .dock-track {
  flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding-bottom: 18px;
}
.dock-track::-webkit-scrollbar { display: none; }
.pill-set { scroll-snap-align: start; }
.dock-track { scroll-padding-inline: 60px; } /* snapped rooms land clear of the edge arrows */
/* edge fades + arrows appear only on the side that has more rooms */
.dock-body::before, .dock-body::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 72px; z-index: 1; pointer-events: none;
  opacity: 0; transition: opacity .2s;
}
.dock-body::before { left: 0; background: linear-gradient(90deg, var(--surface) 30%, transparent); }
.dock-body::after { right: 0; background: linear-gradient(270deg, var(--surface) 30%, transparent); }
.room-dock.can-left .dock-body::before, .room-dock.can-right .dock-body::after { opacity: 1; }
.room-dock.can-left .dock-scroll-prev, .room-dock.can-right .dock-scroll-next { display: grid; }
.dock-scroll {
  position: absolute; top: 50%; z-index: 2; place-items: center; width: 40px; height: 40px; margin-top: -8px;
  transform: translateY(-50%); cursor: pointer;
  background: var(--surface-2); color: var(--ink); border: 1px solid rgba(236, 232, 225, .3); border-radius: 50%;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .45);
}
.dock-scroll:hover { border-color: rgba(236, 232, 225, .7); }
.dock-scroll svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dock-scroll-prev { left: 10px; }
.dock-scroll-next { right: 10px; }

/* phones: shorter labels on the step buttons, compact head */
@media (max-width: 560px) {
  .dock-head { padding: 12px 16px 10px; gap: 10px; }
  .dock-collapse > .dock-head { padding-right: calc(var(--dock-toggle-w, 43px) + 24px); }
  .dock-collapse > #dockToggle { margin-right: 16px; margin-bottom: 10px; }
  .dock-track { padding-inline: 16px; }
  .dock-btn { padding: 0 12px; }
  #dockPrev .dock-btn-text, .dock-toggle .dock-btn-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  #dockPrev, .dock-toggle { padding: 0; }
  #dockNext .dock-btn-text { font-size: 13px; }
  .dock-now-name { font-size: 17px; }
  .dock-actions { margin-left: 0; width: 100%; }
  .dock-count { margin-right: auto; }
}
@media (prefers-reduced-motion: reduce) { .dock-toggle svg, .dock-body::before, .dock-body::after { transition: none; } }

.tour-error {
  position: absolute; inset: 0; z-index: 9; display: flex; flex-direction: column; gap: 14px;
  align-items: center; justify-content: center; text-align: center; color: #e8ecf4;
  background: rgba(11, 13, 18, .92); padding: 24px;
}
.tour-error[hidden] { display: none; }
.tour-error p { color: #93a0b4; font-size: 14px; max-width: 420px; }

/* ============================ funnel page ============================ */
html { scroll-padding-top: 88px; }
.container { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
.narrow { max-width: 820px; }
section { margin-block: var(--sec); scroll-margin-top: 88px; }
.hero { margin-block: 0; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut);
  display: flex; align-items: center; gap: 32px; height: 64px;
}
.wordmark { text-decoration: none; display: flex; align-items: center; gap: 10px; margin-right: auto; }
.wm-text { display: flex; align-items: baseline; gap: 8px; }
/* logo: Icons8 "Home" (Keek Line), assets/brand/ — a mask, so it takes the ink colour in both themes */
.wm-logo {
  flex: none; width: 28px; height: 28px; background: var(--ink);
  -webkit-mask: url("https://assets.talkie-bird.online/v1/assets/brand/logo-home.png") center / contain no-repeat;
          mask: url("https://assets.talkie-bird.online/v1/assets/brand/logo-home.png") center / contain no-repeat;
}
.wm-a { font: 500 20px/1 var(--display); letter-spacing: .01em; color: var(--ink); white-space: nowrap; }
.wm-b { font: 500 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--warm); }
.main-nav { display: flex; gap: 28px; }
.main-nav a {
  text-decoration: none; color: var(--muted); font: 500 13px/1 var(--sans);
  letter-spacing: .04em; text-transform: uppercase; transition: color .15s;
}
.main-nav a:hover { color: var(--ink); }
.btn-header { padding: 12px 20px; font-size: 11px; }
/* header dark-mode switch (components/tour-switch.js paints the control itself) */
.theme-toggle { flex: 0 0 auto; margin-right: -16px; }
@media (max-width: 760px) { .main-nav { display: none; } }

/* ---------- hero ---------- */
.hero { position: relative; height: clamp(560px, 92svh, 980px); overflow: hidden; background: #101214; }
.hero-img, .hero picture { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-img { object-fit: cover; transform-origin: 60% 55%; animation: hero-drift 38s ease-in-out infinite alternate; }
@keyframes hero-drift { from { transform: scale(1.02); } to { transform: scale(1.09) translate(-1%, -.5%); } }
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 16, 17, .45) 0%, rgba(15, 16, 17, 0) 22%),
    linear-gradient(180deg, rgba(15, 16, 17, 0) 38%, rgba(15, 16, 17, .55) 68%, var(--bg) 100%);
}
.hero-content {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding-bottom: clamp(48px, 9vh, 110px); color: #fff;
}
.hero h1 { font-size: clamp(46px, 8vw, 112px); font-weight: 300; letter-spacing: -0.035em; max-width: 14ch; }
/* On a dark pill: the photo behind it (dark cladding, bright sky) changes with the viewport. */
.hero-eyebrow {
  display: inline-block; margin-bottom: 18px; padding: 7px 14px; border-radius: 999px;
  font-size: 12px; color: #fff; background: rgba(15, 16, 17, .62);
  box-shadow: inset 0 0 0 1px rgba(201, 168, 119, .55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.hero-tagline { font-size: clamp(16px, 2vw, 20px); max-width: 52ch; color: rgba(255, 255, 255, .92); margin-top: 18px; }
.hero-facts {
  margin-top: 14px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
  color: rgba(255, 255, 255, .78);
}
.hero-actions { display: flex; align-items: center; gap: 28px; margin-top: 34px; flex-wrap: wrap; }
.btn-on-dark { color: #fff; }
@media (max-width: 700px) { .hero { height: auto; min-height: 82svh; } .hero picture { position: static; } .hero-img { position: absolute; } }

/* ---------- intro / highlights ---------- */
.intro-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.lede { font-size: clamp(17px, 1.6vw, 21px); line-height: 1.65; color: var(--ink); max-width: 62ch; }
.highlights { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.highlight { background: var(--surface); padding: 22px 20px; }
.highlight .eyebrow { margin-bottom: 8px; }
.highlight-value { font: 600 15px/1.35 var(--sans); letter-spacing: -0.01em; }
@media (max-width: 900px) { .intro-grid { grid-template-columns: 1fr; } }

/* ---------- section heads ---------- */
.section-head { margin-bottom: clamp(28px, 4vw, 56px); }
.section-head h2 { font-size: clamp(34px, 4.6vw, 60px); font-weight: 300; margin-top: 12px; }
.section-head .eyebrow { color: var(--warm); }
.section-sub { color: var(--muted); margin-top: 12px; max-width: 60ch; font-size: 15px; }
.tour-section .section-head { padding-inline: 0; }

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 28px; }
.card { border: 1px solid var(--line); border-radius: 2px; background: var(--surface); overflow: hidden; }
.card-media { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.card-media img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: opacity .2s ease; }
.card-media:hover img { opacity: .85; }
.card-body { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding: 18px 20px 20px; border-top: 1px solid var(--line); }
.card-body h3 { font-size: 17px; font-weight: 600; }
.card-body p { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.card-3d { padding: 8px 4px; font-size: 11px; flex: 0 0 auto; }

/* ---------- floor plan ---------- */
.plan-wrap { border: 1px solid var(--line); background: var(--surface); border-radius: 2px; padding: clamp(16px, 3vw, 40px); }
.plan { width: 100%; height: auto; display: block; }
.plan-wall { fill: none; stroke: var(--ink); stroke-width: 2; pointer-events: none; }
.plan-deck { fill: color-mix(in srgb, var(--accent) 7%, transparent); stroke: color-mix(in srgb, var(--ink) 22%, transparent); stroke-width: 1.5; stroke-dasharray: 5 4; }
.plan-static { fill: color-mix(in srgb, var(--ink) 3%, transparent); stroke: var(--line); stroke-width: 1; }
.plan-room rect { fill: var(--surface); stroke: color-mix(in srgb, var(--ink) 18%, transparent); stroke-width: 1; transition: fill .15s, stroke .15s; }
.plan-room text {
  font: 600 13px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase;
  fill: var(--ink); text-anchor: middle; pointer-events: none;
}
.plan-room { cursor: pointer; }
.plan-room:hover rect, .plan-room:focus-visible rect { fill: color-mix(in srgb, var(--accent) 14%, transparent); stroke: var(--warm); }
.plan-room:focus-visible { outline: none; }
.plan-room.active rect { fill: color-mix(in srgb, var(--accent) 24%, transparent); stroke: var(--warm); stroke-width: 2; }
.plan-sub { font: 500 10.5px/1 var(--sans); letter-spacing: .08em; fill: var(--muted); text-anchor: middle; }
.plan-room text.plan-sub { font: 500 10.5px/1 var(--sans); letter-spacing: .08em; text-transform: none; fill: var(--muted); }
.plan-hint { display: none; margin-top: 10px; color: var(--muted); font-size: 12.5px; }
.plan-note { font: 500 11px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; fill: var(--muted); text-anchor: middle; }
@media (max-width: 700px) {
  .plan-wrap { overflow-x: auto; }
  .plan { min-width: 640px; width: 640px; }
  .plan-hint { display: block; }
}

/* ---------- booking: schedule a tour ----------
   Two columns on wide screens: "how it works" + agent on the left, the stepped form in a raised
   panel on the right. The tour-type and time-window cards are Lion <tour-radio> elements (a native
   radio is slotted into each), so arrow keys, screen readers and forced-colors mode all behave as
   they would for plain radios; the day strip still uses bare radios in <label> cards. */
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.book-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (min-width: 1000px) { .book-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); } }

/* left column */
.book-aside { display: grid; gap: 28px; }
@media (min-width: 1000px) { .book-aside { position: sticky; top: 104px; } }
.book-aside > .eyebrow { color: var(--warm); }
.book-steps { list-style: none; padding: 0; display: grid; gap: 0; }
.book-steps li { display: grid; grid-template-columns: 32px 1fr; gap: 16px; position: relative; padding-bottom: 22px; }
.book-steps li:last-child { padding-bottom: 0; }
/* hairline joining the step dots */
.book-steps li:not(:last-child)::before {
  content: ""; position: absolute; left: 15.5px; top: 36px; bottom: 4px; width: 1px; background: var(--line);
}
.book-steps p { color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.book-steps .step-title { color: var(--ink); font-weight: 600; font-size: 15.5px; margin: 5px 0 2px; }
.step-dot {
  display: inline-grid; place-items: center; width: 32px; height: 32px; flex: 0 0 auto; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--warm) 55%, transparent); color: var(--warm);
  font: 600 13px/1 var(--sans); font-variant-numeric: tabular-nums;
}
.agent-card { border: 1px solid var(--line); background: var(--surface); border-radius: 4px; padding: 20px 22px; }
.agent-card .eyebrow { margin-bottom: 10px; }
.agent-name { font-weight: 600; font-size: 17px; }
.agent-line { color: var(--muted); font-size: 14.5px; }
.agent-line a { color: var(--ink); text-underline-offset: 3px; }
.book-3d { justify-self: start; padding-block: 8px; }
@media (max-width: 999px) {
  /* the steps read as a short intro above the form; the agent card sits alongside */
  .book-aside { grid-template-columns: minmax(0, 1fr); }
}

/* right column: the form panel */
.book-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  padding: clamp(20px, 4vw, 44px);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--ink) 4%, transparent), 0 24px 60px -32px rgba(0, 0, 0, .45);
}
.form-note { color: var(--muted); font-size: 13.5px; margin-bottom: 8px; }
.step { border: 0; padding: 0; margin: 0; min-width: 0; padding-block: 26px; border-top: 1px solid var(--line); }
.step:first-of-type { border-top: 0; padding-top: 12px; }
.step legend {
  display: flex; align-items: center; gap: 12px; padding: 0; margin-bottom: 16px; float: left; width: 100%;
  font: 500 clamp(19px, 2vw, 22px)/1.2 var(--display); letter-spacing: -0.01em; color: var(--ink);
}
.step legend + * { clear: both; }
.step legend .step-dot { width: 28px; height: 28px; font-size: 12px; }
.step-hint { color: var(--muted); font-size: 13.5px; margin: -6px 0 14px; clear: both; }

/* radio cards */
/* radio cards: the grid is inside <tour-radio-group>'s shadow DOM (see components/tour-radio.js);
   the host stays a block so Lion's slot="label"/"help-text"/"feedback" children take no cells. */
.choice-grid { display: block; clear: both; }
.choice-grid-2 { --choice-grid-columns: repeat(2, minmax(0, 1fr)); }
.choice-grid-3 { --choice-grid-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 520px) { .choice-grid-2, .choice-grid-3 { --choice-grid-columns: minmax(0, 1fr); } }
/* the card is a <tour-radio> (class="choice"); its label slot carries the icon + texts */
.choice {
  position: relative; display: block;
  padding: 16px 44px 16px 16px; min-height: 64px; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); border-radius: 4px; background: var(--bg);
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.choice label {
  display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center;
}
.choice:hover { border-color: color-mix(in srgb, var(--accent) 70%, transparent); }
.choice-icon {
  grid-row: span 2; width: 26px; height: 26px; color: var(--warm);
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.choice-title { font-weight: 600; font-size: 15.5px; line-height: 1.3; color: var(--ink); }
.choice-desc { grid-column: 2; color: var(--muted); font-size: 13.5px; line-height: 1.4; }

/* compact card: icon on its own line so the title and one-line description get the card's full width */
.choice-compact { padding: 14px 38px 14px 14px; min-height: 0; }
.choice-compact label { grid-template-columns: 1fr; align-items: start; row-gap: 2px; }
.choice-compact .choice-icon { grid-row: auto; grid-column: 1; width: 22px; height: 22px; margin: 0 0 6px; }
.choice-compact .choice-title { grid-column: 1; }
.choice-compact .choice-desc { grid-column: 1; }
/* the real radio, restyled: a ring in the corner that fills with a check when chosen */
.choice input {
  appearance: none; -webkit-appearance: none; margin: 0; position: absolute; top: 14px; right: 14px;
  width: 20px; height: 20px; border-radius: 50%; cursor: pointer;
  border: 1.5px solid color-mix(in srgb, var(--ink) 40%, transparent); background: var(--surface);
  display: grid; place-items: center; transition: border-color .15s ease, background-color .15s ease;
}
.choice input::after {
  content: ""; width: 9px; height: 5px; margin-top: -2px; border: solid var(--on-accent); border-width: 0 0 2px 2px;
  transform: rotate(-45deg) scale(0); transition: transform .15s ease;
}
.choice input:checked { background: var(--accent); border-color: var(--accent); }
.choice input:checked::after { transform: rotate(-45deg) scale(1); }
.choice[checked] {
  border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--bg));
  box-shadow: inset 0 0 0 1px var(--accent);
}
.choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.choice input:focus-visible { outline: none; }
fieldset[data-invalid] .choice:not([checked]) { border-color: var(--danger); }

/* day chips: the same Lion radio cards, laid out as a two-week strip;
   the grid lives in the group's shadow DOM (see components/tour-radio.js) */
.date-grid {
  display: block; clear: both;
  --choice-grid-columns: repeat(7, minmax(0, 1fr)); --choice-grid-gap: 8px;
}
@media (max-width: 560px) { .date-grid { --choice-grid-columns: repeat(4, minmax(0, 1fr)); } }
.date-chip {
  position: relative; display: grid;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); border-radius: 4px; background: var(--bg);
  cursor: pointer; text-align: center; transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
/* the label slot carries the dow/day/mon stack; 74px + the host's 2px border = the old 76px */
.date-chip label { display: grid; justify-items: center; gap: 2px; padding: 10px 4px 11px; min-height: 74px; }
.date-chip:hover { border-color: color-mix(in srgb, var(--accent) 70%, transparent); }
/* the radio covers the chip (invisible) so it stays the thing that's clicked, focused and read */
.date-chip input { appearance: none; -webkit-appearance: none; position: absolute; inset: 0; margin: 0; border-radius: inherit; cursor: pointer; }
.date-chip input:focus-visible { outline: none; }
.date-chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.dc-dow, .dc-mon { font: 600 10.5px/1.2 var(--sans); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.dc-day { font: 400 24px/1.1 var(--display); font-variant-numeric: tabular-nums; color: var(--ink); }
.dc-other-icon { width: 22px; height: 22px; margin: 3px 0 2px; fill: none; stroke: var(--warm); stroke-width: 1.6; stroke-linecap: round; }
.date-chip.is-weekend .dc-dow { color: var(--warm); }
.date-chip[checked] { background: var(--accent); border-color: var(--accent); }
.date-chip[checked] :is(.dc-dow, .dc-mon, .dc-day) { color: var(--on-accent); }
.date-chip[checked] .dc-other-icon { stroke: var(--on-accent); }
.date-other { margin-top: 16px; max-width: 280px; }
.date-other[hidden] { display: none; }
/* Lion datepicker's calendar button is slotted next to the input (light DOM): match the field look */
.date-other button {
  flex: none; align-self: stretch; min-width: 48px; margin-left: 8px; cursor: pointer;
  display: grid; place-items: center; color: var(--muted);
  font: 400 16px/1 var(--sans); background: var(--bg); border-radius: 4px;
  border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  transition: border-color .15s ease, color .15s ease;
}
/* the invoker's calendar glyph (components/tour-input.js _invokerIconTemplate) */
.date-other button .invoker-icon {
  width: 19px; height: 19px; fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.date-other button:hover { color: var(--ink); border-color: color-mix(in srgb, var(--ink) 38%, transparent); }
.date-other button:focus-visible {
  outline: 2px solid transparent; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent);
}

/* text fields */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 20px; clear: both; }
.field { display: flex; flex-direction: column; }
.field-full { grid-column: 1 / -1; }
.field label { font: 600 14px/1.3 var(--sans); color: var(--ink); margin-bottom: 8px; }
.optional { font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  font: 400 16px/1.4 var(--sans); color: var(--ink); background: var(--bg); min-height: 48px;
  border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); border-radius: 4px; padding: 12px 14px; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.field input:hover, .field textarea:hover { border-color: color-mix(in srgb, var(--ink) 38%, transparent); }
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus-visible, .field textarea:focus-visible {
  outline: 2px solid transparent; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] {
  border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger);
}
.field-hint { color: var(--muted); font-size: 13px; margin-top: 6px; line-height: 1.4; }
.field-count { font-variant-numeric: tabular-nums; }
/* errors carry an icon + text, never colour alone */
.field-error { color: var(--danger); font-size: 13.5px; font-weight: 500; line-height: 1.4; }
.field-error:not(:empty) { display: flex; gap: 6px; margin-top: 8px; clear: both; }
.field-error:not(:empty)::before {
  content: "!"; flex: 0 0 auto; display: inline-grid; place-items: center; width: 17px; height: 17px; margin-top: 1px;
  border-radius: 50%; background: var(--danger); color: var(--bg); font: 700 11px/1 var(--sans);
}
.error-summary {
  border: 1px solid var(--danger); border-left-width: 4px; border-radius: 4px; padding: 16px 18px; margin: 8px 0 12px;
  background: color-mix(in srgb, var(--danger) 8%, var(--surface));
}
.error-summary:focus { outline: 2px solid var(--danger); outline-offset: 3px; }
.error-summary[hidden] { display: none; }
.error-summary-title { font-weight: 600; margin-bottom: 6px; }
.error-summary ul { padding-left: 20px; }
.error-summary a { color: var(--danger); font-weight: 500; text-underline-offset: 3px; }

/* footer: live summary of the choices + submit */
.form-foot {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px 24px;
  margin-top: 8px; padding-top: 24px; border-top: 1px solid var(--line);
}
.book-summary .eyebrow { margin-bottom: 4px; }
.book-summary-text { font-size: 15px; font-weight: 500; line-height: 1.45; }
.book-summary-text .pending { color: var(--muted); font-weight: 400; }
.btn-submit { padding: 18px 32px; min-height: 52px; }
/* the Lion submit button is a custom element host: lay it out as a flex row so the
   aria-busy spinner (::before, see components/tour-button.js) sits beside the label */
tour-button-submit.btn-submit { display: inline-flex; align-items: center; justify-content: center; }
.btn-submit[aria-busy="true"]::before {
  content: ""; display: inline-block; width: 12px; height: 12px; margin: 0 10px -1px 0; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.form-foot .reassurance { grid-column: 1 / -1; }
.reassurance { color: var(--muted); font-size: 13px; max-width: 60ch; }
.form-banner-error { color: var(--danger); font-size: 14px; font-weight: 500; margin: 8px 0; }
.hp { position: absolute !important; left: -99999px !important; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 700px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-foot { grid-template-columns: 1fr; }
  .btn-submit { width: 100%; }
}

/* confirmation */
.confirm-card { text-align: left; }
.confirm-card:focus { outline: none; }
.confirm-badge {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; margin-bottom: 18px;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--warm);
}
.confirm-badge svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.confirm-card h3 { font: 400 clamp(28px, 3.4vw, 38px)/1.1 var(--display); letter-spacing: -0.02em; margin: 8px 0 12px; }
.confirm-card h3:focus { outline: none; }
.confirm-card > p { color: var(--muted); font-size: 15.5px; max-width: 56ch; }
.confirm-card b { color: var(--ink); font-weight: 600; }
.confirm-details {
  display: grid; grid-template-columns: auto 1fr; gap: 10px 24px; margin: 24px 0; padding: 20px 22px;
  border: 1px solid var(--line); border-radius: 4px; background: var(--bg);
}
.confirm-details dt { font: 600 11px/1.9 var(--sans); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.confirm-details dd { margin: 0; font-weight: 500; }
.confirm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.confirm-card .reassurance { margin-top: 20px; }

@media (forced-colors: active) {
  .choice[checked], .date-chip[checked] { outline: 3px solid Highlight; }
  .choice input, .date-chip input { forced-color-adjust: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .choice, .choice input, .choice input::after, .date-chip, .field input, .field textarea { transition: none; }
  .btn-submit[aria-busy="true"]::before { animation: none; }
}

/* ---------- location: neighborhood map + nearby places ---------- */
.nbhd-grid { display: grid; grid-template-columns: 1fr; gap: 28px clamp(32px, 4vw, 56px); align-items: start; }
@media (min-width: 1000px) {
  .nbhd-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
  .nbhd-grid .nbhd-map { height: 560px; }
}
:root {
  --lm-police: #5f82b4; --lm-school: #6e9c6a; --lm-hospital: #c9675e; --lm-mall: #9a78b8; --lm-church: var(--accent);
}
.nbhd-map {
  position: relative; height: clamp(320px, 42vw, 440px); border: 1px solid var(--line); border-radius: 2px;
  background: var(--surface-2); overflow: hidden; isolation: isolate; font-family: var(--sans);
}
.nbhd-map-failed { display: grid; place-items: center; padding: 24px; text-align: center; color: var(--muted); font-size: 14px; }
.nbhd-filters { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; min-height: 44px;
  font: 600 15px/1 var(--sans); color: var(--ink); background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); border-radius: 999px; padding: 12px 18px;
  transition: color .15s, border-color .15s, background .15s;
}
.chip:hover { border-color: var(--warm); }
.chip[aria-pressed="true"] { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip-ico svg { width: 18px; height: 18px; display: block; }
.nbhd-list { list-style: none; padding: 0; margin: 12px 0 0; border-top: 1px solid var(--line); }
.nbhd-list li { border-bottom: 1px solid var(--line); }
.nbhd-item {
  width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  background: none; border: 0; padding: 12px 4px; color: var(--ink); text-align: left; cursor: pointer; font: inherit;
  transition: background .15s;
}
.nbhd-item:hover, .nbhd-item.active { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.nbhd-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.nbhd-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.nbhd-cat { font: 600 10.5px/1 var(--sans); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.nbhd-name { font-size: 14.5px; line-height: 1.3; }
.nbhd-dist { font: 500 13px/1 var(--sans); color: var(--warm); font-variant-numeric: tabular-nums; white-space: nowrap; }
.nbhd-note { margin-top: 12px; color: var(--muted); font-size: 12px; }
.nbhd-note a { color: inherit; text-underline-offset: 3px; }

/* category dots (list + map markers) */
.lm-dot {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  color: #fff; background: var(--lm); box-shadow: 0 0 0 2px var(--surface), 0 2px 8px rgba(0, 0, 0, .28);
}
.lm-dot svg { width: 15px; height: 15px; }
.lm-police { --lm: var(--lm-police); } .lm-school { --lm: var(--lm-school); } .lm-hospital { --lm: var(--lm-hospital); }
.lm-mall { --lm: var(--lm-mall); } .lm-church { --lm: var(--lm-church); }

/* Leaflet skin */
.nbhd-map .leaflet-container, .nbhd-map.leaflet-container { background: var(--surface-2); font-family: var(--sans); }
/* OSM's colourful standard tiles, quietened to the page palette; dark mode inverts them into a night map */
.nbhd-tiles { filter: grayscale(.75) sepia(.18) contrast(.92) brightness(1.03); }
html[data-theme="dark"] .nbhd-tiles { filter: invert(1) hue-rotate(180deg) grayscale(.7) sepia(.12) brightness(.82) contrast(.9); }
.pin-lm { background: none; border: 0; }
.pin-lm .lm-dot { transition: transform .2s var(--ease-out, ease); }
.pin-lm:hover .lm-dot { transform: scale(1.15); }
.pin-home { background: none; border: 0; }
.pin-core {
  position: absolute; inset: 6px; display: grid; place-items: center; border-radius: 50%;
  background: var(--ink); color: var(--bg); box-shadow: 0 0 0 3px var(--accent), 0 4px 14px rgba(0, 0, 0, .35);
}
.pin-core svg { width: 17px; height: 17px; }
.pin-pulse { position: absolute; inset: 0; border-radius: 50%; background: var(--accent); opacity: .35; animation: pin-pulse 2.4s ease-out infinite; }
@keyframes pin-pulse { from { transform: scale(.6); opacity: .5; } to { transform: scale(1.6); opacity: 0; } }
.nbhd-link { stroke: var(--lm); opacity: .7; }
.nbhd-map .leaflet-popup-content-wrapper, .nbhd-map .leaflet-popup-tip {
  background: var(--surface); color: var(--ink); border-radius: 2px; box-shadow: 0 8px 28px rgba(0, 0, 0, .3);
}
.nbhd-map .leaflet-popup-content-wrapper { border: 1px solid var(--line); }
.nbhd-map .leaflet-popup-content { margin: 14px 18px; min-width: 180px; }
.nbhd-map .leaflet-popup-content p { margin: 0; }
.nbhd-map .leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
.pop-cat { font: 600 10.5px/1.2 var(--sans); text-transform: uppercase; letter-spacing: .14em; color: var(--warm); }
.pop-name { font: 500 15px/1.3 var(--sans); margin-top: 6px !important; }
.nbhd-map .pop-link { display: inline-block; margin-top: 10px; color: var(--accent); font: 600 12px/1 var(--sans); text-decoration: none; }
.nbhd-map .pop-link:hover { text-decoration: underline; }
.nbhd-map .leaflet-bar { border: 1px solid var(--line); border-radius: 2px; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
.nbhd-map .leaflet-bar a { background: var(--surface); color: var(--ink); border-bottom-color: var(--line); }
.nbhd-map .leaflet-bar a:hover { background: var(--surface-2); }
.nbhd-map.leaflet-container .leaflet-control-attribution { background: color-mix(in srgb, var(--surface) 82%, transparent); color: var(--muted); font-size: 10px; }
.nbhd-map .leaflet-control-attribution a { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .pin-pulse { animation: none; } }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: clamp(48px, 6vw, 80px) 0 40px; margin-top: var(--sec); }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; font-size: 14px; color: var(--muted); }
.footer-grid .eyebrow { margin-bottom: 14px; }
.footer-grid p { margin-bottom: 6px; }
.footer-grid a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.foot-strong { color: var(--ink); font-weight: 600; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- mobile sticky CTA ---------- */
.mobile-cta {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  align-items: center; justify-content: space-between; gap: 16px;
  background: var(--bar-bg); border-top: 1px solid var(--line); backdrop-filter: blur(10px);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  transform: translateY(0); transition: transform .2s ease;
}
.mobile-cta.hidden { transform: translateY(120%); }
.mobile-cta-price { font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.mobile-cta .btn { padding: 12px 18px; font-size: 11px; flex: 0 0 auto; }
@media (max-width: 899px) {
  .mobile-cta { display: flex; }
  /* the sticky bar carries "Schedule a tour" on phones, so the header drops its copy */
  .btn-header { display: none; }
  .theme-toggle { margin-right: 0; }
  body { padding-bottom: 76px; }
}

/* The voice server's bot check (talkie-verify.js). Takes no space unless Turnstile needs the
   visitor to interact; then it sits above the launcher, over the assistant's own layer. */
.talkie-verify {
  position: fixed;
  right: 16px;
  bottom: calc(96px + env(safe-area-inset-bottom));
  z-index: 2147483001;
}

/* ---------- Talkie assistant (index.html <talkie-assistant>) ---------- */
/* Public hooks only: --talkie-* tokens, and the element's light-DOM children. The page already
   loads Hanken Grotesk, so the widget uses it instead of fetching its own Google Fonts. */
talkie-assistant {
  --talkie-font-display: var(--sans);
  --talkie-font-body: var(--sans);
}
@media (max-width: 899px) {
  /* Clear the sticky CTA bar, whose "Schedule a tour" button sits under the default 28px corner. */
  talkie-assistant {
    --talkie-launcher-offset-bottom: calc(76px + 16px + env(safe-area-inset-bottom));
    --talkie-launcher-offset-right: 16px;
    /* Phones get the bottom sheet (talkie-assistant.js, layout="auto"): it docks on top of the
       sticky CTA bar rather than covering "Schedule a tour". */
    --talkie-sheet-offset-bottom: calc(76px + env(safe-area-inset-bottom));
  }
  /* Floating panel (tablets): its inline `bottom: 104px` (launcher offset + 60px launcher +
     16px) moves with the launcher, and its inline `right: 28px` matches the 16px gutter its
     inline width leaves on the left. Capped below the sticky header (~72px) so it never covers
     the whole screen, and scrolls if a small screen still can't fit it. */
  talkie-assistant > talkie-widget:not([layout="sheet"]) {
    bottom: calc(76px + 16px + 60px + 12px + env(safe-area-inset-bottom)) !important;
    right: 16px !important;
    max-height: calc(100dvh - 76px - 16px - 60px - 12px - env(safe-area-inset-bottom) - 80px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}
/* iOS pseudo-fullscreen shares the launcher's z-index and would be covered by it. */
body:has(#tour.pseudo-fullscreen) talkie-assistant { display: none; }

/* ---------- tour poster gets the render ---------- */
.tour-poster { background: #0b0d0e url("https://assets.talkie-bird.online/v1/assets/hero.jpg") center / cover no-repeat; }
.tour-poster::before { content: ""; position: absolute; inset: 0; background: rgba(11, 12, 13, .62); }
.poster-inner h2 { font-size: clamp(30px, 4.6vw, 46px); }
.poster-inner { position: relative; z-index: 1; }

/* ---------- header: scrolled state, scroll-progress hairline, current section ---------- */
.site-header { transition: background .3s ease; }
.site-header.scrolled { background: var(--header-bg-solid); }
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: var(--accent); transform: scaleX(var(--progress, 0)); transform-origin: left;
}
.main-nav a[aria-current="true"] { color: var(--ink); }

/* ---------- scroll animations ----------
   Everything below is gated on html.fx, which an inline script in index.html sets before first
   paint unless prefers-reduced-motion is on; without it the page is static and fully visible.
   page.js adds .in when an element scrolls into view, --d (batch stagger) and --i (child index). */
:root { --ease-out: cubic-bezier(.16, 1, .3, 1); }

.fx .reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .9s var(--ease-out) var(--d, 0s), transform 1.1s var(--ease-out) var(--d, 0s);
}
.fx .reveal.in { opacity: 1; transform: none; }

/* containers whose children rise one after another */
.fx .reveal[data-stagger] { opacity: 1; transform: none; }
.fx [data-stagger] > * {
  opacity: 0; transform: translateY(22px);
  transition: opacity .8s var(--ease-out), transform 1s var(--ease-out);
  transition-delay: calc(var(--d, 0s) + var(--i, 0) * 90ms);
}
.fx .section-head h2 { transform: translateY(.45em); }
.fx [data-stagger].in > * { opacity: 1; transform: none; }

/* section-head eyebrow: a bronze rule that draws in before the label */
.section-head .eyebrow { display: flex; align-items: center; gap: 14px; }
.section-head .eyebrow::before { content: ""; width: 32px; height: 1px; background: var(--warm); transform-origin: left; }
.fx .section-head .eyebrow::before { transform: scaleX(0); transition: transform 1.2s var(--ease-out) calc(var(--d, 0s) + .2s); }
.fx .section-head.in .eyebrow::before { transform: none; }

/* hero: staggered intro on load, then parallax image + content that lifts and fades (--hp 0→1) */
@keyframes fx-rise { from { opacity: 0; transform: translateY(30px); } }
@keyframes fx-fade { from { opacity: 0; } }
.fx .hero picture { animation: fx-fade 1.6s ease both; }
.fx .hero-content > * { animation: fx-rise 1.3s var(--ease-out) both; animation-delay: calc(.2s + var(--i, 0) * .12s); }
.hero-content > :nth-child(2) { --i: 1; }
.hero-content > :nth-child(3) { --i: 2; }
.hero-content > :nth-child(4) { --i: 3; }
.hero-content > :nth-child(5) { --i: 4; }
.fx .hero-content { opacity: calc(1 - var(--hp, 0) * 1.6); transform: translate3d(0, calc(var(--hp, 0) * -60px), 0); }
@media (min-width: 701px) { .fx .hero picture { transform: translate3d(0, calc(var(--hp, 0) * 22%), 0); } }

/* floor plan: the outer wall draws itself (perimeter 2 × (760 + 340) = 2200), rooms sweep in left → right */
.fx .plan-wall { stroke-dasharray: 2200; stroke-dashoffset: 2200; transition: stroke-dashoffset 2.2s cubic-bezier(.65, 0, .35, 1) calc(var(--d, 0s) + .2s); }
.fx .plan-wrap.in .plan-wall { stroke-dashoffset: 0; }
.fx :is(.plan-room, .plan-static, .plan-deck, .plan > text) {
  opacity: 0; transform: scale(.94); transform-box: fill-box; transform-origin: center;
  transition: opacity .7s ease, transform .9s var(--ease-out);
  transition-delay: calc(var(--d, 0s) + .5s + var(--i, 0) * 70ms);
}
.fx .plan-wrap.in :is(.plan-room, .plan-static, .plan-deck, .plan > text) { opacity: 1; transform: none; }

/* 3D tour frame: rises and settles; .settled drops the transform so #tour's fixed-position
   pseudo-fullscreen and Babylon's pointer maths see an untransformed ancestor */
.fx .tour-frame:not(.settled) {
  opacity: 0; transform: translateY(48px) scale(.965);
  transition: opacity 1s var(--ease-out), transform 1.3s var(--ease-out);
}
.fx .tour-frame.in:not(.settled) { opacity: 1; transform: none; }

/* gallery: photos unveil upward, then drift with scroll (--py, set by page.js) */
.card-media { overflow: hidden; }
.card-media picture { display: block; }
.fx .card-media picture { transform: translate3d(0, var(--py, 0px), 0); }
.fx .card-media img { transform: scale(1.08); }
.fx .card.reveal .card-media img {
  clip-path: inset(100% 0 0 0); transform: scale(1.25);
  transition: clip-path 1.2s var(--ease-out) var(--d, 0s), transform 1.6s var(--ease-out) var(--d, 0s), opacity .2s ease;
}
.fx .card.reveal.in .card-media img { clip-path: inset(0); transform: scale(1.08); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-img { animation: none; }
  .mobile-cta, .site-header { transition: none; }
}
