/* ============================================================================
 * V17 REVIEWS  —  vertical infinite slider (Marven N3). priority 122.
 * Awwwards "vertical-reviews-infinite-slider-no-graphism": 2-3 columns of clean
 * typographic review cards scrolling slowly in alternating directions, pause on
 * hover, responsive, AA, palette-only. Replaces the horizontal marquee.
 * ========================================================================== */

/* doubled class (0,2,0) beats the legacy `main > section:nth-child()`
 * alternating-band rule (0,1,2): the reviews slider always owns charcoal,
 * whatever position it lands in, so its cream title/cards never invert. */
.v17-reviews.v17-reviews {
    background: var(--v17-charcoal);
    color: var(--v17-cream-90);
    padding-top: var(--v17-section-y);
    padding-bottom: var(--v17-section-y);
    overflow: hidden;
}
.v17-reviews__inner { text-align: center; }

.v17-reviews__header { margin: 0 auto clamp(2rem, 4vw, 3rem); max-width: 44rem; }
.v17-reviews__title {
    font-family: var(--v17-font-display);
    font-weight: 700;
    font-size: var(--v17-fs-h2);
    line-height: 1.0;
    letter-spacing: -0.02em;
    color: var(--v17-cream);
    margin: 0 0 0.9rem;
}
.v17-reviews__title em {
    font-style: italic;
    font-weight: 400;
    color: var(--v17-rose);
    padding-bottom: 0.04em;
}
.v17-reviews__aggregate {
    font-family: var(--v17-font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    color: var(--v17-cream-65);
    margin: 0;
}
.v17-reviews__aggregate-stars { color: var(--v17-jaune); margin-right: 0.5rem; letter-spacing: 0.08em; }

/* ---- the columns ---- */
.v17-reviews__cols {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(1rem, 1.6vw, 1.5rem);
    height: clamp(420px, 60vh, 560px);
    /* fade top + bottom so cards dissolve, no hard edge (no graphism) */
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 11%, #000 89%, transparent 100%);
            mask-image: linear-gradient(to bottom, transparent 0, #000 11%, #000 89%, transparent 100%);
}

.v17-reviews__col {
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 1.6vw, 1.5rem);
    will-change: transform;
    animation-duration: 64s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}
.v17-reviews__col--up   { animation-name: v17-rev-up; }
.v17-reviews__col--down { animation-name: v17-rev-down; }
.v17-reviews__col--mid  { animation-duration: 78s; }   /* vary the pace */

/* pause when the user hovers the whole field (read at leisure) */
.v17-reviews__cols:hover .v17-reviews__col,
.v17-reviews__col:focus-within { animation-play-state: paused; }

@keyframes v17-rev-up   { from { transform: translateY(0); }      to { transform: translateY(-50%); } }
@keyframes v17-rev-down { from { transform: translateY(-50%); }   to { transform: translateY(0); } }

/* ---- the card (quote, stars, author, date) ---- */
.v17-review-card {
    background: var(--v17-charcoal-soft);
    border: 1px solid var(--v17-line-dark);
    border-radius: var(--v17-r-card);
    padding: 1.5rem 1.5rem 1.35rem;
    text-align: left;
}
.v17-review-card__stars {
    color: var(--v17-jaune);
    font-size: 0.92rem;
    letter-spacing: 0.12em;
    margin: 0 0 0.75rem;
}
.v17-review-card__quote {
    margin: 0 0 1.1rem;
    font-family: var(--v17-font-sans);
    font-size: 1.02rem;
    line-height: 1.55;
    color: var(--v17-cream-90);
}
.v17-review-card__quote a,            /* the service the review mentions */
.v17-review-card__quote .v17-kw {
    color: var(--v17-rose);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid rgba(236,44,145,0.4);
}
.v17-review-card__quote a:hover { border-bottom-color: var(--v17-rose); color: var(--v17-rose-hover); }
.v17-review-card__author { display: flex; align-items: center; gap: 0.7rem; }
.v17-review-card__avatar {
    flex: 0 0 auto;
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 999px;
    background: var(--v17-rose-deep);   /* white initial on rose-deep = 5.2:1 AA */
    color: var(--v17-white);
    font-family: var(--v17-font-display);
    font-weight: 600;
    font-size: 1rem;
}
.v17-review-card__byline { display: flex; flex-direction: column; line-height: 1.25; }
.v17-review-card__name { font-weight: 600; color: var(--v17-cream); font-size: 0.95rem; }
.v17-review-card__meta { font-family: var(--v17-font-mono); font-size: 0.72rem; color: var(--v17-cream-65); letter-spacing: 0.02em; }

/* ---- tablet: 2 columns ---- */
@media (max-width: 1023px) {
    .v17-reviews__cols { grid-template-columns: repeat(2, 1fr); }
    .v17-reviews__col--hide-2 { display: none; }
}

/* ---- mobile: single column ---- */
@media (max-width: 639px) {
    .v17-reviews__cols { grid-template-columns: 1fr; height: clamp(380px, 64vh, 480px); }
    .v17-reviews__col--hide-1 { display: none; }
    .v17-review-card { padding: 1.25rem; }
    .v17-review-card__quote { font-size: 0.98rem; }
}

/* ---- reduced motion: stop the scroll, let the user scroll the field ---- */
@media (prefers-reduced-motion: reduce) {
    .v17-reviews__cols {
        height: auto;
        -webkit-mask-image: none; mask-image: none;
        grid-auto-rows: max-content;
    }
    .v17-reviews__col { animation: none; }
    /* show only the first (non-clone) set; hide duplicates */
    .v17-review-card[aria-hidden="true"] { display: none; }
}
