/* Accessible screenshot carousel (WAI-ARIA carousel pattern). Without JavaScript the slides simply stack, each with its caption, and nothing is hidden. With JavaScript
   (the script adds .is-carousel) one slide shows at a time; there is no autoplay. */
.carousel { margin: 32px 0; }
.carousel-track { display: block; }
.carousel-slide { margin: 0 0 32px; padding: 0; }
.carousel-slide .product-capture { margin: 0; }
.carousel-slide .product-capture + .product-capture { margin-top: 16px; }

.carousel.is-carousel .carousel-viewport { overflow: hidden; border-radius: 12px; touch-action: pan-y; }
.carousel.is-carousel .carousel-track { display: flex; transition: transform .35s ease; }
.carousel.is-carousel .carousel-slide { flex: 0 0 100%; min-width: 0; margin: 0; }
@media (prefers-reduced-motion: reduce) { .carousel.is-carousel .carousel-track { transition: none; } }

.carousel-controls { display: none; }
.carousel.is-carousel .carousel-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; }
.carousel-btn { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-light); background: var(--bg-card); color: var(--text-primary); font-size: 20px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.carousel-btn:hover:not(:disabled) { border-color: var(--accent); }
.carousel-btn:disabled { opacity: .4; cursor: default; }
.carousel-btn:focus-visible, .carousel-dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.carousel-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 0; }
.carousel-dot { width: 44px; height: 44px; background: transparent; border: 0; padding: 0; position: relative; cursor: pointer; }
.carousel-dot::before { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: transparent; border: 2px solid var(--text-secondary); box-sizing: border-box; }
.carousel-dot[aria-current="true"]::before { background: var(--accent); border-color: var(--accent); }
.carousel-count { color: var(--text-secondary); font-size: 14px; min-width: 4.5em; text-align: center; }
.carousel-slide-title { margin: 0 0 12px; color: var(--text-primary); font-size: 15px; font-weight: 600; }

/* previous and next sit over the left and right edges of the picture, so the slide can be changed without scrolling to the dots below */
.carousel-stage { position: relative; }
.carousel.is-carousel .carousel-stage > .carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; background: rgba(15,17,21,.72); color: #fff; border-color: rgba(255,255,255,.35); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.carousel.is-carousel .carousel-stage > .carousel-prev { left: 10px; }
.carousel.is-carousel .carousel-stage > .carousel-next { right: 10px; }
.carousel.is-carousel .carousel-stage > .carousel-btn:hover:not(:disabled) { background: rgba(15,17,21,.9); border-color: var(--accent); }
.carousel.is-carousel .carousel-stage > .carousel-btn:disabled { visibility: hidden; } /* on the first and last slide the arrow that goes nowhere is hidden, not left as a faded circle over the picture */
@media (max-width: 600px) { .carousel.is-carousel .carousel-stage > .carousel-prev { left: 6px; } .carousel.is-carousel .carousel-stage > .carousel-next { right: 6px; } }

/* On your phone: three phone-sized captures, side by side on a wide screen, a swipe row on a phone */
.phone-row { display: flex; gap: 24px; justify-content: center; align-items: flex-start; margin: 8px 0 12px; }
.phone-shot { margin: 0; flex: 0 1 280px; min-width: 0; }
.phone-shot img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: 22px; }
.phone-shot figcaption { margin-top: 10px; font-size: 13px; line-height: 1.5; color: var(--text-muted); text-align: center; }
.phone-note { margin: 12px 0 0; font-size: 13px; color: var(--text-muted); text-align: center; }
@media (max-width: 760px) {
  .phone-row { justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; gap: 16px; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
  .phone-shot { flex: 0 0 72%; scroll-snap-align: center; }
}

/* Home carousel on a phone: every slide gets the same tall picture frame (390 by 720), so the page does not jump in height as you swipe. */
@media (max-width: 700px) {
  .carousel-fixed .product-capture picture { display: block; aspect-ratio: 390 / 720; overflow: hidden; border-radius: 10px; background: var(--bg-card); }
  .carousel-fixed .product-capture img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
  .carousel-fixed .product-capture.fit-contain img { object-fit: contain; object-position: center; }
  .cap-wide { display: none; }
}

.cap-phone { display: none; }
@media (max-width: 700px) { .cap-phone { display: inline; } }

/* Hero showcase carousel inside the window frame */
.hero-showcase.carousel { margin: 18px auto 0; }
.hero-showcase.carousel .product-capture { margin: 0; }
.hero-showcase.carousel .product-capture img { border: 0; border-radius: 0; }
.hero-showcase.carousel .product-capture figcaption { margin-top: 0; }
.hero-showcase.carousel.is-carousel .carousel-viewport { border-radius: 0; }
.hero-showcase.carousel.is-carousel .carousel-controls { margin-top: 0; padding: 6px 14px 10px; background: #0d1117; border-top: 1px solid var(--border); }
.hero-showcase-title { white-space: nowrap; flex-shrink: 0; }
.hero-showcase-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.hero-showcase-tab { font: inherit; font-size: 11.5px; font-weight: 600; padding: 3px 8.5px; border-radius: 999px; border: 1px solid var(--border-light); background: transparent; color: var(--text-secondary); cursor: pointer; white-space: nowrap; }
.hero-showcase-tab:hover { border-color: var(--accent); color: var(--text-primary); }
.hero-showcase-tab[aria-pressed="true"] { background: var(--accent-dim); border-color: var(--accent-dim); color: #fff; }
.hero-showcase-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (min-width: 701px) {
  .hero-showcase.carousel .product-capture > picture,
  .hero-showcase.carousel .product-capture > img { display: block; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; background: #0d1117; }
  .hero-showcase.carousel .product-capture > img,
  .hero-showcase.carousel .product-capture > picture > img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
}
@media (max-width: 640px) {
  .hero-showcase-tabs { width: 100%; margin-left: 0; margin-top: 4px; }
}

/* Phone (700px and under): the nine tab pills and the nine dots would wrap into rows, so they are hidden; the slide changes with the arrows (moved out of the picture, either side of the "1 / 9" count) or a swipe. */
.carousel-btn-inline { display: none; }
@media (max-width: 700px) {
  .hero-showcase-tabs, .carousel-dots { display: none; }
  .carousel.is-carousel .carousel-stage > .carousel-btn { display: none; }
  .carousel.is-carousel .carousel-controls .carousel-btn-inline { display: inline-flex; }
  .carousel.is-carousel .carousel-controls { flex-wrap: nowrap; gap: 16px; }
  .carousel-btn-inline:disabled { visibility: visible; opacity: .35; }
}
