/* Premier Auto Solutions — one board of filled tiles on black, from the brand's own colours.
   Tile tones are tint shades: the share of light a film lets through (70, 50, 35, 20). */

:root {
  --ground: #0a0a0b;
  --tile: #17171a;
  --tile-2: #222226;
  --ink: #f3f3f4;
  --ink-soft: #a9a9b0;
  --chrome: #d2d3d6;
  --accent: #c3171d;          /* the red in the logo */
  --accent-deep: #a11218;
  --v70: #b3b3b3; --v50: #808080; --v35: #595959; --v20: #333333;

  --gap: 8px;
  --edge: clamp(8px, 0.9vw, 12px);
  --pad: clamp(18px, 1.7vw, 24px);
  --section: clamp(88px, 9vw, 128px);

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(4rem, 1rem + 9vw, 10rem);

  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: 'General Sans', system-ui, sans-serif;
  font-size: var(--step-body);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
img, video, svg { display: block; max-width: 100%; }
h1, h2, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.tile { background: var(--tile); }
h1, h2 { font-weight: 700; letter-spacing: -0.02em; line-height: 0.95; }

main > section + section, main > .marquee, main > .marquee + section { margin-top: var(--section); }

/* ---------- hero: the board around the film ---------- */
.hero__board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: clamp(110px, 21svh, 200px) 64px minmax(300px, 1fr) auto;
  gap: var(--gap);
  padding: var(--edge);
  min-height: 100svh;
}
.scene.is-live .hero__board { height: 100svh; min-height: 0; grid-template-rows: clamp(110px, 21svh, 200px) 64px minmax(0, 1fr) auto; }

