/* ==========================================================================
   pds-testimonials — design-006: flat bone ground, heavy headline,
   a cascade of overlapping review windows with signals floating over it.

   The reference builds depth out of nothing but white panes on a warm
   off-white ground: no gradient, no glass, no glow. Each pane is a small
   window with its mark hard left and its label hard right, and each new one
   tucks over the last so the stack reads as a pile rather than a grid. Two
   badge pills and a tail-tag sit on top of the pile, and a hairline accent
   rule closes the section off.

   Only the composition is borrowed — the reference's red is replaced by the
   brand purple, with the stars staying on the system's gold.
   ========================================================================== */

.pds-quotes {
    position: relative;
    isolation: isolate;
    padding-block: var(--pds-section-y);
    overflow: hidden;

    /* How far each card climbs over the one before it. The Elementor control
       writes this; the fallback is what the section ships with. */
    --pds-q-overlap: 38px;

    /* Local palette. Kept on the section so the whole treatment can be
       retuned from one place instead of hunting rgba() literals. */
    --pds-q-edge: rgba(23, 9, 42, .07);
    --pds-q-edge-hi: rgba(106, 36, 140, .26);
    --pds-q-star: #F5A302;
    /* The pane shadow does the entire job of separating card from ground, so
       it is deeper and softer than the system default. */
    --pds-q-lift: 0 1px 2px rgba(23, 9, 42, .04), 0 26px 50px -20px rgba(23, 9, 42, .28);
    --pds-q-lift-hi: 0 2px 4px rgba(23, 9, 42, .05), 0 40px 70px -22px rgba(23, 9, 42, .34);
    --pds-q-tag: rgba(23, 9, 42, .62);
}

/* The rule the reference closes on. Full-bleed, so it reads as the seam
   between this section and the next rather than as a border on a box. */
.pds-quotes::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    inset-block-end: 0;
    block-size: 3px;
    background: var(--pds-purple);
    pointer-events: none;
}

.pds-quotes__body {
    display: flex;
    flex-direction: column;
    gap: clamp(2.5rem, 5vw, 4.25rem);
}

/* --- Head ------------------------------------------------------------------- */

.pds-quotes__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem clamp(2.5rem, 6vw, 5rem);
}

.pds-quotes__head-copy {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    /* Wide enough that the headline breaks where its own <br> says it does,
       instead of being folded a second time by the column. */
    flex: 1 1 30rem;
    max-inline-size: 46rem;
}

/* Heavier and tighter than the system's h2: in the reference the headline is
   the loudest thing on the page and the stack behind it is texture. */
.pds-quotes__title {
    font-size: clamp(2.25rem, 4.8vw, 4.25rem);
    font-weight: 800;
    line-height: .98;
    letter-spacing: -.045em;
}

/* The accent subline under the headline. Not .pds__lead: this one is a single
   coloured line, not a grey paragraph. */
.pds-quotes__lead {
    font-size: clamp(1.125rem, 1.7vw, 1.5rem);
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: -.015em;
    color: var(--pds-purple);
}

/* --- Google badge ------------------------------------------------------------- */

/* Flat white pane, same chrome as the review windows — the head's right side
   is empty in the reference, and this is what fills it without breaking the
   flat treatment. */
.pds-quotes__badge {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: .875rem 1rem;
    padding: 1.125rem 1.5rem;
    border: 1px solid var(--pds-q-edge);
    border-radius: var(--pds-r-lg);
    background: var(--pds-paper);
    box-shadow: var(--pds-q-lift);
}

.pds-quotes__badge-mark {
    display: grid;
    place-items: center;
    inline-size: 2.75rem;
    block-size: 2.75rem;
    border: 1px solid var(--pds-line);
    border-radius: 50%;
    background: var(--pds-paper);
}

.pds-quotes__badge-body {
    display: flex;
    flex-direction: column;
    gap: .1875rem;
    min-inline-size: 0;
}

.pds-quotes__badge-score {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0;
}

.pds-quotes__badge-score strong {
    font-family: var(--pds-display);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.03em;
    color: var(--pds-title);
}

.pds-quotes__badge-max {
    font-size: var(--pds-fs-small);
    color: var(--pds-muted);
}

