@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0b0d10;
  --surface: #14181e;
  --surface-2: #1b2129;
  --text: #f4f6f8;
  --muted: #c5ced6;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #e0b03a;
  --accent-ink: #1c1404;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --sans: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  --radius: 18px;
  --header: 72px;
}

body.theme-stark {
  --accent: #3ee0ff;
  --accent-ink: #041016;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 420;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 8px 12px;
  z-index: 80;
  border-radius: 8px;
  font-weight: 650;
}
.skip:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header);
  padding: 10px 22px;
  background: rgba(11, 13, 16, 0.96);
  color: var(--text);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(22px);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 40% 40% 8px 40%;
  font-weight: 700;
  letter-spacing: -0.04em;
}
body.theme-stark .brand-mark {
  border-radius: 50%;
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  font-weight: 650;
}
.brand-name { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name strong { font-size: 16px; letter-spacing: -0.02em; font-weight: 650; white-space: nowrap; }
body.theme-stark .brand-name strong { letter-spacing: -0.02em; font-weight: 650; }
.brand-name span { color: var(--muted); font-size: 12px; }
.nav { display: flex; gap: 4px; }
.nav a {
  text-decoration: none;
  color: var(--text);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 550;
}
.nav a[aria-current="page"], .nav a:hover { background: rgba(255, 255, 255, 0.08); }

.wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.page-intro { padding: 48px 0 8px; }
.eyebrow {
  margin: 0 0 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 650;
  color: var(--accent);
}
h1, h2, h3 { font-weight: 620; letter-spacing: -0.035em; }
h1 { font-size: clamp(44px, 6.4vw, 84px); line-height: 0.94; margin: 0 0 14px; }
h2 { font-size: clamp(28px, 3vw, 40px); margin: 0; }
.lede { max-width: 46ch; margin: 0; color: var(--muted); font-size: 18px; }

.hero {
  position: relative;
  min-height: min(86vh, 820px);
  display: grid;
  align-items: end;
  overflow: hidden;
  background: #080a0c;
}
.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-width: none;
}
.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 13, 16, 0.2) 0%, rgba(11, 13, 16, 0.15) 35%, rgba(11, 13, 16, 0.88) 100%),
    linear-gradient(90deg, rgba(11, 13, 16, 0.72), transparent 58%);
}
.hero-copy {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 88px 0 56px;
}
.hero h1 { max-width: 11ch; }
.hero .lede { color: #e7edf2; }
.zip-pill {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 22px;
  padding: 6px 6px 6px 18px;
  max-width: 540px;
  border-radius: 999px;
  background: rgba(12, 16, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(16px);
}
.zip-pill input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  border: 0;
  background: transparent;
  color: var(--text);
}
.zip-pill input::placeholder { color: #d5dde4; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 680;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.05); }

.model-strip { padding: 56px 0 12px; }
.strip-head, .model-grid { width: min(1180px, calc(100% - 40px)); margin-left: auto; margin-right: auto; }
.strip-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.strip-head a { font-weight: 650; color: var(--accent); text-decoration: none; }
.model-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin: 0 auto 28px;
}
.model-tile, .model-card {
  position: relative;
  display: block;
  min-height: 340px;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  grid-column: span 2;
}
.model-grid .model-tile:nth-child(n + 4),
.model-grid .model-card:nth-child(n + 4) { grid-column: span 3; }
.model-tile img, .model-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  transition: transform 0.55s ease;
}
.tile-illustration, .model-card.tile-illustration { background: #172029; }
.tile-illustration img { object-fit: contain; padding: 36px 28px 84px; }
.model-stage.tile-illustration img.photo { object-fit: contain; padding: 28px; background: #0b0d10; }
.model-tile.photo-mask img { object-fit: cover; object-position: 88% center; padding: 0; }
.model-stage.photo-mask img.photo { object-position: 78% center; }
.model-tile.photo-mask::after,
.model-stage.photo-mask::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, #101318 0%, rgba(16, 19, 24, 0.92) 18%, rgba(16, 19, 24, 0.35) 34%, rgba(16, 19, 24, 0) 52%);
}
.model-stage.photo-mask { position: relative; }
.tile-body, .model-card > span:last-child {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: block;
  padding: 56px 18px 16px;
  background: linear-gradient(180deg, transparent, rgba(8, 10, 12, 0.92));
}
.model-tile strong, .model-card strong {
  display: block;
  font-size: 28px;
  font-weight: 640;
  letter-spacing: -0.03em;
}
.model-card em { color: var(--muted); font-style: normal; font-size: 14px; }
.spec-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.spec-chips span {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  color: var(--text);
  background: rgba(11, 13, 16, 0.45);
}
.model-tile:hover, .model-card:hover { transform: translateY(-6px); }
.model-tile:hover img, .model-card:hover img { transform: scale(1.06); }

.workspace {
  width: min(1240px, calc(100% - 40px));
  margin: 28px auto 56px;
  display: grid;
  grid-template-columns: minmax(360px, 440px) 1fr;
  height: min(820px, calc(100vh - var(--header) - 24px));
  min-height: 560px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  scroll-margin-top: 12px;
}
.sheet { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; min-height: 0; background: #10141a; }
.map-pane { grid-column: 2; grid-row: 1; isolation: isolate; z-index: 1; }
.sheet-handle { display: none; }
.toolbar {
  display: grid;
  gap: 10px;
  padding: 16px;
  background: rgba(16, 20, 26, 0.92);
  border-bottom: 1px solid var(--line);
}
.toolbar-row { display: flex; gap: 8px; }
label.field { display: grid; gap: 4px; font-size: 12px; font-weight: 650; color: var(--muted); flex: 1; }
input[type="search"], select, form.stack input, form.stack textarea, form.stack select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: #0d1116;
  color: var(--text);
}
.meta-row { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.linkish {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 650;
  padding: 8px 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.results { overflow: auto; padding: 12px; display: grid; gap: 10px; align-content: start; min-height: 0; }
.card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.card.is-active { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.card.is-featured {
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 16%, #1b2129), #1b2129 48%);
}
.kicker { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-featured { background: var(--accent); color: var(--accent-ink); }
.badge-stock { background: #173028; color: #d9ffe8; border: 1px solid #3d8f68; }
.badge-quiet { background: #222830; color: var(--text); }
.distance { margin-left: auto; font-size: 13px; font-weight: 650; color: var(--accent); }
.card h3 { margin: 0; font-size: 22px; }
.card.is-featured h3 { font-size: 26px; }
.where { margin: 2px 0 8px; color: var(--muted); }
.stock { margin: 0 0 10px; font-size: 14px; color: var(--text); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stock-when { color: var(--muted); font-size: 13px; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #0d1116;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.actions a.ghost { color: var(--muted); }
.stock a { color: var(--accent); font-weight: 650; }
.map-pane { min-height: 100%; position: relative; background: #0b0d10; }
#map { height: 100%; min-height: 420px; background: #0b0d10; }
.map-tiles { filter: invert(1) hue-rotate(180deg) brightness(0.82) contrast(0.92) saturate(0.35); }
.leaflet-div-icon.pin-wrap, .leaflet-div-icon.cluster-pin { background: transparent; border: 0; }
.pin-svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.45)); }
.pin-wrap.pin-active .pin-svg { filter: drop-shadow(0 0 8px var(--accent)); }
.cluster-count {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 720;
  font-size: 14px;
  border: 2px solid #0b0d10;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 22%, transparent);
}
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #14181e; color: var(--text); box-shadow: var(--shadow); }
.leaflet-popup-content-wrapper { border-radius: 12px; }
.leaflet-container a { color: var(--accent); }
.leaflet-bar a, .leaflet-bar a:hover {
  background: #14181e;
  color: var(--text);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}
.leaflet-control-attribution {
  background: rgba(11, 13, 16, 0.82) !important;
  color: #d5dde4 !important;
}
.leaflet-control-attribution a { color: var(--accent) !important; }
.empty, .error {
  margin: 4px;
  padding: 16px;
  border-radius: 14px;
  background: #10141a;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  color: var(--text);
}
.error { border-style: solid; border-color: #c46b6b; color: #ffd8d4; }
.skeleton {
  height: 108px;
  border-radius: 16px;
  background: linear-gradient(90deg, #171c23, #222831, #171c23);
  background-size: 200% 100%;
  animation: shine 1.2s linear infinite;
}
@keyframes shine { to { background-position: -200% 0; } }

.directory, .prose { padding: 12px 0 64px; }
.directory h2 { margin-bottom: 8px; }
.state-block { border-top: 1px solid var(--line); padding: 16px 0; }
.state-block h3 { margin: 0 0 8px; font-size: 22px; }
.state-block ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.state-block a { color: var(--text); text-underline-offset: 3px; }
.fine { color: var(--muted); font-size: 14px; }
.site-footer {
  background: #080a0c;
  color: var(--muted);
  padding: 36px 0 48px;
  border-top: 1px solid var(--line);
}
.site-footer .wrap { display: grid; gap: 10px; }
.site-footer a { color: var(--accent); }
.disclaimer { margin: 0; max-width: 72ch; color: var(--text); }

.prose { width: min(760px, calc(100% - 40px)); padding-top: 36px; }
.prose p { font-size: 17px; color: var(--muted); }
.prose strong { color: var(--text); }
form.stack { display: grid; gap: 12px; margin-top: 18px; }
textarea { min-height: 120px; resize: vertical; }
.form-note { font-size: 14px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips a {
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  background: #0d1116;
  color: var(--text);
}
.chips a.is-on, .chips a:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.model-hero {
  position: relative;
  min-height: 78vh;
  display: grid;
  align-items: end;
  margin-bottom: 28px;
  overflow: hidden;
  background: #080a0c;
}
.model-hero .reveal, .model-stage { grid-area: 1 / 1; }
.model-stage { min-height: 78vh; border-radius: 0; background: #101318; }
.model-stage img, .model-stage img.photo {
  width: 100%;
  height: 78vh;
  max-height: none;
  object-fit: cover;
  border-radius: 0;
  background: #101318;
}
.model-stage img:not(.photo) { object-fit: contain; padding: 48px; }
.model-hero .reveal {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 72px clamp(20px, 4vw, 28px) 36px;
  background: linear-gradient(180deg, transparent, rgba(11, 13, 16, 0.94) 62%);
}
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.gallery-frame {
  margin: 0;
  background: #14181e;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.gallery-frame img, .gallery-frame img.photo {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 0;
  background: #101318;
}
.gallery-frame figcaption { color: var(--muted); font-size: 12px; padding: 8px 12px 12px; }
.spec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.spec-grid div { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.spec-grid dt { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.spec-grid dd { margin: 6px 0 0; font-size: 18px; font-weight: 580; letter-spacing: -0.02em; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: #10141a; }
.compare { border-collapse: collapse; min-width: 760px; width: 100%; font-size: 14px; }
.compare th, .compare td { border-bottom: 1px solid var(--line); padding: 12px; text-align: left; vertical-align: top; }
.compare th { background: #171c23; color: var(--text); }
.source-list a { color: var(--accent); }
html.motion .reveal { opacity: 0; transform: translateY(16px); }
html.motion .reveal.is-in { animation: rise 0.6s ease both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.pin-svg { animation: pin-drop 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes pin-drop {
  from { transform: translateY(-12px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@media (max-width: 980px) {
  .model-grid { grid-template-columns: 1fr 1fr; }
  .model-grid .model-tile,
  .model-grid .model-card,
  .model-grid .model-tile:nth-child(n + 4),
  .model-grid .model-card:nth-child(n + 4) { grid-column: auto; min-height: 280px; }
}
@media (max-width: 860px) {
  :root { --header: 112px; }
  .site-header { flex-wrap: wrap; padding: 10px 14px; gap: 8px; }
  .brand-name span { display: none; }
  .nav { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .nav a { white-space: nowrap; }
  .hero { min-height: 88vh; }
  .hero-copy { width: min(100% - 28px, 1180px); padding-bottom: 36px; }
  .hero h1 { font-size: 46px; max-width: none; }
  .zip-pill { flex-direction: column; align-items: stretch; border-radius: 20px; padding: 10px; }
  .model-grid { grid-template-columns: 1fr; }
  .workspace {
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
  }
  .map-pane, #map { height: calc(58vh - var(--header)); min-height: 240px; }
  .sheet {
    position: relative;
    z-index: 5;
    margin-top: -22px;
    border-radius: 22px 22px 0 0;
    background: #10141a;
    box-shadow: 0 -18px 40px rgba(0, 0, 0, 0.45);
    border: 1px solid var(--line);
    border-bottom: 0;
  }
  .sheet-handle {
    display: block;
    width: 44px;
    height: 4px;
    margin: 10px auto 2px;
    border-radius: 99px;
    background: #5c6773;
  }
  .results { overflow: visible; }
  .model-hero, .model-stage, .model-stage img, .model-stage img.photo { min-height: 70vh; height: 70vh; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}

.model-tile svg.art, .model-card svg.art, .model-stage svg.photo { position: absolute; inset: 0; width: 100%; height: 100%; }
.model-stage { position: relative; min-height: 420px; background: #12161c; }
