/* ==========================================================================
   Drive Pilot — Lease Buyout Quote Funnel (demo)
   ========================================================================== */

:root {
  /* Official Drive Pilot brand palette */
  --navy-900: #0f172a;
  --navy-800: #1e293b;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-500: #3b82f6;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;
  /* Accent: amber — the brand palette is all cool tones, so this is the one
     warm pop used for CTAs, ratings, and tags. Swap here if a different
     accent is preferred. */
  --gold-500: #f59e0b;
  --gold-600: #d97706;
  --gold-100: #fef3c7;
  --ink: #0f172a;
  --gray-700: #334155;
  --gray-500: #64748b;
  --gray-300: #cbd5e1;
  --gray-200: #e2e8f0;
  --gray-100: #f1f5f9;
  --white: #ffffff;
  --green-600: #17a058;
  --green-50: #e9f9f0;
  --red-500: #e03434;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 10px 30px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 24px 60px rgba(11, 31, 58, 0.18);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
a { text-decoration: none; color: inherit; }

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #eef0fd 0%, #f7f8fe 320px, #f7f8fe 100%);
  background-attachment: fixed;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1.headline, .logo, .quote-amount-box strong.amount, .landing-icon-label {
  font-family: "Poppins", "Inter", system-ui, sans-serif;
}

img, svg { display: block; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }
h1, h2, h3, p { margin: 0; }

/* ---- App shell ---- */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- Top bar: logo + progress ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-200);
}
.topbar-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 24px 14px;
}
.topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.logo {
  display: inline-flex;
  align-items: center;
}
.logo img { height: 30px; width: auto; display: block; }
.step-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gray-500);
  letter-spacing: 0.01em;
}
.progress-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--gray-200);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 20%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue-500), var(--blue-600));
  transition: width 0.35s ease;
}

/* ---- Main / screens ---- */
main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px 60px;
}
.screen-wrap { width: 100%; max-width: 560px; }
.screen { display: none; animation: fadeUp 0.35s ease; }
.screen.active { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 40px 36px;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue-600);
  background: var(--blue-100);
  padding: 5px 11px;
  border-radius: 999px;
  margin-bottom: 16px;
}
h1.headline {
  font-size: clamp(26px, 5vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy-900);
  line-height: 1.15;
}
.subtext {
  margin-top: 12px;
  font-size: 15.5px;
  color: var(--gray-500);
  line-height: 1.55;
}

/* ---- Landing screen (split panel, echoes leaseend.com's navy-card + light-panel hero) ---- */
.landing-split {
  padding: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  max-width: 780px;
  margin: 0 auto;
}
.landing-left {
  background: linear-gradient(150deg, var(--navy-900), var(--navy-800) 75%);
  color: var(--white);
  padding: 48px 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}
.landing-left .eyebrow { background: rgba(255,255,255,0.12); color: #bfe0f7; }
.landing-left h1.headline { color: var(--white); }
.landing-left .subtext { color: #c9dff2; max-width: 340px; }
.landing-actions { margin-top: 28px; }
.landing-left .btn-primary {
  background: var(--gold-500);
  color: var(--navy-900);
  box-shadow: 0 8px 20px rgba(245, 184, 61, 0.32);
  width: auto;
  padding: 15px 30px;
}
.landing-left .btn-primary:hover { background: var(--gold-600); }
.trust-row {
  margin-top: 24px;
  display: flex;
  justify-content: flex-start;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: #c9dff2;
}
.trust-row span { display: inline-flex; align-items: center; gap: 6px; }
.trust-row svg { color: var(--gold-500); flex-shrink: 0; }

.landing-right {
  background: var(--blue-50);
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 20px;
}
.landing-illustration svg { width: 140px; height: 140px; }
.counter-block strong {
  display: block;
  font-size: 30px;
  font-weight: 800;
  color: var(--navy-900);
  font-family: "Poppins", sans-serif;
  letter-spacing: -0.01em;
}
.counter-block span { font-size: 12.5px; color: var(--gray-500); font-weight: 600; }
.rating-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}
.rating-badge .stars { color: var(--gold-500); letter-spacing: 2px; font-size: 15px; }
.rating-badge strong { display: block; font-size: 14px; color: var(--navy-900); }
.rating-badge span { font-size: 11px; color: var(--gray-500); }

@media (max-width: 700px) {
  .landing-split { grid-template-columns: 1fr; max-width: 460px; }
  .landing-left, .landing-right { padding: 36px 28px; }
  .landing-left { text-align: center; align-items: center; }
  .landing-left .subtext { max-width: none; }
  .trust-row { justify-content: center; }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 24px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 15.5px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}
.btn-primary {
  background: var(--blue-600);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(47, 95, 224, 0.28);
}
.btn-primary:hover { background: var(--blue-700); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-secondary {
  background: var(--white);
  color: var(--navy-900);
  border-color: var(--gray-300);
}
.btn-secondary:hover { border-color: var(--navy-900); }
.btn-link {
  background: none;
  border: none;
  width: auto;
  padding: 8px 0;
  color: var(--blue-600);
  font-weight: 600;
  font-size: 14px;
}
.btn-link:hover { text-decoration: underline; }
.btn-row { display: flex; gap: 12px; margin-top: 26px; }
.btn-row .btn-secondary { flex: 0 0 110px; width: auto; }
.btn-spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4); border-top-color: var(--white);
  animation: spin 0.7s linear infinite;
  display: none;
}
.btn-primary.loading .btn-spinner { display: inline-block; }
.btn-primary.loading .btn-label { opacity: 0.85; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Forms ---- */
.field { margin-top: 20px; }
.field:first-of-type { margin-top: 26px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-900);
  margin-bottom: 7px;
}
.field .optional { font-weight: 500; color: var(--gray-500); }
.field input, .field select {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--ink);
  background: var(--white);
  appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23667085' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.field .prefix-wrap { position: relative; }
