:root {
  --bg: #23272a;
  --bg-alt: #1c1f22;
  --ink: #e9e4dc;
  --ink-dim: #a9adb3;
  --rule: #4a4f56;
  --amber: #f09030;
  --amber-dim: #8a5a24;
  --border: rgba(255,255,255,.08);

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --container: 900px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--amber); color: #1a1d20;
  padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 100;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

.banner { width: 100%; display: block; }

/* ---------------- Top nav ---------------- */
.top-nav {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
}
.top-nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.top-nav-brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: #f5f1ea;
}
.top-nav-link {
  color: var(--amber);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--amber);
  border-radius: 4px;
  padding: 7px 14px;
  transition: background .15s ease, color .15s ease;
}
.top-nav-link:hover { background: var(--amber); color: #1a1d20; }

main > section, .site-footer { padding-left: 48px; padding-right: 48px; }

/* ---------------- Ad slots ----------------
   Hidden by default; JS only unhides a slot if the admin has actually put
   content in it (see app.js). The "Advertisement" label is small but
   always present when a slot is showing, for basic disclosure. */
.ad-slot {
  max-width: var(--container);
  margin: 0 auto;
  padding: 20px 48px;
  text-align: center;
}
.ad-slot-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 0 0 8px;
}
.ad-slot-content { display: inline-block; max-width: 100%; }
.ad-slot-content img { max-width: 100%; height: auto; }

@media (max-width: 640px) {
  .ad-slot { padding: 16px 24px; }
}

/* ---------------- Hero ---------------- */
.hero {
  padding-top: 60px;
  padding-bottom: 56px;
  text-align: center;
  max-width: var(--container);
  margin: 0 auto;
}

.eyebrow {
  font-size: 12.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #8a8f96;
  margin: 0 0 22px;
}
.eyebrow:before, .eyebrow:after {
  content: ''; display: inline-block; width: 32px; height: 1px;
  background: var(--rule); vertical-align: middle; margin: 0 14px;
}

h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -.01em;
  color: #f5f1ea;
  margin: 0 0 22px;
}

.sub {
  color: var(--ink-dim);
  font-size: 17px;
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.65;
}

