:root {
  color-scheme: dark;
  --bg: #0f131a;
  --bg-alt: #151a23;
  --surface: #1a202b;
  --text: #e7ebf2;
  --muted: #a0a9b8;
  --border: #2a3240;
  --accent: #7ea6f2;
  --accent-hover: #9ab9f5;
  --accent-soft: #1c2740;
  --on-accent: #0d1320;
  --paper-shadow: 0 6px 18px rgba(0, 0, 0, .45);
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; margin: 0; }
a { color: var(--accent); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; }
.nav { display: flex; gap: 22px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--text); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 20px; border-radius: 8px;
  font-weight: 600; font-size: 15px; text-decoration: none;
  border: 1px solid transparent; transition: background .15s, border-color .15s;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { color: var(--text); border-color: var(--border); background: var(--surface); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-block { width: 100%; }
.btn:focus-visible, .thumb:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Hero */
.hero { padding: 72px 0 56px; text-align: center; background: linear-gradient(var(--accent-soft), var(--bg)); }
.hero h1 { font-size: clamp(32px, 5vw, 48px); letter-spacing: -0.02em; }
.error-code { margin: 0 0 8px; font-size: 56px; font-weight: 800; line-height: 1; color: var(--accent); letter-spacing: -0.03em; }
.lede { max-width: 620px; margin: 16px auto 0; font-size: 18px; color: var(--muted); }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.badges { list-style: none; padding: 0; margin: 24px 0 0; display: flex; gap: 8px 22px; justify-content: center; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.badges li::before { content: "✓"; color: var(--accent); font-weight: 700; margin-right: 6px; }

/* Sections */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section h2 { font-size: clamp(26px, 3.5vw, 32px); letter-spacing: -0.01em; }
.section-intro { color: var(--muted); max-width: 720px; margin: 10px 0 32px; }
.section-head { text-align: center; }
.section-head .section-intro { margin-left: auto; margin-right: auto; }

/* Type picker */
.picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 640px; margin: 0 auto 56px; }
.tile {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 18px 8px 14px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500; text-align: center;
  transition: border-color .15s, transform .15s;
}
.tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.tile:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.tile .icon { font-size: 34px; line-height: 1; }

/* Template cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; scroll-margin-top: 80px;
  transition: border-color .2s, box-shadow .2s;
}
.card:target { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.thumb { display: block; padding: 20px 20px 0; background: var(--bg-alt); border-bottom: 1px solid var(--border); overflow: hidden; }
.thumb img {
  display: block; width: 100%; height: auto; aspect-ratio: 720 / 932;
  object-fit: cover; object-position: top;
  background: #fff; box-shadow: var(--paper-shadow);
  transform: translateY(0); transition: transform .2s ease;
  /* show only the top ~60% of the page so the header and vehicle fields stay readable */
  max-height: 180px;
}
.card:hover .thumb img { transform: translateY(-3px); }
.card-body { display: flex; flex-direction: column; gap: 10px; padding: 16px; flex: 1; }
.card-body h3 { font-size: 18px; }
.features { list-style: none; padding: 0; margin: 0 0 6px; color: var(--muted); font-size: 14px; flex: 1; }
.features li { padding-left: 16px; position: relative; }
.features li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* Steps */
.steps { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; counter-reset: step; }
.steps li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; margin-bottom: 12px;
}
.steps h3 { font-size: 17px; margin-bottom: 6px; }
.steps p { margin: 0; color: var(--muted); font-size: 15px; }

/* FAQ */
#faq h2 { margin-bottom: 20px; }
details { border-bottom: 1px solid var(--border); }
details:first-of-type { border-top: 1px solid var(--border); }
summary {
  cursor: pointer; list-style: none; padding: 16px 32px 16px 0; font-weight: 600; position: relative;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 22px; color: var(--muted); font-weight: 400; }
details[open] summary::after { content: "–"; }
details p { margin: 0 0 18px; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0 40px; font-size: 14px; color: var(--muted); }
.site-footer p { margin: 0; max-width: 760px; }
.site-footer .copyright { margin-bottom: 10px; color: var(--text); font-weight: 600; }

@media (max-width: 560px) {
  .nav { gap: 14px; }
  .nav a { font-size: 14px; }
  .brand span { display: none; }
  .hero { padding: 48px 0 40px; }
  .grid { grid-template-columns: 1fr; }
  .picker { gap: 10px; }
  .tile { padding: 14px 6px 12px; font-size: 13px; }
  .tile .icon { font-size: 28px; }
  .thumb img { max-height: 220px; }
}