.field .prefix-wrap span {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--gray-500); font-weight: 600; font-size: 15px;
}
.field .prefix-wrap input { padding-left: 28px; }
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--blue-600);
  box-shadow: 0 0 0 4px var(--blue-100);
}
.field input.invalid, .field select.invalid { border-color: var(--red-500); }
.field .error-msg {
  display: none;
  font-size: 12.5px;
  color: var(--red-500);
  margin-top: 6px;
  font-weight: 600;
}
.field.has-error .error-msg { display: block; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.divider {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-500);
  margin: 22px 0;
  position: relative;
  letter-spacing: 0.04em;
}
.divider::before, .divider::after {
  content: ""; position: absolute; top: 50%; width: 42%; height: 1px; background: var(--gray-200);
}
.divider::before { left: 0; }
.divider::after { right: 0; }

.manual-toggle {
  text-align: center;
  margin-top: 6px;
}
.manual-fields { display: none; margin-top: 4px; }
.manual-fields.show { display: block; }

.secure-note {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 12.5px; color: var(--gray-500); margin-top: 16px;
}
.secure-note svg { color: var(--gray-500); flex-shrink: 0; }

/* Vehicle lookup result chip */
.vehicle-found {
  display: none;
  margin-top: 22px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--green-50);
  border: 1px solid #b9ecce;
  align-items: center;
  gap: 12px;
}
.vehicle-found.show { display: flex; }
.vehicle-found .icon {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--white); color: var(--green-600);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.vehicle-found strong { display: block; font-size: 14.5px; color: var(--navy-900); }
.vehicle-found span { font-size: 12.5px; color: var(--gray-700); }
.vehicle-found button {
  margin-left: auto; background: none; border: none; color: var(--blue-600);
  font-weight: 600; font-size: 12.5px; flex-shrink: 0;
}

/* ---- Progress step dots (mini, under top bar on wide screens) ---- */
.step-dots { display: flex; gap: 6px; margin-top: 10px; }
.step-dots i { flex: 1; height: 4px; border-radius: 999px; background: var(--gray-200); }
.step-dots i.done { background: var(--blue-600); }

/* ---- Quote result screen ---- */
.quote-card { text-align: center; }
.quote-card .headline { text-align: left; }
.quote-card .subtext { text-align: left; }
.quote-amount-box {
  margin-top: 28px;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-800));
  border-radius: var(--radius-md);
  padding: 32px 24px;
  color: var(--white);
}
.quote-amount-box span.label {
  display: block; font-size: 12.5px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: #a9c0ff; margin-bottom: 8px;
}
.quote-amount-box strong.amount {
  display: block; font-size: clamp(38px, 9vw, 54px); font-weight: 800; letter-spacing: -0.02em;
}
.quote-financed {
  margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 14px; color: #c6d2ec;
}
.quote-financed strong { color: var(--white); font-size: 17px; }

.quote-stats {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.quote-stats div {
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  text-align: center;
}
.quote-stats div span { display: block; font-size: 11px; color: var(--gray-500); font-weight: 600; margin-bottom: 4px; }
.quote-stats div strong { display: block; font-size: 15px; color: var(--navy-900); font-weight: 700; }

.quote-disclaimer {
  margin-top: 16px; font-size: 11.5px; color: var(--gray-500); text-align: left;
}

.trust-bullets {
  margin-top: 26px;
  display: flex; flex-direction: column; gap: 12px;
}
.trust-bullets li {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 500; color: var(--gray-700);
}
.trust-bullets li svg { color: var(--green-600); flex-shrink: 0; }

.start-over {
  display: block; text-align: center; margin-top: 18px;
  font-size: 13px; color: var(--gray-500); font-weight: 600;
}
.start-over:hover { color: var(--navy-900); }

/* ---- Toast ---- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--navy-900); color: var(--white); padding: 14px 22px; border-radius: 14px;
  font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: all 0.25s ease; z-index: 100;
  max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

footer.mini-footer {
  text-align: center; padding: 18px 20px 30px; font-size: 12px; color: var(--gray-500);
}
.mini-footer-links { margin-top: 6px; }
.mini-footer-links a { font-weight: 600; color: var(--gray-500); }
.mini-footer-links a:hover { color: var(--navy-900); }

/* ---- Responsive ---- */
@media (max-width: 560px) {
  .card { padding: 30px 22px; border-radius: var(--radius-md); }
  .landing-card { padding: 44px 24px; }
  .field-row { grid-template-columns: 1fr; }
  .quote-stats { grid-template-columns: 1fr 1fr; }
  .quote-stats div:last-child { grid-column: 1 / -1; }
  .topbar-inner { padding: 14px 18px 12px; }
  main { padding: 24px 14px 40px; }
}
