/* REVIEW CARDS */
.reviews__track {
  --per: 2;
  --gap: 28px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - var(--gap) * (var(--per) - 1)) / var(--per));
  gap: var(--gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  /* room for the card shadows (the scroller clips anything outside its padding) */
  padding: 10px 0 70px;
  margin-bottom: -50px;
}
.reviews__track::-webkit-scrollbar { display: none; }

.review {
  position: relative;
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
  /* the top padding leaves room for the heads that rise out of the tiles */
  padding: 66px 34px 36px;
  border-radius: 26px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015) 60%, rgba(255, 255, 255, 0.04)), #071427;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 30px 60px -40px rgba(0, 0, 0, 0.9);
  transition: translate 0.5s var(--ease-out), box-shadow 0.4s var(--ease);
}
.review:hover { translate: 0 -4px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 0 0 1px rgba(24, 205, 253, 0.22), 0 36px 70px -40px rgba(10, 77, 255, 0.55); }
/* a faint quote mark in the corner */
.review::before {
  content: "";
  position: absolute;
  top: 66px;
  right: 32px;
  width: 40px;
  height: 31px;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 50'%3E%3Cpath d='M0 50V30C0 13 9 3 26 0l3 7C19 10 14 16 14 24h13v26zm35 0V30C35 13 44 3 61 0l3 7c-10 3-15 9-15 17h13v26z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 50'%3E%3Cpath d='M0 50V30C0 13 9 3 26 0l3 7C19 10 14 16 14 24h13v26zm35 0V30C35 13 44 3 61 0l3 7c-10 3-15 9-15 17h13v26z'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0.16;
  pointer-events: none;
}

/* the client: photo tile, then name / role / logo / stars */
.review__by { display: flex; align-items: center; gap: 26px; margin-bottom: 28px; }
.review__who { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding-right: 44px; }
.review__who b { font-size: 26px; font-weight: 700; line-height: 1.15; letter-spacing: -0.5px; }
.review__role { margin-top: 4px; color: var(--text-3); font-size: 15px; line-height: 1.35; }
.review__logo { max-width: 130px; max-height: 30px; width: auto; height: auto; margin-top: 14px; opacity: 0.7; }
.review__stars { margin-top: 14px; color: var(--signal); font-size: 19px; letter-spacing: 3px; line-height: 1; }
.review blockquote { color: rgba(255, 255, 255, 0.86); font-size: 18px; line-height: 1.6; }

/* photo tile: the blue square in each photo becomes a rounded tile, the head rising out of it */
.review__tile { position: relative; flex: 0 0 auto; width: 170px; aspect-ratio: 393 / 350; }
.review__photo {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: auto;
  -webkit-mask:
    linear-gradient(#000 0 0) top / 100% var(--cut, 21.2%) no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 393 350' preserveAspectRatio='none'%3E%3Crect width='393' height='350' rx='30'/%3E%3C/svg%3E") bottom / 100% calc(100% - var(--cut, 21.2%) + 1px) no-repeat;
  mask:
    linear-gradient(#000 0 0) top / 100% var(--cut, 21.2%) no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 393 350' preserveAspectRatio='none'%3E%3Crect width='393' height='350' rx='30'/%3E%3C/svg%3E") bottom / 100% calc(100% - var(--cut, 21.2%) + 1px) no-repeat;
}

/* ---------- light mode ---------- */
[data-theme="light"] .review { background: #fff; box-shadow: inset 0 0 0 1px var(--line-card), 0 24px 50px -32px rgba(10, 40, 90, 0.4); }
[data-theme="light"] .review:hover { box-shadow: inset 0 0 0 1px rgba(10, 127, 230, 0.35), 0 30px 60px -32px rgba(10, 60, 160, 0.45); }
[data-theme="light"] .review blockquote { color: var(--text-2); }
[data-theme="light"] .review__logo { filter: brightness(0); opacity: 0.5; }

/* ---------- tablets: a smaller tile ---------- */
@media (max-width: 1024px) {
  .review__by { gap: 20px; }
  .review__tile { width: 130px; }
  .review__who b { font-size: 22px; }
  .review blockquote { font-size: 17px; }
}

/* ---------- phones: one card at a time ---------- */
@media (max-width: 767px) {
  .reviews__track { --per: 1; --gap: 16px; }
  .review { padding: 50px 22px 26px; border-radius: 22px; }
  .review::before { top: 50px; right: 22px; width: 30px; height: 23px; }
  .review__by { gap: 18px; margin-bottom: 22px; }
  .review__tile { width: 116px; }
  .review__who { padding-right: 0; }
  .review__who b { font-size: 20px; padding-right: 36px; }
  .review__role { font-size: 13px; }
  .review__logo { max-width: 100px; max-height: 24px; margin-top: 10px; }
  .review__stars { margin-top: 10px; font-size: 15px; letter-spacing: 2px; }
  .review blockquote { font-size: 16px; line-height: 1.55; }
}
