/* ==========================================================================
   WheelSwap marketing site — shared stylesheet
   Dark automotive aesthetic. Zero external resources. No JS required.
   ========================================================================== */

:root {
  --bg: #0E1113;
  --bg-2: #16191D;
  --bg-3: #1B1F24;
  --border: #262B30;
  --border-2: #313840;
  --text: #ECEDEE;
  --muted: #9BA1A6;
  --muted-2: #71787E;
  --accent: #00FFCC;
  --accent-ink: #04120F;
  --accent-dim: rgba(0, 255, 204, 0.10);
  --accent-line: rgba(0, 255, 204, 0.30);
  --danger: #FF6B6B;
  --maxw: 1100px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: 0.1px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.4em; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
ul { margin: 0 0 1rem; padding-left: 1.2rem; }
strong { color: var(--text); font-weight: 700; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.section { padding: 76px 0; }
.section-sm { padding: 52px 0; }
.section-alt { background: linear-gradient(180deg, var(--bg) 0%, #101418 100%); }
.eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0 0 0.7rem;
}
.lead { color: var(--muted); font-size: 1.12rem; max-width: 62ch; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.muted { color: var(--muted); }
.section-head { margin-bottom: 42px; }
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: 0 0 10px 0; font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(14, 17, 19, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 64px;
}
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--text); font-weight: 700; font-size: 1.16rem;
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand svg { width: 22px; height: 22px; flex: none; }
.nav-menu { display: none; }
.nav-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 10px; cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--border-2); color: var(--text); list-style: none;
}
.nav-btn::-webkit-details-marker { display: none; }
.nav-btn svg { width: 20px; height: 20px; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a:not(.btn) {
  color: var(--muted); font-size: 0.96rem; font-weight: 500;
  padding: 8px 12px; border-radius: 8px;
}
.nav-links a:not(.btn):hover { color: var(--text); text-decoration: none; background: var(--bg-2); }
.nav-links .btn { margin-left: 8px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: 0.98rem;
  border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, background .15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #38ffd8; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover { border-color: var(--accent-line); color: var(--accent); }
.btn-lg { padding: 15px 30px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-store { background: var(--bg-2); border-color: var(--border-2); color: var(--text); cursor: default; }
.btn-store:hover { transform: none; border-color: var(--border-2); }
.btn-store svg { width: 18px; height: 18px; color: var(--accent); flex: none; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 60px 0 40px; }
.hero::before {
  content: ""; position: absolute; inset: -30% 30% auto -10%; height: 620px;
  background: radial-gradient(closest-side, rgba(0, 255, 204, 0.14), transparent 70%);
  pointer-events: none; z-index: 0;
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 44px; align-items: center;
}
.hero h1 { margin-bottom: 0.35em; }
.hero .lead { font-size: 1.2rem; margin-bottom: 1.6rem; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px;
  padding: 6px 14px; border: 1px solid var(--border-2); border-radius: 999px;
  background: var(--bg-2); color: var(--muted); font-size: 0.82rem; font-weight: 600;
}
.hero-tag b { color: var(--accent); font-weight: 700; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-note { margin: 16px 0 0; font-size: 0.86rem; color: var(--muted-2); }
.hero-media { display: flex; justify-content: center; }

/* ---------- phone frame ---------- */
.phone {
  position: relative; width: 300px; max-width: 78vw;
  border: 10px solid #060809; border-radius: 42px;
  background: #060809; box-shadow: var(--shadow), 0 0 0 1px var(--border);
  padding: 0; overflow: hidden;
}
.phone::before {
  content: ""; position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 92px; height: 7px; border-radius: 999px; background: #14181c; z-index: 3;
}
.phone img { border-radius: 32px; width: 100%; display: block; }
.phone-caption { text-align: center; color: var(--muted-2); font-size: 0.82rem; margin-top: 14px; }

/* ---------- how it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 24px; position: relative;
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px; margin-bottom: 14px;
  background: var(--accent-dim); color: var(--accent); font-weight: 800; font-size: 1.1rem;
  border: 1px solid var(--accent-line);
}
.step h3 { margin-bottom: 0.3em; }
.step p { color: var(--muted); margin: 0; font-size: 0.98rem; }

/* ---------- feature grid ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 24px;
}
.card:hover { border-color: var(--border-2); }
.card h3 { margin-bottom: 0.35em; display: flex; align-items: center; gap: 10px; }
.card p { color: var(--muted); margin: 0; font-size: 0.98rem; }
.card-icon {
  width: 42px; height: 42px; border-radius: 11px; margin-bottom: 15px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-dim); border: 1px solid var(--accent-line); color: var(--accent);
}
.card-icon svg { width: 22px; height: 22px; }

/* ---------- split showcase ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 46px; align-items: center; }
.split.reverse .split-media { order: 2; }
.split-media { display: flex; justify-content: center; gap: 18px; }
.showcase-img {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); background: var(--bg-2);
}
.showcase-img img { display: block; width: 100%; }
.feature-list { list-style: none; padding: 0; margin: 18px 0 0; }
.feature-list li {
  position: relative; padding: 0 0 0 30px; margin-bottom: 12px; color: var(--muted);
}
.feature-list li::before {
  content: "\2713"; position: absolute; left: 0; top: 0; width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center; margin-top: 4px;
  background: var(--accent-dim); border: 1px solid var(--accent-line); border-radius: 6px;
  color: var(--accent); font-size: 0.72rem; font-weight: 700;
}
.feature-list li b { color: var(--text); }

/* ---------- badges / chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px;
  border-radius: 999px; font-size: 0.85rem; font-weight: 600;
  background: var(--bg-2); border: 1px solid var(--border-2); color: var(--muted);
}
.chip.fit { color: var(--accent); border-color: var(--accent-line); background: var(--accent-dim); }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }
.bolt-grid { display: flex; flex-wrap: wrap; gap: 9px; margin: 8px 0 20px; }
.bolt {
  padding: 8px 14px; border-radius: 10px; background: var(--bg-3);
  border: 1px solid var(--border); font-weight: 600; font-size: 0.92rem; color: var(--text);
}

/* score bars */
.score { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; }
.score-row { display: grid; grid-template-columns: 120px 1fr auto; gap: 14px; align-items: center; margin-bottom: 12px; }
.score-row:last-child { margin-bottom: 0; }
.score-label { color: var(--muted); font-size: 0.95rem; }
.score-track { height: 8px; border-radius: 999px; background: var(--bg-3); overflow: hidden; }
.score-fill { height: 100%; background: var(--accent); border-radius: 999px; }
.score-val { font-weight: 700; font-size: 0.95rem; min-width: 54px; text-align: right; }

/* ---------- catalog table ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); }
table.catalog { width: 100%; border-collapse: collapse; min-width: 560px; }
table.catalog caption { text-align: left; padding: 16px 20px 0; color: var(--muted-2); font-size: 0.85rem; }
table.catalog th, table.catalog td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
table.catalog thead th {
  color: var(--muted); font-size: 0.76rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700;
  position: sticky; top: 0; background: var(--bg-3);
}
table.catalog tbody tr:last-child td { border-bottom: none; }
table.catalog tbody tr:hover { background: var(--bg-3); }
table.catalog .model { font-weight: 600; color: var(--text); }
table.catalog .brandcell { color: var(--accent); font-weight: 600; }
.brand-roster { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 26px; }
.brand-roster span {
  padding: 9px 16px; border-radius: 999px; background: var(--bg-2);
  border: 1px solid var(--border-2); font-weight: 600; font-size: 0.92rem;
}

/* ---------- pricing ---------- */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 26px; display: flex; flex-direction: column;
}
.plan.featured { border-color: var(--accent-line); box-shadow: 0 0 0 1px var(--accent-line), 0 20px 44px rgba(0,255,204,0.06); }
.plan-badge {
  align-self: flex-start; margin-bottom: 14px; padding: 4px 12px; border-radius: 999px;
  background: var(--accent-dim); color: var(--accent); border: 1px solid var(--accent-line);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.plan h3 { font-size: 1.3rem; margin-bottom: 0.1em; }
.plan .price { font-size: 2.3rem; font-weight: 800; letter-spacing: -0.03em; margin: 10px 0 2px; }
.plan .price small { font-size: 0.95rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan .credits { color: var(--accent); font-weight: 600; margin-bottom: 16px; font-size: 0.98rem; }
.plan ul { list-style: none; padding: 0; margin: 6px 0 24px; flex: 1; }
.plan ul li { position: relative; padding-left: 27px; margin-bottom: 10px; color: var(--muted); font-size: 0.95rem; }
.plan ul li::before {
  content: "\2713"; position: absolute; left: 0; top: 1px; color: var(--accent); font-weight: 700; font-size: 0.9rem;
}
.plan ul li b { color: var(--text); }
.pricing-note { text-align: center; color: var(--muted-2); font-size: 0.9rem; margin-top: 22px; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq details {
  border: 1px solid var(--border); border-radius: 12px; background: var(--bg-2);
  margin-bottom: 12px; overflow: hidden;
}
.faq details[open] { border-color: var(--border-2); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 22px; font-weight: 600; font-size: 1.03rem;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; color: var(--accent); font-size: 1.5rem; font-weight: 400; line-height: 1; flex: none;
  transition: transform .2s ease;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--muted); padding: 0 22px 20px; margin: 0; font-size: 0.98rem; }
.faq details p:first-of-type { margin-top: -2px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, #10201d 0%, var(--bg-2) 60%);
  border: 1px solid var(--accent-line); border-radius: 22px; padding: 52px 40px; text-align: center;
}
.cta-band h2 { margin-bottom: 0.4em; }
.cta-band .lead { margin: 0 auto 1.8rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* ---------- use-case / business ---------- */
.usecase .card-icon { margin-bottom: 16px; }
.provides { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.provide {
  display: flex; gap: 16px; padding: 22px; background: var(--bg-2);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.provide .card-icon { margin: 0; flex: none; }
.provide h3 { font-size: 1.08rem; margin-bottom: 0.25em; }
.provide p { color: var(--muted); margin: 0; font-size: 0.95rem; }

/* ---------- prose (legal pages) ---------- */
.prose { max-width: 780px; }
.prose h2 { margin-top: 2em; font-size: 1.5rem; }
.prose h2:first-of-type { margin-top: 0.5em; }
.prose h3 { margin-top: 1.5em; }
.prose p, .prose li { color: var(--muted); }
.prose li { margin-bottom: 8px; }
.prose a { text-decoration: underline; }
.callout {
  background: var(--accent-dim); border: 1px solid var(--accent-line); border-radius: 12px;
  padding: 16px 20px; color: var(--text); margin: 0 0 26px;
}
.callout p { color: var(--text); margin: 0; font-size: 0.95rem; }
.updated { color: var(--muted-2); font-size: 0.88rem; margin-bottom: 26px; }

/* breadcrumbs */
.crumbs { font-size: 0.85rem; color: var(--muted-2); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.crumbs span { color: var(--muted-2); padding: 0 6px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: #0b0e10; padding: 54px 0 34px; margin-top: 40px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 36px; }
.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p { color: var(--muted); font-size: 0.92rem; max-width: 34ch; }
.footer-col h4 { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: var(--muted); font-size: 0.94rem; }
.footer-col a:hover { color: var(--text); text-decoration: none; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 22px; }
.trademark { color: var(--muted-2); font-size: 0.82rem; max-width: 82ch; margin: 0 0 10px; }
.copyright { color: var(--muted-2); font-size: 0.86rem; margin: 0; }

/* ---------- 404 ---------- */
.status-page { min-height: 62vh; display: flex; align-items: center; justify-content: center; text-align: center; }
.status-page .code { font-size: clamp(4rem, 16vw, 8rem); font-weight: 800; color: var(--accent); letter-spacing: -0.04em; line-height: 1; margin-bottom: 0.1em; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; text-align: center; }
  .hero-tag, .hero-cta { justify-content: center; }
  .hero::before { inset: -20% auto auto 50%; transform: translateX(-50%); }
  .split { grid-template-columns: 1fr; gap: 28px; }
  .split.reverse .split-media { order: 0; }
  .grid-3, .steps, .pricing { grid-template-columns: 1fr 1fr; }
  .provides { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  body { font-size: 16px; }
  .section { padding: 56px 0; }
  .grid-3, .grid-2, .steps, .pricing { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-brand { grid-column: 1 / -1; }
  .cta-band { padding: 40px 24px; }

  /* mobile nav: <details> hamburger toggles the sibling .nav-links dropdown */
  .nav-menu { display: inline-block; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0; display: none;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 12px 16px 18px; box-shadow: var(--shadow);
  }
  .nav-menu[open] ~ .nav-links { display: flex; }
  .nav-menu[open] .nav-btn { border-color: var(--accent-line); color: var(--accent); }
  .nav-links a:not(.btn) { padding: 12px 12px; font-size: 1rem; }
  .nav-links .btn { margin: 8px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
