/* ====================================================================
   TOKENS
   ==================================================================== */
:root{
  --bg:#FFFBF9;
  --surface:#1A2226;
  --surface-2:#212B30;
  --surface-3:#293338;
  --ink:#EEF2F1;
  --muted:#8FA0A3;
  --muted-2:#9dacaf;
  --line:rgba(238,242,241,0.09);
  --spark:#FF6900;
  --spark-ink:#07211D;
  --ember:#E8934A;
  --danger:#E5626B;
  --success:#6FCF97;

  --c-bev:#FF6900;
  --c-phev:#df8830;
  --c-hev:#4FADA8;
  --c-mhev:#3FD6C2;

  --font-display:'Space Grotesk', 'Inter', sans-serif;
  --font-body:'Inter', sans-serif;
  --font-mono:'IBM Plex Mono', monospace;

  --r-sm:8px;
  --r-md:14px;
  --r-lg:22px;
  --r-pill:999px;

  --shadow-lift: 0 12px 30px -14px rgba(0,0,0,0.55);
  --tabbar-h: 66px;
}

@media (prefers-reduced-motion: no-preference){
  :root{ --transition-speed: 1; }
}

*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--font-body);
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4{
  font-family:var(--font-display);
  font-weight:700;
  margin:0 0 .4em;
  letter-spacing:-0.01em;
}
p{ margin:0 0 1em; color:var(--muted); }
a{ color:inherit; }
button{ font-family:inherit; }
img,svg{ display:block; max-width:100%; }
:focus-visible{ outline:2px solid var(--spark); outline-offset:2px; border-radius:4px; }
.mono{ font-family:var(--font-mono); }

/* ====================================================================
   LAYOUT SHELL
   ==================================================================== */
.app{ min-height:100dvh; display:flex; flex-direction:column; }

