/* The car for sale card with the monthly payment worked out from the deposit.
   A warm white card on a white page: the car drawn in fine lines with a soft floor shadow and a studio light that
   sweeps its paint, four specs, the price on reels, the deposit slider with the ticks that rise under the handle like
   under a lens, the monthly payment on rolling reels and the button that books the test drive. */
:root {
  --page: #ffffff;               /* the page */
  --card: #fbfaf8;               /* the body of the card */
  --ink: #18191b;                /* the words and the lines of the car */
  --muted: #7b7c80;              /* the small words */
  --faint: #c9c8c3;              /* the ticks at rest */
  --rule: rgba(24, 25, 27, 0.08);/* the hairlines */
  --accent: #1f6b52;             /* racing green: the slider, the badge, the booked state */
  --accent-soft: rgba(31, 107, 82, 0.12);
  --font: 'Mona Sans Variable', system-ui, sans-serif;
  --car-h: clamp(62px, 19vh, 118px);
  --gap: clamp(7px, 1.9vh, 14px);
}

* { box-sizing: border-box; }
html { touch-action: manipulation; }
html, body { margin: 0; overflow-x: clip; }
body {
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
p, h2, dl, dd { margin: 0; }

.stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(8px, 2.4vh, 28px) 12px;
  overflow: hidden;
}

.lot {
  position: relative;
  width: min(360px, 90vw);
  padding: clamp(11px, 2.6vh, 20px) clamp(13px, 4vw, 20px) clamp(11px, 2.6vh, 18px);
  border-radius: 24px;
  background:
    radial-gradient(130% 70% at 50% -10%, #ffffff 0%, rgba(255, 255, 255, 0) 60%),
    linear-gradient(180deg, #fdfcfb, var(--card));
  border: 1px solid rgba(24, 25, 27, 0.07);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 1) inset,
    0 0 0 0.5px rgba(24, 25, 27, 0.04),
    0 1px 2px rgba(24, 25, 27, 0.05),
    0 10px 24px -10px rgba(24, 25, 27, 0.14),
    0 34px 70px -30px rgba(24, 25, 27, 0.26);
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  isolation: isolate;
}
.lot__grain {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  opacity: 0.05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.9 0'/></filter><rect width='140' height='140' filter='url(%23n)'/></svg>");
}
/* the light on the top edge, which follows the pointer */
.lot__edge {
  position: absolute; left: 16px; right: 16px; top: -1px; height: 1px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(31, 107, 82, 0.55), rgba(31, 107, 82, 0));
  background-size: 160px 1px; background-repeat: no-repeat;
  background-position: var(--ex, 50%) 0;
  opacity: 0.8;
}

.lot__head { display: flex; align-items: center; justify-content: space-between; }
.lot__badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px 0 7px; border-radius: 99px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 11.5px; font-weight: 560; font-stretch: 104%; letter-spacing: 0.005em;
}
.lot__badge svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linejoin: round; stroke-linecap: round; }
.lot__save {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  border: 1px solid var(--rule); background: #fff;
  box-shadow: 0 1px 2px rgba(24, 25, 27, 0.06);
  transition: border-color 0.2s, background-color 0.2s;
}
.lot__save svg { width: 16px; height: 16px; fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round; transition: fill 0.25s, stroke 0.25s; }
.lot__save[aria-pressed='true'] svg { fill: var(--accent); stroke: var(--accent); }
@media (hover: hover) { .lot__save:hover { border-color: rgba(24, 25, 27, 0.18); } }

