/*
 * tuning-database.co.uk, v3: the homepage (templates/front-page.php, 19 Oct
 * 2026). A split hero with a real car and its Stage 1 gains, the reading
 * tools, the file service (steps, cars, one price, why us), TunerSuite beside a
 * big screen of it and what you get, the portal seat by seat in whole-page
 * screens, dealers, prices, questions, a last call for each buyer. Colours and
 * sizes are tokens, so both themes read; js/front.js moves it with anime.js.
 * The moving light behind the hero and the last call is css/motion.css.
 */

/* 1. hero: the words on the left, a car and its gains on the right ---------- */

.home-hero {
  padding-block: clamp(var(--sp-7), 7vw, var(--sp-9)) var(--sp-8);
}

.hero-split {
  display: grid;
  gap: var(--sp-7);
  align-items: center;
}

@media (min-width: 980px) {
  .hero-split {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: var(--sp-8);
  }
}

.hero-split h1 {
  max-width: 17ch;
  font-size: var(--step-5);
  line-height: var(--leading-tight);
  letter-spacing: -0.025em;
}

.hero__accent {
  color: var(--accent-ink);
}

.hero-split .lede {
  max-width: 50ch;
  margin-top: var(--sp-5);
}

.hero__cta {
  margin-top: var(--sp-6);
}

.hero__ticks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
  margin-top: var(--sp-5);
  color: var(--ink-2);
}

.hero__ticks li + li {
  margin-top: 0;
}

/* The car card: pick one of four, see stock against Stage 1. */
.gains {
  padding: var(--sp-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-2);
  background: var(--bg-raised);
  box-shadow: var(--shadow-float);
}

.gains__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}

.gains__tab,
.views__tab {
  min-height: 40px;
  padding: var(--sp-1) var(--sp-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--ink-2);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.gains__tab:hover,
.views__tab:hover {
  border-color: var(--ink-3);
  color: var(--ink);
}

.gains__tab:focus-visible,
.views__tab:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.gains__tab[aria-selected="true"],
.views__tab[aria-selected="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

/* Without js/front.js the four cars stand one under the other. */
.gains__panel + .gains__panel {
  margin-top: var(--sp-6);
}

.gains.is-ready .gains__panel + .gains__panel {
  margin-top: 0;
}

.gains__pic {
  overflow: hidden;
  aspect-ratio: 5 / 3;
  border-radius: var(--radius-1);
  background: var(--bg-sunk);
}

.gains__photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gains__name {
  margin-top: var(--sp-3);
  color: var(--ink);
  font-weight: 700;
}

.gains__figs {
  display: grid;
  gap: var(--sp-3);
  margin: var(--sp-3) 0 0;
}

.gains__row {
  display: grid;
  grid-template-columns: 4.5em minmax(0, 1fr);
  gap: var(--sp-3);
  align-items: start;
}

.gains__row dt {
  padding-top: 0.35em;
  color: var(--ink-3);
  font-size: var(--step--1);
  font-weight: 600;
}

.gains__row dd {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-1) var(--sp-3);
  margin: 0;
}

.gains__nums {
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.gains__nums b {
  color: var(--ink);
  font-size: var(--step-2);
}

.gains__plus {
  color: var(--accent-ink);
  font-weight: 700;
}

.gains__bar {
  display: block;
  flex-basis: 100%;
  width: 100%;
  height: 8px;
}

.gains__track {
  fill: var(--bg-sunk);
}

.gains__stage {
  fill: var(--accent);
}

.gains__stock {
  fill: var(--ink-3);
}

.gains__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
  color: var(--ink-2);
}

.gains__foot b {
  color: var(--ink);
}

/* 2. the reading tools ------------------------------------------------------ */

.tools-band {
  display: grid;
  justify-items: center;
  gap: var(--sp-4);
  text-align: center;
}

.tools__head {
  color: var(--ink-2);
  font-size: var(--step-0);
  font-weight: 600;
}

.tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.tools__item {
  min-width: 8em;
  padding: var(--sp-3) var(--sp-5);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-2);
  background: var(--bg-raised);
  color: var(--ink);
  font-size: var(--step-1);
  font-weight: 700;
}

