/*
 * KLEIDI Motors: an exact copy of video 14's design (see SPEC-video-14-exact.md).
 * Desktop is laid out in the video's own pixels on a 1440-wide canvas and zoomed to the window (--z).
 * Phones (under 900px) use a stacked layout with the same parts and colours.
 */
:root {
  --bg: #050505; --panel: #0a0b0d; --line: rgba(255, 255, 255, 0.12); --head: #f3eee4; --cream: #f1e6d2;
  --text: rgba(255, 255, 255, 0.8); --muted: rgba(255, 255, 255, 0.55); --eyebrow: #6fa3dc;
  --blue: #62aef0; --blue-ink: #0d2238; --race: #3466a8; --fill: #6aa6e0; --track: #46473f;
  --chip-line: #5a9fe0; --chip-fill: #14202e; --green: #8fd16a; --card: rgba(11, 14, 21, 0.86);
  --z: 1;
  --mono: "JetBrains Mono", ui-monospace, monospace; --sans: "Inter", ui-sans-serif, sans-serif; --display: "Montserrat", ui-sans-serif, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); font: 400 13px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
body { margin: 0; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
:where(a, button, input, select):focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.site { width: 1440px; zoom: var(--z); }
.mono { font: 500 9px/1.4 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.eyebrow { font: 500 10px/1 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--eyebrow); margin: 0 0 12px; }
.h2 { font: 700 50px/0.98 var(--display); letter-spacing: -0.02em; color: var(--head); margin: 0; }
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 999px; background: var(--blue); color: var(--blue-ink); font: 500 12px/1 var(--sans); cursor: pointer; transition: filter 150ms, transform 150ms var(--ease); }
.pill:hover { filter: brightness(1.08); }
.pill:active { transform: scale(0.98); }

