/* ==========================================================================
   Porchlight — "Lights on"
   Palette: dusk ink, twilight, haze, window glow, horizon blush, cool paper
   Type: Big Shoulders Display (signage), Hanken Grotesk (body), IBM Plex Mono (specs)
   ========================================================================== */

:root {
  /* black · white · gold */
  --ink: #0B0B0C;
  --dusk: #17171A;
  --haze: #2A2A2E;
  --glow: #D6B25E;
  --glow-hot: #F1DDA0;
  --blush: #B8A27A;
  --pool: #EDE8DC;
  --paper: #FAF9F6;
  --paper-2: #F0EEE8;
  --card: #FFFFFF;
  --text: #0E0E10;
  --muted: #6A6862;
  --line: rgba(14, 14, 16, 0.12);
  --on-dark: #F4F2EC;
  --on-dark-muted: #ABA79E;
  --line-dark: rgba(244, 242, 236, 0.14);

  --f-display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --f-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --r: 16px;
  --r-sm: 8px;
  --shadow: 0 1px 2px rgba(10, 10, 11, 0.06), 0 18px 40px -22px rgba(10, 10, 11, 0.35);
  --shadow-lift: 0 2px 4px rgba(10, 10, 11, 0.08), 0 30px 60px -26px rgba(10, 10, 11, 0.5);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --nav-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.modal-open { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; }
p { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--f-mono); }
.wrap { width: min(1240px, 100% - 32px); margin-inline: auto; }

:focus-visible { outline: 3px solid var(--glow); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  background: var(--glow); color: var(--ink); padding: 10px 16px; border-radius: var(--r-sm);
  font-weight: 700; text-decoration: none; transition: top .2s;
}
.skip:focus { top: 12px; }

/* ---------- Type ---------- */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
h1, h2, .display {
  font-family: var(--f-display);
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.005em;
  line-height: 0.9;
}
h2 { font-size: clamp(2.7rem, 6vw, 5rem); }
.section-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-sub { color: var(--muted); font-size: 1.08rem; margin-top: 18px; max-width: 60ch; }