.tools__note {
  max-width: 70ch;
}

/* 3. the file service: steps, cars, one price, why us ----------------------- */

.steps__icon,
.why__icon,
.get__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: var(--sp-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-1);
  color: var(--accent-ink);
}

.steps__icon svg,
.why__icon svg,
.get__icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.steps.steps--cards li {
  position: relative;
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-top: 3px solid var(--line-strong);
  border-radius: var(--radius-2);
  background: var(--bg-raised);
}

.steps.steps--cards li:first-child {
  border-top-color: var(--accent);
}

@media (min-width: 900px) {
  .steps.steps--cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--sp-4);
  }
}

.steps__n {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-5);
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: var(--step-1);
}

.home-fs__hours {
  margin-top: var(--sp-4);
}

.cars-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  margin: var(--sp-8) 0 var(--sp-5);
}

.cars-head h3,
.fs-price__head h3,
.why__head,
.home-gets-head h3,
.home-seats h3,
.home-host h3 {
  font-size: var(--step-3);
}

.cars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 900px) {
  .cars {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.car__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-2);
  background: var(--bg-raised);
  color: var(--ink);
  text-decoration: none;
  transition: border-color var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out);
}

.car__link:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.car__link:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.car__pic {
  display: block;
  overflow: hidden;
  aspect-ratio: 5 / 3;
  background: var(--bg-sunk);
}

.car__photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-3) var(--ease-out);
}

.car__link:hover .car__photo {
  transform: scale(1.04);
}

.car__name {
  padding: var(--sp-3) var(--sp-4) 0;
  font-weight: 700;
  line-height: var(--leading-snug);
}

.car__figs {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: auto;
  padding: var(--sp-2) var(--sp-4) var(--sp-4);
  color: var(--ink-2);
  font-size: var(--step--1);
}

.car__figs b {
  color: var(--ink);
  font-size: var(--step-1);
  font-variant-numeric: tabular-nums;
}

.car__plus {
  color: var(--accent-ink);
  font-weight: 700;
}

.fs-price {
  margin-top: var(--sp-8);
  padding: var(--sp-6);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-2);
  background: var(--bg-raised);
}

.fs-price > * + * {
  margin-top: var(--sp-5);
}

.fs-price__head .muted {
  max-width: 70ch;
  margin-top: var(--sp-2);
}

.stages {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-3);
  padding: 0;
  list-style: none;
}

