:root {
  --bg: #faf9f7;
  --surface: #ffffff;
  --ink: #16130f;
  --muted: #6f6a62;
  --line: #e8e4dd;
  --accent: #ff4d00;
  --accent-soft: #fff0e9;
  --ok: #0d9463;
  --radius: 16px;
  --font-display: "Space Grotesk", "Helvetica Neue", sans-serif;
  --font-body: "Inter", -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; }
a { color: inherit; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 5vw;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-logo { font-family: var(--font-display); font-weight: 700; font-size: 18px; text-decoration: none; display: flex; gap: 9px; align-items: center; }
.logo-mark { width: 46px; height: auto; display: block; flex-shrink: 0; transition: transform .25s ease; }
.nav-logo:hover .logo-mark { transform: translateX(-4px); }
.nav-logo span { font-style: italic; text-transform: uppercase; letter-spacing: .02em; font-size: 16.5px; }
.nav-links { display: flex; gap: 26px; }
.nav-links a { text-decoration: none; font-size: 14px; color: var(--muted); font-weight: 500; }
.nav-links a:hover { color: var(--ink); }
@media (max-width: 720px) { .nav-links { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  padding: 13px 26px; border-radius: 999px; border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 20px rgba(255, 77, 0, .28); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-sm { padding: 9px 18px; font-size: 13px; }
.btn-wide { width: 100%; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 64px 5vw 56px; }
.hero-car { margin: 44px auto 0; max-width: 1040px; }
.stage-meta { display: flex; justify-content: center; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.stage-meta strong { font-family: var(--font-display); font-size: 17px; color: var(--ink); }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--muted); font-weight: 500;
  border: 1px solid var(--line); background: var(--surface);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 28px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .4; } }
.hero h1 { font-size: clamp(40px, 7vw, 72px); line-height: 1.02; font-weight: 700; }
.hero-sub { margin: 22px auto 0; max-width: 560px; color: var(--muted); font-size: 18px; }
.hero-cta { margin-top: 34px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-stats {
  margin: 40px auto 0; display: flex; justify-content: center; gap: 0;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); max-width: 640px; overflow: hidden;
}
.hero-stats { flex-wrap: wrap; }
.hero-stats > div { flex: 1 1 140px; padding: 18px 10px; display: flex; flex-direction: column; }
.hero-stats > div + div { border-left: 1px solid var(--line); }
@media (max-width: 640px) { .hero-stats > div + div { border-left: none; border-top: 1px solid var(--line); } .hero-stats > div { flex-basis: 100%; } }
.hero-stats strong { font-family: var(--font-display); font-size: 26px; }
.hero-stats span { font-size: 12.5px; color: var(--muted); }

/* ---------- sections ---------- */
section { padding: 64px 5vw; max-width: 1120px; margin: 0 auto; scroll-margin-top: 64px; }
.section-head { text-align: center; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); }
.section-head p { color: var(--muted); margin-top: 8px; }

/* ---------- viewer ---------- */
.stage-toggle {
  display: flex; justify-content: center; gap: 0; margin-bottom: 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  width: fit-content; margin-left: auto; margin-right: auto; padding: 4px;
}
.seg {
  border: none; background: transparent; cursor: pointer;
  font-family: var(--font-display); font-weight: 600; font-size: 13.5px; color: var(--muted);
  padding: 8px 18px; border-radius: 999px; transition: background .15s ease, color .15s ease;
}
.seg.active { background: var(--ink); color: #fff; }
.viewer-hint { text-align: center; color: var(--muted); font-size: 13.5px; margin-top: 10px; }
.car-stage {
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px;
  padding: 22px 10px 6px; overflow-x: auto;
}
.car-stage > svg { display: block; width: 100%; min-width: 620px; height: auto; animation: stage-in .4s ease; }
@keyframes stage-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.car-stage.photo { padding: 10px; }
.photo-stage { position: relative; container-type: inline-size; border-radius: 18px; overflow: hidden; animation: stage-in .4s ease; }
.photo-stage img { display: block; width: 100%; height: auto; }
.photo-decal {
  position: absolute; display: inline-flex; align-items: center; gap: .42em;
  transform: translate(-50%, -50%) rotate(var(--r, 0deg));
  font-family: var(--font-display); font-size: calc(1.9cqw * var(--s, 1));
  text-transform: uppercase; white-space: nowrap;
  background: #fff; color: #17181c; padding: .28em .6em .28em .3em; border-radius: .45em;
  box-shadow: 0 .12em .4em rgba(0, 0, 0, .32), inset 0 0 0 1px rgba(0, 0, 0, .05);
}
.photo-decal .d-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.5em; height: 1.5em; border-radius: .34em; color: #fff; flex-shrink: 0;
}
.photo-decal .d-ic svg { width: 72%; height: 72%; min-width: 0; fill: currentColor; }
@media (prefers-reduced-motion: reduce) { .car-stage svg, .photo-stage { animation: none; } }