.topbar{
  position:sticky; top:0; z-index:40;
  background:rgba(16,22,26,0.86);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.topbar-inner{
  max-width:1120px; margin:0 auto;
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 20px;
}
.brand{ width: 20%;
  display: inline-flex;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  cursor: pointer;}
.brand-mark{
  width:34px; height:34px; border-radius:10px;
  background:linear-gradient(135deg, var(--ember), var(--c-phev) 55%, var(--spark));
  display:flex; align-items:center; justify-content:center;
  font-size:16px;
}
.brand-name{ font-family:var(--font-display); font-weight:700; font-size:19px; color:var(--ink); }
.brand-name .accent{ color:var(--spark); }

.topnav{ display:none; }

.logo{
  max-width: 100%;
  height: auto;
  margin-right: auto;
}

main{ flex:1; }
.view{ max-width:1120px; margin:0 auto; padding:20px 20px calc(var(--tabbar-h) + 40px); }

/* ====================================================================
   BOTTOM TAB BAR (mobile primary nav)
   ==================================================================== */
.tabbar{
  position:fixed; left:0; right:0; bottom:0; z-index:50;
  height:calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom:env(safe-area-inset-bottom);
  background:rgba(20,27,31,0.92);
  backdrop-filter:blur(14px);
  border-top:1px solid var(--line);
  display:flex; justify-content:space-around; align-items:stretch;
}
.tab{
  flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:3px; background:none; border:none; color:var(--muted-2); cursor:pointer;
  font-size:11px; font-weight:600; padding:6px 2px 2px;
  transition:color .15s ease;
}
.tab svg{ width:22px; height:22px; stroke:currentColor; fill:none; stroke-width:1.8; }
.tab.active{ color:var(--spark); }
.tab .dot{ width:4px; height:4px; border-radius:50%; background:var(--spark); opacity:0; margin-top:1px; transition:opacity .15s; }
.tab.active .dot{ opacity:1; }

@media (min-width:900px){
  .tabbar{ display:none; }
  .topnav{ display:flex; align-items:center; gap:4px; }
  .topnav-link{
    background:none; border:none; color:var(--muted); font-weight:600; font-size:14.5px;
    padding:9px 14px; border-radius:var(--r-pill); cursor:pointer; transition:all .15s ease;
  }
  .topnav-link:hover{ color:var(--ink); }
  .topnav-link.active{ color:var(--ink); background:var(--surface-2); }
  .topnav-cta{ background:var(--spark); color:var(--spark-ink); margin-left:8px; }
  .topnav-cta:hover{ color:var(--spark-ink); background:#ff7d20; }
  .view{ padding:44px 32px 80px; }
}

/* ====================================================================
   SHARED COMPONENTS
   ==================================================================== */
.eyebrow{
  display:inline-flex; align-items:center; gap:7px;
  font-family:var(--font-mono); font-size:11.5px; letter-spacing:.06em; text-transform:uppercase;
  color:var(--spark); background: #484747; border:1px solid rgba(63,214,194,0.25);
  padding:5px 11px; border-radius:var(--r-pill); margin-bottom:16px;
}
.card{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg);
  padding:20px;
}
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  font-weight:600; font-size:15px; border-radius:var(--r-pill); border:1px solid transparent;
  padding:13px 22px; cursor:pointer; transition:transform .12s ease, background .15s ease, opacity .15s;
  text-decoration:none;
}
.btn:active{ transform:scale(0.97); }
.btn-primary{ background:var(--spark); color:var(--spark-ink); }
.btn-primary:hover{ background:#FF6900; }
.btn-primary:disabled{ opacity:.4; cursor:not-allowed; }
.btn-ghost{ background:var(--surface-2); color:var(--ink); border-color:var(--line); }
.btn-ghost:hover{ background:var(--surface-3); }
.btn-block{ width:100%; }
.btn-sm{ padding:9px 16px; font-size:13.5px; }

.section-head{color: var(--surface-2); max-width:640px; margin-bottom:28px; }
.section-head h2{ font-size:26px; }
.section-head p{color: var(--surface-3); font-size:15.5px; }

/* Spectrum bar — signature element: MHEV → HEV → PHEV → BEV */
.spectrum{ }
.spectrum-track{
  position:relative; height:14px; border-radius:var(--r-pill);
  background:linear-gradient(90deg, var(--c-mhev), var(--c-hev) 34%, var(--c-phev) 67%, var(--c-bev));
  margin:18px 0 10px;
}
.spectrum-marker{
  position:absolute; top:50%; width:22px; height:22px; border-radius:50%;
  background:var(--bg); border:3px solid var(--ink); transform:translate(-50%,-50%);
  transition:left .5s cubic-bezier(.2,.8,.2,1);
  box-shadow:0 0 0 4px rgba(16,22,26,0.5);
}
.spectrum-labels{ display:flex; justify-content:space-between; font-family:var(--font-mono); font-size:11px; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; }
.spectrum-zones{
  display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-top:16px;
}
.spectrum-zone{
  background:var(--surface-2); border:1px solid var(--line); border-radius:var(--r-md);
  padding:12px 10px; cursor:pointer; text-align:left; color:var(--ink);
  transition:border-color .15s ease, transform .12s ease;
}
.spectrum-zone:hover{ transform:translateY(-2px); }
.spectrum-zone .tag{ display:block; font-family:var(--font-mono); font-size:10.5px; font-weight:600; margin-bottom:4px; }
.spectrum-zone .name{ display:block; font-size:12.5px; font-weight:700; margin-bottom:4px; }
.spectrum-zone p{ font-size:11.5px; margin:0; color:var(--muted); line-height:1.35; }
.spectrum-zone.mhev{ border-top:3px solid var(--c-mhev); }
.spectrum-zone.hev{ border-top:3px solid var(--c-hev); }
.spectrum-zone.phev{ border-top:3px solid var(--c-phev); }
.spectrum-zone.bev{ border-top:3px solid var(--c-bev); }
.spectrum-zone.mhev .tag{ color:var(--c-mhev); }
.spectrum-zone.hev .tag{ color:var(--c-hev); }
.spectrum-zone.phev .tag{ color:var(--c-phev); }
.spectrum-zone.bev .tag{ color:var(--c-bev); }

.type-chip{
  display:inline-flex; align-items:center; gap:5px; font-family:var(--font-mono); font-size:10.5px;
  font-weight:600; padding:4px 9px; border-radius:var(--r-pill); text-transform:uppercase; letter-spacing:.03em;
}
.type-chip::before{ content:''; width:6px; height:6px; border-radius:50%; background:currentColor; }
.type-chip.mhev{ color:var(--c-mhev); background:rgba(201,124,75,0.12); }
.type-chip.hev{ color:var(--c-hev); background:rgba(154,174,104,0.12); }
.type-chip.phev{ color:var(--c-phev); background:rgba(79,173,168,0.12); }
.type-chip.bev{ color:var(--c-bev); background:rgba(63,214,194,0.12); }

.toast{
  position:fixed; left:50%; bottom:calc(var(--tabbar-h) + 18px); transform:translateX(-50%) translateY(8px);
  background:var(--ink); color:var(--bg); font-weight:600; font-size:14px;
  padding:12px 20px; border-radius:var(--r-pill); z-index:100; box-shadow:var(--shadow-lift);
  opacity:0; pointer-events:none; transition:opacity .2s ease, transform .2s ease;
}
.toast.show{ opacity:1; transform:translateX(-50%) translateY(0); }
@media (min-width:900px){ .toast{ bottom:24px; } }

/* ====================================================================
   HOME
   ==================================================================== */
.hero{ padding-top:6px; }
.hero h1{ color: var(--surface-2); font-size:34px; line-height:1.08; max-width:15ch; }
.hero .lead{color: var(--surface-3); font-size:16.5px; max-width:44ch; }
.hero-actions{ display:flex; flex-wrap:wrap; gap:10px; margin:22px 0 30px; }

.feature-grid{ display:grid; grid-template-columns:1fr; gap:14px; margin-top:36px; }
.feature-card{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg);
  padding:20px; cursor:pointer; text-align:left; color:var(--ink); position:relative; overflow:hidden;
  transition:border-color .15s ease, transform .12s ease;
}
.feature-card:hover{ border-color:rgba(63,214,194,0.4); transform:translateY(-2px); }
.feature-card .num{ font-family:var(--font-mono); font-size:12px; color:var(--muted-2); }
.feature-card h3{ font-size:19px; margin-top:6px; }
.feature-card p{ font-size:14px; margin-bottom:14px; }
.feature-card .go{ font-family:var(--font-mono); font-size:12.5px; color:var(--spark); font-weight:600; }

