/* The Eco Power Hub — quiz styles */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0f2236;
  --dusk: #1e3a5f;
  --amber: #f5b21a;
  --amber-press: #e0a00f;
  --amber-wash: #fff6dc;
  --frost: #eef3f6;
  --paper: #ffffff;
  --line: #d3dde5;
  --muted: #4b6075;
  --green: #1b8f6a;
  --coral: #d2492f;
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Instrument Sans", "Avenir Next", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--frost);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
@media (min-width: 900px) { body { font-size: 18px; } }
h1, h2, h3 { font-family: var(--display); margin: 0; color: var(--ink); }
p { margin: 0; }
a { color: var(--dusk); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--dusk); outline-offset: 3px; border-radius: 6px; }

/* ---------- top bar ---------- */
.topbar {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 20px 4px;
  display: flex;
  justify-content: center;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.brand svg { width: 26px; height: 26px; flex: none; }

/* ---------- stage ---------- */
.stage {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 20px 64px;
  flex: 1;
}
.stage.wide { max-width: 1100px; }
.stage.results-stage { max-width: 920px; }
.stage.prose { max-width: 760px; }

.screen { animation: enter 0.18s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- start screen ---------- */
.hero { display: grid; gap: 36px; padding: 14px 0 4px; }
.hero > * { min-width: 0; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: #6f4a00;
  background: var(--amber-wash);
  border: 1px solid #f2d88c;
  padding: 7px 14px;
  border-radius: 999px;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 3px rgba(245, 178, 26, 0.28); }

.hero h1 {
  margin-top: 20px;
  font-weight: 750;
  font-size: clamp(37px, 9.4vw, 66px);
  line-height: 1.03;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.hero .lede { font-size: clamp(18px, 2.7vw, 21px); line-height: 1.5; color: #3b5167; margin-top: 20px; max-width: 29em; }
.hero .cta { margin-top: 32px; width: 100%; }
.hero .btn-lg { width: 100%; }
@media (min-width: 600px) { .hero .btn-lg { width: auto; } }

.checks { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 15px; color: var(--muted); }
.checks li { position: relative; padding-left: 22px; }
.checks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.26em;
  width: 6px;
  height: 11px;
  border: solid var(--green);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(40deg);
}

.lineup {
  position: relative;
  margin: 0;
  padding: 30px 20px 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f8fa 100%);
  border: 1.5px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 28px 50px -36px rgba(15, 34, 54, 0.45);
  overflow: hidden;
}
.lineup::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 46% at 50% 62%, rgba(245, 178, 26, 0.17), rgba(245, 178, 26, 0) 70%);
  pointer-events: none;
}
.lineup-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr) minmax(0, 1.2fr);
  grid-template-rows: auto auto;
  column-gap: 6px;
}
.unit { display: contents; }
.u1 > * { grid-column: 1; }
.u2 > * { grid-column: 2; }
.u3 > * { grid-column: 3; }
.lineup-row img { grid-row: 1; align-self: end; display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }
.unit-name {
  grid-row: 2;
  align-self: start;
  margin-top: 8px;
  text-align: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 12.5px;
  line-height: 1.2;
  white-space: nowrap;
}
.unit-name span { display: block; margin-top: 2px; font-family: var(--body); font-weight: 500; font-size: 12.5px; color: var(--muted); }
.lineup figcaption { position: relative; color: var(--muted); font-size: 15px; text-align: center; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
@media (min-width: 560px) {
  .unit-name { font-size: 15px; }
  .unit-name span { font-size: 14px; }
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
    gap: 64px;
    align-items: center;
    min-height: min(600px, calc(100vh - 210px));
    padding-top: 24px;
  }
}

/* sections under the hero */
.sec { margin-top: 72px; }
@media (min-width: 900px) { .sec { margin-top: 96px; } }
.sec-title { text-align: center; font-weight: 700; font-size: clamp(27px, 4.6vw, 38px); line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; }

.steps { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
.steps li { background: var(--paper); border: 1.5px solid var(--line); border-radius: 20px; padding: 24px 24px 26px; }
.num { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--amber); color: var(--ink); font-family: var(--display); font-weight: 800; font-size: 18px; }
.steps h3 { font-weight: 700; font-size: 21px; line-height: 1.2; letter-spacing: -0.01em; margin-top: 16px; }
.steps p { color: var(--muted); font-size: 16px; line-height: 1.5; margin-top: 8px; }

.faq-list { max-width: 760px; margin: 28px auto 0; border-top: 1.5px solid var(--line); }
.faq details { border-bottom: 1.5px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 4px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-family: var(--body); font-weight: 400; font-size: 28px; line-height: 1; color: var(--dusk); }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { padding: 0 4px 22px; color: var(--muted); max-width: 42em; }

