/* scroll-stack.css — styles for the scroll-driven card stack (scroll-stack.js).
   Ported from the React Bits <ScrollStack /> component and themed to the site.
   Native-scroll version: the section scrolls with the page (no inner scroller),
   so we don't reproduce the source's overflow/height-100% wrapper. */

.scroll-stack {
  position: relative;
  width: 100%;
}
.scroll-stack-inner {
  /* Headroom above the first card and a tail below the last so the final pin
     releases cleanly. Tuned for the homepage rhythm rather than the source's
     20vh/50rem which assumed a dedicated full-screen scroller. */
  padding: 6vh 0 22vh;
}

.scroll-stack-card {
  position: relative;
  width: 100%;
  /* Cards overlap as they pin; each needs an opaque surface to cover the one
     behind it. */
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  /* Vertical gap between cards before they stack. */
  margin: 0 0 100px;
  transform-origin: top center;
  backface-visibility: hidden;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 320px;
}
.scroll-stack-card:last-of-type { margin-bottom: 0; }

.scroll-stack-card__img {
  position: relative;
  background: var(--surface-2);
  min-height: 320px;
}
.scroll-stack-card__img img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.scroll-stack-card__noimg {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.2em;
}
.scroll-stack-card__year {
  position: absolute;
  top: 16px; left: 16px;
  background: rgba(21,23,28,.78);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  border-radius: var(--r-pill);
}

.scroll-stack-card__body {
  padding: clamp(28px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
.scroll-stack-card__title {
  font-family: var(--font-disp);
  font-weight: 700;
  font-size: clamp(26px, 3vw, 40px);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1.02;
  color: var(--fg);
}
.scroll-stack-card__specs {
  display: flex; flex-wrap: wrap; gap: 8px 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--fg-2);
}
.scroll-stack-card__price {
  font-family: var(--font-disp);
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 30px);
  color: var(--accent);
}
.scroll-stack-card__price--muted { color: var(--muted); }
.scroll-stack-card__cta {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-2);
}

.scroll-stack-end { width: 100%; height: 1px; }

/* Stack the card halves on narrow screens. */
@media (max-width: 720px) {
  .scroll-stack-card { grid-template-columns: 1fr; min-height: 0; }
  .scroll-stack-card__img { min-height: 200px; aspect-ratio: 16/10; }
  .scroll-stack-inner { padding: 4vh 0 16vh; }
}