@media (min-width:640px){
  .hero h1{ font-size:44px; }
  .feature-grid{ grid-template-columns:repeat(3,1fr); }
}
@media (min-width:900px){
  .hero h1{ font-size:52px; }
}

.stat-row{ display:flex; gap:26px; flex-wrap:wrap; margin-top:30px; padding-top:26px; border-top:1px solid var(--line); }
.stat{ min-width:110px; }
.stat b{color: var(--surface-3); display:block; font-family:var(--font-display); font-size:24px; }
.stat span{ font-size:12.5px; color:var(--spark-ink); }

.disclaimer{
  margin-top:30px; font-size:12.5px; color:var(--muted-2); background:var(--surface);
  border:1px dashed var(--line); border-radius:var(--r-md); padding:12px 14px;
}

/* ====================================================================
   QUIZ
   ==================================================================== */
.quiz-progress{ display:flex; align-items:center; gap:10px; margin-bottom:22px; }
.quiz-progress-track{ flex:1; height:6px; border-radius:var(--r-pill); background:var(--surface-2); overflow:hidden; }
.quiz-progress-fill{ height:100%; background:var(--spark); border-radius:var(--r-pill); transition:width .35s ease; }
.quiz-progress-label{ font-family:var(--font-mono); font-size:12px; color:var(--muted); white-space:nowrap; }

.quiz-card{ }
.quiz-card h2{ font-size:21px; margin-bottom:18px; }
.quiz-options{ display:grid; gap:10px; }
.quiz-option{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  text-align:left; background:var(--surface-2); border:1.5px solid var(--line); border-radius:var(--r-md);
  padding:15px 16px; cursor:pointer; color:var(--ink); font-size:15px; font-weight:500;
  transition:border-color .15s ease, background .15s ease;
}
.quiz-option:hover{ border-color:var(--c-bev); }
.quiz-option .arrow{ opacity:.5; flex-shrink:0; }
.quiz-nav{ display:flex; justify-content:space-between; margin-top:22px; }