.pds-quotes__badge-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .25rem .5rem;
    margin: 0;
    font-size: var(--pds-fs-small);
    color: var(--pds-body);
}

.pds-quotes__badge-source {
    font-weight: 600;
    color: var(--pds-title);
}

/* Separates source from count without an extra element. */
.pds-quotes__badge-source + span::before {
    content: "·";
    margin-inline-end: .5rem;
    color: var(--pds-muted);
}

.pds-quotes__badge-link {
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    /* render_link() prints the label before the icon; the reference leads with
       the glyph, so the row is reversed here rather than in the shared helper. */
    flex-direction: row-reverse;
    justify-content: center;
    gap: .5rem;
    padding: .625rem 1.125rem;
    border: 1px solid rgba(106, 36, 140, .18);
    border-radius: 999px;
    background: var(--pds-purple-wash);
    font-size: var(--pds-fs-small);
    font-weight: 600;
    color: var(--pds-purple-dark);
    text-decoration: none;
    transition: background .35s var(--pds-ease), border-color .35s var(--pds-ease),
                color .35s var(--pds-ease);
}

.pds-quotes__badge-link:hover,
.pds-quotes__badge-link:focus-visible {
    background: var(--pds-purple);
    border-color: var(--pds-purple);
    color: var(--pds-paper);
}

/* --- Stars --------------------------------------------------------------------- */

.pds-quotes__stars {
    display: inline-flex;
    gap: .125rem;
    color: var(--pds-q-star);
}

/* --- The cascade ----------------------------------------------------------------- */

.pds-quotes__stage {
    position: relative;
    /* The pile is deliberately narrower than the head. It keeps the cascade a
       column rather than a spread, and it is what creates the right-hand
       gutter the signal pills clip into — anchor them to the full content
       width instead and they float away from the cards entirely. */
    inline-size: min(100%, 60rem);
}

.pds-quotes__stack {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Each card is placed by three custom properties the widget writes inline:
   how far in from the stack's edge it sits, how far it is tipped, and where
   it lands in the pile. The offsets cycle, the z-index keeps climbing, so a
   card always tucks behind the one that follows it. */
.pds-quotes__slot {
    position: relative;
    z-index: var(--pds-q-z, 1);
    /* 50% wide against a widest offset of 32%: the pile reaches ~82% of the
       stage, so the right-hand gutter is narrower than the pills that sit in
       it and each one clips a card edge the way the reference's alerts do. */
    inline-size: clamp(15rem, 50%, 30rem);
    margin-inline-start: var(--pds-q-x, 0);
    rotate: var(--pds-q-r, 0deg);
}

/* The overlap only applies between cards, never above the first one. */
.pds-quotes__slot + .pds-quotes__slot {
    margin-block-start: calc(var(--pds-q-overlap) * -1);
}

/* The featured review closes the pile: wider, square to the page and with
   nothing on top of it. */
.pds-quotes__slot--feature {
    inline-size: clamp(17rem, 60%, 34rem);
    margin-inline-start: 10%;
    rotate: 0deg;
}

/* --- Review window ---------------------------------------------------------------- */

.pds-quotes__card {
    display: flex;
    flex-direction: column;
    block-size: 100%;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--pds-q-edge);
    border-radius: var(--pds-r-lg);
    background: var(--pds-paper);
    box-shadow: var(--pds-q-lift);
    transition: border-color .4s var(--pds-ease), box-shadow .5s var(--pds-ease-out),
                transform .5s var(--pds-ease-out);
}

/* Lifting the card, not the slot: the slot carries the reveal transform and
   the cascade's rotation, and a hover must not fight either. */
.pds-quotes__card:hover {
    border-color: var(--pds-q-edge-hi);
    box-shadow: var(--pds-q-lift-hi);
    transform: translateY(-6px);
}

/* The window chrome: mark hard left, label hard right, hairline underneath. */
.pds-quotes__card-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .875rem 1.125rem;
    border-block-end: 1px solid var(--pds-line);
}

.pds-quotes__card-id {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .0625rem;
    min-inline-size: 0;
    text-align: end;
}

