/* Landing page.
 *
 * Visual-first: the product output IS the hero, and every section is
 * anchored to a real image produced by the real pipeline. Text exists to
 * label what you are already looking at. */

.shell { max-width: 1140px; margin: 0 auto; padding: 0 max(var(--gutter), var(--safe-l)) 0 max(var(--gutter), var(--safe-r)); }
.shell.narrow { max-width: 760px; }


/* ---------- hero ---------- */
.hero { padding: clamp(var(--s-6), 5vw, var(--s-8)) 0 clamp(var(--s-7), 6vw, var(--s-9)); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; gap: clamp(var(--s-6), 5vw, var(--s-8)); align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.15fr .85fr; } }
/* The compare is a picture beside the words, not the whole fold. */
.compare { max-width: 440px; width: 100%; margin-inline: auto; }
@media (min-width: 900px) { .compare { justify-self: end; } }

.hero h1 {
  font-size: clamp(2.4rem, 6.4vw, 4rem);
  letter-spacing: -.04em;
  line-height: 1.02;
  max-width: 13ch;
}
.hero .lede {
  margin-top: var(--s-4);
  font-size: clamp(var(--t-md), 2.1vw, var(--t-lg));
  color: var(--ink-2);
  line-height: 1.45;
  max-width: 40ch;
}

/* ---------- before / after ---------- */
.compare {
  position: relative;
  margin: 0;
  aspect-ratio: 1;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--sunken);
  border: 1px solid var(--line);
  box-shadow: var(--sh-3);
  touch-action: pan-y;      /* let the page scroll; we only take the X */
  user-select: none;
  --split: 50%;
}
.compare img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* The "before" layer is FULL SIZE and clipped, not resized.
 *
 * Sizing it to the split width instead (width: var(--split) with
 * overflow hidden) squashes the photo to half scale, so the two halves
 * show the vehicle at different sizes and the comparison is a lie. It
 * looks approximately right at a glance, which is what makes it worth a
 * comment. clip-path leaves the image untouched and just hides part of
 * it. */
.cmp-clip {
  position: absolute; inset: 0;
  clip-path: inset(0 calc(100% - var(--split)) 0 0);
}

.compare input[type="range"] {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  margin: 0; padding: 0;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none; appearance: none;
  background: transparent;
}
.compare input[type="range"]:focus-visible ~ .cmp-handle { outline: 2px solid var(--accent); outline-offset: 3px; }

.cmp-handle {
  position: absolute; top: 50%; left: var(--split);
  translate: -50% -50%;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: var(--r-full);
  background: rgba(255,255,255,.92);
  color: #14171c;
  box-shadow: 0 2px 14px rgba(0,0,0,.45);
  pointer-events: none;
}
.cmp-handle svg { width: 20px; height: 20px; }
.cmp-handle::before,
.cmp-handle::after {
  content: ''; position: absolute; left: 50%; translate: -50% 0;
  width: 2px; height: 50vh;
  background: rgba(255,255,255,.75);
}
.cmp-handle::before { bottom: 100%; }
.cmp-handle::after { top: 100%; }

.cmp-tag {
  position: absolute; bottom: var(--s-4);
  padding: 4px var(--s-3);
  border-radius: var(--r-full);
  background: rgba(0,0,0,.62);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: var(--t-xs); font-weight: 650;
  pointer-events: none;
}
.cmp-tag-l { left: var(--s-4); }
.cmp-tag-r { right: var(--s-4); background: var(--accent); color: var(--accent-ink); }

/* ---------- blocks ---------- */
.block { padding: clamp(var(--s-7), 7vw, var(--s-9)) 0; }
.block.alt { background: var(--surface); border-block: 1px solid var(--line); }
.block h2, .closer h2 {
  font-size: clamp(1.75rem, 4.2vw, var(--t-2xl));
  letter-spacing: -.035em;
  line-height: 1.08;
}
.center-h { text-align: center; }