.quiz-result-badge{
  display:inline-flex; align-items:center; gap:8px; padding:7px 14px; border-radius:var(--r-pill);
  font-family:var(--font-mono); font-weight:700; font-size:13px; margin-bottom:16px;
}
.result-cars{ display:grid; gap:12px; margin-top:20px; grid-template-columns:1fr; }
@media (min-width:640px){ .result-cars{ grid-template-columns:1fr 1fr; } }

.car-card{ background:var(--surface-2); border:1px solid var(--line); border-radius:var(--r-md); padding:16px; }
.car-card .icon{ font-size:26px; margin-bottom:8px; }
.car-card h4{ font-size:16px; margin-bottom:2px; }
.car-card .brand-line{ font-size:12.5px; color:var(--muted-2); margin-bottom:10px; }
.car-card .price{ font-family:var(--font-mono); font-size:15px; color:var(--spark); font-weight:600; }
.car-card .spec-mini{ font-size:12px; color:var(--muted); margin-top:6px; }
.car-card .car-card-actions{ display:flex; gap:8px; margin-top:12px; }

/* ====================================================================
   COMPARADOR
   ==================================================================== */
.filter-row{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:18px; }
.filter-chip{
  font-family:var(--font-mono); font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:.03em;
  padding:8px 14px; border-radius:var(--r-pill); border:1px solid var(--line); background:var(--surface);
  color:var(--muted); cursor:pointer; transition:all .15s ease;
}
.filter-chip.active{ background:var(--surface-2); color:var(--spark); border-color:var(--ink); }

.picker-grid{ display:grid; grid-template-columns:1fr; gap:10px; }
@media (min-width:640px){ .picker-grid{ grid-template-columns:1fr 1fr; } }
@media (min-width:900px){ .picker-grid{ grid-template-columns:1fr 1fr 1fr; } }

.picker-card{
  display:flex; align-items:flex-start; gap:12px; background:var(--surface); border:1.5px solid var(--line);
  border-radius:var(--r-md); padding:14px; cursor:pointer; text-align:left; color:var(--ink);
  transition:border-color .15s ease;
}
.picker-card.selected{ border-color:var(--spark); background:var(--surface-2); }
.picker-card .checkbox{
  width:20px; height:20px; border-radius:6px; border:1.5px solid var(--muted-2); flex-shrink:0; margin-top:2px;
  display:flex; align-items:center; justify-content:center; transition:all .15s ease;
}
.picker-card.selected .checkbox{ background:var(--spark); border-color:var(--spark); }
.picker-card .checkbox svg{ width:13px; height:13px; stroke:var(--spark-ink); stroke-width:3; opacity:0; }
.picker-card.selected .checkbox svg{ opacity:1; }
.picker-card .picker-icon{ font-size:22px; }
.picker-card h4{ font-size:14.5px; margin:0 0 2px; }
.picker-card .picker-meta{ font-size:12px; color:var(--muted-2); }

.compare-empty{ text-align:center; padding:50px 20px; color:var(--muted-2); }
.compare-empty .big-icon{ font-size:38px; margin-bottom:10px; }

.compare-wrap{ overflow-x:auto; margin-top:24px; border-radius:var(--r-lg); border:1px solid var(--line); }
table.compare-table{ border-collapse:collapse; width:100%; min-width:560px; }
.compare-table th, .compare-table td{ padding:13px 16px; text-align:left; border-bottom:1px solid var(--line); font-size:13.5px; white-space:nowrap; }
.compare-table thead th{ background:var(--surface-2); position:sticky; top:0; }
.compare-table tbody th{ background:var(--surface); color:var(--muted); font-weight:500; font-family:var(--font-mono); font-size:12px; text-transform:uppercase; letter-spacing:.03em; position:sticky; left:0; }
.compare-table td{ font-family:var(--font-mono); background:var(--surface); }
.compare-table .car-col-head{ min-width:170px; }
.compare-table .car-col-head .icon{ font-size:22px; }
.compare-table .car-col-head h4{ font-size:14.5px; margin:6px 0 3px; font-family:var(--font-body); }
.compare-table .remove-btn{ background:none; border:none; color:var(--muted-2); cursor:pointer; font-size:11px; margin-top:6px; text-decoration:underline; padding:0; }
.compare-table tr:last-child td, .compare-table tr:last-child th{ border-bottom:none; }