.pds-quotes__card-name {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
}

.pds-quotes__card-name strong {
    font-family: var(--pds-display);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -.015em;
    color: var(--pds-title);
}

.pds-quotes__card-source {
    flex: none;
}

.pds-quotes__card-place {
    font-size: var(--pds-fs-eyebrow);
    line-height: 1.4;
    color: var(--pds-muted);
}

.pds-quotes__avatar {
    display: grid;
    place-items: center;
    flex: none;
    inline-size: 2.25rem;
    block-size: 2.25rem;
    border-radius: 50%;
    overflow: hidden;
    background: var(--pds-purple-wash);
    box-shadow: inset 0 0 0 1px var(--pds-line);
}

.pds-quotes__avatar img {
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
    display: block;
}

.pds-quotes__avatar--initial {
    font-family: var(--pds-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--pds-purple-dark);
}

.pds-quotes__card-body {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    flex: 1;
    padding: clamp(1.125rem, 1.8vw, 1.5rem);
    /* The next card in the pile lands inside this padding, so the overlap eats
       white space rather than the last line of the review. */
    padding-block-end: clamp(2.25rem, 2.8vw, 3rem);
}

.pds-quotes__card blockquote {
    margin: 0;
    font-size: var(--pds-fs-small);
    line-height: 1.6;
    color: var(--pds-body);
    text-wrap: pretty;
}

/* --- Featured window --------------------------------------------------------------- */

.pds-quotes__card--feature .pds-quotes__mark {
    display: grid;
    place-items: center;
    flex: none;
    inline-size: 2.25rem;
    block-size: 2.25rem;
    border-radius: 50%;
    background: var(--pds-orange-wash);
    color: var(--pds-orange-ink);
}

.pds-quotes__feature-media {
    aspect-ratio: 16 / 9;
    background: var(--pds-bone-deep);
}

.pds-quotes__feature-media video,
.pds-quotes__feature-media img {
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
    display: block;
}

.pds-quotes__card--feature blockquote {
    font-family: var(--pds-display);
    font-size: clamp(1.125rem, 1.9vw, 1.625rem);
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -.025em;
    color: var(--pds-title);
}

/* --- Signals over the cascade -------------------------------------------------------- */

/* An overlay rather than a flow item: the pills in the reference straddle the
   card edges, which nothing in normal flow can do. It never eats a click —
   the cards underneath stay hoverable. */
.pds-quotes__signals {
    position: absolute;
    inset: 0;
    z-index: 999;
    pointer-events: none;
}

.pds-quotes__pill {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .6875rem 1.125rem;
    border-radius: 999px;
    font-size: var(--pds-fs-small);
    font-weight: 600;
    letter-spacing: -.01em;
    white-space: nowrap;
}

.pds-quotes__pill-icon {
    flex: none;
}

.pds-quotes__pill--accent {
    background: var(--pds-purple);
    color: var(--pds-paper);
    box-shadow: 0 16px 32px -12px rgba(106, 36, 140, .55);
}

.pds-quotes__pill--soft {
    background: var(--pds-paper);
    border: 1px solid var(--pds-q-edge);
    color: var(--pds-title);
    box-shadow: var(--pds-q-lift);
}

/* Three anchors walking down the right-hand gutter, each just clipping the
   edge of the pile the way the reference's alerts clip the Copilot card.
   They stay on that side deliberately: the cards all start at the stage's left
   edge, so a left-anchored pill would have to cover a review to be seen.
   Only pills precede the tag, so nth-child is stable. */
.pds-quotes__pill:nth-child(1) {
    inset-block-start: 16%;
    inset-inline-end: 1%;
}

.pds-quotes__pill:nth-child(2) {
    inset-block-start: 41%;
    inset-inline-end: 7%;
}

.pds-quotes__pill:nth-child(3) {
    inset-block-start: 73%;
    inset-inline-end: 8%;
}

/* The tail-tag: a dark chip hanging off the bottom-left corner with its
   pointer growing up into the pile it labels. The reference drops its tag
   straight over a card; here it sits in the corner the cascade leaves empty,
   so a review never disappears behind decoration. */