/* ---------- Buttons ---------- */
.btn {
  --bh: 52px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--bh); padding: 0 24px;
  border-radius: 6px; border: 1px solid transparent;
  font-weight: 700; font-size: 0.98rem; letter-spacing: 0.01em;
  text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .3s var(--ease), background .2s, color .2s, border-color .2s;
}
.btn:active { transform: translateY(1px); }
.btn-sm { --bh: 42px; padding: 0 18px; font-size: 0.92rem; }
.btn-glow { background: var(--glow); color: var(--ink); box-shadow: 0 0 0 rgba(214, 178, 94, 0); }
.btn-glow:hover { box-shadow: 0 0 34px rgba(214, 178, 94, 0.55); background: var(--glow-hot); }
.btn-ghost { border-color: rgba(244, 242, 236, 0.35); color: var(--on-dark); background: rgba(10, 10, 11, 0.2); }
.btn-ghost:hover { border-color: var(--on-dark); background: rgba(244, 242, 236, 0.08); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--dusk); box-shadow: 0 10px 30px -12px rgba(10, 10, 11, 0.7); }
.btn-line { border-color: var(--line); background: var(--card); color: var(--text); }
.btn-line:hover { border-color: var(--text); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.link-btn { background: none; border: 0; padding: 6px 2px; text-decoration: underline; text-underline-offset: 3px; color: inherit; opacity: 0.75; font-size: 0.92rem; }
.link-btn:hover { opacity: 1; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  color: var(--on-dark);
  /* only the tint fades; animating backdrop-filter re-blurred the hero every frame just as scrolling began */
  transition: background-color .3s, box-shadow .3s;
}
.nav.scrolled {
  background: rgba(10, 10, 11, 0.86);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 1px 0 var(--line-dark);
}
.nav-inner { height: 100%; width: min(1320px, 100% - 32px); margin-inline: auto; display: flex; align-items: center; gap: 28px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark { width: 30px; height: 30px; color: currentColor; }
.logo-word { font-family: var(--f-display); font-weight: 800; font-size: 1.6rem; text-transform: uppercase; letter-spacing: 0.03em; line-height: 1; }
.nav-links { display: flex; gap: 4px; margin-left: 12px; }
.nav-links a {
  text-decoration: none; padding: 8px 12px; border-radius: 6px;
  font-weight: 600; font-size: 0.95rem; color: var(--on-dark-muted);
  transition: color .2s, background .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--on-dark); background: rgba(244, 242, 236, 0.08); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.saved-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 14px;
  border-radius: 6px; border: 1px solid var(--line-dark); background: transparent; color: var(--on-dark);
  font-family: var(--f-mono); font-size: 0.9rem;
}
.saved-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.saved-btn.has svg { fill: var(--blush); stroke: var(--blush); }
.saved-btn:hover { border-color: var(--on-dark-muted); }
.menu-btn { display: none; width: 44px; height: 42px; border: 1px solid var(--line-dark); border-radius: 6px; background: transparent; position: relative; }
.menu-btn span:not(.sr) { position: absolute; left: 12px; right: 12px; height: 2px; background: currentColor; transition: transform .25s; }
.menu-btn span:nth-child(1) { top: 15px; }
.menu-btn span:nth-child(2) { top: 24px; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: max(100svh, 700px);
  display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(180deg, #050506 0%, #0E0E11 42%, #18181C 78%, #2A2620 100%);
  color: var(--on-dark);
  overflow: hidden;
  isolation: isolate;
}
.hero-sky { position: absolute; inset: 0; z-index: -1; }
.starfield { position: absolute; inset: 0; overflow: hidden; }
.home-sky .starfield { position: relative; inset: auto; aspect-ratio: 16 / 9; }
.starfield svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.moon {
  position: absolute; right: 12%; top: 18%;
  width: 54px; height: 54px; border-radius: 50%;
  box-shadow: inset -14px 8px 0 0 #F4E7C8;
  filter: drop-shadow(0 0 18px rgba(244, 231, 200, 0.35));
  transform: rotate(-20deg);
}
.star { fill: #F4F2EC; }
/* each .sf-tw is one bucket of twinkling stars; fading the whole <svg> runs on the compositor, no repaints */
.sf-tw { animation: twinkle 3.6s ease-in-out infinite; animation-delay: var(--t); will-change: opacity; }
/* sections scrolled out of view (the `motion` observer in app.js) stop animating */
.anim-off, .anim-off * { animation-play-state: paused !important; }
/* the hero street's moving scenery holds still once you scroll off the top (onScroll in app.js) */
.hero.still svg * { animation-play-state: paused !important; }

/* back-to-top arrow: top right, under the nav, appears once you're a screen down */
.to-top {
  position: fixed; top: calc(var(--nav-h) + 14px); right: 20px; z-index: 45;
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; padding: 0;
  border: 1px solid rgba(214, 178, 94, 0.55); background: rgba(10, 10, 12, 0.85); color: var(--glow);
  cursor: var(--cur-hover, pointer); box-shadow: 0 10px 28px -10px rgba(0, 0, 0, 0.6);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .25s, transform .25s, visibility .25s, background-color .2s, color .2s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--glow); color: var(--ink); }
.to-top:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; }
.to-top svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
body.modal-open .to-top { display: none; }
@media (max-width: 720px) { .to-top { right: 12px; width: 42px; height: 42px; } }
@keyframes twinkle { 50% { opacity: 0.15; } }

.hero-copy { padding-top: calc(var(--nav-h) + clamp(20px, 5vh, 64px)); position: relative; z-index: 2; pointer-events: none; }
.hero-copy a { pointer-events: auto; }
.hero .eyebrow { color: var(--on-dark-muted); text-transform: none; letter-spacing: 0.01em; font-family: inherit; font-size: 0.98rem; }
.hero h1 {
  font-size: clamp(3.3rem, min(7.4vw, 11vh), 8rem);
  font-weight: 900;
  max-width: 13ch;
  line-height: 0.86;
  animation: rise .9s var(--ease) both;
}
.hero h1 em {
  font-style: normal;
  color: var(--glow);
  text-shadow: 0 0 24px rgba(214, 178, 94, 0.45), 0 0 70px rgba(214, 178, 94, 0.25);
}
.hero .lede { margin-top: 22px; max-width: 44ch; font-size: clamp(1.02rem, 1.4vw, 1.18rem); color: var(--on-dark-muted); animation: rise .9s .12s var(--ease) both; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; animation: rise .9s .22s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

.street {
  position: relative; z-index: 1;
  /* the top of the street SVG is empty sky, so tuck it up under the copy */
  margin-top: clamp(-120px, -7vw, 0px);
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.street::-webkit-scrollbar { display: none; }
.street-svg { width: 100%; min-width: 1080px; height: auto; }.swipe-hint { display: none; }

/* SVG house parts (shared by hero, cards, finder) */
.w { transition: fill .45s ease; transition-delay: var(--d, 0s); }
.w.on { fill: var(--glow); }
.w.off { fill: #2E2E33; }
.g { fill: var(--glow); opacity: 0; transition: opacity .5s ease; transition-delay: var(--d, 0s); }
.g.on { opacity: 0.55; }
.g.lampg { opacity: 0.85; fill: var(--glow-hot); }
.lamp { fill: var(--glow-hot); }
.mul { stroke: #18181B; stroke-width: 2; fill: none; }
.rail { stroke: #5E5440; stroke-width: 2.4; fill: none; }
.fence { stroke: #2A2A2E; stroke-width: 2.4; fill: none; }
.beacon { fill: #E05A4A; animation: blink 2.4s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0.15; } }

.street-svg.boot .w.on { animation: lightOn .6s ease both; animation-delay: var(--d); }
.street-svg.boot .g.on { animation: glowOn 1s ease both; animation-delay: var(--d); }
@keyframes lightOn { from { fill: #2E2E33; } 40% { fill: #F1DDA0; } to { fill: var(--glow); } }
@keyframes glowOn { from { opacity: 0; } 40% { opacity: .85; } to { opacity: .55; } }

.lot { cursor: pointer; outline: none; }
.lot-house { transition: filter .35s ease; }
.street-svg:hover .lot:not(:hover) .lot-house { filter: brightness(0.72) saturate(0.8); }
.lot:hover .w.off, .lot:focus-visible .w.off { fill: var(--glow); transition-delay: 0s; }
.lot:hover .g.off, .lot:focus-visible .g.off { opacity: 0.55; transition-delay: 0s; }
.lot:focus-visible .hit { stroke: var(--glow); stroke-width: 3; stroke-dasharray: 8 6; }

.street-tip {
  position: absolute; z-index: 5; left: 0; top: 0;
  width: 250px;
  background: rgba(10, 10, 12, 0.92);
  border: 1px solid rgba(214, 178, 94, 0.35);
  border-radius: 12px; padding: 14px 16px 12px;
  color: var(--on-dark);
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.6), 0 0 40px -10px rgba(214, 178, 94, 0.35);
  backdrop-filter: blur(8px);
  pointer-events: none;
  opacity: 0; transform: translate(-50%, calc(-100% + 8px));
  transition: opacity .2s, transform .25s var(--ease);
}
.street-tip.show { opacity: 1; transform: translate(-50%, -100%); }
.street-tip::after {
  content: ""; position: absolute; left: 50%; bottom: -7px; width: 12px; height: 12px;
  background: inherit; border-right: 1px solid rgba(214, 178, 94, 0.35); border-bottom: 1px solid rgba(214, 178, 94, 0.35);
  transform: translateX(-50%) rotate(45deg);
}
.tip-status { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--glow); }
.tip-price { font-family: var(--f-display); font-weight: 800; font-size: 2rem; line-height: 1; margin-top: 4px; }
.tip-addr { font-weight: 600; margin-top: 4px; }
.tip-specs { font-family: var(--f-mono); font-size: 0.78rem; color: var(--on-dark-muted); margin-top: 6px; }
.tip-cta { font-size: 0.8rem; color: var(--glow-hot); margin-top: 8px; }

/* ---------- Closings tape (stock-ticker style, js/closings.js) ---------- */
.tape {
  --up: #3DDC84; --down: #FF5A5F; --flat: #8E8E93;
  position: relative; display: flex; align-items: stretch; height: 58px;
  background: #060607; color: var(--on-dark, #F4F1EA);
  border-block: 1px solid var(--glow);
  white-space: nowrap; overflow: hidden;
}
.tape-board {
  position: relative; z-index: 2; flex: none;
  display: flex; align-items: center; gap: 18px;
  padding: 10px 22px 10px 18px;
  background: var(--glow); color: var(--ink);
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
  padding-right: 34px;
}
.tape-live {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--f-mono); font-size: 0.7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  background: var(--ink); color: #fff; padding: 4px 9px 4px 8px; border-radius: 4px;
}
.tape-live i { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #FF3B30; }
/* the pulse ring is a scaled copy of the dot (transform + opacity) rather than an animated box-shadow, which repainted every frame */
.tape-live i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgba(255, 59, 48, .7); animation: tape-pulse 1.4s ease-out infinite; }
@keyframes tape-pulse { 0% { transform: scale(1); opacity: 1; } 70%, 100% { transform: scale(2.75); opacity: 0; } }
.tape-title { font-family: var(--f-display); font-weight: 800; font-size: 1.25rem; text-transform: uppercase; letter-spacing: .02em; }
.tape-stat { display: flex; flex-direction: column; line-height: 1.05; }
.tape-stat small { font-family: var(--f-mono); font-size: 0.58rem; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.tape-stat b { font-family: var(--f-mono); font-size: 0.98rem; font-weight: 700; font-variant-numeric: tabular-nums; display: inline-block; transform-origin: left center; }
.tape-stat b.bump { animation: tape-bump .55s ease-out; }
@keyframes tape-bump { 0% { transform: scale(1.22); color: #fff; text-shadow: 0 0 10px rgba(255,255,255,.9); } 100% { transform: scale(1); } }
.tape-team .tape-live, .tape-team .tape-stat { display: none; }
.tape-demo { font-family: var(--f-mono); font-size: 0.6rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; border: 1px dashed var(--ink); padding: 3px 6px; border-radius: 3px; opacity: .75; cursor: help; }
.tape-window {
  position: relative; flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: stretch;
  background: #060607;
}
.tape-window::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 60px; background: linear-gradient(90deg, rgba(6, 6, 7, 0), #060607); pointer-events: none; }
.tape-track { position: relative; display: flex; flex: none; height: 100%; background: #060607; }
.tk {
  display: inline-flex; align-items: center; gap: 10px; flex: none; height: 100%;
  padding: 0 22px; border-right: 1px solid rgba(214, 178, 94, .16);
  font-family: var(--f-mono); font-size: 0.86rem; font-variant-numeric: tabular-nums;
}
.tk-sym { font-family: var(--f-display); font-weight: 800; font-size: 1.15rem; letter-spacing: .03em; text-transform: uppercase; color: #fff; }
.tk-type { font-size: 0.62rem; letter-spacing: .1em; color: var(--glow); border: 1px solid rgba(214, 178, 94, .45); padding: 1px 5px; border-radius: 3px; }
.tk-px { color: #fff; font-weight: 600; }
.tk-chg { font-weight: 700; }
.tk-chg.up { color: var(--up); }
.tk-chg.down { color: var(--down); }
.tk-chg.flat { color: var(--flat); }
.tk-firms { color: var(--flat); font-size: 0.7rem; }
.tape-src { font-size: 0.64rem; letter-spacing: .06em; color: var(--flat); white-space: nowrap; }
.tk-badge { font-size: 0.62rem; font-weight: 700; letter-spacing: .14em; background: var(--glow); color: var(--ink); padding: 2px 6px; border-radius: 3px; }
.tk-note { color: var(--glow-hot); font-size: 0.78rem; }
.tk-team .tk-sym { color: var(--glow-hot); }
.tk.fresh { animation: tk-fresh 2.8s ease-out; }
.tk.fresh .tk-px { animation: tk-fresh-px 2.8s ease-out; }
@keyframes tk-fresh { 0%, 25% { background: rgba(214, 178, 94, .34); box-shadow: inset 0 -2px 0 var(--glow); } 100% { background: transparent; box-shadow: inset 0 -2px 0 transparent; } }
@keyframes tk-fresh-px { 0%, 40% { color: var(--glow-hot); } 100% { color: #fff; } }
@media (max-width: 1000px) {
  .tape-wide { display: none; }
}
@media (max-width: 600px) {
  .tape { height: 50px; }
  .tape-title { display: none; }
  .tape-board { gap: 12px; padding: 8px 28px 8px 12px; }
  .tk { padding: 0 16px; }
  .tk-sym { font-size: 1rem; }
}

/* ---------- Listings ---------- */
.listings { padding: clamp(80px, 10vw, 140px) 0; }
/* free setup: the MLS's own search (or "send me MLS matches") */
.mls-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 18px 32px; flex-wrap: wrap;
  margin: 0 0 28px; padding: 24px 28px; border-radius: 18px;
  background: var(--ink); color: var(--on-dark, #F4F1EA);
  border: 1px solid rgba(214, 178, 94, .35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 18px 40px -24px rgba(0, 0, 0, .55);
}
.mls-copy { flex: 1 1 380px; min-width: 0; }
.mls-kicker { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--glow); margin: 0 0 6px; }
.mls-title { font-family: var(--f-display); font-weight: 800; font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.05; text-transform: uppercase; margin: 0; }
.mls-sub { color: var(--on-dark-muted, #B9B3A6); margin: 8px 0 0; font-size: 0.95rem; }
.mls-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.decor-lot { pointer-events: none; }
.listings.few #fTag, .listings.few .filter-row { display: none; }
.filters {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px 24px;
  padding-bottom: 24px; border-bottom: 1px solid var(--line); margin-bottom: 18px;
}
.tabs { display: inline-flex; background: var(--paper-2); border-radius: 10px; padding: 4px; gap: 2px; }
.tabs button {
  border: 0; background: transparent; padding: 9px 16px; border-radius: 7px;
  font-weight: 600; font-size: 0.94rem; color: var(--muted);
  transition: background .2s, color .2s, box-shadow .2s;
}
.tabs button[aria-selected="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(10, 10, 11, 0.14); }
.tabs button:hover { color: var(--text); }
.filter-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.field select {
  appearance: none; -webkit-appearance: none;
  height: 42px; padding: 0 36px 0 14px; min-width: 150px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--card);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235D6082' stroke-width='1.6' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; background-size: 11px;
  font-weight: 500; font-size: 0.94rem;
}
.field select:hover { border-color: rgba(14, 14, 16, 0.3); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--card); height: 42px; }
.seg button { border: 0; background: transparent; padding: 0 13px; font-weight: 600; font-size: 0.9rem; color: var(--muted); border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button[aria-checked="true"] { background: var(--ink); color: #fff; }
.seg button:hover:not([aria-checked="true"]) { background: var(--paper); color: var(--text); }
.result-count { font-size: 0.82rem; color: var(--muted); }
.result-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; min-height: 40px; }
.view-toggle { display: inline-flex; height: 40px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--card); flex: none; }
.view-toggle button {
  display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent;
  padding: 0 14px; font-weight: 600; font-size: 0.9rem; color: var(--muted);
  transition: background .2s, color .2s;
}
.view-toggle button + button { border-left: 1px solid var(--line); }
.view-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.view-toggle button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.view-toggle button:hover:not([aria-pressed="true"]) { background: var(--paper); color: var(--text); }

/* ---------- Map view ---------- */
.map-view {
  display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 20px;
  height: min(74vh, 740px); min-height: 500px;
}
/* no overscroll-behavior here: when the list is empty or at its end, the wheel must move the page */
.map-list { overflow-y: auto; display: grid; align-content: start; gap: 10px; padding: 2px 8px 2px 2px; }
.map-wrap { position: relative; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); background: #08080A; isolation: isolate; }
.map-canvas { position: absolute; inset: 0; background: #08080A; font-family: var(--f-body); }
/* turn light map tiles into a dusk-colored night map */
.map-canvas.invert .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) saturate(0.15) sepia(0.4) hue-rotate(205deg) saturate(1.5) brightness(0.8) contrast(1.12); }
.map-error { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--on-dark-muted); }

.map-legend {
  position: absolute; left: 12px; top: 12px; z-index: 1000;
  display: flex; flex-wrap: wrap; gap: 4px 12px;
  padding: 8px 12px; border-radius: 8px;
  background: rgba(10, 10, 12, 0.88);
  font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark);
  pointer-events: none;
}
.lg::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; background: var(--glow); box-shadow: 0 0 8px var(--glow); vertical-align: -1px; }
.lg.coming-soon::before { background: var(--pool); box-shadow: 0 0 8px var(--pool); }
.lg.pending::before { background: var(--blush); box-shadow: 0 0 8px var(--blush); }
.lg.sold::before { background: var(--ink); box-shadow: 0 0 0 1.5px var(--glow); }

.map-canvas .pin-wrap { background: none; border: 0; outline: none; }
.pin {
  position: absolute; left: 0; top: 0;
  transform: translate(-50%, calc(-100% - 8px));
  transform-origin: 50% calc(100% + 8px);
  padding: 6px 10px 5px; border-radius: 6px;
  background: var(--glow); color: var(--ink);
  font-family: var(--f-display); font-weight: 800; font-size: 1.05rem; line-height: 1; letter-spacing: .02em; white-space: nowrap;
  box-shadow: 0 0 0 2px rgba(10, 10, 12, 0.9), 0 0 18px rgba(214, 178, 94, 0.5), 0 8px 18px -6px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s;
}
.pin::after {
  content: ""; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px;
  background: inherit; transform: translateX(-50%) rotate(45deg);
  box-shadow: 2px 2px 0 0 rgba(10, 10, 12, 0.9);
}
.pin.coming-soon { background: var(--pool); box-shadow: 0 0 0 2px rgba(10, 10, 12, 0.9), 0 0 18px rgba(127, 216, 230, 0.5), 0 8px 18px -6px rgba(0, 0, 0, 0.6); }
.pin.pending { background: var(--blush); box-shadow: 0 0 0 2px rgba(10, 10, 12, 0.9), 0 0 18px rgba(238, 155, 130, 0.45), 0 8px 18px -6px rgba(0, 0, 0, 0.6); }
.pin.sold { background: var(--ink); color: var(--glow); box-shadow: 0 0 0 1.5px var(--glow), 0 8px 18px -6px rgba(0, 0, 0, 0.6); }
.pin.sold::after { box-shadow: 1.5px 1.5px 0 0 var(--glow); }
.pin.cluster {
  background: var(--ink); color: var(--on-dark);
  font-size: 0.95rem; letter-spacing: .04em; text-transform: uppercase;
  box-shadow: 0 0 0 2px var(--glow), 0 0 22px rgba(214, 178, 94, 0.45), 0 8px 18px -6px rgba(0, 0, 0, 0.6);
}
.pin.cluster::after { box-shadow: 2px 2px 0 0 var(--glow); }
/* ten or more homes in one spot: a round bubble that grows and glows with the count,
   so the zoomed-out map shows where the homes are */
.bubble {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%);
  display: grid; place-items: center;
  width: var(--d); height: var(--d); border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, rgba(232, 200, 120, 0.98), rgba(214, 178, 94, 0.9));
  color: var(--ink);
  font-family: var(--f-display); font-weight: 800; font-size: var(--fs); line-height: 1; letter-spacing: .02em;
  box-shadow: 0 0 0 2px rgba(10, 10, 12, 0.85), 0 0 0 var(--halo) rgba(214, 178, 94, 0.22), 0 0 var(--blur) rgba(214, 178, 94, 0.55);
  cursor: pointer;
  transition: transform .2s var(--ease);
}
.bubble.b1 { --d: 38px; --fs: 0.95rem; --halo: 6px; --blur: 14px; }
.bubble.b2 { --d: 50px; --fs: 1.1rem; --halo: 9px; --blur: 22px; }
.bubble.b3 { --d: 64px; --fs: 1.3rem; --halo: 13px; --blur: 32px; }
.bubble.b4 { --d: 80px; --fs: 1.5rem; --halo: 18px; --blur: 44px; }
.pin-wrap:hover .bubble, .pin-wrap.hot .bubble, .pin-wrap:focus-visible .bubble { transform: translate(-50%, -50%) scale(1.1); }
/* the line above a live map's list: how many homes are in view */
.map-note { position: sticky; top: 0; z-index: 2; margin: 0; padding: 4px 2px 8px; background: var(--paper); font-size: 0.9rem; line-height: 1.45; color: var(--muted); }
.scroll-hint { display: none; color: var(--text); font-weight: 600; }
.map-list.scrolls .scroll-hint { display: inline; }
/* a list with more below fades out at the bottom edge */
.map-list.scrolls { -webkit-mask-image: linear-gradient(#000 calc(100% - 44px), transparent); mask-image: linear-gradient(#000 calc(100% - 44px), transparent); padding-bottom: 40px; }
.map-note b { color: var(--text); font-family: var(--f-display); font-weight: 800; font-size: 1.25rem; letter-spacing: .02em; }
.pin-wrap:hover .pin, .pin-wrap.hot .pin, .pin-wrap:focus-visible .pin {
  transform: translate(-50%, calc(-100% - 8px)) scale(1.18);
}
.pin-wrap:focus-visible .pin { outline: 3px solid var(--on-dark); outline-offset: 3px; }

.map-canvas .leaflet-bar { border: 0; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.6); }
.map-canvas .leaflet-bar a { background: rgba(10, 10, 12, 0.9); color: var(--on-dark); border-color: var(--line-dark); width: 34px; height: 34px; line-height: 34px; }
.map-canvas .leaflet-bar a:hover { background: var(--dusk); color: var(--glow); }
.map-canvas .leaflet-control-attribution { background: rgba(10, 10, 12, 0.75); color: var(--on-dark-muted); font-size: 10px; }
.map-canvas .leaflet-control-attribution a { color: var(--on-dark); }

.pl-popup .leaflet-popup-content-wrapper {
  padding: 0; overflow: hidden; border-radius: 14px;
  background: var(--ink); color: var(--on-dark);
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(214, 178, 94, 0.35);
}
.pl-popup .leaflet-popup-content { margin: 0; width: 250px !important; font: inherit; line-height: 1.4; }
.pl-popup .leaflet-popup-content p { margin: 0; }
.pl-popup .leaflet-popup-tip { background: var(--ink); box-shadow: 0 0 0 1px rgba(214, 178, 94, 0.35); }
.pl-popup a.leaflet-popup-close-button {
  top: 8px; right: 8px; z-index: 2; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(10, 10, 12, 0.7); color: #fff; font: 20px/26px var(--f-body);
}
.pl-popup a.leaflet-popup-close-button:hover { color: var(--glow); }
.pp-art { aspect-ratio: 16 / 9; overflow: hidden; }
.pp-art .scene, .pp-art img { width: 100%; height: 100%; object-fit: cover; }
.pp-body { padding: 12px 14px 14px; }
.pp-status { font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--glow); }
.pp-price { font-family: var(--f-display); font-weight: 800; font-size: 1.9rem; line-height: 1; margin-top: 4px !important; }
.pp-addr { font-weight: 600; margin-top: 4px !important; }
.pp-specs { font-family: var(--f-mono); font-size: 0.74rem; color: var(--on-dark-muted); margin-top: 2px !important; }
.pp .btn { width: 100%; margin-top: 12px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 28px; }
.card {
  position: relative;
  background: var(--card); border-radius: var(--r); overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }
.card-hit { position: absolute; inset: 0; z-index: 2; border: 0; background: transparent; border-radius: var(--r); }
.card-hit:focus-visible { outline-offset: -3px; }
.card-art { aspect-ratio: 4 / 3; overflow: hidden; background: var(--dusk); position: relative; }
.card-art .scene, .card-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.card:hover .card-art .scene, .card:hover .card-art img { transform: scale(1.035); }
.card:hover .w.off, .card:focus-within .w.off { fill: var(--glow); }
.card:hover .g.off, .card:focus-within .g.off { opacity: 0.55; }
.card-body { padding: 18px 20px 20px; }
.price { font-family: var(--f-display); font-weight: 800; font-size: 2.1rem; line-height: 1; letter-spacing: 0.01em; }
.addr { font-size: 1.08rem; font-weight: 700; margin-top: 8px; }
.hood { color: var(--muted); font-size: 0.94rem; }
.specs { font-family: var(--f-mono); font-size: 0.82rem; color: var(--text); margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); display: flex; gap: 14px; flex-wrap: wrap; }
.specs b { font-weight: 500; }
.card-agent { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 0.86rem; color: var(--muted); }

.status {
  position: absolute; z-index: 3; left: 14px; top: 14px;
  font-family: var(--f-mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 6px 10px 5px; border-radius: 4px; background: var(--glow); color: var(--ink);
}
.status.coming-soon { background: var(--pool); }
.status.pending { background: var(--blush); }
.status.sold { background: var(--ink); color: var(--glow); font-family: var(--f-display); font-size: 0.95rem; letter-spacing: 0.08em; font-weight: 800; padding: 4px 12px 3px; }
.new-tag { position: absolute; z-index: 3; right: 14px; bottom: 14px; font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark); background: rgba(10, 10, 12, 0.65); padding: 5px 9px; border-radius: 4px; backdrop-filter: blur(4px); }

.save {
  position: absolute; z-index: 3; right: 12px; top: 12px;
  width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: rgba(10, 10, 12, 0.55); backdrop-filter: blur(6px);
  display: grid; place-items: center; color: #fff;
  transition: transform .2s var(--ease), background .2s;
}
.save svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; transition: fill .2s; }
.save:hover { transform: scale(1.08); background: rgba(10, 10, 12, 0.8); }
.save[aria-pressed="true"] svg { fill: var(--blush); stroke: var(--blush); }
.save.pop svg { animation: pop .4s var(--ease); }
@keyframes pop { 40% { transform: scale(1.35); } }

.avatar {
  --h1: #1A1A1E; --h2: #B8964E;
  display: inline-grid; place-items: center; flex: none;
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(160deg, var(--h1), var(--h2));
  color: var(--glow); font-family: var(--f-display); font-weight: 800; font-size: 0.9rem; letter-spacing: 0.02em;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 56px; height: 56px; font-size: 1.4rem; }

/* ---------- Loading mark: three stacked bars that pulse in turn ----------
   Each bar fades from faint to solid and stretches from half to full width, one after the
   other. Colored by the text color around it; .sm fits inside a button, .lg is for big areas. */
.bars { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; width: 32px; flex: none; }
.bars i { display: block; width: 100%; height: 4px; border-radius: 99px; background: currentColor; opacity: .2; transform: scaleX(.5); animation: bar-pulse 1.5s ease-in-out infinite; }
.bars i:nth-child(2) { animation-delay: .2s; }
.bars i:nth-child(3) { animation-delay: .4s; }
.bars.sm { width: 20px; gap: 3px; }
.bars.sm i { height: 3px; }
.bars.lg { width: 48px; gap: 6px; }
.bars.lg i { height: 6px; }
@keyframes bar-pulse { 0%, 100% { opacity: .2; transform: scaleX(.5); } 50% { opacity: 1; transform: scaleX(1); } }
/* the mark with a line of text under it, for an area that is loading */
.loading { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 64px 20px; color: var(--text); text-align: center; }
.loading span:last-child { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.loading.slim { flex-direction: row; justify-content: flex-start; padding: 6px 2px; }
.loading.tall { padding: 120px 20px; }
.grid .loading { grid-column: 1 / -1; }
.btn.busy { pointer-events: none; opacity: .8; }
/* the pill over the map while the map, or every home's position, is still coming in */
.map-loading {
  position: absolute; left: 12px; bottom: 12px; z-index: 1000;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; border-radius: 99px;
  background: rgba(10, 10, 12, 0.9);
  color: var(--on-dark); font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: .1em; text-transform: uppercase;
  pointer-events: none;
}
.map-loading[hidden] { display: none; }
.pin.busy { animation: pin-busy .7s ease-in-out infinite alternate; }
@keyframes pin-busy { to { opacity: .4; } }

/* live MLS search: next page of results, and the grid while a search is running */
.more { display: flex; justify-content: center; margin-top: 32px; }
.grid[aria-busy="true"] > .c3 { opacity: .55; transition: opacity .2s; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-title { font-family: var(--f-display); font-weight: 800; font-size: 2rem; text-transform: uppercase; color: var(--text); margin-bottom: 8px; }

/* ---------- Finder ---------- */
.finder {
  position: relative;
  padding: clamp(80px, 10vw, 130px) 0;
  background: linear-gradient(180deg, #070708 0%, #101013 60%, #18181C 100%);
  color: var(--on-dark);
  /* clip (not hidden) so the sticky house preview still works */
  overflow: hidden; overflow: clip; isolation: isolate;
}
#finderStars { position: absolute; inset: 0; z-index: -1; opacity: 0.7; }
.finder .eyebrow { color: var(--on-dark-muted); }
.finder-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.finder-title { font-size: clamp(2.7rem, 5.6vw, 4.8rem); }
.finder-title span { color: var(--glow); display: block; }
.progress { height: 4px; background: var(--line-dark); border-radius: 4px; margin: 30px 0 28px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: var(--glow); box-shadow: 0 0 12px var(--glow); border-radius: 4px; transition: width .5s var(--ease); }

.step { min-height: 380px; }
.step-count { font-family: var(--f-mono); font-size: 0.78rem; color: var(--glow); letter-spacing: .1em; text-transform: uppercase; }
.step-q { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.8rem, 3vw, 2.5rem); text-transform: uppercase; line-height: 1; margin: 8px 0 6px; }
.step-hint { color: var(--on-dark-muted); font-size: 0.96rem; margin-bottom: 22px; }
.step-anim { animation: stepIn .45s var(--ease) both; }
@keyframes stepIn { from { opacity: 0; transform: translateX(18px); } }

.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.opts.small { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.opt {
  position: relative; text-align: left;
  padding: 16px 16px 15px;
  border-radius: 10px;
  border: 1px solid var(--line-dark);
  background: rgba(244, 242, 236, 0.04);
  color: var(--on-dark);
  transition: border-color .2s, background .2s, box-shadow .3s, transform .2s var(--ease);
}
.opt:hover { border-color: rgba(214, 178, 94, 0.6); background: rgba(244, 242, 236, 0.07); transform: translateY(-2px); }
.opt[aria-pressed="true"] {
  border-color: var(--glow);
  background: rgba(214, 178, 94, 0.12);
  box-shadow: 0 0 0 1px var(--glow), 0 0 30px -6px rgba(214, 178, 94, 0.5);
}
.opt-label { display: block; font-weight: 700; font-size: 1.02rem; }
.opt-sub { display: block; font-size: 0.84rem; color: var(--on-dark-muted); margin-top: 3px; line-height: 1.35; }
.opts.small .opt { text-align: center; padding: 18px 8px; }
.opts.small .opt-label { font-family: var(--f-display); font-size: 1.9rem; font-weight: 800; line-height: 1; }
.opt .check {
  position: absolute; right: 12px; top: 12px; width: 20px; height: 20px; border-radius: 5px;
  border: 1.5px solid var(--line-dark); display: grid; place-items: center;
}
.opt .check svg { width: 12px; height: 12px; stroke: var(--ink); stroke-width: 3; fill: none; opacity: 0; }
.opt[aria-pressed="true"] .check { background: var(--glow); border-color: var(--glow); }
.opt[aria-pressed="true"] .check svg { opacity: 1; }
.opt.multi { padding-right: 40px; }

.finder-nav { display: flex; align-items: center; gap: 12px; margin-top: 26px; }
.finder-nav .link-btn { margin-left: auto; }

.finder-stage { position: sticky; top: calc(var(--nav-h) + 20px); }
.stage-art {
  border-radius: 18px; overflow: hidden;
  border: 1px solid var(--line-dark);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7), 0 0 80px -30px rgba(214, 178, 94, 0.25);
  aspect-ratio: 520 / 380;
  background: #08080A;
}
.dream { width: 100%; height: 100%; }
.dream .bd, .dream .ft { opacity: 0; transition: opacity .7s ease, transform .7s var(--ease); }
.dream .bd.show, .dream .ft.show { opacity: 1; }
/* the truck drives in from the right (CSS transform overrides the SVG attribute) */
.dream .ft[data-ft="truck"] { transform: translate(580px, 300px); transition: opacity .6s ease, transform 1.1s var(--ease); }
.dream .ft[data-ft="truck"].show { transform: translate(408px, 300px); }
.dream .bp { stroke: #C9B27A; stroke-width: 1.4; stroke-dasharray: 5 4; opacity: 0.9; transition: opacity .7s ease; }
.dream .bp text { fill: #C9B27A; stroke: none; font-family: var(--f-mono); font-size: 10px; }
.dream .solid { opacity: 0; transition: opacity .9s ease; }
.dream.built .bp { opacity: 0; }
.dream.built .solid { opacity: 1; }
.dream .smoke circle { fill: #8A867E; opacity: 0.3; animation: smoke 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.dream .smoke circle:nth-child(2) { animation-delay: .5s; }
.dream .smoke circle:nth-child(3) { animation-delay: 1s; }
@keyframes smoke { 0% { transform: translateY(8px) scale(.6); opacity: 0; } 40% { opacity: .35; } 100% { transform: translateY(-14px) scale(1.2); opacity: 0; } }
.dream .shimmer { animation: shimmer 3s ease-in-out infinite; }
@keyframes shimmer { 50% { opacity: .45; transform: translateX(6px); } }
.sign-text { font-family: var(--f-display); font-weight: 800; font-size: 12px; fill: var(--ink); letter-spacing: .06em; }
.truck-text { font-family: var(--f-display); font-weight: 800; font-size: 11px; fill: #1A1A1E; letter-spacing: .06em; }
.dream.celebrate .w.on { fill: var(--glow-hot); }
.dream.celebrate .g.on { opacity: .7; }

.stage-readout { display: flex; align-items: center; gap: 22px; margin-top: 20px; }
.count { display: flex; flex-direction: column; align-items: center; flex: none; min-width: 96px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line-dark); background: rgba(244, 242, 236, 0.04); }
.count-num { font-family: var(--f-display); font-weight: 900; font-size: 3.4rem; line-height: 1; color: var(--glow); text-shadow: 0 0 20px rgba(214, 178, 94, 0.35); font-variant-numeric: tabular-nums; }
.count-num.bump { animation: bump .4s var(--ease); }
@keyframes bump { 40% { transform: scale(1.18); } }
.count-label { font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-muted); text-align: center; margin-top: 4px; }
.stage-summary { color: var(--on-dark); font-size: 1.02rem; line-height: 1.5; }
.stage-summary b { color: var(--glow-hot); font-weight: 600; }

/* results */
.results-list { display: grid; gap: 10px; margin: 6px 0 20px; }
.mini {
  display: grid; grid-template-columns: 96px 1fr auto; gap: 14px; align-items: center;
  padding: 8px; padding-right: 14px; border-radius: 12px;
  border: 1px solid var(--line-dark); background: rgba(244, 242, 236, 0.04);
  text-align: left; color: var(--on-dark); width: 100%;
  transition: border-color .2s, background .2s, transform .2s var(--ease);
}
.mini:hover { border-color: rgba(214, 178, 94, 0.6); background: rgba(244, 242, 236, 0.08); transform: translateX(3px); }
.mini-art { width: 96px; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; }
.mini-art .scene, .mini-art img { width: 100%; height: 100%; object-fit: cover; }
.mini-price, .mini-addr, .mini-specs { display: block; }
.mini-price { font-family: var(--f-display); font-weight: 800; font-size: 1.5rem; line-height: 1; }
.mini-addr { font-weight: 600; font-size: 0.94rem; margin-top: 3px; }
.mini-specs { font-family: var(--f-mono); font-size: 0.74rem; color: var(--on-dark-muted); margin-top: 2px; }
.mini-hits { font-family: var(--f-mono); font-size: 0.72rem; color: var(--glow); text-align: right; }
.close-note { font-size: 0.9rem; color: var(--on-dark-muted); margin-bottom: 10px; }

.match-agent {
  display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center;
  padding: 18px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(214, 178, 94, 0.16), rgba(214, 178, 94, 0.04));
  border: 1px solid rgba(214, 178, 94, 0.4);
}
.match-agent .avatar { width: 64px; height: 64px; font-size: 1.6rem; }
.match-eyebrow { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--glow); }
.match-name { font-family: var(--f-display); font-weight: 800; font-size: 1.8rem; text-transform: uppercase; line-height: 1; margin-top: 2px; }
.match-why { font-size: 0.9rem; color: var(--on-dark-muted); margin-top: 6px; }
.match-why li { margin-left: 1em; }
.match-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Team ---------- */
.team { padding: clamp(80px, 10vw, 140px) 0; background: var(--paper-2); }
.team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.agent {
  position: relative; text-align: left;
  display: flex; flex-direction: column;
  padding: 16px 16px 20px;
  border: 0; border-radius: var(--r);
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.agent:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }
.agent.lead { grid-column: span 2; flex-direction: row; gap: 28px; padding: 20px; }
.agent.lead .portrait { width: 44%; flex: none; }
.agent.lead .agent-info { padding-top: 10px; display: flex; flex-direction: column; }
.agent.lead .agent-name { font-size: clamp(2.4rem, 4vw, 3.6rem); }
.agent.lead .agent-quote { display: block; }

.portrait {
  --h1: #1A1A1E; --h2: #3A3630; --h3: #B89A5C;
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: 999px 999px 10px 10px;
  background: linear-gradient(180deg, var(--h1) 0%, var(--h2) 62%, var(--h3) 100%);
  display: grid; place-items: center;
  isolation: isolate;
}
.portrait::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(120% 90% at 50% 100%, rgba(214, 178, 94, 0.95), rgba(214, 178, 94, 0.5) 45%, rgba(214, 178, 94, 0) 75%);
  opacity: 0; transition: opacity .5s ease;
}
.portrait::after {
  content: ""; position: absolute; inset: 0; z-index: 3;
  background:
    linear-gradient(90deg, transparent calc(50% - 2px), rgba(10, 10, 11, 0.55) calc(50% - 2px), rgba(10, 10, 11, 0.55) calc(50% + 2px), transparent calc(50% + 2px)),
    linear-gradient(180deg, transparent calc(56% - 2px), rgba(10, 10, 11, 0.55) calc(56% - 2px), rgba(10, 10, 11, 0.55) calc(56% + 2px), transparent calc(56% + 2px));
  box-shadow: inset 0 0 0 6px rgba(10, 10, 11, 0.55);
  border-radius: inherit;
  pointer-events: none;
}
.portrait.has-photo::after { background: none; box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.9); }
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; }
.initials {
  position: relative; z-index: 2;
  font-family: var(--f-display); font-weight: 900; font-size: clamp(4rem, 8vw, 6.5rem); line-height: 1;
  color: var(--glow); letter-spacing: 0.02em;
  text-shadow: 0 0 30px rgba(214, 178, 94, 0.5);
  transition: color .4s, text-shadow .4s;
}
.agent:hover .portrait::before, .agent:focus-visible .portrait::before { opacity: 1; }
.agent:hover .initials, .agent:focus-visible .initials { color: var(--ink); text-shadow: none; }
.agent-info { padding: 18px 4px 0; }
.agent-name { font-family: var(--f-display); font-weight: 800; font-size: 2.1rem; text-transform: uppercase; line-height: 0.95; }
.agent-role { color: var(--muted); font-weight: 600; font-size: 0.94rem; margin-top: 6px; }
.agent-quote { display: none; font-size: 1.2rem; line-height: 1.45; margin: 18px 0; max-width: 34ch; }
.agent-quote::before { content: "“"; }
.agent-quote::after { content: "”"; }
.agent-stats { display: flex; gap: 18px; flex-wrap: wrap; font-family: var(--f-mono); font-size: 0.8rem; margin-top: 14px; }
.agent-stats b { display: block; font-family: var(--f-display); font-weight: 800; font-size: 1.6rem; line-height: 1; }
.agent-stats span { color: var(--muted); }
.agent-stats b { color: var(--text); margin-bottom: 2px; }
/* lead card: the stats sit under the tags and stretch to fill the rest of the card */
.lead-stats { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 22px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.lead-stats > span { display: flex; flex-direction: column; justify-content: center; background: var(--card); padding: 16px 18px; }
.lead-stats b { font-family: var(--f-display); font-weight: 900; font-size: clamp(2.2rem, 3.4vw, 3.2rem); line-height: 1; letter-spacing: 0; color: var(--text); margin-bottom: 6px; }
.agent-name, .agent-role, .agent-info { display: block; }
.agent.lead .agent-info { display: flex; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag { font-size: 0.78rem; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: var(--paper); color: var(--text); border: 1px solid var(--line); }
.agent.lead .agent-more { margin-top: auto; padding-top: 18px; font-weight: 700; display: inline-flex; gap: 8px; align-items: center; }

/* ---------- Contact ---------- */
.contact { padding: clamp(80px, 10vw, 140px) 0; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 90px); align-items: start; }
.office { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; margin: 36px 0 0; }
.office dt { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.office dd { margin: 0; font-weight: 600; }
.office a { text-decoration-color: rgba(14, 14, 16, .3); text-underline-offset: 3px; }

.card-form { background: var(--card); border-radius: 20px; padding: clamp(22px, 3vw, 34px); box-shadow: var(--shadow); display: grid; gap: 16px; }
.chips-field { border: 0; padding: 0; margin: 0; }
.chips-field legend, .input > span { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; padding: 0; }
.input > span em { font-style: normal; text-transform: none; letter-spacing: 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-opt input { position: absolute; opacity: 0; pointer-events: none; }
.chip-opt span { display: inline-block; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); font-weight: 600; font-size: 0.92rem; cursor: pointer; transition: all .2s; }
.chip-opt input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip-opt input:focus-visible + span { outline: 3px solid var(--glow); outline-offset: 2px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.input { display: flex; flex-direction: column; }
.input input, .input textarea, .input select {
  border: 1px solid var(--line); border-radius: 8px; background: var(--paper);
  padding: 12px 14px; font-size: 1rem; width: 100%;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.input textarea { resize: vertical; min-height: 100px; }
.input input:focus, .input textarea:focus { outline: none; border-color: var(--ink); background: #fff; box-shadow: 0 0 0 3px rgba(214, 178, 94, 0.5); }
.input input[aria-invalid="true"] { border-color: #B23A33; }
.form-error { color: #B23A33; font-size: 0.9rem; font-weight: 600; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--on-dark-muted); padding: 60px 0 30px; }
.footer .logo { color: var(--on-dark); margin-bottom: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; gap: 32px; align-items: start; }
.footer nav { display: flex; flex-direction: column; gap: 8px; }
.footer nav a { text-decoration: none; color: var(--on-dark); font-weight: 600; }
.footer nav a:hover { color: var(--glow); }
.eho { display: flex; gap: 14px; align-items: flex-start; }
.eho svg { width: 36px; flex: none; color: var(--on-dark); }
.eho img { width: 38px; height: auto; flex: none; }
/* the brokerage's mark beside its name and license line */
.foot-brokerage { display: flex; gap: 14px; align-items: flex-start; }
.foot-brokerage img { width: 54px; height: auto; flex: none; }
.fine { font-size: 0.84rem; line-height: 1.5; }
/* copyright and the maker's signature share one centred row */
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line-dark); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 32px; text-align: center; }
.footer-bottom .aaaa-sig { justify-content: center; }
.copy { margin: 0; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5, 5, 6, 0.66); backdrop-filter: blur(6px); animation: fade .3s ease both; }
.modal-panel {
  position: relative; width: min(1120px, 100%); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
  overflow: auto; overscroll-behavior: contain;
  background: var(--paper); border-radius: 22px;
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.6);
  animation: panelIn .45s var(--ease) both;
  outline: none;
}
.modal-panel.narrow { width: min(720px, 100%); }
@keyframes fade { from { opacity: 0; } }
@keyframes panelIn { from { opacity: 0; transform: translateY(28px) scale(.98); } }
.modal-close {
  position: sticky; top: 14px; float: right; margin: 14px 14px -58px 0; z-index: 5;
  width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(10, 10, 12, 0.7); color: #fff; display: grid; place-items: center; backdrop-filter: blur(6px);
}
.modal-close svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.2; }
.modal-close:hover { background: var(--ink); }

.lx-hero { position: relative; aspect-ratio: 16 / 7; background: var(--dusk); overflow: hidden; }
.lx-hero .scene, .lx-hero img { width: 100%; height: 100%; object-fit: cover; }
.lx-hero:hover .w.off { fill: var(--glow); }
.lx-hero:hover .g.off { opacity: .55; }
.lx-hero .status { left: 24px; top: 24px; }
.lx-thumbs { display: flex; gap: 8px; padding: 10px 24px 0; overflow-x: auto; }
.lx-thumbs button { flex: none; width: 90px; aspect-ratio: 4/3; border-radius: 6px; overflow: hidden; border: 2px solid transparent; padding: 0; }
.lx-thumbs button[aria-current="true"] { border-color: var(--glow); }
.lx-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.lx-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 40px; padding: 32px clamp(20px, 3vw, 40px) 40px; }
.lx-price { font-family: var(--f-display); font-weight: 900; font-size: clamp(3rem, 6vw, 4.6rem); line-height: 0.9; }
.lx-addr { font-size: 1.45rem; font-weight: 700; margin-top: 10px; }
.lx-hood { color: var(--muted); }
.lx-specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; margin: 26px 0; overflow: hidden; background: var(--card); }
.lx-specs div { padding: 14px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lx-specs div:nth-child(3n) { border-right: 0; }
.lx-specs div:nth-last-child(-n + 3) { border-bottom: 0; }
.lx-specs dt { font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.lx-specs dd { margin: 2px 0 0; font-family: var(--f-display); font-weight: 800; font-size: 1.6rem; line-height: 1.1; }
.lx-blurb { font-size: 1.12rem; line-height: 1.6; }
.lx-details { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; }
.lx-details li { position: relative; padding-left: 20px; }
.lx-details li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 9px; height: 9px; border-radius: 2px; background: var(--glow); box-shadow: 0 0 8px var(--glow); }
.h3 { font-family: var(--f-display); font-weight: 800; font-size: 1.7rem; text-transform: uppercase; line-height: 1; margin: 36px 0 16px; }

.calc { background: var(--card); border-radius: 14px; padding: 22px; border: 1px solid var(--line); }
.calc-total { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.calc-total strong { font-family: var(--f-display); font-weight: 900; font-size: 3rem; line-height: 1; }
.calc-total span { color: var(--muted); }
.calc-bar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; margin: 16px 0 10px; background: var(--paper-2); }
.calc-bar i { display: block; height: 100%; transition: width .4s var(--ease); }
.calc-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.84rem; color: var(--muted); }
.calc-legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; background: var(--c); }
.calc-inputs { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px; margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--line); }
.calc-inputs label { display: flex; flex-direction: column; gap: 6px; font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.calc-inputs output { font-family: var(--f-body); font-size: 0.95rem; font-weight: 700; color: var(--text); letter-spacing: 0; text-transform: none; }
.calc-inputs input[type="number"], .calc-inputs select { height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; background: var(--paper); font-family: var(--f-body); font-size: 0.95rem; letter-spacing: 0; text-transform: none; color: var(--text); }
input[type="range"] { accent-color: var(--ink); width: 100%; height: 40px; margin: 0; }
.calc-note { font-size: 0.78rem; color: var(--muted); margin-top: 12px; }

.lx-side { display: flex; flex-direction: column; gap: 18px; }
.side-card { background: var(--card); border-radius: 14px; padding: 20px; border: 1px solid var(--line); }
.side-agent { display: flex; gap: 14px; align-items: center; }
.side-agent .who { flex: 1; }
.side-agent .name { font-family: var(--f-display); font-weight: 800; font-size: 1.5rem; text-transform: uppercase; line-height: 1; }
.side-agent .role { color: var(--muted); font-size: 0.88rem; }
.side-agent .link-btn { font-size: 0.85rem; }
.contact-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.contact-row a { height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 0.9rem; transition: all .2s; }
.contact-row a:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.tour-title { font-family: var(--f-display); font-weight: 800; font-size: 1.5rem; text-transform: uppercase; line-height: 1; }
.tour-sub { font-size: 0.88rem; color: var(--muted); margin: 4px 0 14px; }
.days { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.day, .time {
  flex: none; border: 1px solid var(--line); background: var(--paper); border-radius: 8px;
  transition: all .2s;
}
.day { width: 58px; padding: 8px 0; text-align: center; }
.day small { display: block; font-family: var(--f-mono); font-size: 0.64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.day b { display: block; font-family: var(--f-display); font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.time { padding: 9px 0; font-size: 0.86rem; font-weight: 600; }
.day:hover, .time:hover { border-color: var(--text); }
.day[aria-pressed="true"], .time[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.day[aria-pressed="true"] small { color: var(--glow); }
.tour-form { display: grid; gap: 10px; margin-top: 14px; }
.tour-form .input input { padding: 10px 12px; }
.share-row { display: flex; gap: 8px; }
.share-row .btn { flex: 1; }

/* agent modal */
.ax { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(24px, 4vw, 48px); padding: clamp(20px, 3vw, 40px); }
.ax .portrait { position: sticky; top: 0; }
.ax-name { font-family: var(--f-display); font-weight: 900; font-size: clamp(2.8rem, 5vw, 4.2rem); text-transform: uppercase; line-height: .9; }
.ax-role { color: var(--muted); font-weight: 600; margin-top: 8px; }
.ax-quote { font-size: 1.35rem; line-height: 1.4; margin: 24px 0; padding-left: 18px; border-left: 3px solid var(--glow); }
.ax-quote cite { display: block; margin-top: 8px; font-size: .85rem; font-style: normal; opacity: .7; }
.ax-quote cite::before { content: "— "; }
.ax-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 22px 0; }
.ax-stats div { background: var(--card); padding: 14px; }
.ax-stats b { display: block; font-family: var(--f-display); font-weight: 900; font-size: 2rem; line-height: 1; }
.ax-stats span { font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ax-list { display: grid; gap: 10px; }
/* licenses by state + towns by region, on an agent's profile */
.ax-lic { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ax-lic-row { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.ax-lic-row.here { border-color: var(--glow); box-shadow: inset 3px 0 0 var(--glow); }
.ax-lic-st { font-family: var(--f-display); font-weight: 800; font-size: 1.3rem; text-transform: uppercase; line-height: 1; }
.ax-lic-no { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: .04em; color: var(--muted); margin-top: 6px; }
.ax-lic-reach { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; font-size: 0.9rem; font-weight: 600; }
.ax-lic-reach a { overflow-wrap: anywhere; text-decoration-color: var(--glow); }
.ax-towns details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.ax-towns summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 10px; font-weight: 700; }
.ax-towns summary::-webkit-details-marker { display: none; }
.ax-towns summary small { font-family: var(--f-mono); font-size: 0.7rem; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ax-towns summary::after { content: "+"; margin-left: auto; font-family: var(--f-mono); color: #8C6D24; }
.ax-towns details[open] summary::after { content: "–"; }
.ax-towns dl { display: grid; gap: 10px; margin-top: 12px; }
.ax-towns dt { font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: .1em; text-transform: uppercase; color: #8C6D24; }
.ax-towns dd { margin: 2px 0 0; font-size: 0.92rem; line-height: 1.5; }
@media (max-width: 560px) { .ax-lic { grid-template-columns: 1fr; } }
.mini.light { color: var(--text); border-color: var(--line); background: var(--card); }
.mini.light .mini-specs, .mini.light .mini-hits { color: var(--muted); }
.mini.light:hover, .mini.light.hot { border-color: var(--ink); background: var(--card); box-shadow: 0 10px 24px -14px rgba(10, 10, 11, 0.45); }

/* wishlist modal */
.wx { padding: clamp(24px, 4vw, 40px); }
.wx h2 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.wx-summary { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin: 18px 0; font-size: 0.95rem; }
.wx-summary b { font-weight: 700; }
.wx form { display: grid; gap: 14px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90;
  transform: translate(-50%, 140%);
  background: var(--ink); color: var(--on-dark);
  padding: 14px 20px; border-radius: 10px; font-weight: 600;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(214, 178, 94, 0.35);
  transition: transform .4s var(--ease);
  max-width: calc(100% - 32px);
}
.toast.show { transform: translate(-50%, 0); }
.toast::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 10px; background: var(--glow); box-shadow: 0 0 10px var(--glow); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--rd, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* ==========================================================================
   STATES — one look per tab. <html data-state="maine|nh|ma|florida">
   ========================================================================== */
:root { --sky1: #040405; --sky2: #0B0B0E; --sky3: #16161A; --sky4: #2E281E; }
:root[data-state="maine"] { --sky1: #030405; --sky2: #080C10; --sky3: #121A20; --sky4: #2C2A22; }
:root[data-state="nh"] { --sky1: #040304; --sky2: #0C0909; --sky3: #1C1412; --sky4: #3A2C1C; }
:root[data-state="florida"] { --sky1: #050405; --sky2: #100A0C; --sky3: #2A1A16; --sky4: #6A4A26; }
.hero { background: linear-gradient(180deg, var(--sky1) 0%, var(--sky2) 42%, var(--sky3) 78%, var(--sky4) 100%); transition: background .6s; }
.finder { background: linear-gradient(180deg, var(--sky1) 0%, var(--sky2) 60%, var(--sky3) 100%); }
:root[data-state="florida"] .moon { display: none; }
.moon { top: 30%; right: 9%; }
:root[data-state="florida"] #heroStars { opacity: 0.35; }
.hero-copy { padding-top: calc(var(--nav-h) + clamp(28px, 5vh, 56px)); }
.hero h1 { font-size: clamp(2.8rem, min(6.4vw, 9.6vh), 7rem); max-width: 14ch; }

::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; }

/* license-plate tabs */
.plates-wrap { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: clamp(16px, 3vh, 30px); pointer-events: auto; animation: rise .8s var(--ease) both; }
.plates-label { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-muted); }
/* ================= SPECIALTIES & LEAD GEN ================= */
/* "I'm…" entry buttons in the hero */
.intent { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; max-width: 720px; pointer-events: auto; animation: rise .9s .3s var(--ease) both; }
.intent-label { font-family: var(--f-mono); font-size: 0.74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-muted); margin-right: 4px; }
.intent button {
  border: 1px solid rgba(214, 178, 94, 0.45); background: rgba(10, 10, 12, 0.45); color: var(--on-dark);
  padding: 8px 14px; border-radius: 99px; font-size: 0.9rem; font-weight: 600; backdrop-filter: blur(6px);
  transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease);
}
.intent button:hover { background: var(--glow); color: var(--ink); border-color: var(--glow); transform: translateY(-2px); }

/* Services section */
.services-sec { padding: clamp(80px, 10vw, 140px) 0; background: var(--ink); color: var(--on-dark); }
.services-sec .eyebrow { color: var(--glow); }
.services-sec .section-sub { color: var(--on-dark-muted); }
.svc-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.svc-card {
  position: relative; display: flex; flex-direction: column; gap: 10px; text-align: left;
  padding: 26px 24px 22px; border-radius: 18px; border: 1px solid var(--line-dark);
  background: linear-gradient(160deg, rgba(244, 242, 236, 0.05), rgba(244, 242, 236, 0.01)); color: var(--on-dark);
  transition: border-color .3s, transform .35s var(--ease), background .3s;
}
.svc-card:hover { border-color: rgba(214, 178, 94, 0.6); transform: translateY(-4px); background: linear-gradient(160deg, rgba(214, 178, 94, 0.12), rgba(244, 242, 236, 0.02)); }
.svc-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--glow); color: var(--ink); box-shadow: 0 10px 24px -10px rgba(214, 178, 94, 0.8); }
.svc-ic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.svc-title { margin-top: 6px; font-family: var(--f-display); font-weight: 800; font-size: 1.8rem; text-transform: uppercase; line-height: .95; }
.svc-short { color: var(--on-dark-muted); font-size: 0.98rem; }
.svc-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--line-dark); font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark-muted); }
.svc-go { color: var(--glow); white-space: nowrap; }

/* specialty filter + card tags */
.tagrow { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tagrow button { border: 1px solid var(--line); background: var(--card); color: var(--text); padding: 7px 13px; border-radius: 99px; font-size: 0.86rem; font-weight: 600; transition: all .2s; }
.tagrow button i { font-style: normal; font-family: var(--f-mono); font-size: 0.74rem; color: var(--muted); margin-left: 3px; }
.tagrow button[aria-pressed="true"] { background: var(--ink); color: var(--glow); border-color: var(--ink); }
.tagrow button[aria-pressed="true"] i { color: var(--glow-hot); }
.tagrow button:hover:not([aria-pressed="true"]):not([disabled]) { border-color: var(--text); }
.tagrow button[disabled] { opacity: .4; cursor: default; }
.c3-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.c3-tag { padding: 3px 8px; border-radius: 5px; font-family: var(--f-mono); font-size: 0.64rem; letter-spacing: .06em; text-transform: uppercase; background: var(--ink); color: var(--glow); }
.c3 { height: 560px; }
.lx-svc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.lx-svc-btn { border: 1px solid rgba(214, 178, 94, 0.6); background: rgba(214, 178, 94, 0.1); color: var(--text); padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: 0.88rem; }
.lx-svc-btn:hover { background: var(--glow); }
.tag-link { cursor: pointer; background: var(--ink); color: var(--glow); border-color: var(--ink); }
.tag-link:hover { background: var(--glow); color: var(--ink); }
.sell-special { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; font-weight: 600; }
.sell-special button { border: 1px solid var(--line); background: var(--card); padding: 8px 12px; border-radius: 99px; font-size: 0.86rem; font-weight: 600; }
.sell-special button:hover { border-color: var(--ink); background: var(--ink); color: var(--glow); }
.consent { font-size: 0.7rem; line-height: 1.45; color: var(--muted); }

/* specialty page (opens in the modal) */
.svc-hero { padding: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 40px); background: var(--ink); color: var(--on-dark); border-radius: 22px 22px 0 0; }
.svc-hero .eyebrow { color: var(--glow); }
.svc-hero h2 { font-size: clamp(2.2rem, 4.8vw, 3.8rem); max-width: 18ch; }
.svc-pitch { margin-top: 16px; max-width: 62ch; color: var(--on-dark-muted); font-size: 1.08rem; }
.svc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.svc-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 36px; padding: 30px clamp(20px, 3vw, 40px) 40px; }
.svc-for { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; }
.svc-for li { position: relative; padding-left: 20px; }
.svc-for li::before { content: ""; position: absolute; left: 0; top: .5em; width: 9px; height: 9px; border-radius: 2px; background: var(--glow); }
.svc-steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 12px; }
.svc-steps li { counter-increment: step; display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; align-items: start; }
.svc-steps li::before { content: counter(step); grid-row: span 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--ink); color: var(--glow); font-family: var(--f-display); font-weight: 800; font-size: 1.4rem; }
.svc-steps b { font-weight: 700; }
.svc-steps span { color: var(--muted); font-size: 0.95rem; }
.svc-list { display: grid; gap: 10px; margin-bottom: 8px; }
.svc-empty { color: var(--muted); }
.svc-faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.svc-faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.svc-faq summary::after { content: "+"; font-family: var(--f-mono); color: #8C6D24; }
.svc-faq details[open] summary::after { content: "–"; }
.svc-faq p { margin-top: 8px; color: var(--muted); }
.svc-disclaimer { margin-top: 20px; font-size: 0.78rem; color: var(--muted); padding: 12px 14px; border-radius: 10px; background: var(--paper-2); }
.svc-side { display: flex; flex-direction: column; gap: 16px; }
.svc-form { display: grid; gap: 10px; }
.svc-form .input input, .svc-form .input select { padding: 10px 12px; }
.svc-agent { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; border-radius: 10px; background: transparent; text-align: left; }
.svc-agent:hover { background: var(--paper); }
.svc-agent b { display: block; }
.svc-agent small { display: block; color: var(--muted); font-size: 0.8rem; }

/* floating "Talk to Zach" */
.fab { position: fixed; right: 20px; bottom: 20px; z-index: 70; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
body.modal-open .fab { display: none; }
.fab-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 18px 6px 6px; border: 0; border-radius: 99px;
  background: var(--glow); color: var(--ink); font-weight: 800; font-size: 0.95rem;
  box-shadow: 0 14px 34px -10px rgba(0, 0, 0, 0.6), 0 0 0 4px rgba(214, 178, 94, 0.25);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.fab-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.7), 0 0 0 6px rgba(214, 178, 94, 0.3); }
.fab-btn .avatar { width: 38px; height: 38px; }
.fab-panel { width: min(320px, calc(100vw - 40px)); padding: 18px; border-radius: 18px; background: var(--card); color: var(--text); border: 1px solid var(--line); box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.55); }
.fab-head { display: flex; align-items: center; gap: 12px; }
.fab-name { font-family: var(--f-display); font-weight: 800; font-size: 1.4rem; text-transform: uppercase; line-height: 1; }
.fab-role { color: var(--muted); font-size: 0.82rem; margin-top: 3px; }
.fab-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.fab-row a { height: 42px; display: grid; place-items: center; border-radius: 10px; background: var(--ink); color: var(--glow); text-decoration: none; font-weight: 700; }
.fab-row a:hover { background: var(--dusk); }
.fab-or { font-size: 0.85rem; color: var(--muted); margin-bottom: 4px; }
#cbForm { display: grid; gap: 8px; }
#cbForm .input input, #cbForm .input select { padding: 9px 11px; font-size: 0.95rem; }

@media (max-width: 1080px) {
  .svc-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .svc-cards, .svc-for { grid-template-columns: 1fr; }
  .intent button { font-size: 0.82rem; padding: 7px 11px; }
  .fab { right: 12px; bottom: 12px; }
  .fab-btn span { display: none; }
  .fab-btn { padding: 6px; }
  .c3 { height: 540px; }
}

/* ---------- all homes vs ZWO listings ---------- */
.scope { display: inline-flex; margin-bottom: 18px; padding: 4px; border-radius: 12px; background: var(--ink); }
.scope button { border: 0; background: transparent; color: var(--on-dark-muted); padding: 10px 18px; border-radius: 9px; font-weight: 700; font-size: 0.95rem; transition: background .2s, color .2s; }
.scope button[aria-checked="true"] { background: var(--glow); color: var(--ink); }
.scope button:hover:not([aria-checked="true"]) { color: var(--on-dark); }
/* IDX rule: the listing firm and its contact, no smaller than the other listing text and easy to read */
.c3-credit { margin-top: 8px; font-size: 0.94rem; line-height: 1.35; color: var(--text); }
.idx-credit { margin: 14px 0 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 1rem; line-height: 1.5; color: var(--text); }
.idx-credit b { color: var(--text); font-weight: 600; }
/* MLS disclaimer + logos (IDX rules): under search results and on MLS listing pages */
.idx-foot { margin-top: 28px; padding-top: 16px; border-top: 1px dashed var(--line); font-size: 0.76rem; line-height: 1.5; color: var(--muted); }
.idx-foot-brand { color: var(--text); font-weight: 700; font-size: 1rem; margin-bottom: 6px; }
.idx-foot-contact { margin-top: 8px; color: var(--text); font-size: 0.9rem; }
/* the brokerage named above the results, and beside the agent on a listing page */
.buy-broker { margin: -6px 0 22px; font-size: 1.02rem; font-weight: 700; color: var(--text); }
.side-agent .brokerage { margin-top: 2px; font-size: 0.95rem; font-weight: 600; color: var(--text); }
.art-note { position: absolute; left: 10px; top: 10px; z-index: 2; padding: 4px 8px; border-radius: 6px; background: rgba(10, 10, 12, 0.72); color: var(--on-dark); font-size: 0.72rem; }
.map-legend[hidden] { display: none; }
.idx-updated { margin-top: 8px; font-size: 0.76rem; color: var(--muted); }
.idx-foot-logos { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.idx-foot-logos img { height: 34px; width: auto; }
.idx-foot .eho { width: 30px; height: 30px; color: var(--text); flex: none; }
.side-kicker { font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: .12em; text-transform: uppercase; color: #8C6D24; margin-bottom: 12px; }
.side-note { margin-top: 14px; font-size: 0.84rem; line-height: 1.45; color: var(--muted); }
.gate-sub { margin: 10px 0 20px; color: var(--muted); }
.gate .gate-skip { justify-self: center; }

/* ---------- Sell ---------- */
.sell { padding: clamp(80px, 10vw, 140px) 0; background: var(--paper); }
.sell-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.services { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.services li { padding: 18px 18px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; }
.services li::before { content: ""; position: absolute; left: 18px; top: 0; width: 34px; height: 3px; border-radius: 0 0 3px 3px; background: var(--glow); }
.services b { display: block; font-family: var(--f-display); font-weight: 800; font-size: 1.25rem; text-transform: uppercase; line-height: 1.05; }
.services span { display: block; margin-top: 6px; font-size: 0.92rem; color: var(--muted); line-height: 1.45; }
.form-title { font-family: var(--f-display); font-weight: 800; font-size: 2rem; text-transform: uppercase; line-height: 1; }
.form-sub { color: var(--muted); margin-top: -6px; }
.input select { border: 1px solid var(--line); border-radius: 8px; background: var(--paper); padding: 12px 14px; font-size: 1rem; width: 100%; }

/* ---------- Buying elsewhere (referral) ---------- */
.refer { padding: clamp(56px, 7vw, 90px) 0; background: var(--ink); color: var(--on-dark); }
.refer .eyebrow { color: var(--glow); }
.refer-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px; align-items: center; }
.refer-title { font-size: clamp(2rem, 4vw, 3.2rem); }
.refer-sub { margin-top: 12px; color: var(--on-dark-muted); max-width: 46ch; }
.refer-form { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr auto; gap: 12px; align-items: end; }
.refer-form .input > span { color: var(--on-dark-muted); }
.refer-form .input input { background: rgba(244, 242, 236, 0.06); border-color: var(--line-dark); color: var(--on-dark); }
.refer-form .input input:focus { background: rgba(244, 242, 236, 0.1); border-color: var(--glow); }
.refer-form .form-error { grid-column: 1 / -1; color: #F0A090; }
@media (max-width: 1080px) {
  .sell-grid, .refer-grid { grid-template-columns: 1fr; }
  .refer-form { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .services, .refer-form { grid-template-columns: 1fr; }
  .scope { display: flex; }
  .scope button { flex: 1; padding: 10px 8px; font-size: 0.88rem; }
}

/* ---------- 3D flip listing cards ---------- */
.grid { gap: 34px; }
.c3 { height: 560px; perspective: 2000px; }
.c3-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .75s var(--ease); }
@media (hover: hover) { .c3:hover .c3-inner { transform: rotateY(180deg); } }
.c3.flipped .c3-inner { transform: rotateY(180deg); }
.c3-face {
  position: absolute; inset: 0; border-radius: 18px;
  transform-style: preserve-3d; backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
/* every floating layer hides its back too, so the far side never shows through mid-flip */
.c3-face * { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.c3-front { display: flex; flex-direction: column; padding: 12px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.c3-back {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 26px 22px; background: var(--ink); color: var(--on-dark);
  border: 1px solid rgba(214, 178, 94, 0.35); box-shadow: var(--shadow-lift);
  transform: rotateY(180deg);
}
.c3-hit { position: absolute; inset: 0; border: 0; border-radius: 18px; background: transparent; transform: translateZ(1px); cursor: pointer; }
.c3-hit:focus-visible { outline-offset: -4px; }
/* decorative layers let clicks fall through to the card button underneath */
.c3-art, .c3-body, .c3-foot, .c3-tiles, .c3-h, .c3-blurb, .c3-agent { pointer-events: none; }

.c3-art { position: relative; flex: none; height: 250px; transform-style: preserve-3d; transform: translateZ(50px); }
.c3-art-clip { position: absolute; inset: 0; overflow: hidden; border-radius: 12px; background: var(--dusk); border: 1px solid var(--line); }
.c3-art-clip .scene, .c3-art-clip img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.c3:hover .c3-art-clip .scene, .c3:hover .c3-art-clip img { transform: scale(1.1); }
.c3:hover .w.off, .c3.flipped .w.off { fill: var(--glow); }
.c3:hover .g.off, .c3.flipped .g.off { opacity: .55; }
.c3 .status { transform: translateZ(40px); }
.c3-price {
  position: absolute; left: 14px; bottom: 14px; transform: translateZ(80px);
  padding: 8px 15px 7px; border-radius: 99px;
  background: rgba(255, 255, 255, 0.96); border: 1px solid var(--line);
  font-family: var(--f-display); font-weight: 800; font-size: 1.4rem; line-height: 1; color: var(--text);
  box-shadow: 0 12px 26px -8px rgba(0, 0, 0, 0.5);
}
/* the save heart sits outside the flipping part, so it stays in the corner (and clickable) on both sides */
.c3 { position: relative; }
.c3 > .save { top: 22px; right: 22px; z-index: 5; background: rgba(10, 10, 12, 0.7); backdrop-filter: none; }
/* a card far off screen is not drawn; it keeps its place (the card has a fixed height) */
.c3.away > * { display: none; }

.c3-body { flex: 1; padding: 22px 12px 8px; transform: translateZ(60px); }
.c3-eyebrow { display: flex; align-items: center; gap: 7px; font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: .1em; text-transform: uppercase; color: #8C6D24; }
.c3-eyebrow svg { width: 15px; height: 15px; flex: none; fill: var(--glow); }
.c3-addr { margin-top: 10px; font-family: var(--f-display); font-weight: 800; font-size: 1.95rem; line-height: .95; text-transform: uppercase; transition: color .3s; }
.c3:hover .c3-addr { color: #8C6D24; }
.c3-town { display: flex; align-items: center; gap: 6px; margin-top: 10px; color: var(--muted); font-weight: 500; }
.c3-town svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--glow); stroke-width: 2; }
.c3-foot { display: flex; justify-content: space-between; align-items: center; padding: 0 12px 10px; font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); transform: translateZ(40px); transition: color .3s; }
.c3-foot svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .3s; }
.c3:hover .c3-foot { color: #8C6D24; }
.c3:hover .c3-foot svg { transform: translateX(4px); }

.c3-tiles { display: flex; justify-content: center; gap: 12px; margin-bottom: 24px; transform-style: preserve-3d; }
.c3-tile {
  display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 86px; padding: 14px 10px;
  border-radius: 16px; background: rgba(244, 242, 236, 0.06); border: 1px solid rgba(214, 178, 94, 0.3);
  transform-style: preserve-3d; transform: translateZ(130px);
}
.c3-tile.mid { transform: translateZ(160px); }
.c3-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--glow); color: var(--ink); transform: translateZ(22px); box-shadow: 0 8px 18px -8px rgba(214, 178, 94, 0.8); }
.c3-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.c3-tile b { font-family: var(--f-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: .03em; transform: translateZ(10px); white-space: nowrap; }
.c3-h { font-family: var(--f-display); font-weight: 800; font-size: 1.6rem; line-height: 1; text-transform: uppercase; color: var(--glow); transform: translateZ(80px); }
.c3-blurb {
  max-width: 300px; margin-top: 10px; font-size: 0.92rem; line-height: 1.5; color: var(--on-dark-muted);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
  transform: translateZ(40px);
}
.c3-agent { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 0.84rem; color: var(--on-dark-muted); transform: translateZ(50px); }
.c3-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 46px; margin-top: 20px; border: 0; border-radius: 12px;
  background: var(--glow); color: var(--ink); font-weight: 700; letter-spacing: .02em;
  box-shadow: 0 15px 30px -8px rgba(0, 0, 0, 0.55), 0 0 30px -10px rgba(214, 178, 94, 0.7);
  transform: translateZ(100px); transition: transform .2s, background .2s;
}
.c3-cta:hover { background: var(--glow-hot); transform: translateZ(100px) scale(1.03); }
.c3-cta:active { transform: translateZ(100px) scale(.97); }
.c3-cta svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.c3-flipback { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; border: 0; background: none; color: var(--on-dark-muted); font-size: 0.82rem; transform: translateZ(60px); }
.c3-flipback svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
@media (max-width: 640px) { .c3 { height: 545px; } .c3-art { height: 230px; } }

/* agent headshots: framed in the arched window, face kept in view */
.portrait img { object-position: 50% 18%; transition: transform .6s var(--ease); }
.portrait.has-photo::after { background: none; box-shadow: inset 0 0 0 5px var(--glow); opacity: .85; }
.portrait.has-photo .initials { visibility: hidden; }
.agent:hover .portrait img { transform: scale(1.04); }
.agent.lead .portrait { align-self: flex-start; aspect-ratio: 4 / 5; }
.avatar { position: relative; }
.avatar img { position: absolute; inset: 0; object-position: 50% 20%; }
.avatar.has-photo .av-i { visibility: hidden; }

/* the four state plates live in the nav bar */
/* extra breathing room above the nav so the plates don't crowd the top edge */
:root { --nav-h: 88px; }
.nav { padding-top: 14px; }

/* plates spread across all the free space between the links and the buttons */
.plates { display: flex; flex: 1; justify-content: space-evenly; align-items: center; gap: 16px; margin: 0 20px; min-width: 0; }
.nav .plate { width: 96px; flex: none; border-radius: 5px; }
.nav .plate-svg, .nav .plate::after { border-radius: 5px; }
.nav .plate[aria-selected="true"] { transform: translateY(-1px) rotate(-2deg) scale(1.06); }
/* each plate is an SVG of the state's real standard plate (see PLATES in app.js) */
.plate {
  position: relative; display: block;
  width: 152px; aspect-ratio: 2 / 1; padding: 0;
  border: 0; border-radius: 10px; background: none;
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.8);
  opacity: 0.55; filter: saturate(0.55) brightness(0.7);
  transition: opacity .3s, filter .3s, transform .35s var(--ease), box-shadow .3s;
}
.plate-svg { display: block; width: 100%; height: 100%; border-radius: 10px; }
/* a little metal sheen across the reflective sheeting */
.plate::after { content: ""; position: absolute; inset: 0; border-radius: 10px; pointer-events: none; background: linear-gradient(115deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 38%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.12) 100%); }
.plate:hover { opacity: 0.9; filter: none; transform: translateY(-2px); }
.plate[aria-selected="true"] {
  opacity: 1; filter: none; transform: translateY(-4px) rotate(-1.5deg);
  box-shadow: 0 0 0 2px var(--glow), 0 0 30px rgba(214, 178, 94, 0.5), 0 14px 26px -10px rgba(0, 0, 0, 0.8);
}
.plate:focus-visible { outline-offset: 5px; }

/* compact switcher in the nav */
.state-mini { display: inline-flex; margin-left: 6px; border: 1px solid var(--line-dark); border-radius: 6px; overflow: hidden; }
.state-mini button {
  height: 34px; padding: 0 10px; border: 0; background: transparent; color: var(--on-dark-muted);
  font-family: var(--f-display); font-weight: 800; font-size: 0.95rem; letter-spacing: .06em;
  transition: background .2s, color .2s;
}
.state-mini button + button { border-left: 1px solid var(--line-dark); }
.state-mini button[aria-pressed="true"] { background: var(--glow); color: var(--ink); }
.state-mini button:hover:not([aria-pressed="true"]) { color: var(--on-dark); background: rgba(244, 242, 236, 0.08); }

/* sky effects */
.hero-fx { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.mtns { position: absolute; left: 0; right: 0; bottom: 14%; width: 100%; height: 46%; opacity: .9; }
/* Maine's northern lights: a quarter-resolution canvas stretched over the top of the sky (drawn by aurora() in
   app.js). The old version was three full-size animated layers screen-blended over the sky, which kept the
   machine busy just sitting at the top of the page. */
.aurora { position: absolute; left: 0; top: 0; width: 100%; height: 58%; opacity: 0.6; }
.leaf {
  position: absolute; top: -4%; left: var(--x);
  width: 13px; height: 9px; border-radius: 0 80% 0 80%;
  background: var(--c); opacity: 0.85;
  animation: fall var(--du) linear infinite; animation-delay: var(--dl);
}
@keyframes fall {
  0% { transform: translate(0, -8vh) rotate(0deg) scale(var(--sc)); }
  25% { transform: translate(var(--sw), 22vh) rotate(110deg) scale(var(--sc)); }
  50% { transform: translate(calc(var(--sw) * -1), 50vh) rotate(210deg) scale(var(--sc)); }
  75% { transform: translate(var(--sw), 78vh) rotate(300deg) scale(var(--sc)); }
  100% { transform: translate(0, 108vh) rotate(400deg) scale(var(--sc)); }
}
.fw { position: absolute; width: 0; height: 0; }
.fw::after { content: ""; position: absolute; left: -40px; top: -40px; width: 80px; height: 80px; border-radius: 50%; background: radial-gradient(var(--c), transparent 65%); opacity: 0; animation: fwflash .9s ease-out; }
.fw i { position: absolute; left: -1px; top: -4px; width: 2px; height: 9px; border-radius: 2px; background: var(--c); box-shadow: 0 0 6px var(--c); animation: spark 1.7s cubic-bezier(.1, .7, .3, 1) forwards; }
@keyframes spark { 0% { transform: rotate(var(--a)) translateY(0); opacity: 1; } 70% { opacity: 1; } 100% { transform: rotate(var(--a)) translateY(-78px); opacity: 0; } }
@keyframes fwflash { 0% { opacity: .5; transform: scale(.3); } 100% { opacity: 0; transform: scale(1.4); } }
.rocket {
  position: absolute; left: 70%; bottom: 30%; width: 5px; height: 5px; border-radius: 50%;
  background: #FFF3D6; box-shadow: 0 0 12px 4px #FFB36A, 0 0 34px 12px rgba(255, 140, 80, 0.45);
  animation: launch 7s cubic-bezier(.45, 0, .8, .55) forwards;
}
.rocket::after { content: ""; position: absolute; left: 1.5px; top: 5px; width: 2px; height: 160px; background: linear-gradient(#FFD9A0, rgba(255, 160, 100, 0.45) 30%, rgba(210, 190, 230, 0.15) 70%, transparent); }
@keyframes launch { 0% { transform: translate(0, 0) rotate(10deg); opacity: 0; } 4% { opacity: 1; } 100% { transform: translate(12vw, -80vh) rotate(16deg); opacity: 0; } }
.gulls { position: absolute; top: 20%; left: -12%; width: 110px; fill: none; stroke: #0A0909; stroke-width: 2; stroke-linecap: round; animation: glide 46s linear infinite; }
@keyframes glide { to { transform: translate(125vw, 30px); } }

/* SVG details */
.beam polygon { fill: #FFE9B8; opacity: 0; }
.beam .beam-l { animation: beamL 6s ease-in-out infinite; }
.beam .beam-r { animation: beamR 6s ease-in-out infinite; }
@keyframes beamL { 0%, 100% { opacity: 0; } 20% { opacity: .22; } 40% { opacity: 0; } }
@keyframes beamR { 0%, 50%, 100% { opacity: 0; } 70% { opacity: .22; } 90% { opacity: 0; } }
.bob, .buoy { animation: bob 3.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.buoy:nth-of-type(2n) { animation-delay: -1.3s; }
@keyframes bob { 50% { transform: translateY(1.6px) rotate(1.5deg); } }
.neon { stroke: #E3C170; stroke-width: 2.5; fill: none; filter: drop-shadow(0 0 3px #E3C170); animation: neon 6s infinite; }
.neon.teal { stroke: #F4F2EC; filter: drop-shadow(0 0 3px #F4F2EC); animation-delay: -2.5s; }
@keyframes neon { 0%, 90%, 100% { opacity: 1; } 91% { opacity: .3; } 92% { opacity: 1; } 95% { opacity: .5; } 96% { opacity: 1; } }
.shing { stroke: rgba(255, 255, 255, 0.07); stroke-width: 1; stroke-dasharray: 7 3; fill: none; }
.th-maine .w.off { fill: #2A2E33; }
.th-maine .mul { stroke: #141618; }
.th-nh .w.off { fill: #33302E; }
.th-nh .mul { stroke: #161313; }
.th-florida .w.off { fill: #353134; }
.th-florida .mul { stroke: #141112; }
.tag.lic { background: var(--ink); color: var(--glow); border-color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agent.lead { grid-column: 1 / -1; }
  .finder-grid { grid-template-columns: 1fr; }
  .finder-stage {
    position: sticky; top: var(--nav-h); z-index: 3; order: -1;
    margin-inline: -16px; padding: 10px 16px 12px;
    background: rgba(12, 12, 14, 0.94);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line-dark);
    box-shadow: 0 16px 30px -18px rgba(0, 0, 0, 0.8);
  }
  .stage-art { max-height: 30vh; max-width: calc(30vh * 520 / 380); margin-inline: auto; }
  .stage-readout { margin-top: 10px; justify-content: center; }
  .stage-summary { font-size: 0.9rem; max-width: 44ch; }
  .step { min-height: 0; }
  .lx-grid { grid-template-columns: 1fr; }
  .ax { grid-template-columns: 1fr; }
  .ax .portrait { position: relative; max-width: 320px; }
}
@media (max-width: 860px) {
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; gap: 0; margin: 0;
    background: rgba(10, 10, 11, 0.97); backdrop-filter: blur(14px);
    padding: 8px 16px 20px;
    border-bottom: 1px solid var(--line-dark);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: all .25s var(--ease);
  }
  .nav-links.open { transform: none; opacity: 1; visibility: visible; }
  .nav-links a { padding: 14px 8px; font-size: 1.1rem; border-bottom: 1px solid var(--line-dark); border-radius: 0; }
  .menu-btn { display: block; }
  .nav-cta { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .filters { flex-direction: column; align-items: stretch; }
  .map-view { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .map-wrap { height: 62vh; min-height: 380px; order: -1; }
  .map-list { overflow: visible; padding: 0; }
  .map-note { position: static; }
  .tabs { align-self: flex-start; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { min-height: 100svh; }
  .hero h1 { font-size: clamp(3rem, 15vw, 4.4rem); }
  .street-svg { min-width: 1350px; }
  .moon { top: auto; bottom: 42%; right: 14%; width: 40px; height: 40px; box-shadow: inset -10px 6px 0 0 #F4E7C8; }
  .swipe-hint {
    display: block; position: absolute; right: 16px; bottom: 16px; z-index: 3;
    font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: .08em; color: var(--on-dark-muted);
    background: rgba(8, 8, 9, 0.7); padding: 6px 10px; border-radius: 99px;
  }
  .team-grid { grid-template-columns: 1fr; }
  .agent.lead { flex-direction: column; gap: 0; padding: 16px 16px 20px; }
  .agent.lead .portrait { width: 100%; }
  .filter-row { display: grid; grid-template-columns: 1fr 1fr; }
  .filter-row .field:nth-child(3) { grid-column: 1 / -1; }
  .field select { min-width: 0; width: 100%; }
  .seg { width: 100%; }
  .seg button { flex: 1; padding: 0 6px; }
  .two { grid-template-columns: 1fr; }
  .office { grid-template-columns: 1fr; }
  .modal { padding: 0; align-items: end; }
  .modal-panel { border-radius: 20px 20px 0 0; max-height: 94dvh; }
  .lx-hero { aspect-ratio: 4 / 3; }
  .lx-specs dd { font-size: 1.3rem; }
  .lx-details { grid-template-columns: 1fr; }
  .calc-inputs { grid-template-columns: 1fr 1fr; }
  .calc-inputs label:first-child { grid-column: 1 / -1; }
  .ax-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini { grid-template-columns: 80px 1fr; }
  .mini-art { width: 80px; }
  .mini-hits { display: none; }
  .stage-readout { gap: 14px; }
  .count { min-width: 80px; }
  .count-num { font-size: 2.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; transition-delay: 0s !important; }
  .reveal { opacity: 1; transform: none; }
  .tape-window { overflow-x: auto; }
  /* the loading mark holds still: three bars of different lengths */
  .bars i { animation: none; opacity: .85; transform: none; }
  .bars i:nth-child(2) { transform: scaleX(.75); }
  .bars i:nth-child(3) { transform: scaleX(.5); }
}

/* ---------- State plates in the nav, by screen size ---------- */
@media (max-width: 1240px) {
  .nav-cta { display: none; }
  .nav .plate { width: 76px; }
}
@media (max-width: 1060px) {
  .nav-links a { padding: 8px 8px; font-size: 0.9rem; }
}
/* phones & tablets: plates get their own row under the logo */
@media (max-width: 860px) {
  :root { --nav-h: 134px; }
  .nav-inner { flex-wrap: wrap; align-content: center; row-gap: 8px; column-gap: 12px; }
  .nav .plates { order: 3; flex: 0 0 100%; width: 100%; margin: 0 0 4px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .nav .plate { width: 100%; max-width: 120px; justify-self: center; }
  .nav { background: rgba(10, 10, 11, 0.72); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  .nav-links { top: var(--nav-h); }
}
@media (max-width: 440px) {
  .saved-btn { display: none; }
}
/* =========================================================================
   STATE CURSORS — gold-tipped drawings for each state, one picked at random per page load (js/cursors.js).
   Mouse only; text fields keep the normal text cursor.
   ========================================================================= */
@media (hover: hover) and (pointer: fine) {
  :root[data-state] { cursor: var(--cur, auto); }
  :root[data-state] :is(a[href], button, [role="button"], [role="tab"], label, summary, select,
    input[type="checkbox"], input[type="radio"], input[type="range"], input[type="submit"],
    .lot, .c3-hit, .chip-opt span, .tag-link, .leaflet-marker-icon, .leaflet-interactive) { cursor: var(--cur-hover, pointer); }
  :root[data-state] :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="submit"]), textarea, [contenteditable="true"]) { cursor: text; }
  :root[data-state] :is(button[disabled], .tagrow button[disabled]) { cursor: var(--cur, default); }
}
/* =========================================================================
   HOME PAGE (html[data-mode="home"]) — the starting page before a state is picked.
   Sections marked data-view="state" or "home" only show in their view.
   ========================================================================= */
:root[data-mode="home"] [data-view="state"],
:root[data-mode="state"] [data-view="home"] { display: none !important; }

.home-hero {
  position: relative; overflow: hidden; color: var(--on-dark);
  padding: calc(var(--nav-h) + clamp(40px, 7vh, 88px)) 0 clamp(64px, 8vw, 110px);
  background:
    radial-gradient(900px 520px at 78% -8%, rgba(214, 178, 94, .18), transparent 62%),
    radial-gradient(700px 420px at 0% 100%, rgba(214, 178, 94, .07), transparent 60%),
    linear-gradient(180deg, #050506 0%, #0B0B0D 55%, #141316 100%);
}
.home-sky { position: absolute; inset: 0; pointer-events: none; opacity: .9; }
.home-copy { position: relative; z-index: 1; }
/* Zac's three marks (Luxury, ZWO, Commercial) across the top of the home page */
/* sized by the screen's width as well as its height, so all three fit across a phone */
.brand-logos { display: flex; align-items: center; gap: clamp(12px, 3vw, 40px); margin-bottom: clamp(22px, 3.4vh, 36px); animation: rise .9s var(--ease) both; }
.brand-logos img { height: clamp(30px, min(6.4vh, 11vw), 64px); width: auto; }
.brand-logos img + img { padding-left: clamp(12px, 3vw, 40px); border-left: 1px solid var(--line-dark); box-sizing: content-box; }
.home-kicker { color: var(--on-dark-muted); font-size: 0.98rem; margin-bottom: 16px; animation: rise .9s var(--ease) both; }
.home-hero h1 { font-size: clamp(3.3rem, min(8.4vw, 13vh), 8.4rem); font-weight: 900; line-height: .86; max-width: 11ch; animation: rise .9s .06s var(--ease) both; }
.home-hero h1 em { display: block; font-style: normal; color: var(--glow); text-shadow: 0 0 24px rgba(214, 178, 94, .45), 0 0 70px rgba(214, 178, 94, .25); }
.home-hero .lede { margin-top: 22px; max-width: 48ch; font-size: clamp(1.02rem, 1.4vw, 1.18rem); color: var(--on-dark-muted); animation: rise .9s .12s var(--ease) both; }
.home-hero .wrap + .wrap { position: relative; z-index: 1; }
.home-pick { margin: clamp(48px, 7vw, 80px) 0 18px; font-family: var(--f-mono); font-size: 0.74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--glow); scroll-margin-top: calc(var(--nav-h) + 24px); }
.state-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; scroll-margin-top: calc(var(--nav-h) + 60px); }
.state-card {
  position: relative; display: flex; flex-direction: column; text-align: left; padding: 0; overflow: hidden;
  border-radius: 18px; background: #0E0E10; color: inherit; border: 1px solid rgba(214, 178, 94, .22);
  box-shadow: 0 24px 50px -30px rgba(0, 0, 0, .9);
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
}
.state-card:hover, .state-card:focus-visible { transform: translateY(-6px); border-color: rgba(214, 178, 94, .7); box-shadow: 0 30px 60px -28px rgba(0, 0, 0, .95), 0 0 0 1px rgba(214, 178, 94, .25); }
.state-art { display: block; height: 190px; overflow: hidden; }
.state-art .scene { width: 100%; height: 100%; display: block; transition: transform .8s var(--ease); }
.state-card:hover .state-art .scene { transform: scale(1.06); }
.state-plate { position: absolute; top: 150px; right: 14px; width: 104px; height: auto; border-radius: 6px; box-shadow: 0 10px 22px -8px rgba(0, 0, 0, .8); transform: rotate(-3deg); transition: transform .35s var(--ease); }
.state-card:hover .state-plate { transform: rotate(0deg) translateY(-3px); }
.state-body { display: flex; flex-direction: column; gap: 6px; padding: 26px 18px 18px; flex: 1; }
.state-name { font-family: var(--f-display); font-weight: 800; font-size: 1.7rem; line-height: 1; text-transform: uppercase; }
.state-tag { color: var(--on-dark-muted); font-size: 0.95rem; }
.state-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 1px dashed rgba(214, 178, 94, .25); font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--on-dark-muted); }
.state-go { color: var(--glow); white-space: nowrap; }

.about { padding: clamp(80px, 10vw, 140px) 0; background: var(--paper); }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 90px); align-items: start; }
.about .section-head { margin-bottom: 0; }
.pillars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pillar { display: flex; flex-direction: column; gap: 6px; padding: 22px 20px 20px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.pillar-n { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: .12em; color: #8C6D24; }
.pillar b { font-family: var(--f-display); font-weight: 800; font-size: 1.35rem; text-transform: uppercase; line-height: 1.05; }
.pillar span:last-child { color: var(--muted); font-size: 0.97rem; }

@media (max-width: 1100px) { .state-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .state-cards { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .home-hero h1 { font-size: clamp(3rem, 15vw, 4.4rem); }
}/* on the home page no state is picked yet, so every plate shows in full color as an invitation */
:root[data-mode="home"] .plate { opacity: 1; filter: none; }
/* Fallback: hide Netlify's injected "Powered by Netlify" badge iframe */
iframe[data-nl-ready], #nl-hud-frame { display: none !important; }