/* ====================================================================
   FORMS (economia + contato)
   ==================================================================== */
.form-grid{ display:grid; gap:16px; grid-template-columns:1fr; }
@media (min-width:640px){ .form-grid.two-col{ grid-template-columns:1fr 1fr; } }

.field label{ display:block; font-size:13px; font-weight:600; margin-bottom:7px; color:var(--ink); }
.field .hint{ display:block; font-size:11.5px; color:var(--muted-2); margin-top:5px; font-weight:400; }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="number"],
.field select,
.field textarea{
  width:100%; background:var(--surface-2); border:1.5px solid var(--line); border-radius:var(--r-sm);
  padding:12px 13px; color:var(--ink); font-size:15px; font-family:inherit; transition:border-color .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus{ border-color:var(--spark); outline:none; }
.field textarea{ resize:vertical; min-height:90px; }
.field-inline-suffix{ position:relative; }
.field-inline-suffix span{ position:absolute; right:13px; top:50%; transform:translateY(-50%); color:var(--muted-2); font-size:12.5px; font-family:var(--font-mono); pointer-events:none; }

.segmented{ display:flex; background:var(--surface-2); border:1.5px solid var(--line); border-radius:var(--r-pill); padding:3px; }
.segmented button{ flex:1; border:none; background:none; color:var(--muted); font-size:13px; font-weight:600; padding:9px 6px; border-radius:var(--r-pill); cursor:pointer; }
.segmented button.active{ background:var(--surface); color:var(--c-bev); }

.range-field input[type="range"]{ width:100%; accent-color:var(--spark); }
.range-field .range-value{ font-family:var(--font-mono); color:var(--spark); font-weight:700; }

.checkbox-row{ display:flex; align-items:flex-start; gap:10px; }
.checkbox-row input{ margin-top:3px; accent-color:var(--spark); width:16px; height:16px; flex-shrink:0; }
.checkbox-row label{ font-size:12.5px; color:var(--muted); line-height:1.5; }

.result-panel{ margin-top:26px; }
.result-cards-2{ display:grid; grid-template-columns:1fr; gap:12px; }
@media (min-width:640px){ .result-cards-2{ grid-template-columns:1fr 1fr 1fr; } }
.metric-card{ background:var(--surface-2); border:1px solid var(--line); border-radius:var(--r-md); padding:16px; }
.metric-card .metric-label{ font-family:var(--font-mono); font-size:11px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted-2); }
.metric-card .metric-value{ font-family:var(--font-display); font-size:24px; margin-top:6px; }
.metric-card.highlight{ border-color:rgba(63,214,194,0.4); background:rgba(63,214,194,0.06); }
.metric-card.highlight .metric-value{ color:var(--spark); }

.bar-compare{ margin-top:20px; }
.bar-row{ display:flex; align-items:center; gap:12px; margin-bottom:10px; }
.bar-row .bar-label{ width:110px; font-size:12.5px; color:var(--muted); flex-shrink:0; }
.bar-row .bar-track{ flex:1; height:26px; background:var(--surface-2); border-radius:6px; overflow:hidden; }
.bar-row .bar-fill{ height:100%; border-radius:6px; transition:width .5s ease; display:flex; align-items:center; padding-left:10px; font-family:var(--font-mono); font-size:11.5px; font-weight:600; color:var(--spark-ink); white-space:nowrap; }
.bar-row.current .bar-fill{ background:var(--ember); color:#2A1503; }
.bar-row.new .bar-fill{ background:var(--spark); }

.form-success{ text-align:center; padding:40px 20px; }
.form-success .icon-circle{
  width:64px; height:64px; border-radius:50%; background:rgba(63,214,194,0.12); color:var(--spark);
  display:flex; align-items:center; justify-content:center; margin:0 auto 18px; font-size:28px;
}

.lead-summary{ background:var(--surface-2); border:1px solid var(--line); border-radius:var(--r-md); padding:14px 16px; margin-bottom:20px; font-size:13.5px; }
.lead-summary b{ color:var(--ink); }

fieldset{ border:none; padding:0; margin:0; }
legend{ padding:0; }