/* Adamas Digital — carousel.
   Built for the homepage testimonials, but nothing here names them: any track
   of equal-width slides works. The slide card keeps its own styling, so the
   carousel only ever owns layout and motion. */

.carousel { min-width: 0; }

/* The clip. Slides live outside it until they are the current one. */
.carousel-viewport {
  border-radius: 24px;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  align-items: stretch;
  transition: transform .65s cubic-bezier(.22, 1, .36, 1);
}

/* Basis rather than width, and shrink off: a flex item with content wider than
   its basis would otherwise be squeezed narrower than the viewport and the
   slides would drift out of step with the transform. */
.carousel-slide {
  flex: 0 0 100%;
  min-width: 0;
  max-width: 100%;
}

/* Match the card's own radius so the clip never cuts a visible corner. */
.carousel-slide > * { height: 100%; }

/* Dragging: kill the easing so the slide tracks the finger exactly, and stop
   the browser claiming the horizontal gesture for a page scroll. */
.carousel.is-dragging .carousel-track { transition: none; }
.carousel.is-dragging { cursor: grabbing; }
.carousel-viewport { touch-action: pan-y; }

/* ---- Controls ----------------------------------------------------------- */
.carousel-controls {
  align-items: center;
  gap: 18px;
  margin-top: 26px;
  display: flex;
}

.carousel-arrow {
  width: 44px;
  height: 44px;
  color: var(--paper);
  cursor: pointer;
  background: none;
  border: 1px solid #ffffff3d;
  border-radius: 50%;
  place-items: center;
  padding: 0;
  transition: background .25s, border-color .25s, transform .25s;
  display: grid;
}

.carousel-arrow:hover {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--blue);
  transform: translateY(-2px);
}

.carousel-arrow:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 3px;
}

.carousel-dots {
  align-items: center;
  gap: 9px;
  margin-right: auto;
  display: flex;
}

/* A wider bar for the current slide rather than a colour change alone —
   position stays readable when the two states sit side by side. */
.carousel-dot {
  width: 9px;
  height: 9px;
  cursor: pointer;
  background: #ffffff45;
  border: 0;
  border-radius: 999px;
  padding: 0;
  transition: width .35s cubic-bezier(.22, 1, .36, 1), background .25s;
}

.carousel-dot:hover { background: #ffffff85; }

.carousel-dot[aria-selected="true"] {
  width: 28px;
  background: var(--paper);
}

.carousel-dot:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 3px;
}

/* On a light ground the same controls need the ink palette. */
.section-light .carousel-arrow { color: var(--ink); border-color: var(--line); }
.section-light .carousel-arrow:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.section-light .carousel-dot { background: #0d0d0d2e; }
.section-light .carousel-dot[aria-selected="true"] { background: var(--ink); }

@media (max-width: 720px) {
  .carousel-controls { gap: 12px; margin-top: 20px; }
  .carousel-arrow { width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  /* Slides still change, they just stop sliding. site.js also skips autoplay,
     so nothing moves that the visitor did not ask to move. */
  .carousel-track { transition: none; }
  .carousel-dot { transition: none; }
}
