/* Real EV Cost — landing page. Light + dark via prefers-color-scheme. */

:root {
  --page: #f9f9f7;
  --surface-1: #fcfcfb;
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --muted: #898781;
  --hairline: #e1e0d9;
  --border: rgba(11, 11, 11, 0.10);
  --accent: #2a78d6;          /* series slot 1 (validated, light) */
  --accent-deep: #1c5cab;
  --accent-wash: rgba(42, 120, 214, 0.07);
  --ev-light: #86b6ef;        /* ordinal step 250 (validated, light) */
  --petrol: #898781;          /* de-emphasis gray */
  --delta-good: #006300;
  --focus: #2a78d6;
  --shadow: 0 1px 2px rgba(11, 11, 11, 0.04), 0 8px 24px rgba(11, 11, 11, 0.06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #0d0d0d;
    --surface-1: #1a1a19;
    --text-primary: #ffffff;
    --text-secondary: #c3c2b7;
    --muted: #898781;
    --hairline: #2c2c2a;
    --border: rgba(255, 255, 255, 0.10);
    --accent: #2a78d6;        /* ordinal dark pair validated: #6da7ec → #2a78d6 */
    --accent-deep: #6da7ec;
    --accent-wash: rgba(57, 135, 229, 0.10);
    --ev-light: #6da7ec;
    --delta-good: #0ca30c;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}

/* soft radial accent glow behind the hero */
.glow {
  position: absolute;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: 1100px;
  height: 640px;
  background: radial-gradient(ellipse at center, var(--accent-wash) 0%, transparent 65%);
  pointer-events: none;
}

main, .hero, footer, .topbar { max-width: 52rem; margin: 0 auto; padding: 0 1.25rem; position: relative; }

a { color: var(--accent-deep); }
h1 {
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0.9rem 0 0;
}
h2 { font-size: clamp(1.35rem, 3vw, 1.7rem); letter-spacing: -0.01em; margin: 0 0 0.35rem; }
h3 { font-size: 1.02rem; margin: 0.4rem 0 0.2rem; }
.muted { color: var(--text-secondary); }
.small { font-size: 0.85rem; }

.eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

/* ---------- top bar + hero ---------- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.1rem;
}
.brand { font-weight: 750; letter-spacing: -0.01em; }

.hero { padding: 3.2rem 1.25rem 3rem; text-align: center; }
.badge {
  display: inline-block;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-deep);
  background: var(--accent-wash);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
}
.hero .sub {
  color: var(--text-secondary);
  font-size: 1.08rem;
  max-width: 36rem;
  margin: 1.1rem auto 0;
}
.hero .sub em { font-style: normal; font-weight: 650; color: var(--text-primary); }
.sub-cta {
  margin: 1.6rem 0 0;
  display: flex;
  gap: 1.1rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.quiet-link { color: var(--text-secondary); font-size: 0.92rem; text-decoration: none; border-bottom: 1px solid var(--hairline); }
.quiet-link:hover { color: var(--accent-deep); border-color: var(--accent-deep); }

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  padding: 0;
  margin: 2rem 0 0;
}
.chips li {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid var(--hairline);
  background: var(--surface-1);
  border-radius: 999px;
  padding: 0.28rem 0.8rem;
}

/* ---------- buttons & focus ---------- */
.button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.75rem 1.35rem;
  font-size: 1rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(42, 120, 214, 0.30);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
.button:hover { filter: brightness(1.07); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(42, 120, 214, 0.35); }
.button.ghost {
  background: transparent;
  color: var(--accent-deep);
  border: 1px solid var(--border);
  box-shadow: none;
  padding: 0.45rem 0.95rem;
  font-size: 0.88rem;
}
.button.ghost:hover { background: var(--accent-wash); transform: none; }
:is(a, button, input, select, summary):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* ---------- cards & sections ---------- */
.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.8rem;
  margin: 0 0 2.2rem;
  box-shadow: var(--shadow);
}
.section { margin: 0 0 2.6rem; text-align: center; }
.section > .grid3, .section > .grid4 { text-align: left; }

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.3rem; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 1.3rem; }

.mini-card {
  position: relative;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.3rem 1.2rem 1.1rem;
  box-shadow: var(--shadow);
}
.mini-card p { color: var(--text-secondary); font-size: 0.9rem; margin: 0.3rem 0 0; }
.step-num {
  position: absolute;
  top: 1rem;
  right: 1.1rem;
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  color: var(--accent-wash);
  -webkit-text-stroke: 1.5px var(--accent-deep);
  opacity: 0.65;
}

.trust-item { padding: 0.4rem 0.2rem; }
.trust-item p { color: var(--text-secondary); font-size: 0.86rem; margin: 0.15rem 0 0; }

.icon {
  width: 26px;
  height: 26px;
  color: var(--accent-deep);
  background: var(--accent-wash);
  border-radius: 8px;
  padding: 5px;
}