.pds-quotes__tag {
    position: absolute;
    inset-block-end: -1.25rem;
    inset-inline-start: 2%;
    padding: .625rem 1.125rem;
    border-radius: 14px;
    background: var(--pds-q-tag);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    font-size: var(--pds-fs-small);
    font-weight: 600;
    color: var(--pds-on-ink);
    white-space: nowrap;
}

.pds-quotes__tag::before {
    content: "";
    position: absolute;
    inset-block-start: -7px;
    inset-inline-start: 1.5rem;
    inline-size: 0;
    block-size: 0;
    border-inline: 8px solid transparent;
    border-block-end: 8px solid var(--pds-q-tag);
}

/* --- Social rail ------------------------------------------------------------------ */

.pds-quotes__socials {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
}

.pds-quotes__socials-label {
    margin: 0;
    font-size: var(--pds-fs-eyebrow);
    font-weight: 600;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--pds-muted);
}

.pds-quotes__socials-list {
    display: flex;
    align-items: center;
    gap: .625rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pds-quotes__social {
    display: grid;
    place-items: center;
    inline-size: 3rem;
    block-size: 3rem;
    border: 1px solid var(--pds-q-edge);
    border-radius: 50%;
    background: var(--pds-paper);
    box-shadow: var(--pds-shadow-sm);
    color: var(--pds-purple);
    text-decoration: none;
    transition: background .35s var(--pds-ease), border-color .35s var(--pds-ease),
                transform .45s var(--pds-ease-out), color .35s var(--pds-ease);
}

.pds-quotes__social:hover,
.pds-quotes__social:focus-visible {
    background: var(--pds-purple-wash);
    border-color: var(--pds-q-edge-hi);
    color: var(--pds-purple-dark);
    transform: translateY(-3px);
}

/* --- Responsive -------------------------------------------------------------------- */

@media (max-width: 1099px) {

    .pds-quotes__slot {
        inline-size: clamp(16rem, 62%, 28rem);
    }

    .pds-quotes__slot--feature {
        inline-size: clamp(17rem, 78%, 34rem);
        margin-inline-start: 6%;
    }

    .pds-quotes__pill:nth-child(1) {
        inset-inline-end: 0;
    }
}

/* Below this there is no room to float anything over a card, so the pile
   straightens out and the signals drop back into the flow above it. */
@media (max-width: 899px) {

    .pds-quotes__head-copy {
        max-inline-size: none;
    }

    .pds-quotes__badge {
        inline-size: 100%;
    }

    .pds-quotes__stage {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .pds-quotes__stack {
        gap: 1rem;
    }

    .pds-quotes__slot,
    .pds-quotes__slot--feature {
        inline-size: 100%;
        margin-inline-start: 0;
        rotate: 0deg;
    }

    .pds-quotes__slot + .pds-quotes__slot {
        margin-block-start: 0;
    }

    .pds-quotes__signals {
        order: -1;
        position: static;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: .625rem;
        pointer-events: auto;
    }

    .pds-quotes__pill,
    .pds-quotes__tag {
        position: static;
        white-space: normal;
    }

    .pds-quotes__tag::before {
        display: none;
    }
}

@media (max-width: 599px) {

    .pds-quotes__badge {
        padding: 1rem 1.125rem;
        gap: .75rem;
    }

    .pds-quotes__badge-mark {
        inline-size: 2.5rem;
        block-size: 2.5rem;
    }

    /* Source and count stack at this width; the interpunct that separates them
       on one line would otherwise open the second one. */
    .pds-quotes__badge-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: .125rem;
    }

    .pds-quotes__badge-source + span::before {
        content: none;
        margin-inline-end: 0;
    }

    .pds-quotes__card-bar {
        padding: .75rem .875rem;
    }

    .pds-quotes__socials {
        justify-content: flex-start;
    }
}

/* The pile's depth is carried by shadow and overlap, not by motion. Where the
   viewer has asked for less of it, the hover lift stops with everything else. */
@media (prefers-reduced-motion: reduce) {

    .pds-quotes__card,
    .pds-quotes__social {
        transition: none;
    }

    .pds-quotes__card:hover,
    .pds-quotes__social:hover {
        transform: none;
    }
}