.car { position: relative; height: var(--car-h); margin: 0 -4px; }
.car__svg { display: block; width: 100%; height: 100%; overflow: visible; }
.car__paint { fill: url(#car-body); }
.car__glass { fill: url(#car-glass); opacity: 0.9; }
.car__glint { fill: none; stroke: rgba(255, 255, 255, 0.35); stroke-width: 4; stroke-linecap: round; }
.car__sweep { mix-blend-mode: normal; opacity: 0.9; }
.car__line { fill: none; stroke: var(--ink); stroke-width: 1.15; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.car__line--fine { stroke-width: 0.7; opacity: 0.55; }
.car__lamp { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }
.car__lamp--rear { stroke: #b6402e; }
.car__tyre { fill: #222326; }
.car__rim { fill: #eeeeeb; stroke: #9a9b9e; stroke-width: 0.6; }
.car__spokes path { stroke: #4a4b4f; stroke-width: 1.8; stroke-linecap: round; fill: none; }
.car__hub { fill: #2a2b2e; }
.car__floor { stroke: var(--rule); stroke-width: 1; vector-effect: non-scaling-stroke; }

.lot__title { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.lot__name { font-size: clamp(16px, 4.2vh, 19px); font-weight: 650; font-stretch: 96%; letter-spacing: -0.015em; line-height: 1.1; }
.lot__dealer { font-size: 12px; color: var(--muted); margin-top: 3px; }
.lot__price { font-size: clamp(17px, 4.6vh, 21px); font-weight: 640; letter-spacing: -0.02em; display: flex; align-items: baseline; white-space: nowrap; }
.cur { font-weight: 500; margin-right: 1px; }

.specs {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.spec { padding: clamp(6px, 1.6vh, 10px) 0 clamp(6px, 1.6vh, 10px) 9px; position: relative; overflow: hidden; }
.spec:first-child { padding-left: 0; }
.spec + .spec::before { content: ''; position: absolute; left: 0; top: 22%; bottom: 22%; width: 1px; background: var(--rule); }
.spec dt { font-size: 10.5px; color: var(--muted); letter-spacing: 0.01em; }
.spec dd { font-size: clamp(11.5px, 3.2vh, 13px); font-weight: 580; font-stretch: 92%; margin-top: 2px; white-space: nowrap; }

.fin { display: flex; flex-direction: column; gap: clamp(3px, 1vh, 6px); }
.fin__row { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; }
.fin__label { color: var(--muted); }
.fin__dep { font-weight: 600; }

.slider { position: relative; height: 26px; touch-action: none; }
.slider__ticks { position: absolute; left: 0; right: 0; top: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center; }
.slider__ticks i {
  display: block; width: 1px; height: 8px; border-radius: 1px; background: var(--faint);
  transform-origin: 50% 50%;
}
.slider__ticks i.is-major { height: 12px; }
.slider__ticks i.is-on { background: var(--accent); }
.slider__glow {
  position: absolute; top: 50%; left: 0; width: 90px; height: 40px; margin: -20px 0 0 -45px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(31, 107, 82, 0.18), rgba(31, 107, 82, 0));
}
.slider__thumb { position: absolute; top: 50%; left: 0; width: 0; height: 0; pointer-events: none; }
.slider__knob {
  position: absolute; left: -11px; top: -11px; width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(180deg, #ffffff, #f0f0ec);
  border: 1px solid rgba(24, 25, 27, 0.12);
  box-shadow: 0 1px 0 #fff inset, 0 2px 4px rgba(24, 25, 27, 0.12), 0 8px 16px -6px rgba(24, 25, 27, 0.28);
}
.slider__knob::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 2px;
  background: var(--accent); transform: rotate(45deg) scale(var(--k, 1));
}
.slider__input {
  position: absolute; inset: -6px -12px; width: calc(100% + 24px); height: calc(100% + 12px); margin: 0;
  opacity: 0; cursor: grab;
}
.slider__input:active { cursor: grabbing; }
.slider:has(.slider__input:focus-visible) .slider__knob { outline: 2px solid var(--accent); outline-offset: 2px; }

.fin__out { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.fin__monthly { display: flex; align-items: baseline; font-size: clamp(24px, 7vh, 32px); font-weight: 660; letter-spacing: -0.03em; line-height: 1; }
.fin__monthly .cur { font-size: 0.62em; margin-right: 2px; color: var(--muted); font-weight: 520; }
.fin__per { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 3px; letter-spacing: 0; }
.fin__terms { font-size: 11px; color: var(--muted); text-align: right; line-height: 1.4; }

/* the reels: every digit is a column of 0 to 9 that rolls; the edges fade like a drum seen from the side */
.reels { display: inline-flex; height: 1.12em; line-height: 1.12em; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
          mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent); }
.reel { display: inline-block; position: relative; height: 1.12em; overflow: hidden; }
.reel__col { display: flex; flex-direction: column; }
.reel__col span { height: 1.12em; display: block; text-align: center; }
.reel--sep { width: 0.28em; text-align: center; }

.lot__cta {
  position: relative; height: clamp(38px, 10vh, 46px); border-radius: 14px; overflow: hidden;
  background: linear-gradient(180deg, #2a2b2e, #151618);
  color: #f6f6f4; font-size: 13.5px; font-weight: 600; font-stretch: 100%;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.14) inset, 0 6px 14px -6px rgba(24, 25, 27, 0.5);
  display: grid; place-items: center;
  transition: font-stretch 0.35s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.lot__cta-fill { position: absolute; inset: 0; background: linear-gradient(180deg, #2a8466, var(--accent)); transform: scaleX(0); transform-origin: 0 50%; }
.lot__cta-text { grid-area: 1 / 1; position: relative; display: inline-flex; align-items: center; gap: 7px; }
.lot__cta-text--done { opacity: 0; }
.lot__cta-text--done svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .lot__cta:hover { font-stretch: 112%; } }
.lot__cta.is-hover { font-stretch: 112%; }
.lot__cta:focus-visible, .lot__save:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.pointer {
  position: absolute; left: 0; top: 0; width: 22px; height: 22px;
  fill: #18191b; stroke: #fff; stroke-width: 1.4; stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25));
  pointer-events: none; opacity: 0; z-index: 20;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