.shot { margin: 0; border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--sh-2); background: var(--surface); }
.shot img { width: 100%; height: auto; display: block; }
.shot.paper { background: #fff; }

/* ---------- pictures with a word under them ---------- */
figure.pic, .vars figure, .shapes figure, .duo figure { margin: 0; }
.vars figcaption, .shapes figcaption, .duo figcaption, .clips figcaption {
  margin-top: var(--s-2); font-size: var(--t-sm); color: var(--ink-2); text-align: center;
}
.vars img, .shapes img, .fleet img {
  width: 100%; height: auto; display: block;
  border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: var(--sh-2);
}

/* One car, eight looks: four across, two on a phone. */
.vars { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-4) var(--s-3); margin-top: clamp(var(--s-5), 4vw, var(--s-7)); }
@media (min-width: 720px) { .vars { grid-template-columns: repeat(4, 1fr); gap: var(--s-5) var(--s-4); } }

/* The three shapes: square and portrait at one height, the horizontal
   under both, as wide as the two together. */
.shapes { display: grid; grid-template-columns: 1.78fr 1fr; gap: var(--s-4); margin-top: clamp(var(--s-5), 4vw, var(--s-7)); align-items: start; }
.shapes .hz { grid-column: 1 / -1; }
@media (min-width: 860px) {
  .shapes { grid-template-columns: 1fr .5625fr 1.78fr; align-items: start; }
  .shapes .hz { grid-column: auto; }
}

/* The fleet: five squares across, a scrolling row on a phone. */
.fleet { display: flex; gap: var(--s-3); margin-top: clamp(var(--s-5), 4vw, var(--s-7)); overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: var(--s-2); scrollbar-width: none; }
.fleet::-webkit-scrollbar { display: none; }
.fleet img { flex: 0 0 62vw; max-width: 300px; scroll-snap-align: start; }
@media (min-width: 720px) { .fleet { display: grid; grid-template-columns: repeat(5, 1fr); overflow: visible; } .fleet img { max-width: none; } }

/* Three steps in a row, a line each. */
.steps { display: grid; gap: var(--s-6); }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); gap: var(--s-6); } }
.steps h3 { font-size: var(--t-md); letter-spacing: -.01em; margin-bottom: var(--s-1); }
.step-n {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: var(--r-full);
  background: var(--accent); color: var(--accent-ink);
  font-weight: 750; font-size: var(--t-base);
  margin-bottom: var(--s-3);
}

/* A picture under a heading. */
.block h2 + .shot, .block h2 + .vars, .block h2 + .shapes, .block h2 + .clips { margin-top: clamp(var(--s-5), 4vw, var(--s-7)); }
.paper-center { max-width: 560px; margin-inline: auto; }

/* ---------- spacing classes, in place of inline styles ---------- */
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }
.hero-note { margin-top: var(--s-4); }
.sub { margin-top: var(--s-4); }
.sub-sm { margin-top: var(--s-3); }
.closer-cta { margin-top: var(--s-5); }
.foot-row { gap: var(--s-5); }
.foot-brand { font-size: var(--t-base); }

/* The clip frames: a horizontal and a portrait, each as wide as it is. */
.clips { display: grid; gap: var(--s-4); margin-top: clamp(var(--s-5), 4vw, var(--s-7)); align-items: start; }
/* Widths in the ratio that makes a 16:9 and a 9:16 the same height. */
@media (min-width: 720px) { .clips { grid-template-columns: 3.16fr 1fr; align-items: stretch; } }
@media (max-width: 719px) { .clips .shot:last-child { max-width: 300px; margin-inline: auto; } }
.clips .shot { background: var(--surface); }

.claimrow { display: flex; flex-wrap: wrap; gap: var(--s-2); justify-content: center; margin-top: var(--s-6); }

/* ---------- closer ---------- */
.closer { padding: clamp(var(--s-7), 7vw, var(--s-9)) 0; border-top: 1px solid var(--line); }

footer { padding: var(--s-6) 0 calc(var(--s-7) + var(--safe-b)); border-top: 1px solid var(--line); color: var(--ink-3); }
footer a { color: var(--ink-2); }