.hero__band { grid-column: 1 / -1; grid-row: 1; position: relative; overflow: hidden; background: #000; }
.hero__band img { position: absolute; top: 0; left: 50%; height: 100%; width: auto; max-width: none; translate: -50% 0; mix-blend-mode: screen; }

.hero__links { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.hero__links a { display: block; padding: 20px var(--pad); text-decoration: none; font-weight: 500; transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out); }
.hero__links a:hover { background: var(--chrome); color: var(--ground); }

.hero__left { grid-column: 1 / 3; grid-row: 3 / 5; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: var(--gap); min-height: 0; }
.hero__left img { width: 100%; height: 100%; object-fit: cover; }
.hero__facts { padding: var(--pad); font-size: var(--step-small); display: grid; gap: 8px; }

.hero__window { grid-column: 3 / 11; grid-row: 3; position: relative; overflow: hidden; background: #080c10; min-height: 0; }
.hero__film-wrap { position: absolute; inset: 0; background: #07080a; }   /* the studio wall above, its floor below */
.hero__film-wrap::before { content: ''; position: absolute; inset: 50% 0 0; background: #1e2125; }
.hero__film { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Live on a wide screen the film sits behind the whole board, clipped to the window by the script,
   at its full-screen size; the clip opens and the film settles as the board slides away. */
@media (min-width: 768px) {
  .scene.is-live .hero__window { position: static; overflow: visible; background: none; }
  .scene.is-live .hero__board > :not(.hero__window, .hero__steps) { position: relative; z-index: 1; }
  .scene.is-live .hero__film { inset: auto; left: 50%; top: 50%; width: max(100%, 183.07svh); max-width: none; height: auto; aspect-ratio: 1600 / 874; }
}
/* a tall screen would crop the truck to its middle; there the film fits the width and the studio fills the rest */
@media (min-width: 768px) and (orientation: portrait) {
  .scene.is-live .hero__film { width: 100%; }
}

.hero__say { grid-column: 3 / 11; grid-row: 4; padding: var(--pad); }
.hero__say h1 { font-size: var(--step-head); max-width: 14em; }
.hero__say p { margin-top: 32px; font-size: var(--step-lead); line-height: 1.25; max-width: 34ch; }

.hero__rail { grid-column: 11 / 13; grid-row: 3 / 5; display: grid; grid-template-rows: repeat(4, minmax(0, 1fr)) minmax(0, 1.3fr); gap: var(--gap); min-height: 0; }
.shade { padding: 16px 20px; font-size: var(--step-small); line-height: 1.3; }
.shade b { display: block; font-size: var(--step-lead); line-height: 1; margin-bottom: 6px; }
.shade--70 { background: var(--v70); color: var(--ground); }
.shade--50 { background: var(--v50); color: var(--ground); }
.shade--35 { background: var(--v35); color: #fff; }
.shade--20 { background: var(--v20); color: #fff; }
.shade--go { padding: 0; }
.shade--go a { display: flex; align-items: flex-end; height: 100%; padding: 16px 20px; background: var(--accent); color: #fff; font-size: var(--step-lead); font-weight: 500; line-height: 1.1; text-decoration: none; transition: background-color 200ms var(--ease-out); }
.shade--go a:hover { background: var(--accent-deep); }

/* the film's captions: a row of tiles at rest, one at a time over the film when live */
.hero__steps { grid-column: 1 / -1; grid-row: 5; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.hero__steps li { padding: var(--pad); font-size: var(--step-lead); line-height: 1.2; }
.scene.is-live .hero__steps { position: absolute; z-index: 2; left: calc(var(--edge) * 2); bottom: calc(var(--edge) * 2); width: min(520px, 40vw); display: block; }
.scene.is-live .hero__steps li { position: absolute; left: 0; bottom: 0; width: 100%; background: #000; color: #fff; opacity: 0; visibility: hidden; }

/* ---------- the shade picker, cut across a board of tiles ---------- */
.mosaic {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: var(--gap);
  padding: 0 var(--edge);
}
.cell { aspect-ratio: 1; min-width: 0; padding: var(--pad); }
.pic { padding: 0; overflow: hidden; background: #080c10; }
.pic svg { width: 100%; height: 100%; transition: transform 700ms var(--ease-expo); }
.pic:hover svg { transform: scale(1.08); }
/* each tile holds the truck at all four shades; the picked one shows */
.pic image { opacity: 0; transition: opacity 450ms var(--ease-out); }
.mosaic[data-shade='70'] .s70, .mosaic[data-shade='50'] .s50, .mosaic[data-shade='25'] .s25, .mosaic[data-shade='5'] .s5 { opacity: 1; }
.js .mosaic__fallback { display: none; }
.mosaic__fallback { grid-column: 1 / -1; width: 100%; height: auto; }

.cell--head, .cell--pick, .cell--verdict { aspect-ratio: auto; }
.cell--head { grid-area: 1 / 1 / 2 / 3; background: var(--chrome); color: var(--ground); font-size: var(--step-lead); line-height: 1; }
.cell--pick { grid-area: 1 / 7 / 2 / 9; }
.cell--verdict { grid-area: 4 / 4 / 5 / 6; background: var(--tile-2); font-size: var(--step-body); line-height: 1.35; }
.cell--go { grid-area: 4 / 1; display: flex; align-items: flex-end; background: var(--accent); color: #fff; font-size: var(--step-lead); font-weight: 500; line-height: 1.1; text-decoration: none; transition: background-color 200ms var(--ease-out); }
.cell--go:hover { background: var(--accent-deep); }

.picker { margin: 0; border: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; }
.picker legend { float: left; padding: 0; font-weight: 500; }
.picker legend + * { clear: both; }
.picker__opts { display: flex; gap: 4px; }
.picker__opts label { flex: 1; position: relative; cursor: pointer; }
.picker__opts input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.picker__opts span { display: grid; place-items: center; height: 40px; font-size: var(--step-small); font-weight: 500; font-variant-numeric: tabular-nums; transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out), transform 120ms var(--ease-out); }
.picker__opts label:nth-child(1) span { background: var(--v70); color: var(--ground); }
.picker__opts label:nth-child(2) span { background: var(--v50); color: var(--ground); }
.picker__opts label:nth-child(3) span { background: #404040; color: #fff; }
.picker__opts label:nth-child(4) span { background: #000; color: #fff; }
.picker__opts input:checked + span { background: var(--accent); color: #fff; }
.picker__opts input:active + span { transform: scale(0.94); }
.picker__opts input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.picker__now { font-size: var(--step-small); color: var(--ink-soft); }

/* ---------- services: the giant word on the left, one column of filled bars on the right ---------- */
.services { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); padding: 0 var(--edge); align-items: start; }
.services__list { display: contents; }
.giant { grid-column: 1 / 7; font-size: var(--step-display); line-height: 0.8; letter-spacing: -0.045em; white-space: nowrap; }
.bars { grid-column: 7 / 13; display: grid; gap: 6px; }
.bar { background: var(--tile); }
.bar summary { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 18px; font-weight: 500; cursor: pointer; list-style: none; transition: background-color 200ms var(--ease-out); }
.bar summary::-webkit-details-marker { display: none; }
.bar summary::after { content: '+'; font-size: 1.5em; line-height: 1; transition: transform 300ms var(--ease-out); }
.bar[open] summary::after { transform: rotate(45deg); }
.bar summary:hover { background: var(--tile-2); }
.bar__panel { padding: 4px 18px 20px; display: grid; gap: 12px; }
.bar__panel p { max-width: 52ch; }
.bar__seen { color: var(--ink-soft); font-size: var(--step-small); }

figure.tile { position: relative; overflow: hidden; }
figure.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-expo); }
figure.tile:hover img { transform: scale(1.04); }
.photo > figcaption { position: absolute; left: 0; bottom: 0; padding: 8px 12px; background: var(--ground); font-size: var(--step-small); }

/* ---------- reviews: a board of names, words and cars ---------- */
.reviews { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; gap: var(--gap); padding: 0 var(--edge); }
.reviews > * { aspect-ratio: 3 / 2; min-width: 0; }
.reviews > .tall { grid-row: span 2; aspect-ratio: auto; }
.reviews__head { grid-column: span 2; aspect-ratio: auto; padding: var(--pad); background: var(--accent); color: #fff; font-size: var(--step-head); }
.quote { display: flex; flex-direction: column; gap: 12px; padding: var(--pad); }
.quote figcaption { font-size: var(--step-lead); font-weight: 700; line-height: 1.05; letter-spacing: -0.01em; }
.quote:nth-of-type(odd) { background: var(--tile-2); }
.reviews__more { display: flex; align-items: flex-end; padding: var(--pad); background: var(--chrome); color: var(--ground); font-size: var(--step-lead); font-weight: 500; line-height: 1.1; text-decoration: none; transition: background-color 200ms var(--ease-out); }
.reviews__more:hover { background: #fff; }

/* ---------- the marquee: the name, travelling ---------- */
.marquee { overflow: hidden; }
.marquee__track { display: flex; width: max-content; }
.marquee__track span { font-size: var(--step-display); font-weight: 700; letter-spacing: -0.04em; line-height: 1; white-space: nowrap; padding-right: 0.25em; }

/* ---------- questions ---------- */
.faq { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); padding: 0 var(--edge); align-items: start; }
.faq__head { grid-column: 1 / 5; position: sticky; top: 32px; font-size: var(--step-head); padding-inline: var(--pad); }
.faq__list { grid-column: 5 / 13; display: grid; gap: var(--gap); }
.q { background: var(--tile); transition: background-color 250ms var(--ease-out), color 250ms var(--ease-out); }
.q summary { position: relative; display: flex; align-items: center; min-height: 72px; padding: 16px 64px 16px 24px; font-size: var(--step-lead); font-weight: 500; line-height: 1.2; cursor: pointer; list-style: none; }
.q summary::-webkit-details-marker { display: none; }
.q summary::before, .q summary::after { content: ''; position: absolute; right: 24px; top: 50%; width: 16px; height: 3px; margin-top: -1.5px; background: currentColor; transition: transform 300ms var(--ease-out); }
.q summary::after { transform: rotate(90deg); }
.q[open] summary::after { transform: rotate(0deg); }
.q:not([open]) summary:hover { background: var(--tile-2); }
.q[open] { background: var(--accent); color: #fff; }
.q p { padding: 0 24px 24px; max-width: 52ch; }

/* ---------- book: the red field ---------- */
.book { margin-inline: var(--edge); background: var(--accent); color: #fff; padding: var(--pad) var(--pad) clamp(48px, 6vw, 72px); }
.book__strip { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: var(--gap); }
.book__strip img { width: 100%; height: 150px; object-fit: cover; }
.book__head { margin-top: 72px; font-size: var(--step-head); }
.book__form { margin-top: 40px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.book__form .cell { aspect-ratio: auto; padding: 0; height: 96px; }
.book__form input { width: 100%; height: 100%; border: 0; border-radius: 0; background: var(--accent-deep); color: #fff; font: inherit; font-size: var(--step-body); text-align: center; transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out); }
.book__form input::placeholder { color: #f6d3d4; opacity: 1; }
.book__form input:focus { outline: none; background: #fff; color: var(--ground); }
.book__form input:focus::placeholder { color: #6b6b70; }
.book__form button { border: 0; border-radius: 0; background: var(--ground); color: #fff; font: inherit; font-size: var(--step-lead); font-weight: 500; cursor: pointer; transition: background-color 200ms var(--ease-out), transform 120ms var(--ease-out); }
.book__form button:hover { background: #000; }
.book__form button:active { transform: scale(0.98); }
.book__form button:disabled { opacity: 0.6; cursor: progress; }
.book__small { grid-column: 1; font-size: var(--step-small); }
.book__small--end { grid-column: 3; }
.book__small a { font-weight: 500; }
.book__status { grid-column: 1 / -1; font-size: var(--step-lead); }
.book__status:empty { display: none; }

/* ---------- footer: the last rows of the board ---------- */
.footer { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); padding: var(--gap) var(--edge) var(--edge); }
.footer > .tile { padding: var(--pad); min-width: 0; }
.footer__say { grid-column: 1 / 5; min-height: 220px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.footer__say p:first-child { font-size: var(--step-lead); line-height: 1.25; }
.footer__legal { font-size: var(--step-small); color: var(--ink-soft); }
.footer__nav { grid-column: 5 / 8; }
.footer__nav ul { display: grid; gap: 6px; }
.footer__nav a, .footer__where a { text-decoration: none; }
.footer__nav a:hover, .footer__where a:hover, .footer__mail a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer__where { grid-column: 8 / 10; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.footer__where p { font-size: var(--step-small); color: var(--ink-soft); }
.footer__mail { grid-column: 10 / 13; display: flex; align-items: flex-end; }
.footer__mail a { font-size: var(--step-lead); line-height: 1.2; overflow-wrap: anywhere; text-decoration: none; }
.footer__mark { grid-column: 1 / 9; min-height: 320px; display: grid; place-items: center; background: #000; }
.footer > .footer__mark { padding: 24px; }
.footer__mark img { width: min(88%, 980px); height: auto; mix-blend-mode: screen; }
.footer__call { grid-column: 9 / 13; display: flex; flex-direction: column; justify-content: space-between; background: var(--accent); color: #fff; font-size: var(--step-lead); font-weight: 500; line-height: 1.15; text-decoration: none; transition: background-color 200ms var(--ease-out); }
.footer__call svg { align-self: flex-end; transition: transform 300ms var(--ease-expo); }
.footer__call:hover { background: var(--accent-deep); }
.footer__call:hover svg { transform: translate(4px, -4px); }

/* ---------- tablet and phone ---------- */
@media (max-width: 1099px) {
  .hero__left { display: none; }
  .giant, .bars { grid-column: 1 / -1; }
  .giant { margin-bottom: 12px; }
  .hero__window, .hero__say { grid-column: 1 / 11; }
  .mosaic { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cell--head, .cell--pick, .cell--verdict, .cell--go { aspect-ratio: auto; grid-column: 1 / -1; }
  .cell--head { grid-row: 1; }
  .cell--pick { grid-row: 4; }
  .cell--verdict { grid-row: 5; }
  .cell--go { grid-row: 6; min-height: 96px; }
  .picker__opts span { height: 48px; font-size: var(--step-body); }
  .reviews { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faq__head { grid-column: 1 / -1; position: static; margin-bottom: 16px; }
  .faq__list { grid-column: 1 / -1; }
  .footer__say { grid-column: 1 / 7; }
  .footer__nav { grid-column: 7 / 13; }
  .footer__where { grid-column: 1 / 7; }
  .footer__mail { grid-column: 7 / 13; }
  .footer__mark { grid-column: 1 / -1; }
  .footer__call { grid-column: 1 / -1; min-height: 160px; }
}

@media (max-width: 767px) {
  :root { --gap: 6px; --edge: 6px; }
  .hero__board, .scene.is-live .hero__board { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 96px auto minmax(180px, 1fr) auto 64px; }
  .hero__links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__links a { padding: 14px 16px; }
  .hero__left { display: none; }
  .hero__window, .hero__say { grid-column: 1 / -1; }
  .hero__say p { margin-top: 20px; }
  .hero__rail { grid-column: 1 / -1; grid-row: 5; grid-template-rows: none; grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 2fr); }
  .shade { padding: 10px 12px; }
  .shade b { font-size: var(--step-body); margin: 0; }
  .shade span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .shade--go a { padding: 10px 12px; font-size: var(--step-body); align-items: center; }
  .hero__steps { grid-row: 6; grid-template-columns: none; }
  .scene.is-live .hero__steps { position: relative; left: auto; bottom: auto; width: auto; grid-column: 1 / -1; grid-row: 4; }
  .scene.is-live .hero__steps li { inset: 0; font-size: var(--step-lead); }

  .reviews__head { grid-column: 1 / -1; min-height: 120px; font-size: 9vw; }
  .reviews .rv-extra { display: none; }
  .reviews > .quote { grid-column: 1 / -1; aspect-ratio: auto; }
  .reviews > .tall { grid-row: auto; aspect-ratio: 3 / 2; }
  .reviews > .reviews__more { grid-column: 1 / -1; aspect-ratio: auto; min-height: 120px; }
  .quote figcaption { font-size: var(--step-body); }
  .faq__head { font-size: 9vw; }
  .q summary { font-size: var(--step-body); min-height: 64px; padding: 14px 52px 14px 20px; }
  .q p { padding: 0 20px 20px; font-size: var(--step-body); }
  .book__strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .book__strip img { height: 110px; }
  .book__head { margin-top: 48px; font-size: 9vw; }
  .book__form { grid-template-columns: 1fr; }
  .book__form .cell { height: 60px; }
  .book__small, .book__small--end { grid-column: 1; }
  .footer__say, .footer__nav, .footer__where, .footer__mail { grid-column: span 6; }
  .footer__mark { min-height: 160px; }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .marquee__track { animation: travel 38s linear infinite; }
  .marquee:hover .marquee__track { animation-play-state: paused; }
  .js .hero [data-load] { animation: rise 700ms var(--ease-expo) backwards; animation-delay: var(--d, 0ms); }
  .js [data-reveal] { opacity: 0.4; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-expo); transition-delay: calc(var(--i, 0) * 80ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
}
@keyframes travel { to { transform: translateX(-50%); } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