.zone { cursor: pointer; }
.zone .zone-under { fill: rgba(255, 255, 255, .14); stroke: rgba(255, 255, 255, .9); stroke-width: 4.5; transition: fill .15s ease; }
.zone .zone-fill { fill: transparent; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 7 6; }
.zone:hover .zone-under { fill: rgba(255, 255, 255, .32); }
.zone.taken .zone-under { fill: rgba(22, 19, 15, .05); stroke: transparent; }
.zone.taken .zone-fill { stroke: #b9b2a7; stroke-dasharray: none; stroke-width: 1.5; }
.zone.taken:hover .zone-under { fill: rgba(255, 77, 0, .10); }
.zone.taken:hover .zone-fill { stroke: var(--accent); }
.zone-chip { pointer-events: none; }

.table-lead {
  display: flex; justify-content: center; align-items: center; gap: 8px;
  margin-top: 30px; font-size: 12.5px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em;
}
.zone-table-wrap { margin-top: 12px; overflow-x: auto; }
.zone-table { width: 100%; min-width: 620px; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 14.5px; }
.zone-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); }
.zone-table td { padding: 13px 16px; border-bottom: 1px solid var(--line); }
.zone-table tr:last-child td { border-bottom: none; }
.zone-table .price { font-family: var(--font-display); font-weight: 700; }
.zone-table .held { color: var(--muted); font-size: 13px; }
.badge { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.badge-free { background: var(--accent-soft); color: var(--accent); }
.badge-taken { background: #efece7; color: var(--muted); }
.book-link { background: none; border: none; color: var(--accent); font-weight: 600; font-family: var(--font-body); font-size: 14px; cursor: pointer; padding: 0; }
.book-link:hover { text-decoration: underline; }

/* ---------- garage ---------- */
.garage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.car-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; cursor: pointer; text-align: left;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  font-family: var(--font-body);
}
.car-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(22, 19, 15, .08); }
.car-card.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.car-card svg { width: 100%; height: auto; margin-bottom: 10px; }
.car-card h3 { font-size: 17px; }
.car-card .card-meta { color: var(--muted); font-size: 13px; margin: 3px 0 10px; }
.car-card .card-foot { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.card-foot .from { font-family: var(--font-display); font-weight: 700; font-size: 15px; }

/* ---------- how ---------- */
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.how-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; }
.how-num {
  display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center;
  background: var(--ink); color: #fff; border-radius: 50%;
  font-family: var(--font-display); font-weight: 700; margin-bottom: 14px;
}
.how-card h3 { font-size: 18px; margin-bottom: 8px; }
.how-card p { color: var(--muted); font-size: 14.5px; }

