/* The showcases carousel (js/carousel.js, index.html #showcases): the three automations at work, one slide in view at a
   time. The track is a horizontal scroll-snap row, so a touch or trackpad swipe is the browser's own; a mouse drags it
   (is-free lifts the snap while a drag or a move is under way). Every slide stretches to the tallest, so the section
   keeps one height whichever shows, and nothing in it is ever the page's scroll anchor. Under the slides (over them on a
   phone) one quiet row: the rotation control, then a story segment per slide (its app's icon, its name, a bar that
   fills over its loop). */
.car { display: flex; flex-direction: column; padding-block: var(--sp-48); overflow-anchor: none; }
.car-track {
  order: 1; display: flex;
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; overflow-anchor: none;
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.car-track::-webkit-scrollbar { display: none; }
.car-track.is-free { scroll-snap-type: none; }
.car-track.is-drag { cursor: grabbing; user-select: none; -webkit-user-select: none; }
/* a slide is the track's width; its padding holds the tilted board and its shadow, and it clips there, so a neighbour's
   shadow never shows at the edge of the one in view */
.car-slide { flex: 0 0 100%; min-width: 0; padding-block: var(--sp-48); overflow: clip; scroll-snap-align: start; scroll-snap-stop: always; }

/* the controls: shown only once js/carousel.js can drive them */
.car-ctl { order: 2; display: flex; align-items: center; gap: var(--sp-16); }
html:not(.js) .car-ctl { display: none; }
.car-play { flex: none; display: grid; place-items: center; width: var(--tap); height: var(--tap); padding: 0; border: var(--hair) solid var(--sel); border-radius: 50%; background: var(--surface); color: var(--ink); transition: background-color var(--d-fast) var(--ease-std); }
.car-play:hover { background: var(--ground); }
.car-play svg { width: var(--ic-s); height: var(--ic-s); fill: currentColor; }
.car-play .car-i-play, .car-play.is-stopped .car-i-pause { display: none; }
.car-play.is-stopped .car-i-play { display: block; }
.car-play[hidden] { display: none; }
.car-segs { flex: 1; min-width: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--sp-16); }
.car-seg { display: grid; align-content: center; gap: var(--sp-8); min-width: 0; min-height: var(--tap); padding: 0; border: 0; background: none; text-align: left; color: var(--muted); font-size: var(--fs-meta); line-height: var(--lh-meta); font-weight: 600; transition: color var(--d-fast) var(--ease-std); }
.car-seg:hover, .car-seg[aria-current="true"] { color: var(--ink); }
.car-name { display: flex; align-items: center; gap: var(--sp-6); min-width: 0; white-space: nowrap; }
.car-name img { flex: none; width: var(--ic-s); height: var(--ic-s); }
.car-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* the story bar: the hairline track, filled in ink to how far the slide's loop has played (written each frame) */
.car-bar { display: block; height: var(--car-seg); border-radius: var(--r-pill); background: var(--sel); overflow: hidden; }
.car-bar i { display: block; height: 100%; background: var(--ink); transform-origin: left; transform: scaleX(0); }

/* a phone: the board alone fills the screen, so the row moves over the slides (where a story's segments sit) and stays
   in view with the slide's title */
@media (max-width: 640px) {
  .car { padding-block: var(--sp-32); }
  .car-slide { padding-block: var(--sp-16) var(--sp-32); }
  .car-ctl { order: 0; gap: var(--sp-12); }
  .car-segs { gap: var(--sp-12); }
  .car-more { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .car-bar i, .car-seg, .car-play { transition: none; }
}