/* ---------- top bar ---------- */
.top { position: fixed; z-index: 30; top: 0; left: 0; width: 1440px; height: 66px; zoom: var(--z); pointer-events: none; }
.top > * { pointer-events: auto; }
.logo { position: absolute; left: 40px; top: 21px; font: 700 18px/1 var(--display); color: #fff; letter-spacing: -0.01em; }
.logo span { font-weight: 500; color: #8db4f0; }
.logo small { display: block; margin-top: 4px; font: 500 5px/1 var(--mono); letter-spacing: 0.24em; color: var(--muted); }
.top nav { position: absolute; left: 1100px; top: 25px; display: flex; gap: 26px; font: 600 12px/1 var(--sans); color: #fff; letter-spacing: -0.01em; }
.top nav a:hover { color: #cfe3ff; }
.call { position: absolute; left: 1272px; top: 17px; width: 138px; height: 31px; font-size: 11px; }

/* ---------- 1. scroll film ---------- */
.film { position: relative; height: calc(900px * 9); }   /* 9 screens of scroll for 1,064 frames (it was 8 for 944): the same pace */
.stage { position: sticky; top: 0; height: calc(100vh / var(--z)); min-height: 560px; overflow: hidden; background: #000; }
.shot { position: absolute; inset: 0; opacity: 0; transition: opacity 600ms ease; }
.shot.on { opacity: 1; }
.shot img { width: 100%; height: 100%; object-fit: cover; transform: scale(var(--k, 1)); transform-origin: var(--o, 50% 50%); will-change: transform; }
/* the real footage, drawn frame by frame by scrollfilm.js; the stills above stay only until it is ready */
.film-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 400ms; }
.film.has-footage .film-canvas { opacity: 1; }
.film.has-footage #shots { visibility: hidden; }
.shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0) 40%), linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0) 22%); }
.copy { position: absolute; left: 40px; top: 105px; width: 420px; opacity: 0; transform: translateY(14px); transition: opacity 500ms ease, transform 700ms var(--ease); pointer-events: none; }
.copy.on { opacity: 1; transform: none; pointer-events: auto; }
.copy .mono { color: rgba(255, 255, 255, 0.55); margin: 0 0 18px; font-size: 9px; }
.copy .mono.blue { color: var(--eyebrow); }
.copy h1, .copy h2 { margin: 0; font: 700 84px/0.92 var(--display); letter-spacing: -0.03em; color: var(--cream); }
.copy.small h2 { font-size: 60px; line-height: 0.95; color: var(--head); }
.copy p { margin: 18px 0 0; width: 360px; font-size: 12px; line-height: 1.6; color: rgba(255, 255, 255, 0.9); }
.copy .play { display: inline-flex; align-items: center; gap: 8px; margin-top: 40px; font-size: 12px; color: #fff; }
.copy .play i { width: 22px; height: 22px; border-radius: 50%; background: var(--blue); display: grid; place-items: center; }
.copy .play i::after { content: ""; border-left: 7px solid var(--blue-ink); border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent; margin-left: 2px; }
.card { position: absolute; padding: 14px 16px 16px; background: var(--card); border-radius: 6px; backdrop-filter: blur(6px); opacity: 0; transform: translateY(16px); transition: opacity 500ms ease, transform 700ms var(--ease); pointer-events: none; }
.card.on { opacity: 1; transform: none; pointer-events: auto; }
.card.right { left: 1063px; width: 330px; top: calc(100vh / var(--z) - 295px); }
.card.left { left: 44px; width: 316px; top: calc(100vh / var(--z) - 206px); }
.card .mono { margin: 0 0 8px; color: rgba(255, 255, 255, 0.6); font-size: 8px; }
.card h3 { margin: 0; font: 700 30px/1 var(--display); letter-spacing: -0.02em; color: var(--head); }
.card.left h3 { font-size: 20px; }
.card .tag { margin: 6px 0 0; font-size: 10px; color: rgba(255, 255, 255, 0.85); }
.card .rule { height: 1px; margin: 14px 0 12px; background: rgba(255, 255, 255, 0.1); }
.card dl { display: grid; grid-template-columns: 1fr 1fr auto; margin: 0; }
.card dt { font: 500 7px/1 var(--mono); letter-spacing: 0.2em; color: rgba(255, 255, 255, 0.55); text-transform: uppercase; }
.card dd { margin: 6px 0 0; font: 600 15px/1 var(--sans); color: #fff; }
.card .spec { margin: 10px 0 0; font: 500 7px/1.4 var(--mono); letter-spacing: 0.2em; color: rgba(255, 255, 255, 0.5); text-transform: uppercase; }
.card .pill { margin-top: 16px; height: 30px; padding: 0 16px; font-size: 10px; }

/* ---------- sections ---------- */
.sec { position: relative; width: 900px; margin: 0 0 0 268px; }
.sec .lede { margin: 12px 0 0; width: 440px; font-size: 12px; line-height: 1.65; color: var(--text); }

/* 2. vault */
#vault { padding-top: 65px; }
.vault-grid { position: relative; height: 326px; margin-top: 30px; }
.rows { position: absolute; left: 2px; top: 23px; width: 435px; }
.row { position: relative; height: 65px; margin-bottom: 13px; border-radius: 12px; border: 1px solid var(--line); background: #070809; }
.row .mono { position: absolute; left: 14px; top: 28px; font-size: 7px; }
.row button.step { position: absolute; top: 17px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.22); background: transparent; color: #cfd3da; cursor: pointer; display: grid; place-items: center; transition: background 150ms; }
.row button.step:hover { background: rgba(255, 255, 255, 0.08); }
.row button.prev { left: 77px; } .row button.next { left: 390px; }
.row output { position: absolute; left: 120px; right: 60px; top: 21px; text-align: center; font: 700 17px/1 var(--sans); color: #fff; }
.open-vault { position: absolute; left: 2px; top: 261px; width: 435px; height: 47px; font-size: 12px; }
.vault { position: absolute; left: 469px; top: 0; width: 428px; height: 326px; border-radius: 14px; border: 1px solid var(--line); overflow: hidden; background: radial-gradient(60% 60% at 50% 50%, #18191b 0%, #0b0b0c 100%); }
.vault .seam { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: rgba(255, 255, 255, 0.07); }
.vault .door { position: absolute; top: 0; bottom: 0; width: 50%; background: radial-gradient(120% 60% at 100% 50%, #18191b, #0b0b0c); transition: transform 900ms var(--ease); z-index: 2; }
.vault .door.l { left: 0; } .vault .door.r { right: 0; background: radial-gradient(120% 60% at 0% 50%, #18191b, #0b0b0c); }
.vault.open .door.l { transform: translateX(-101%); } .vault.open .door.r { transform: translateX(101%); }
.vault .ring { position: absolute; z-index: 3; left: 148px; top: 97px; width: 132px; height: 132px; border-radius: 50%; border: 8px solid #5c5c5c; transition: opacity 400ms ease 500ms; }
.vault .ring i { position: absolute; right: -16px; top: 55px; width: 22px; height: 6px; border-radius: 2px; background: #c9ccd1; }
.vault .ring.spin { animation: spin 900ms var(--ease); }
@keyframes spin { to { transform: rotate(270deg); } }
.vault.open .ring { opacity: 0; }
.vault .locked { position: absolute; z-index: 3; left: 0; right: 0; bottom: 18px; text-align: center; font-size: 7px; transition: opacity 300ms; }
.vault.open .locked { opacity: 0; }
.vault .match { position: absolute; inset: 0; }
.vault .match img { width: 100%; height: 100%; object-fit: cover; }
.vault .match::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0) 45%); }
.vault .match div { position: absolute; z-index: 1; left: 14px; bottom: 18px; }
.vault .match .mono { font-size: 7px; color: rgba(255, 255, 255, 0.6); }
.vault .match b { display: block; margin-top: 4px; font: 700 24px/1.1 var(--display); color: #fff; letter-spacing: -0.01em; }
.vault .match span { font-size: 11px; color: rgba(255, 255, 255, 0.8); }

/* 3. drag race */
#race { padding-top: 220px; }
.lanes-head { display: flex; gap: 10px; align-items: flex-end; margin-top: 20px; }
.lanes-head label { display: grid; gap: 7px; width: 398px; }
.lanes-head label .mono { font-size: 7px; }
select { appearance: none; height: 40px; padding: 0 30px 0 14px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.18); background: #060708 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23aaa' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 12px center; color: #fff; font: 500 13px/1 var(--sans); letter-spacing: -0.01em; width: 100%; }
.race-btn { width: 82px; height: 43px; background: var(--race); color: #cfe0f5; font-size: 12px; }
.lights { display: flex; align-items: center; gap: 8px; margin: 22px 0 10px 4px; }
.lights i { width: 10px; height: 10px; border-radius: 50%; background: #2b2e2a; transition: background 150ms; }
.lights i.on { background: var(--green); }
.lights .mono { margin-left: 14px; font-size: 8px; }
.lane { position: relative; height: 53px; margin-bottom: 10px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.1); background: #060708 repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 30px); overflow: hidden; }
.lane .finish { position: absolute; left: 93%; top: 0; bottom: 0; border-left: 2px dashed rgba(255, 255, 255, 0.55); }
.lane .racer { position: absolute; left: 0; top: 6px; height: 40px; width: 96px; transform: translateX(var(--x, 0px)); }
.lane .racer img { height: 100%; width: auto; transform: scaleX(-1); filter: drop-shadow(-14px 0 10px rgba(80, 140, 255, 0.45)); }
.lane .who { position: absolute; left: calc(93% + 10px); top: 22px; font-size: 7px; }
.results { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.result { height: 56px; padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.1); background: #060708; transition: border-color 300ms; }
.result.win { border-color: var(--chip-line); }
.result b { display: block; font: 700 15px/1.2 var(--display); color: #fff; letter-spacing: -0.01em; }
.result .mono { font-size: 7px; }
.foot-note { margin-top: 12px; font-size: 6.5px; color: rgba(255, 255, 255, 0.45); }

/* 4. payment */
#pay { padding-top: 220px; }
.pay-grid { position: relative; height: 360px; margin-top: 30px; }
.pay-left { position: absolute; left: 2px; top: 0; width: 455px; height: 360px; padding: 23px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); }
.pay-right { position: absolute; left: 485px; top: 0; width: 415px; height: 360px; padding: 23px; border-radius: 16px; border: 1px solid rgba(110, 160, 210, 0.35); background: linear-gradient(180deg, #0b1622, #06080b); }
.field-label { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 8px; }
.field-label .mono { font-size: 7px; }
.field-label output { font: 600 13px/1 var(--sans); color: #fff; }
.pay-left select { margin-bottom: 26px; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; margin: 4px 0 28px; border-radius: 2px; background: linear-gradient(90deg, var(--fill) var(--p, 40%), var(--track) var(--p, 40%)); cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--fill); border: 2px solid #0a0b0d; box-shadow: 0 0 0 1px var(--fill); }
input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--fill); border: 2px solid #0a0b0d; }
.terms { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 24px; }
.terms label input { position: absolute; opacity: 0; }
.terms label span { display: grid; place-items: center; height: 38px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.16); background: #070809; font: 600 11px/1 var(--sans); color: #fff; cursor: pointer; letter-spacing: -0.01em; }
.terms label input:checked + span { border-color: var(--chip-line); background: var(--chip-fill); }
.terms label input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.big { margin: 6px 0 12px; font: 700 58px/1 var(--display); letter-spacing: -0.03em; color: #fff; font-variant-numeric: tabular-nums; }
.big small { font: 500 20px/1 var(--sans); color: rgba(255, 255, 255, 0.7); margin-left: 2px; }
.summary { margin: 0 0 18px; font-size: 7px; line-height: 1.7; }
.pay-right label { display: grid; gap: 7px; margin-bottom: 12px; }
.pay-right label .mono { font-size: 7px; }
.pay-right input:not([type="range"]) { height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.14); background: #050607; color: #fff; }
.pay-right .pill { width: 100%; height: 47px; margin-top: 4px; }
.err { color: #ff9b8f; font-size: 10px; }
.done { margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: rgba(98, 174, 240, 0.12); border: 1px solid rgba(98, 174, 240, 0.4); font-size: 11px; color: #fff; }

/* 5. still on the lot */
#lot { padding-top: 180px; }
.lot { display: grid; grid-template-columns: repeat(4, 216px); gap: 12px; margin: 26px 0 0 2px; padding: 0; list-style: none; }
.lot li { height: 222px; border-radius: 10px; border: 1px solid var(--line); background: #0b0c0e; overflow: hidden; transition: transform 200ms var(--ease), border-color 200ms; }
.lot li:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.25); }
.lot img { width: 100%; height: 160px; object-fit: cover; }
.lot b { display: block; margin: 12px 14px 0; font: 700 14px/1.2 var(--display); color: #fff; letter-spacing: -0.01em; }
.lot span { display: block; margin: 4px 14px 0; font-size: 12px; color: rgba(255, 255, 255, 0.7); }

/* footer */
.footer { margin-top: 84px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.footer .inner { display: flex; justify-content: space-between; width: 955px; margin-left: 242px; padding: 40px 0 46px; font-size: 12px; color: rgba(255, 255, 255, 0.8); letter-spacing: -0.01em; }
.footer b { color: #fff; }

/* ---------- phones ---------- */
@media (max-width: 899px) {
  .site, .top { width: 100%; zoom: 1; }
  .top { height: 60px; background: linear-gradient(180deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0)); }
  .logo { left: 18px; top: 18px; }
  .top nav { display: none; }
  .call { left: auto; right: 16px; top: 14px; width: auto; height: 34px; padding: 0 14px; }
  .stage { height: 100vh; }
  .copy { left: 18px; right: 18px; width: auto; top: 96px; }
  .copy h1, .copy h2 { font-size: 46px; }
  .copy.small h2 { font-size: 38px; }
  .copy p { width: auto; }
  .card.right, .card.left { left: 12px; right: 12px; width: auto; top: auto; bottom: 18px; }
  .card h3 { font-size: 24px; }
  .sec { width: auto; margin: 0 18px; }
  .h2 { font-size: 34px; }
  .sec .lede { width: auto; }
  #vault { padding-top: 90px; }
  .vault-grid, .pay-grid { height: auto; display: grid; gap: 16px; }
  .rows, .open-vault, .vault, .pay-left, .pay-right { position: relative; left: auto; top: auto; width: 100%; }
  .rows { order: 2; }
  .open-vault { order: 3; }
  .vault { order: 1; height: 280px; }
  .vault .ring { left: calc(50% - 66px); top: 70px; }
  .row button.prev { left: 70px; } .row button.next { left: auto; right: 14px; }
  .row output { left: 108px; right: 52px; font-size: 15px; }
  #race, #pay, #lot { padding-top: 110px; }
  .lanes-head { flex-wrap: wrap; }
  .lanes-head label { width: calc(50% - 5px); }
  .race-btn { width: 100%; }
  .lane .racer { width: 70px; height: 32px; top: 10px; }
  .results { grid-template-columns: 1fr; }
  .result { height: auto; }
  .pay-left, .pay-right { height: auto; }
  .big { font-size: 46px; }
  .lot { grid-template-columns: 1fr 1fr; margin-left: 0; }
  .lot li { height: auto; padding-bottom: 12px; }
  .lot img { height: 120px; }
  .footer .inner { width: auto; margin: 0 18px; flex-direction: column; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation: none !important; }
}

/* the vault's best match opens its car page (14/11/2026) */
.match-link { display: contents; color: inherit; }
.match-link:hover b { color: var(--blue); }