@media (min-width: 760px) {
  .stages {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.stage {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-2);
  background: var(--bg);
}

.stage__name {
  color: var(--ink-2);
  font-weight: 600;
}

.stage__price {
  color: var(--ink);
  font-size: var(--step-4);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.stage__sub {
  color: var(--ink-3);
  font-size: var(--step--1);
}

.fs-price__inc {
  color: var(--ink);
  font-weight: 600;
}

.fs-price__inc + .included {
  margin-top: var(--sp-3);
}

.included {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  padding: 0;
  list-style: none;
}

.included li {
  padding: 2px var(--sp-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  color: var(--ink-2);
  font-size: var(--step--1);
}

.included li::before {
  content: "+ ";
  color: var(--accent-ink);
  font-weight: 700;
}

.fsp-table__sub {
  display: block;
  margin-top: 2px;
  color: var(--ink-3);
  font-size: var(--step--1);
}

.fsp-table tr[data-pack="100"] .fsp-table__sub {
  color: var(--accent-ink);
  font-weight: 600;
}

.why__head {
  margin: var(--sp-8) 0 var(--sp-5);
}

.why,
.gets {
  display: grid;
  gap: var(--sp-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .why,
  .gets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .why,
  .gets {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.why__item,
.get {
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-2);
  background: var(--bg-raised);
}

.why__item h4,
.get h4 {
  margin-bottom: var(--sp-2);
  font-size: var(--step-0);
}

.why__item p,
.get p {
  color: var(--ink-2);
  font-size: var(--step--1);
}

.home-service__find {
  margin-top: var(--sp-8);
  padding: var(--sp-6);
  border: 1px solid var(--line);
  border-radius: var(--radius-2);
  background: var(--bg-raised);
}

.home-service__find > * + * {
  margin-top: var(--sp-3);
}

.home-service__find h3 {
  font-size: var(--step-2);
}

/* 4. TunerSuite: the pitch beside a big screen, then what you get ----------- */

.ts-band {
  display: grid;
  gap: var(--sp-7);
  align-items: center;
}

@media (min-width: 980px) {
  .ts-band {
    grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  }
}

.ts-band h2 {
  font-size: var(--step-4);
}

.ts-band .door__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-1) var(--sp-3);
}

.ts-band .door__price b {
  color: var(--ink);
  font-size: var(--step-3);
}

.ts-band .door__price > span {
  flex-basis: 100%;
  color: var(--ink-2);
  font-size: var(--step--1);
}

.door__was {
  color: var(--ink-3);
  font-size: var(--step-1);
}

.door__left {
  color: var(--accent-ink);
  font-weight: 700;
}

.demo-note {
  max-width: 46ch;
}

.ts-band__shot .shot__frame {
  height: clamp(320px, 38vw, 540px);
}

.home-proof {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-6);
  margin-top: var(--sp-8);
  padding: var(--sp-6) 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.home-proof li {
  color: var(--ink-2);
}

.home-proof b {
  display: block;
  margin-bottom: var(--sp-1);
  color: var(--ink);
  font-size: var(--step-4);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

@media (min-width: 900px) {
  .home-proof {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.home-gets-head,
.home-seats {
  margin-top: var(--sp-8);
}

/* The first three are what nobody else gives: files from us, the network, dealers. */
.get:nth-child(-n+3) {
  border-top: 3px solid var(--accent);
}

.get h4 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
}

.gets__addon {
  padding: 1px var(--sp-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  color: var(--ink-3);
  font-size: var(--step--1);
  font-weight: 600;
}

/* 5. the portal seat by seat: tabs over whole-page screens ------------------ */

/* Without js/front.js every panel shows, one under the other, each with its
   name; with it, the tabs pick one and the names are read from the tabs. */
.views__tabs {
  display: none;
}

.views.is-ready .views__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
}

.views__panel + .views__panel {
  margin-top: var(--sp-8);
}

.views.is-ready .views__panel + .views__panel {
  margin-top: 0;
}

.views__panel:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 6px;
}

.views__name {
  font-size: var(--step-2);
}

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

.views__line {
  max-width: 70ch;
  margin-bottom: var(--sp-5);
  color: var(--ink-2);
  font-size: var(--step-1);
}

/* One screen per row, at the width of the page: a whole page any narrower
   cannot be read. */
.views__shots {
  display: grid;
  gap: var(--sp-6);
}

.views .shot__frame {
  height: clamp(360px, 50vw, 640px);
}

/* A whole page in a frame of a screen's height: the visitor scrolls through
   it (and js/front.js scrolls it once when it comes into view). */
.shot {
  margin: 0;
}

.shot__frame {
  height: clamp(300px, 34vw, 480px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-2);
  background: var(--bg-raised);
  scrollbar-width: thin;
}

.shot__frame:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.shot__frame img {
  display: block;
  width: 100%;
  height: auto;
}

.shot figcaption {
  margin-top: var(--sp-2);
  color: var(--ink-2);
  font-size: var(--step--1);
}

/* Each screen exists in both themes; the visitor's theme picks one. Written
   above `.shot__frame img`, which would otherwise show both. */
.shot .shot__l {
  display: none;
}

:root[data-theme="light"] .shot .shot__d {
  display: none;
}

:root[data-theme="light"] .shot .shot__l {
  display: block;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .shot .shot__d {
    display: none;
  }

  :root:not([data-theme="dark"]) .shot .shot__l {
    display: block;
  }
}

/* 6. dealers ---------------------------------------------------------------- */

.master {
  display: grid;
  gap: var(--sp-5);
}

.master__col {
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-top: 3px solid var(--line-strong);
  border-radius: var(--radius-2);
  background: var(--bg-raised);
}

.master__col h3 {
  margin-bottom: var(--sp-4);
  font-size: var(--step-1);
}

.master__col .ticks {
  color: var(--ink-2);
}

@media (min-width: 900px) {
  .master {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* 7. prices: licences, then hosting with Pro recommended --------------------- */

.home-plans {
  display: grid;
  gap: var(--sp-4);
  padding: 0;
  list-style: none;
}

.home-plan {
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-2);
  background: var(--bg-raised);
}

.home-plan > * + * {
  margin-top: var(--sp-2);
}

.home-plan h3 {
  font-size: var(--step-1);
}

.home-plan__price b {
  color: var(--ink);
  font-size: var(--step-3);
  font-variant-numeric: tabular-nums;
}

@media (min-width: 640px) {
  .home-plans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .home-plans {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.home-host {
  margin-top: var(--sp-8);
}

.home-hosting .plan {
  position: relative;
  background: var(--bg-raised);
}

.home-hosting .plan__name {
  font-size: var(--step-2);
}

.plan__ribbon {
  position: absolute;
  top: calc(var(--sp-3) * -1);
  right: var(--sp-4);
  padding: 2px var(--sp-2);
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--step--1);
  font-weight: 700;
}

@media (min-width: 1120px) {
  .plans--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* 8. the last call: one door for each buyer ---------------------------------- */

.home-last {
  text-align: center;
}

.home-last h2 {
  max-width: 28ch;
  margin-inline: auto;
  font-size: var(--step-4);
}

.home-last__doors {
  display: grid;
  gap: var(--sp-4);
  max-width: 1000px;
  margin: var(--sp-7) auto 0;
  text-align: left;
}

.home-last__doors > .stack {
  display: flex;
  flex-direction: column;
  padding: var(--sp-6);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-2);
  background: var(--bg-raised);
}

.home-last__doors h3 {
  font-size: var(--step-2);
}

.home-last__doors p {
  color: var(--ink-2);
}

.home-last__doors .row {
  padding-top: var(--sp-2);
}

@media (min-width: 760px) {
  .home-last__doors {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.home-last__links {
  margin-top: var(--sp-6);
}

/* 9. fully white-label, and sending a file on (an optional extra) ---------- */

.white-label {
  display: grid;
  gap: var(--sp-6);
  margin-top: var(--sp-8);
  padding: var(--sp-6);
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-2);
  background: var(--bg-raised);
}

@media (min-width: 900px) {
  .white-label {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
  }
}

.white-label h3 {
  font-size: var(--step-3);
}

.white-label .lede {
  margin-top: var(--sp-2);
}

.white-label__points {
  display: grid;
  gap: var(--sp-2) var(--sp-5);
  color: var(--ink);
}

.white-label__points li + li {
  margin-top: 0;
}

@media (min-width: 640px) {
  .white-label__points {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.send-on {
  margin-top: var(--sp-6);
  padding: var(--sp-6);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-2);
  background: var(--bg);
}

.send-on > * + * {
  margin-top: var(--sp-3);
}

.send-on__tag {
  display: inline-block;
  padding: 1px var(--sp-2);
  border: 1px solid var(--accent);
  border-radius: var(--radius-pill);
  color: var(--accent-ink);
  font-size: var(--step--1);
  font-weight: 700;
}

.send-on h3 {
  font-size: var(--step-2);
}

.send-on .ticks {
  color: var(--ink-2);
}

/* 10. AI File Match: four steps on one line that draws itself -------------- */

.am-flow {
  position: relative;
}

.am-flow__line {
  display: none;
}

@media (min-width: 900px) {
  .am-flow__line {
    display: block;
    position: absolute;
    top: 22px;
    right: 22px;
    left: 22px;
    height: 2px;
    background: var(--accent);
    transform-origin: left center;
  }
}

.am-steps {
  position: relative;
  display: grid;
  gap: var(--sp-6);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 900px) {
  .am-steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.am-step__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: var(--bg);
  color: var(--accent-ink);
}

.am-step__icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.am-step__n {
  display: block;
  margin-top: var(--sp-3);
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: var(--step--1);
}

.am-step h3 {
  margin-top: var(--sp-1);
  font-size: var(--step-1);
}

.am-step p {
  margin-top: var(--sp-2);
  color: var(--ink-2);
}
