/* Forecourt3D marketing site — shared styles for /, /about, /contact. */
:root {
  color-scheme: dark;
  --bg: #101013;
  --bg-2: #16161a;
  --bg-3: #1b1b20;
  --line: #26262b;
  --line-2: #34343b;
  --fg: #f2f2f0;
  --muted: #a6a6ad;
  --muted-2: #74747c;
  --accent: #c99f5b;
  --accent-soft: rgba(201, 159, 91, 0.12);
  --gutter: 24px;
  --maxw: 1440px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* Lenis smooth scroll (landing-src/car-spin.js) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img, iframe { display: block; max-width: 100%; }
h1, h2, h3 { font-weight: 650; letter-spacing: -0.015em; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Full-bleed section bands + alternating backgrounds */
section { padding: 80px 0; border-bottom: 1px solid var(--line); }
section.band { background: var(--bg-2); }

.kicker {
  font-size: 13px;
  color: var(--accent);
  margin: 0 0 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
h2 { font-size: clamp(25px, 3.6vw, 33px); margin: 0 0 14px; line-height: 1.12; }
.sub { color: var(--muted); margin: 0; max-width: 56ch; font-size: clamp(16px, 2vw, 18px); }

/* Header */
header.site { position: sticky; top: 0; z-index: 20; background: rgba(16,16,19,0.82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.wordmark b { color: var(--accent); font-weight: 700; }
.wordmark .logo-car { width: 24px; height: 24px; color: var(--accent); flex: none; }
.nav a.enter {
  font-size: 14px;
  text-decoration: none;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
.nav a.enter:hover { color: var(--fg); border-bottom-color: var(--line-2); }

/* Buttons — flat, no gloss */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border-radius: 6px;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: #161008; }
.btn-primary:hover { background: #d8b06b; }
.btn-nav { padding: 9px 16px; font-size: 14px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.btn-text {
  color: var(--fg);
  border: 1px solid var(--line-2);
  background: transparent;
}
.btn-text:hover { border-color: #46464e; }

/* Hero — two columns: copy beside the live demo */
.hero { padding: 76px 0 56px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}
.hero-copy { max-width: 760px; }
h1 {
  font-size: clamp(34px, 5.4vw, 56px);
  line-height: 1.05;
  margin: 0 0 22px;
  max-width: 18ch;
}
.lede {
  font-size: clamp(17px, 2.1vw, 20px);
  color: var(--muted);
  max-width: 62ch;
  margin: 0 0 30px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-note { font-size: 14px; color: var(--muted-2); margin: 24px 0 0; max-width: 46ch; }

/* Demo */
.demo-wrap { }
.demo-frame {
  border: 1px solid var(--line-2);
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 24px 60px -30px rgba(0,0,0,0.9);
}
.demo-frame { position: relative; }
.demo-frame iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; max-height: 86vh; border: 0; }

/* Controls tooltip — CSS-only (hover / keyboard focus / tap focus) */
.controls-tip { position: absolute; top: 14px; right: 14px; z-index: 2; }
.controls-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 12px; border-radius: 6px;
  font: 600 13px/1 inherit; font-family: inherit;
  color: var(--fg); cursor: help;
  background: rgba(16,16,19,0.78); backdrop-filter: blur(6px);
  border: 1px solid var(--line-2);
}
.controls-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.controls-panel {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: max-content; max-width: min(320px, 80vw);
  padding: 14px 16px; border-radius: 8px;
  background: rgba(16,16,19,0.94); backdrop-filter: blur(8px);
  border: 1px solid var(--line-2);
  box-shadow: 0 16px 40px -18px rgba(0,0,0,0.9);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.controls-tip:hover .controls-panel,
.controls-tip:focus-within .controls-panel { opacity: 1; visibility: visible; transform: none; }
.ctl { display: grid; grid-template-columns: auto auto; gap: 8px 22px; margin: 0; font-size: 13.5px; }
.ctl dt { color: var(--muted); }
.ctl dd { margin: 0; color: var(--fg); text-align: right; }
.ctl kbd {
  display: inline-block; min-width: 1.6em; padding: 1px 5px; text-align: center;
  font: 600 12px/1.5 inherit; font-family: inherit;
  border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px;
  background: var(--bg-3); color: var(--fg);
}
.ctl-touch { display: none; }
@media (hover: none) and (pointer: coarse) {
  .ctl-desktop { display: none; }
  .ctl-touch { display: grid; }
}
.demo-caption { margin: 13px 0 0; font-size: 14px; color: var(--muted-2); }

/* How it works — stepped three-column */
.section-head { max-width: 62ch; }
/* Full-bleed scroll stage: the car is pinned across the whole viewport width
   while the step cards scroll over it. Rotation is tied to the pinned span. */
.how-grid { position: relative; margin: 0; }
#how { padding-top: 0; }
.how-visual {
  position: sticky; top: 64px; z-index: 0;
  height: calc(100vh - 64px); min-height: 420px;
  width: 100vw; margin-left: calc(50% - 50vw);
}
.spin-sticky {
  position: absolute; inset: 0; overflow: hidden;
  background: radial-gradient(70% 75% at 38% 55%, #202027 0%, #141418 62%, var(--bg-2) 100%);
}
.spin-sticky canvas { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity .6s ease; }
.how-visual.is-loaded .spin-sticky canvas { opacity: 1; }
.spin-hint {
  position: absolute; left: 0; right: 0; bottom: 18px; margin: 0;
  text-align: center; font-size: 13px; color: var(--muted-2);
  transition: opacity .3s ease;
}
.how-visual.no-webgl { display: none; }
.how-visual.no-webgl + .how-steps { margin-top: 0; }
.how-steps {
  position: relative; z-index: 1;
  margin-top: calc(-1 * max(100vh - 64px, 420px)); /* scroll over the pinned stage */
  pointer-events: none;
  padding-bottom: 38vh; /* room under step 3 before the stage releases (padding, so it can't collapse away) */
}
.step {
  pointer-events: auto;
  max-width: 440px; margin: 0 0 62vh auto;
  padding: 26px 28px 28px;
  background: rgba(16, 16, 19, 0.84); backdrop-filter: blur(8px);
  border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: 0 24px 60px -30px rgba(0,0,0,0.9);
  opacity: .55; transition: opacity .35s ease;
}
.step:first-child { margin-top: 34vh; }
.step:last-child { margin-bottom: 0; }
.step.is-active { opacity: 1; }
.step-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.step-n {
  font-size: 13px; font-weight: 600; color: var(--accent);
  font-variant-numeric: tabular-nums; letter-spacing: 0.08em;
}
.step-ico {
  width: 42px; height: 42px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid rgba(201,159,91,0.25);
}
.step-ico svg { width: 22px; height: 22px; }
.step h3 { font-size: 19px; margin: 0 0 8px; }
.step p { margin: 0; color: var(--muted); font-size: 16px; }

/* Benefits — asymmetric: intro column + editorial list */
.benefits-grid {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 56px;
  align-items: start;
}
.benefits-intro { position: sticky; top: 96px; }
.benefits-intro .sub { margin-top: 12px; }
.points { display: grid; gap: 2px; }
.point {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: 4px 20px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.point:first-child { border-top: 0; padding-top: 0; }
.point .n {
  grid-row: span 2;
  font-size: 15px;
  color: var(--accent);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding-top: 3px;
}
.point h3 { font-size: 19px; margin: 0; }
.point p { margin: 7px 0 0; color: var(--muted); font-size: 16px; max-width: 54ch; }

/* FAQ — two columns on desktop, native details/summary */
.faq-grid {
  margin-top: 42px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 40px;
  align-items: start;
}
details.faq {
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}
details.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 40px 18px 0;
  position: relative;
  font-size: 17px;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.4;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "";
  position: absolute;
  right: 6px; top: 24px;
  width: 10px; height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}
details.faq[open] summary::after { transform: rotate(-135deg); top: 27px; }
details.faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
details.faq > p { margin: 0 0 20px; color: var(--muted); font-size: 16px; max-width: 54ch; }

/* Contact */
.contact-grid {
  margin-top: 36px;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: start;
}
.contact-grid .aside p { color: var(--muted); margin: 0 0 16px; }
.contact-grid .aside a { color: var(--accent); text-decoration: none; }
.contact-grid .aside a:hover { text-decoration: underline; }
.field { margin-bottom: 18px; }
label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 7px;
}
input, textarea {
  width: 100%;
  padding: 12px 13px;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  background: var(--bg);
  color: var(--fg);
  font-size: 16px;
  font-family: inherit;
  outline: none;
}
section.band input, section.band textarea { background: var(--bg); }
textarea { resize: vertical; min-height: 120px; }
input:focus, textarea:focus { border-color: var(--accent); }
form button {
  border: 0;
  border-radius: 6px;
  padding: 13px 24px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  color: #161008;
  cursor: pointer;
  background: var(--accent);
}
form button:hover { background: #d8b06b; }
form button[disabled] { opacity: 0.55; cursor: progress; }
.form-status { margin: 14px 0 0; font-size: 14px; min-height: 1.2em; }
.form-status.error { color: #e88; }
.form-status.ok { color: #8ecf9a; }
.thanks { padding: 8px 0; }
.thanks h3 { margin: 0 0 6px; font-size: 19px; }
.thanks p { margin: 0; color: var(--muted); }
[hidden] { display: none !important; }

/* Footer */
footer.site { border: 0; padding: 36px 0 52px; }
.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  color: var(--muted-2);
  font-size: 14px;
}

@media (max-width: 920px) {
  section { padding: 64px 0; }
  .hero { padding: 48px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  h1 { max-width: 20ch; }
  .lede { max-width: 56ch; }
  .benefits-grid { grid-template-columns: 1fr; gap: 32px; }
  .benefits-intro { position: static; }
  .step { max-width: none; margin: 0 0 70vh 0; padding: 20px 20px 22px; }
  .step:first-child { margin-top: 52vh; }
  .step:last-child { margin-bottom: 0; }
  .how-steps { padding-bottom: 30vh; }
  .faq-grid { grid-template-columns: 1fr; gap: 0 0; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 560px) {
  .demo-frame iframe { aspect-ratio: 4 / 3; }
  .controls-tip { top: 10px; right: 10px; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  details.faq summary::after { transition: none; }
}

/* Site nav (shared by /, /about, /contact) */
.nav-right { display: flex; align-items: center; gap: 22px; }
.nav-links { display: flex; align-items: center; gap: 22px; margin: 0; padding: 0; list-style: none; }
.nav-links a {
  font-size: 14px; text-decoration: none; color: var(--muted);
  padding: 4px 0; border-bottom: 1px solid transparent;
}
.nav-links a:hover { color: var(--fg); }
.nav-links a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--accent); }
.foot-links { display: flex; gap: 18px; }
.foot-links a { color: var(--muted-2); text-decoration: none; }
.foot-links a:hover { color: var(--fg); }
@media (max-width: 560px) {
  .nav-right, .nav-links { gap: 14px; }
  .wordmark .logo-car { display: none; }
  .btn-nav { padding: 8px 12px; font-size: 13px; }
}

/* "Try it yourself" heading with the full-preview button beside it */
.try-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; }
.try-head .btn { flex: none; }
/* Header fit on narrow phones: keep the button on one line; the wordmark already links home */
.btn-nav { white-space: nowrap; }

.nav-right { margin-left: 16px; }
.try-head { justify-content: flex-start; }

/* Narrow phones: keep all four header items by tightening type and spacing */
@media (max-width: 480px) {
  .nav-right { gap: 10px; margin-left: 10px; }
  .nav-links { gap: 10px; }
  .nav-links a { font-size: 13px; }
  .wordmark { font-size: 15px; white-space: nowrap; }
  .btn-nav { padding: 7px 10px; font-size: 12.5px; }
}
@media (max-width: 370px) {
  .nav-links { gap: 8px; }
  .nav-links a { font-size: 12.5px; }
}
@media (max-width: 480px) {
  .wrap.nav { padding-inline: 16px; }   /* 16px side gutter in the header */
  .wordmark { gap: 4px; font-size: 14.5px; }
}
@media (max-width: 370px) {
  .nav-right { gap: 8px; margin-left: 6px; }
  .btn-nav { padding: 6px 8px; font-size: 12px; }
  .wordmark { font-size: 14px; }
}
@media (max-width: 340px) {
  .wrap.nav { padding-inline: 12px; }
  .wordmark { font-size: 13px; }
  .nav-right { gap: 6px; margin-left: 4px; }
  .nav-links { gap: 6px; }
  .nav-links a { font-size: 11.5px; }
  .btn-nav { padding: 6px 7px; font-size: 11.5px; }
}
/* Heading that links out, with a ↗ arrow */
.h-link { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 0.3em; }
.h-arrow { width: 0.8em; height: 0.8em; color: var(--accent); flex: none; transition: transform .2s ease; }
.h-link:hover .h-arrow, .h-link:focus-visible .h-arrow { transform: translate(3px, -3px); }
.h-link:hover { color: var(--fg); }