.btn {
  display: inline-block;
  background: transparent;
  color: var(--amber);
  border: 1px solid var(--amber);
  padding: 14px 30px;
  border-radius: 2px;
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: .03em;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
  font-family: var(--font-body);
}
.btn:hover { background: var(--amber); color: #1a1d20; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; border: none; background: var(--amber); color: #1a1d20; }
.btn-block:hover { background: #ffa64d; }

/* ---------------- Sites strip ---------------- */
.sites {
  text-align: center;
  padding-top: 36px;
  padding-bottom: 36px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.sites-label {
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: #8a8f96; margin: 0 0 16px;
}
.site-badge {
  font-family: var(--font-display); font-weight: 500; font-size: 15px;
  border: 1px solid var(--rule); padding: 9px 22px; margin: 0 6px;
  display: inline-block; color: var(--ink);
}

/* ---------------- Generic section ---------------- */
.section {
  padding-top: 60px;
  padding-bottom: 60px;
  border-top: 1px solid var(--border);
  max-width: var(--container);
  margin: 0 auto;
}
.section h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
  text-align: center;
  color: #f5f1ea;
  margin: 0 0 12px;
}
.section-sub {
  text-align: center;
  color: var(--ink-dim);
  font-size: 15px;  max-width: 520px;
  margin: 0 auto 40px;
}

/* ---------------- How it works ---------------- */
.steps { display: flex; gap: 0; margin-top: 36px; }
.step { flex: 1; text-align: center; padding: 0 24px; position: relative; }
.step:not(:last-child):after {
  content: ''; position: absolute; top: 9px; right: -10px;
  width: 20px; height: 1px; background: var(--rule);
}
.step .n { font-family: var(--font-display); font-size: 13px; color: var(--amber); margin-bottom: 10px; }
.step h3 { font-family: var(--font-display); font-weight: 600; font-size: 17px; color: #f5f1ea; margin: 0 0 8px; }
.step p { color: var(--ink-dim); font-size: 14px; line-height: 1.55; margin: 0; }

/* ---- How-it-works icons — big, bright, and always in motion once they
   scroll into view. Visible and sensibly posed with no JS at all (same
   progressive-enhancement convention as the rest of the site); JS just
   unlocks the continuous motion on top of an already-good static icon. */
.step-icon { width: 92px; height: 92px; margin: 0 auto 20px; }
.step-icon svg { width: 100%; height: 100%; overflow: visible; }

/* Icon I — tachometer needle swinging up to the target, with a flash
   on landing, like a dashboard gauge hitting the mark. */
.gauge-track { stroke: rgba(255,255,255,.1); }
.gauge-fill {
  stroke: var(--amber);
  stroke-dasharray: 113;
  stroke-dashoffset: 30;
  filter: drop-shadow(0 0 6px rgba(240,144,48,.6));
}
.gauge-needle {
  stroke: #ff5c5c;
  transform-origin: 50px 78px;
  transform: rotate(20deg);
  filter: drop-shadow(0 0 4px rgba(255,92,92,.7));
}
.gauge-hub { fill: #f5f1ea; }
.gauge-flash { fill: var(--amber); opacity: 0; transform-origin: 50px 78px; }

html.js .step-icon-gauge .gauge-fill,
html.js .step-icon-gauge .gauge-needle {
  transition: none;
}
html.js .step.in-view .step-icon-gauge .gauge-fill {
  animation: gauge-fill-sweep 2.6s cubic-bezier(.45,0,.55,1) infinite;
}
html.js .step.in-view .step-icon-gauge .gauge-needle {
  animation: gauge-needle-sweep 2.6s cubic-bezier(.34,1.6,.64,1) infinite;
}
html.js .step.in-view .step-icon-gauge .gauge-flash {
  animation: gauge-flash-pop 2.6s ease-out infinite;
}
@keyframes gauge-fill-sweep {
  0%, 8%   { stroke-dashoffset: 113; }
  55%, 100%{ stroke-dashoffset: 30; }
}
@keyframes gauge-needle-sweep {
  0%, 8%   { transform: rotate(-70deg); }
  50%      { transform: rotate(28deg); }
  58%      { transform: rotate(14deg); }
  66%, 100%{ transform: rotate(20deg); }
}
@keyframes gauge-flash-pop {
  0%, 48%  { opacity: 0; transform: scale(.6); }
  54%      { opacity: .55; transform: scale(1.15); }
  68%, 100%{ opacity: 0; transform: scale(1.3); }
}

/* Icon II — radar dish continuously sweeping, blips lighting up as it
   passes them, like the daily scan finding new sales in real time. */
.radar-ring { stroke: rgba(255,255,255,.15); }
.radar-sweep-group { transform-origin: 50px 50px; }
.radar-sweep { fill: var(--blue, #0084e4); opacity: .35; }
.radar-blip { fill: var(--amber); opacity: .3; filter: drop-shadow(0 0 4px rgba(240,144,48,.7)); }

html.js .step.in-view .radar-sweep-group {
  animation: radar-spin 2.2s linear infinite;
}
@keyframes radar-spin { to { transform: rotate(360deg); } }

html.js .step.in-view .blip-1 { animation: blip-flash 2.2s ease-in-out infinite; animation-delay: .15s; }
html.js .step.in-view .blip-2 { animation: blip-flash 2.2s ease-in-out infinite; animation-delay: .85s; }
html.js .step.in-view .blip-3 { animation: blip-flash 2.2s ease-in-out infinite; animation-delay: 1.5s; }
@keyframes blip-flash {
  0%, 90%, 100% { opacity: .3; transform: scale(1); }
  8%            { opacity: 1; transform: scale(1.6); }
  20%           { opacity: .3; transform: scale(1); }
}

/* Icon III — bell shaking side to side with sound waves and a little
   confetti pop, like a genuinely exciting "you matched!" moment. */
.bell-shake { transform-origin: 50px 24px; }
.bell-body { fill: #f5f1ea; }
.bell-clapper { fill: var(--amber); }
.bell-wave {
  fill: none; stroke: var(--amber); stroke-width: 3; stroke-linecap: round;
  opacity: 0; filter: drop-shadow(0 0 4px rgba(240,144,48,.6));
}
.pop-dot { opacity: 0; }
.pop-1, .pop-3 { fill: var(--blue, #0084e4); }
.pop-2, .pop-4 { fill: #3fd97f; }

html.js .step.in-view .bell-shake { animation: bell-shake 2.4s ease-in-out infinite; }
@keyframes bell-shake {
  0%, 20%, 100% { transform: rotate(0deg); }
  4%  { transform: rotate(16deg); }
  8%  { transform: rotate(-14deg); }
  12% { transform: rotate(10deg); }
  16% { transform: rotate(-6deg); }
}
html.js .step.in-view .wave-1 { animation: wave-pulse 2.4s ease-out infinite; animation-delay: .05s; }
html.js .step.in-view .wave-2 { animation: wave-pulse 2.4s ease-out infinite; animation-delay: .2s; }
@keyframes wave-pulse {
  0%, 18% { opacity: 0; transform: scale(.7); }
  28%     { opacity: 1; transform: scale(1); }
  50%, 100% { opacity: 0; transform: scale(1.15); }
}
html.js .step.in-view .pop-dot { animation: pop-out 2.4s ease-out infinite; }
html.js .step.in-view .pop-1 { animation-delay: .1s; }
html.js .step.in-view .pop-2 { animation-delay: .18s; }
html.js .step.in-view .pop-3 { animation-delay: .12s; }
html.js .step.in-view .pop-4 { animation-delay: .22s; }
@keyframes pop-out {
  0%, 15%   { opacity: 0; transform: translate(0,0) scale(.4); }
  30%       { opacity: 1; transform: translate(var(--dx,0), var(--dy,0)) scale(1); }
  55%, 100% { opacity: 0; transform: translate(calc(var(--dx,0) * 1.6), calc(var(--dy,0) * 1.6)) scale(.6); }
}
.pop-1 { --dx: -10px; --dy: -8px; }
.pop-2 { --dx: 10px;  --dy: -8px; }
.pop-3 { --dx: 8px;   --dy: 10px; }
.pop-4 { --dx: -8px;  --dy: 10px; }

@media (prefers-reduced-motion: reduce) {
  html.js .step.in-view .step-icon-gauge .gauge-fill,
  html.js .step.in-view .step-icon-gauge .gauge-needle,
  html.js .step.in-view .step-icon-gauge .gauge-flash,
  html.js .step.in-view .radar-sweep-group,
  html.js .step.in-view .radar-blip,
  html.js .step.in-view .bell-shake,
  html.js .step.in-view .bell-wave,
  html.js .step.in-view .pop-dot {
    animation: none !important;
  }
  .gauge-fill { stroke-dashoffset: 30; }
  .gauge-needle { transform: rotate(20deg); }
  .radar-blip, .bell-wave, .pop-dot { opacity: .6; }
}

/* ---------------- Form ---------------- */
.form-section { max-width: 640px; }

#target-form {
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 30px;
  margin-top: 8px;
}

.row { display: flex; gap: 16px; margin-bottom: 18px; }
.field { flex: 1; display: flex; flex-direction: column; gap: 7px; }

label { font-size: 13px; font-weight: 600; color: #cfd3d8; }
.field-hint { font-size: 12px; color: var(--ink-dim); margin: 0; font-weight: 400; }

.form-section-heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: #f5f1ea;
  margin: 0 0 18px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
#target-form h3.form-section-heading:first-child { padding-top: 0; border-top: none; }

.account-section-sub { font-size: 13px; color: var(--ink-dim); margin: -10px 0 18px; }

.link-btn {
  background: none;
  border: none;
  color: var(--amber);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-family: var(--font-body);
}
.link-btn:hover { color: #ffab5c; }

.auth-toggle { text-align: center; margin: -6px 0 20px; }

input, select, textarea {
  background: var(--bg-alt);
  border: 1px solid var(--rule);
  border-radius: 3px;
  color: var(--ink);
  padding: 11px 13px;
  font-size: 14.5px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color .15s ease;
}
textarea { width: 100%; resize: vertical; }
input::placeholder, textarea::placeholder { color: #666b70; font-family: var(--font-mono); font-size: 13.5px; }
input:focus, select:focus, textarea:focus { border-color: var(--amber); }

.message { text-align: center; font-size: 14px; margin: 16px 0 0; min-height: 18px; font-weight: 500; }
.message.success { color: #6bc98a; }
.message.error { color: #e07a6b; }

/* ---------------- Forecast reveal (post-submit) ----------------
   Always visible in the How It Works section — deliberately the
   brightest thing on the site, since it's the payoff moment. Play
   button sits centered on the chart itself; clicking it is the ONLY
   way this animation runs — never from the real target form, since
   it's a stylized illustration, not real data. */
.demo-caption { color: var(--ink-dim); font-size: 12.5px; text-align: center; margin: 12px 0 0; }

.forecast-wrap { margin-top: 44px; }

.forecast-card {
  background: #fdfcfa;
  color: #1a1d20;
  border-radius: 12px;
  padding: 28px 26px;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.5);
}

.forecast-eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8a95a3;
  margin: 0 0 6px;
}
.forecast-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
  color: #14181b;
  margin: 0 0 18px;
}

.forecast-chart { position: relative; margin-bottom: 4px; }
.forecast-chart svg { width: 100%; height: 200px; display: block; }

.forecast-target-line { stroke: #d8a04a; stroke-width: 2; stroke-dasharray: 5 5; }
.forecast-price-line { fill: none; stroke: #0084e4; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.forecast-car-dot { fill: #0084e4; stroke: #fff; stroke-width: 2; filter: drop-shadow(0 2px 4px rgba(0,132,228,.5)); }

.axis-gridline { stroke: #ececea; stroke-width: 1; }
.axis-tick { stroke: #c7c2b8; stroke-width: 1; }
.axis-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  fill: #9a958a;
}
.axis-label-y { text-anchor: end; }
.axis-label-x { text-anchor: middle; }

.chart-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(20,24,27,.85);
  border: 2px solid #f0b169;
  color: #f0b169;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,.4);
}
.chart-play-btn:hover { transform: translate(-50%, -50%) scale(1.08); background: rgba(20,24,27,.95); }
.chart-play-btn:disabled { opacity: .4; cursor: not-allowed; transform: translate(-50%, -50%); }
.chart-play-icon { font-size: 20px; margin-left: 3px; }

.forecast-readouts {
  display: flex;
  gap: 12px;
  border-top: 1px solid #e8e4dc;
  padding-top: 16px;
}
.readout { flex: 1; text-align: center; }
.readout-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #8a95a3;
  margin-bottom: 6px;
}
.readout-value {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 18px;
  color: #14181b;
}
.odometer-value {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: .08em;
  background: #14181b;
  color: #ffab5c;
  border-radius: 4px;
  padding: 4px 8px;
  border: 2px solid #3a3f45;
}

.forecast-alert {
  margin-top: 18px;
  background: #fff4e5;
  border: 1px solid #f0b169;
  color: #8a5a1a;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
}
/* The [hidden] attribute and .forecast-alert's `display: flex` have equal
   CSS specificity, so without this override the class rule wins the
   cascade and the alert stays visible even when JS sets hidden=true. */
.forecast-alert[hidden] { display: none; }
.forecast-alert-icon { font-size: 18px; margin-right: 10px; }
.forecast-alert.flash { animation: alert-flash 1s ease-in-out 2; }
@keyframes alert-flash {
  0%, 100% { background: #fff4e5; }
  50% { background: #ffe0b3; }
}

.forecast-fineprint {
  margin: 14px 0 0;
  font-size: 11.5px;
  color: #9aa3ac;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .forecast-alert.flash { animation: none; }
}

@media (max-width: 560px) {
  .forecast-readouts { flex-direction: column; gap: 14px; }
}

/* ---------------- Footer ---------------- */
.site-footer {
  padding-top: 36px;
  padding-bottom: 36px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-brand {
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  color: #f5f1ea; margin: 0 0 14px;
}
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; margin-bottom: 16px; }
.footer-links a { color: var(--ink-dim); text-decoration: none; font-size: 14px; margin: 0 12px 8px; }
.footer-links a:hover { color: var(--amber); }
.footer-fine { font-size: 12.5px; color: #6c7278; margin: 0; }

@media (max-width: 640px) {
  .row { flex-direction: column; gap: 18px; }
  .steps { flex-direction: column; gap: 28px; }
  .step:not(:last-child):after { display: none; }
  main > section, .site-footer { padding-left: 24px; padding-right: 24px; }
  .top-nav { padding: 12px 16px; }
  .top-nav-link { padding: 6px 10px; font-size: 13px; }
}

/* ---------------- Content pages (About/Terms/Privacy/Contact/Sitemap) --- */
.content-page { max-width: 720px; }
.content-page h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 32px;
  color: #f5f1ea;
  text-align: center;
  margin: 0 0 32px;
}
.content-page h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  color: #f5f1ea;
  text-align: left;
  margin: 28px 0 10px;
}
.content-page p {
  color: var(--ink-dim);
  font-size: 15px;
  line-height: 1.7;
  margin: 0 0 14px;
}
.content-page a { color: var(--amber); }
.content-page em { color: #8a8f96; font-size: 13.5px; }

.sitemap-list { list-style: none; padding: 0; margin: 0; }
.sitemap-list li { margin-bottom: 12px; }
.sitemap-list a {
  color: var(--ink); text-decoration: none; font-size: 16px;
  font-family: var(--font-display); font-weight: 600;
}
.sitemap-list a:hover { color: var(--amber); }
.sitemap-list p { color: var(--ink-dim); font-size: 13.5px; margin: 2px 0 0; }

#contact-form {
  max-width: 560px; margin: 0 auto;
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 30px;
}