/* ---------- list / simulator ---------- */
.list-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 820px) { .list-grid { grid-template-columns: 1fr; } }
.list-form, .estimate {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
}
.list-form label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 16px; }
.list-form input[type="text"], .list-form select {
  display: block; width: 100%; margin-top: 6px;
  padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-family: var(--font-body); font-size: 15px; background: var(--bg); color: var(--ink);
}
.list-form input:focus, .list-form select:focus { outline: 2px solid var(--accent); border-color: transparent; }
.list-form input[type="range"] { width: 100%; margin-top: 10px; accent-color: var(--accent); }
.unit-toggle { float: right; display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.unit-toggle button {
  border: none; background: var(--surface); color: var(--muted); cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: 11.5px; padding: 3px 10px;
}
.unit-toggle button.active { background: var(--ink); color: #fff; }
.list-form input[type="color"] { display: block; margin-top: 6px; width: 64px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); cursor: pointer; }
.estimate h3 { font-size: 18px; margin-bottom: 14px; }
.estimate-row { display: flex; justify-content: space-between; align-items: baseline; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.estimate-row .z-size { color: var(--muted); font-size: 12.5px; margin-left: 8px; }
.estimate-row strong { font-family: var(--font-display); }
.estimate-total { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; font-weight: 600; }
.estimate-total strong { font-family: var(--font-display); font-size: 26px; color: var(--accent); }
.tiny { font-size: 12px; color: var(--muted); margin-top: 10px; }

/* ---------- faq ---------- */
.faq { max-width: 720px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin-bottom: 10px; }
.faq summary { font-family: var(--font-display); font-weight: 600; cursor: pointer; font-size: 15.5px; }
.faq details p { margin-top: 10px; color: var(--muted); font-size: 14.5px; }

/* ---------- footer ---------- */
.footer { text-align: center; padding: 48px 5vw 64px; border-top: 1px solid var(--line); }
.footer p:first-child { font-family: var(--font-display); font-weight: 600; }
.footer-links { display: flex; justify-content: center; gap: 10px; margin: 10px 0 2px; color: var(--muted); }
.text-link { background: none; border: none; padding: 0; cursor: pointer; font-family: var(--font-body); font-size: 13.5px; color: var(--muted); text-decoration: underline; }
.text-link:hover { color: var(--ink); }
.legal p { margin-top: 12px; font-size: 14.5px; color: var(--muted); }
.legal h3 { margin-bottom: 4px; }

/* ---------- small screens ---------- */
@media (max-width: 820px) {
  .zone-table { min-width: 480px; }
  .zone-table .col-size { display: none; }
}
@media (max-width: 640px) {
  .hero { padding-top: 56px; }
  .hero-stats strong { font-size: 19px; }
  .hero-stats span { font-size: 11px; }
  .hero-cta .btn { padding: 12px 20px; font-size: 14px; }
  section { padding: 48px 5vw; }
}

/* ---------- toast & owner success ---------- */
.toast {
  position: fixed; top: 74px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 14px;
  padding: 12px 22px; border-radius: 999px; box-shadow: 0 14px 40px rgba(22, 19, 15, .3);
  z-index: 60; animation: toast-in .3s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.owner-success { color: var(--ok); font-weight: 600; font-size: 14.5px; }

/* ---------- modal ---------- */
dialog { border: none; border-radius: 20px; padding: 0; max-width: 420px; width: calc(100vw - 40px); box-shadow: 0 30px 80px rgba(22, 19, 15, .25); }
dialog::backdrop { background: rgba(22, 19, 15, .45); backdrop-filter: blur(3px); }
.modal-inner { padding: 30px; position: relative; }
.modal-close { position: absolute; top: 16px; right: 16px; background: var(--bg); border: 1px solid var(--line); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 13px; }
.modal-inner h3 { font-size: 22px; }
.modal-sub { color: var(--muted); font-size: 14px; margin: 6px 0 18px; }
.modal-inner label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 14px; }
.modal-inner input[type="text"], .modal-inner select {
  display: block; width: 100%; margin-top: 6px;
  padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; background: var(--bg); color: var(--ink); font-family: var(--font-body);
}
.modal-inner input[type="file"] { margin-top: 6px; font-size: 13px; width: 100%; }
.logo-preview { margin: -6px 0 14px; }
.logo-preview img { max-height: 56px; max-width: 160px; border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: #fff; }
.modal-total { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; margin-bottom: 6px; border-top: 1px solid var(--line); font-weight: 600; }
.modal-total strong { font-family: var(--font-display); font-size: 24px; color: var(--accent); }