.final { margin-top: 72px; background: var(--ink); color: #fff; border-radius: 28px; padding: 44px 24px 46px; text-align: center; }
@media (min-width: 900px) { .final { margin-top: 96px; padding: 56px 40px 58px; } }
.final h2 { color: #fff; font-weight: 700; font-size: clamp(27px, 5vw, 42px); line-height: 1.08; letter-spacing: -0.025em; text-wrap: balance; max-width: 15em; margin: 0 auto; }
.final .btn { margin-top: 28px; }

/* ---------- buttons & fields ---------- */
.btn {
  appearance: none;
  border: 0;
  background: var(--amber);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.1;
  min-height: 58px;
  padding: 18px 30px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.12s ease;
}
.btn:hover { background: var(--amber-press); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.6; cursor: default; }
.btn.block { width: 100%; }
.btn-lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 64px;
  padding: 20px 38px;
  font-size: 19px;
  border-radius: 14px;
  box-shadow: 0 12px 26px -12px rgba(224, 160, 15, 0.95);
}
.btn-lg:hover { transform: translateY(-1px); }
.btn-lg:active { transform: translateY(1px); }
.btn .arrow { display: inline-block; transition: transform 0.15s ease; }
.btn:hover .arrow { transform: translateX(4px); }
.btn-link { display: inline-flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; color: var(--ink); }
.btn-link:hover { color: var(--ink); }

.link-btn {
  appearance: none;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 15px;
  padding: 8px 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.link-btn:hover { color: var(--ink); }

.field { display: block; margin-top: 18px; }
.field > span { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.field input {
  width: 100%;
  min-height: 58px;
  padding: 14px 16px;
  font: inherit;
  font-size: 18px;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
}
.field input:focus { outline: none; border-color: var(--dusk); box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.2); }
.field input[aria-invalid="true"] { border-color: var(--coral); }

.error { color: var(--coral); font-weight: 600; font-size: 15px; margin-top: 12px; min-height: 1.4em; }
.consent { font-size: 14px; color: var(--muted); margin-top: 16px; line-height: 1.45; text-align: center; }

/* ---------- quiz flow ---------- */
.flow-head { display: flex; align-items: center; justify-content: space-between; min-height: 40px; padding-top: 6px; }
.flow-head .count { font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }

.cells { display: flex; align-items: center; gap: 6px; margin: 10px 0 40px; }
.cells i { flex: 1; height: 8px; border-radius: 999px; background: var(--line); transition: background 0.2s ease; }
.cells i.on { background: var(--amber); }

.q-title { text-align: center; font-weight: 700; font-size: clamp(27px, 6vw, 42px); line-height: 1.1; letter-spacing: -0.025em; text-wrap: balance; max-width: 19em; margin: 0 auto; }
.q-title:focus { outline: none; }
.q-help { text-align: center; color: var(--muted); font-size: 17px; margin: 12px auto 0; max-width: 34em; }

/* picture cards */
.cards { display: grid; gap: 14px; margin-top: 34px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 660px) {
  .cards.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.card {
  appearance: none;
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  overflow: hidden;
  text-align: center;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: 18px;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}
.card:active { transform: translateY(1px); }
@media (hover: hover) {
  .card:hover { border-color: var(--amber); transform: translateY(-2px); box-shadow: 0 16px 28px -20px rgba(15, 34, 54, 0.5); }
  .card:active { transform: translateY(0); }
}
.card .art {
  display: block;
  height: 104px;
  padding: 12px 16px;
  background: var(--frost);
  color: var(--dusk);
  transition: background 0.12s ease;
}
.card .art svg { display: block; width: 100%; height: 100%; }
.card .cfoot { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 14px 20px; flex: 1; }
.card .key {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1.5px solid #a3b4c3;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.9);
}
.card .ctext { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.card .clabel { font-weight: 600; font-size: 17px; line-height: 1.22; text-wrap: balance; }
.card .chint { color: var(--muted); font-size: 14.5px; line-height: 1.3; text-wrap: balance; }
.card .tick {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 28px;
  height: 28px;
  padding: 4px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--ink);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.12s ease, transform 0.12s ease;
}
.card[aria-checked="true"] { border-color: var(--amber); background: var(--amber-wash); }
.card[aria-checked="true"] .art { background: #fdeab5; }
.card[aria-checked="true"] .key { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.card[aria-checked="true"] .tick { opacity: 1; transform: none; }
.card:focus-visible { outline-offset: 2px; }
@media (min-width: 660px) {
  .card .art { height: 136px; padding: 14px 22px; }
  .card .cfoot { padding: 18px 16px 22px; }
  .card .clabel { font-size: 18px; }
}
@media (hover: none) { .card .key { display: none; } }

.email-form {
  margin: 30px auto 0;
  max-width: 480px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 22px;
  padding: 6px 20px 24px;
  box-shadow: 0 28px 50px -38px rgba(15, 34, 54, 0.5);
}
@media (min-width: 560px) { .email-form { padding: 8px 28px 28px; } }
.email-form .btn { margin-top: 22px; }

/* ---------- results ---------- */
.results { padding-top: 6px; }
.hello { font-family: var(--display); font-weight: 600; font-size: 22px; line-height: 1.2; color: var(--muted); }
.eyebrow {
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #8a5d00;
  margin-top: 22px;
}

.match {
  display: grid;
  margin-top: 10px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.match-img { background: linear-gradient(165deg, #ffffff 0%, var(--frost) 100%); padding: 18px; }
.match-img img { display: block; width: 100%; max-width: 340px; height: auto; aspect-ratio: 1; object-fit: contain; margin: 0 auto; }
.match-body { padding: 22px 22px 24px; min-width: 0; }
.match-body h2 { font-weight: 800; font-size: clamp(28px, 5vw, 38px); line-height: 1.05; letter-spacing: -0.02em; }
.pitch { color: var(--muted); margin-top: 8px; }
.specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 18px 0 0; }
.spec { background: var(--frost); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.spec dt { font-size: 12.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.spec dd { margin: 2px 0 0; font-family: var(--display); font-weight: 700; font-size: 18px; line-height: 1.2; overflow-wrap: anywhere; }
.match-body h3 { font-weight: 700; font-size: 18px; margin-top: 24px; }
.reasons { list-style: none; margin: 8px 0 0; padding: 0; }
.reasons li { position: relative; padding-left: 28px; margin-top: 10px; }
.reasons li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.35em;
  width: 7px;
  height: 12px;
  border: solid var(--green);
  border-width: 0 3px 3px 0;
  transform: rotate(40deg);
}
.match-body .btn-link { margin-top: 26px; width: 100%; }
.disclose { font-size: 13.5px; color: var(--muted); margin-top: 12px; line-height: 1.45; }

@media (min-width: 780px) {
  .match { grid-template-columns: 0.8fr 1.2fr; }
  .match-img { display: grid; place-items: center; padding: 28px; }
  .match-body { padding: 28px 28px 30px; }
  .match-body .btn-link { width: auto; }
}

.section-title { font-weight: 700; font-size: 24px; letter-spacing: -0.015em; margin-top: 44px; }
.notes { margin-top: 14px; display: grid; gap: 14px; }
.note { border-left: 5px solid var(--amber); background: var(--paper); padding: 16px 18px; border-radius: 0 12px 12px 0; }
.note b { font-family: var(--display); font-size: 17px; display: block; margin-bottom: 2px; }

.alt {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-top: 14px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}
.alt-img img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; background: var(--frost); border-radius: 10px; }
.alt-body h3 { font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.alt-specs { color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.alt-body p + p { margin-top: 6px; }
.alt-link { display: inline-block; margin-top: 8px; font-weight: 600; }
@media (min-width: 640px) { .alt { grid-template-columns: 120px minmax(0, 1fr); padding: 18px; } }

.inbox {
  margin-top: 44px;
  background: var(--ink);
  color: #fff;
  border-radius: 20px;
  padding: 26px 24px;
}
.inbox h2 { color: #fff; font-weight: 700; font-size: 26px; line-height: 1.12; letter-spacing: -0.015em; }
.inbox p { color: #dce6ee; margin-top: 10px; }
.inbox p b { color: #fff; }

.retry { margin-top: 30px; }
#empty { text-align: center; padding-top: 24px; }

.preview-flag { background: #fff3cd; color: #5c4400; border-radius: 10px; padding: 10px 14px; font-size: 15px; margin-bottom: 18px; }

/* ---------- footer & prose ---------- */
.footer { width: 100%; max-width: 1100px; margin: 0 auto; padding: 22px 20px 32px; color: var(--muted); font-size: 14px; line-height: 1.5; text-align: center; border-top: 1.5px solid var(--line); }
.footer a { color: var(--muted); white-space: nowrap; }
.footer a:hover { color: var(--ink); }
.footer p { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; }
.footer .copy, .footer .links { white-space: nowrap; }
.footer .sep { margin: 0 10px; color: #9fb0bf; }

.prose h1 { font-weight: 800; font-size: clamp(32px, 6vw, 46px); letter-spacing: -0.02em; line-height: 1.05; }
.prose h2 { font-weight: 700; font-size: 22px; margin-top: 34px; }
.prose p, .prose ul { margin-top: 10px; }
.prose ul { padding-left: 22px; }
.prose li + li { margin-top: 6px; }
.prose .updated { color: var(--muted); margin-top: 10px; }

@media (prefers-reduced-motion: reduce) {
  .screen { animation: none; }
  .cells i, .btn, .btn .arrow, .card, .card .tick, .card .art { transition: none; }
}
