:root {
  --bg: #0a0a0c;
  --bg-elevated: #141417;
  --card: #18181c;
  --border: #2a2a30;
  --text: #f2f0ea;
  --text-dim: #9a978f;
  --gold: #c9a227;
  --gold-bright: #e6c34f;
  --red: #b3312c;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Helvetica Neue", Arial, "Segoe UI", sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

.noise-overlay {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(circle at 20% 20%, rgba(201,162,39,0.06), transparent 40%),
                     radial-gradient(circle at 80% 70%, rgba(179,49,44,0.06), transparent 40%);
}

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(10,10,12,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 960px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
}
.brand { font-weight: 700; letter-spacing: 0.04em; font-size: 15px; }
.brand-thin { font-weight: 300; color: var(--text-dim); }
.slots-pill {
  font-size: 12px; padding: 6px 12px; border-radius: 999px;
  background: rgba(201,162,39,0.12); border: 1px solid rgba(201,162,39,0.4);
  color: var(--gold-bright); white-space: nowrap;
}

#app { position: relative; z-index: 1; }

.step {
  display: none;
  min-height: calc(100vh - 60px);
  align-items: center;
  justify-content: center;
  padding: 40px 20px 80px;
}
.step.active { display: flex; animation: fadeUp 0.5s ease both; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-content { max-width: 560px; width: 100%; text-align: center; }
.step-content.wide { max-width: 760px; }

.step-intro { position: relative; }
.intro-bg {
  position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse at 50% 0%, rgba(179,49,44,0.18), transparent 55%),
              radial-gradient(ellipse at 50% 100%, rgba(201,162,39,0.12), transparent 55%);
}

.eyebrow {
  font-size: 12px; letter-spacing: 0.25em; color: var(--gold-bright);
  margin: 0 0 16px; font-weight: 600;
}
h1 { font-size: clamp(32px, 6vw, 52px); line-height: 1.15; margin: 0 0 20px; font-weight: 700; }
h2 { font-size: clamp(24px, 4vw, 32px); margin: 0 0 12px; font-weight: 700; }
.lede { color: var(--text-dim); font-size: 17px; line-height: 1.6; margin: 0 0 32px; }

.step-tag { font-size: 11px; letter-spacing: 0.2em; color: var(--gold); font-weight: 700; margin: 0 0 10px; }
.step-desc { color: var(--text-dim); font-size: 15px; margin: 0 0 28px; line-height: 1.6; }

.btn {
  border: none; cursor: pointer; font-size: 15px; font-weight: 600;
  padding: 14px 28px; border-radius: 8px; transition: transform 0.15s, opacity 0.15s;
  font-family: inherit;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn-primary { background: linear-gradient(135deg, var(--gold-bright), var(--gold)); color: #1a1400; }
.btn-secondary { background: var(--card); color: var(--text); border: 1px solid var(--border); }
.btn-ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--border); }
.btn-block { width: 100%; }

.step-nav {
  display: flex; justify-content: space-between; gap: 12px; margin-top: 32px;
}
.step-nav .btn-primary { margin-left: auto; }

.link-btn {
  background: none; border: none; color: var(--gold-bright); text-decoration: underline;
  cursor: pointer; font-size: inherit; padding: 0;
}
.skip-note { color: var(--text-dim); font-size: 13px; margin-top: 16px; }

/* Ngu Hanh */
.hanh-input-row { display: flex; gap: 10px; justify-content: center; margin-bottom: 8px; }
.hanh-input-row input {
  background: var(--card); border: 1px solid var(--border); color: var(--text);
  padding: 12px 16px; border-radius: 8px; font-size: 15px; width: 160px; text-align: center;
}
.hanh-result { margin: 24px 0; }
.hanh-card {
  display: flex; align-items: center; gap: 16px; text-align: left;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 20px;
}
.hanh-icon { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; }
.hanh-card h3 { margin: 0 0 6px; font-size: 18px; }
.hanh-card p { margin: 0; color: var(--text-dim); font-size: 14px; line-height: 1.5; }

/* Car preview */
.car-preview { margin: 0 auto 28px; max-width: 560px; }
.car-svg { width: 100%; height: auto; }

.swatch-grid {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-bottom: 8px;
}
.swatch {
  width: 64px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; background: none; border: none; font-family: inherit;
}
.swatch-dot {
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--border);
  transition: transform 0.15s, border-color 0.15s; position: relative;
}
.swatch:hover .swatch-dot { transform: scale(1.08); }
.swatch.selected .swatch-dot { border-color: var(--gold-bright); box-shadow: 0 0 0 3px rgba(201,162,39,0.25); }
.swatch-dot.recommended::after {
  content: "✦"; position: absolute; top: -8px; right: -6px; color: var(--gold-bright); font-size: 14px;
}
.swatch-label { font-size: 11px; color: var(--text-dim); text-align: center; }

/* Interior */
.interior-preview { margin: 0 auto 28px; max-width: 640px; }
.interior-svg { width: 100%; height: auto; border-radius: 12px; overflow: hidden; }

/* Badge */
.badge-preview-wrap { margin: 0 auto 24px; max-width: 340px; }
.badge-svg { width: 100%; height: auto; }
.badge-brand { fill: #f2f0ea; font-size: 20px; font-weight: 700; letter-spacing: 0.08em; }
.badge-sub { fill: var(--gold-bright); font-size: 10px; letter-spacing: 0.15em; }
.badge-name { fill: #f2f0ea; font-size: 16px; font-weight: 600; letter-spacing: 0.05em; }
.badge-count { fill: var(--text-dim); font-size: 9px; letter-spacing: 0.1em; }

#badgeText {
  width: 100%; max-width: 340px; background: var(--card); border: 1px solid var(--border);
  color: var(--text); padding: 12px 16px; border-radius: 8px; font-size: 15px; text-align: center;
}

/* Summary */
.summary-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px; margin: 24px 0;
}
.summary-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px;
  text-align: left;
}
.summary-label { display: block; font-size: 11px; color: var(--text-dim); letter-spacing: 0.1em; margin-bottom: 6px; }
.summary-value { display: block; font-size: 16px; font-weight: 600; }
.scarcity-note {
  color: var(--gold-bright); font-size: 14px; font-weight: 600; margin-top: 8px;
}

/* Lead form */
.lead-form { text-align: left; }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; }
.form-row input, .form-row textarea {
  width: 100%; background: var(--card); border: 1px solid var(--border); color: var(--text);
  padding: 12px 14px; border-radius: 8px; font-size: 15px; font-family: inherit; resize: vertical;
}
.form-status { text-align: center; font-size: 14px; margin-top: 14px; min-height: 20px; }
.form-status.error { color: #ff6b6b; }
.form-status.success { color: #6bcf7f; }

.thanks-code { color: var(--text-dim); font-size: 13px; margin-top: 20px; }

@media (max-width: 480px) {
  .step { padding: 24px 16px 60px; }
  .hanh-input-row { flex-direction: column; align-items: center; }
  .hanh-input-row input { width: 100%; max-width: 240px; }
}