/* ---------- calculator ---------- */
.calc { margin-top: 0.5rem; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem 1.25rem; margin: 1.1rem 0; }
.calc-grid label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.9rem; color: var(--text-secondary); }
.advanced { grid-column: 1 / -1; }
.advanced summary { cursor: pointer; color: var(--accent-deep); font-size: 0.9rem; font-weight: 600; }
input, select {
  font: inherit;
  color: var(--text-primary);
  background: var(--page);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  transition: border-color 0.12s ease;
}
input:hover, select:hover { border-color: var(--muted); }

/* result: stat tile + bars */
.result {
  display: grid;
  grid-template-columns: minmax(11rem, 16rem) 1fr;
  gap: 1.5rem;
  align-items: start;
  margin-top: 1.1rem;
}
.stat-tile {
  background: linear-gradient(160deg, var(--accent-wash), transparent 70%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem 1.15rem;
}
.stat-label { margin: 0; font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); }
.stat-value { margin: 0.2rem 0 0; font-size: 2.7rem; font-weight: 800; letter-spacing: -0.02em; color: var(--delta-good); }
.stat-sub { margin: 0.25rem 0 0; font-size: 0.8rem; color: var(--muted); }

.bars { min-width: 0; }
.bar-group {
  margin: 0.9rem 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 0.2rem;
}
.bars .bar-group:first-child { margin-top: 0; }
.bar-row { display: grid; grid-template-columns: 10.5rem 1fr; align-items: center; gap: 0.6rem; margin: 0.45rem 0; }
.bar-name { font-size: 0.85rem; color: var(--text-secondary); text-align: right; }
.bar-track { position: relative; height: 26px; }
.bar {
  height: 100%;
  border-radius: 0 4px 4px 0;   /* rounded data-end, flat baseline end */
  min-width: 2px;
  transition: width 0.35s ease;
}
.bar.petrol { background: var(--petrol); }
.bar.ev-std { background: var(--ev-light); }
.bar.ev-smart { background: var(--accent); }
.bar-label {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  gap: 0.55rem;
  align-items: baseline;
  white-space: nowrap;
  transition: left 0.35s ease;
}
.bar-val {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}
.save-chip {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--delta-good);
}
/* hover tooltip (breakdown) */
.tip {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 0.4rem 0.6rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
  z-index: 2;
}
.bar-track:hover .tip { display: block; }

.assumption-note { margin-top: 1.2rem; border-top: 1px solid var(--hairline); padding-top: 0.8rem; }

/* ---------- signup panel ---------- */
.signup-panel {
  background: linear-gradient(150deg, var(--accent-wash), transparent 80%), var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  margin: 0 0 2.6rem;
  padding: 2rem 1.8rem;
}
.signup-inner { max-width: 36rem; margin: 0 auto; text-align: center; }
.eyebrow.light { color: var(--accent-deep); }
.signup-lead { color: var(--text-secondary); font-size: 0.98rem; margin: 0.4rem 0 0; }
.signup-panel form { margin-top: 1.2rem; text-align: left; }
.signup-row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 0.9rem 0; justify-content: center; }
.signup-row input[type="email"] { flex: 1 1 16rem; background: var(--surface-1); }
.signup-row.seg { align-items: flex-end; gap: 1.6rem; }
.signup-row.seg label, .signup-row.seg fieldset { font-size: 0.9rem; color: var(--text-secondary); }
.signup-row.seg label { display: flex; flex-direction: column; gap: 0.3rem; }
fieldset { border: none; margin: 0; padding: 0; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
legend { padding: 0 0 0.3rem; }
.signup-row.seg fieldset label { display: inline-flex; gap: 0.35rem; align-items: center; flex-direction: row; }
#website { position: absolute; left: -9999px; height: 1px; width: 1px; }
.form-msg { min-height: 1.3em; margin: 0.25rem 0; font-weight: 600; text-align: center; }
.form-msg.ok { color: var(--delta-good); }
.form-msg.err { color: #d03b3b; }
.signup-panel .muted.small { text-align: center; }

/* ---------- FAQ ---------- */
.faq { text-align: left; }
.faq .eyebrow, .faq h2 { text-align: center; }
details { border-top: 1px solid var(--hairline); padding: 0.7rem 0; }
.faq details:first-of-type { margin-top: 0.8rem; }
details summary { cursor: pointer; font-weight: 600; }
details summary:hover { color: var(--accent-deep); }
details p { color: var(--text-secondary); }

footer { padding: 1.6rem 1.25rem 3rem; border-top: 1px solid var(--hairline); margin-top: 2.4rem; text-align: center; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .grid3 { grid-template-columns: 1fr; }
  .grid4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .hero { padding-top: 2.2rem; }
  .calc-grid, .result { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 1fr; gap: 0.15rem; }
  .bar-name { text-align: left; }
}
@media (max-width: 480px) {
  .grid4 { grid-template-columns: 1fr; }
}
