/* ============ GOOGLE REVIEW CAROUSEL ============
   The card, the track, the read-more and the arrows — everything the review
   carousel needs on EITHER ground. Built to the reference design Samuel
   supplied.

   WHY ITS OWN FILE. These rules were the second half of the "Gallery +
   Google reviews" block in home.css until 2026-12-01, when the footer took
   the same carousel. home.css is enqueued on the front page only, so the
   footer — which renders on every template — would have got naked markup
   everywhere else. The gallery deck, the score pill and the band's own
   layout stayed in home.css: those really are home-only.

   IT IS UNLAYERED, like home.css, and it is enqueued AFTER typography.css
   and BEFORE home.css. That keeps the cascade exactly as it was: unlayered
   still beats shared.css's @layer core and components.css's @layer
   components/utilities without specificity games, typography.css still
   loses ties to these rules, and home.css still wins ties against them —
   which is what .gr-gal's arrow overrides depend on.

   See template-parts/review-carousel.php for the markup and why it is one
   component rather than two. */

/* ---- the track ----
   Shared with the gallery deck on the home page, which overrides it from
   home.css at higher specificity (.gr-gal.is-live .gr-track--gal). */
.gr-track{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;scrollbar-width:none}
.gr-track::-webkit-scrollbar{display:none}
.gr-track:focus-visible{outline:2px solid var(--blue);outline-offset:3px}

/* The star row, used both by the home page's score pill and by every card. */
.gr-stars{color:var(--gold);letter-spacing:0.1em;font-size:0.92rem;line-height:1}

/* ---- the review carousel ----
   HOW MANY ARE IN VIEW IS ONE NUMBER, --gr-per, set per instance from the
   template (2 in the home page's half-width column, 3 across the footer).
   The gap is a variable for the same reason: the basis has to subtract the
   gaps between the visible cards, so the two were one setting written in
   two places, and the old hard-coded calc(50% - 0.375rem) silently stopped
   being right the moment either changed.

   They snap to START, not centre: with more than one in view, centring the
   active card leaves the row sitting lopsided, while start alignment lands
   a clean edge every time. The script reads that off data-gr-align rather
   than assuming centre — the gallery deck still centres, because it shows
   one. */
.gr-revs{position:relative}
.gr-track--rev{--gr-gap:0.75rem;align-items:stretch;gap:var(--gr-gap)}
.gr-card{flex:0 0 calc((100% - (var(--gr-per,2) - 1) * var(--gr-gap)) / var(--gr-per,2));scroll-snap-align:start;background:#f6f8fa;border:1px solid var(--line);padding:1.15rem 1.25rem;text-align:left}
.gr-who{display:flex;align-items:center;gap:0.7rem}
/* An initial, not an avatar. The review post type stores no photograph, and
   a generic silhouette would imply one is missing. The colour is set inline
   by the template, which cycles a palette chosen for the ground it is on. */
.gr-face{flex:none;width:38px;height:38px;border-radius:50%;display:grid;place-items:center;color:#fff;font-size:0.95rem;font-weight:600;line-height:1}
.gr-id{display:flex;flex-direction:column;gap:0.1rem;min-width:0}
.gr-id b{font-size:0.92rem;font-weight:600;color:var(--ink)}
.gr-when{font-size:0.74rem;color:var(--grey)}
.gr-stars--sm{font-size:0.8rem;display:block;margin:0.6rem 0 0.55rem}
.gr-card p{margin:0;font-size:0.88rem;line-height:1.65;color:#3d4145}
/* The clamp is behind .is-live deliberately. It HIDES TEXT, and the button
   that reveals it is added by the script — so if the script never runs, a
   clamp here would cost the reader the second half of every long review.
   Unclamped and un-toggled, the cards just run their full length. */
.gr-revs.is-live .gr-card p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:6;line-clamp:6;overflow:hidden}
/* display:block is what releases the clamp — -webkit-line-clamp only applies
   to a -webkit-box, so changing the display is cleaner than trying to unset
   the line count. */
.gr-revs.is-live .gr-card.is-open p{display:block;overflow:visible}
.gr-more{display:inline-flex;align-items:center;gap:0.35rem;margin-top:0.7rem;padding:0;border:0;background:none;font:inherit;font-size:0.8rem;font-weight:600;color:var(--blue);cursor:pointer}
.gr-more[hidden]{display:none}
.gr-more:hover{color:var(--blue-bright)}
.gr-more:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.gr-more-i{transition:transform .25s ease}
.gr-card.is-open .gr-more-i{transform:rotate(180deg)}

/* Round arrows against the card's edges, as in the reference. Hidden until
   the script claims them — the track swipes and scrolls without.

   -17px is half of the 34px button, so each one straddles the card border:
   half outside, half over the card. It clears the viewport because
   .container keeps clamp(1.2rem,4vw,3.5rem) of padding — never less than
   19.2px — so the outer half always has somewhere to sit. Change the button
   size and this has to move with it.

   Two earlier attempts are worth not repeating: left/right 4px put them
   squarely on top of the review text, and moving them below the track cost
   the home section its symmetry with the gallery beside it. */
.gr-nav{display:none;position:absolute;top:50%;transform:translateY(-50%);z-index:2;width:34px;height:34px;padding:0;border-radius:50%;border:1px solid var(--line);background:#fff;color:var(--blue);font-size:1.1rem;line-height:1;cursor:pointer;box-shadow:0 4px 14px rgba(8,36,63,0.12);transition:background .2s,color .2s,opacity .2s}
.gr-revs.is-live .gr-nav,
.gr-gal.is-live .gr-nav{display:block}
.gr-nav--prev{left:-17px}
.gr-nav--next{right:-17px}
.gr-nav:hover:not(:disabled){background:var(--blue);color:#fff}
.gr-nav:disabled{opacity:.3;cursor:default;box-shadow:none}
.gr-nav:focus-visible{outline:2px solid var(--blue);outline-offset:2px}

/* ============ THE DARK SKIN ============
   One modifier, for the footer's #0C2A47 ground. Everything structural is
   shared with the light carousel above; what changes is the card surface,
   the type colours and the arrows.

   THE CARD SURFACE IS TRANSLUCENT WHITE, not a second hard-coded navy. The
   footer ground is one colour today, but a panel mixed from the ground it
   sits on cannot drift away from it, and #f6f8fa's job here — lifting a
   quoted block off the page — is done just as well by a 5% white wash.

   The gold is the site's only accent and it is already the star colour, so
   "Read more" takes it rather than introducing a third. On white that
   control is --blue; gold on white would not pass contrast, which is why
   this is a skin and not a token swap. */
.gr-revs--dark .gr-card{background:rgba(255,255,255,0.055);border-color:rgba(255,255,255,0.14);padding:1rem 1.15rem}
/* FOUR LINES HERE, SIX ON THE HOME PAGE, and the cards came down by about
   fifty pixels on 2026-12-01 because of it.

   align-items:stretch means every card is as tall as the tallest, and the
   tallest is whichever one fills the clamp - so the clamp alone sets the
   height of the whole row. Six lines across the footer's full width is a
   lot of text: these cards are nearly twice the width of the home page's
   pair, so four lines here hold roughly what six hold there.

   Specificity is written out rather than relied on. This selector and
   .gr-revs.is-live .gr-card p above it would otherwise tie at 0-3-1 and be
   settled by source order, which is the sort of thing that breaks silently
   the day somebody moves a block. */
.gr-revs.gr-revs--dark.is-live .gr-card p{-webkit-line-clamp:4;line-clamp:4}
.gr-revs--dark .gr-id b{color:#fff}
.gr-revs--dark .gr-when{color:rgba(255,255,255,0.55)}
.gr-revs--dark .gr-card p{color:rgba(255,255,255,0.82)}
.gr-revs--dark .gr-more{color:var(--gold)}
.gr-revs--dark .gr-more:hover{color:#fff}
/* Only the colour changes — the shorthand above already set the width,
   style and offset, and these selectors are specific enough to win. */
.gr-revs--dark .gr-more:focus-visible,
.gr-revs--dark .gr-nav:focus-visible,
.gr-revs--dark .gr-track:focus-visible{outline-color:var(--gold)}
/* Outlined rather than solid white, which is the vocabulary the rest of the
   footer already uses for a control on this ground. Filling on hover is what
   makes them read as buttons; the drop shadow goes, because a shadow on a
   dark ground is invisible at best. */
.gr-revs--dark .gr-nav{background:transparent;border-color:rgba(255,255,255,0.3);color:#fff;box-shadow:none}
.gr-revs--dark .gr-nav:hover:not(:disabled){background:#fff;color:var(--blue);border-color:#fff}
.gr-revs--dark .gr-nav:disabled{opacity:.25}

/* ---- how many are in view ----
   Three abreast needs real room, so the footer's row steps down to two well
   before its cards get narrower than the home page's pair ever are, and the
   phone rule takes everything to one.

   WHY --gr-per IS SET ON THE WRAPPER AND OVERRIDDEN ON THE TRACK. The
   template writes it as an inline style, and no selector outruns an inline
   declaration — but it writes it on .gr-revs, and these rules declare it on
   .gr-track--rev INSIDE it. A value declared on an element always beats one
   inherited from its parent, whatever the parent's specificity was. Set
   inline on the track instead and nothing below could ever move it.

   That is also why .gr-track--rev above must NOT carry a --gr-per default:
   declaring it there would override the wrapper's value on every instance.
   The default lives in the var() fallback on .gr-card, which only applies
   when nothing up the tree set it at all. */
   WIDEST QUERY FIRST, NARROWEST LAST, and the phone rule is written as
   .gr-revs .gr-track--rev rather than .gr-track--rev on purpose. Both
   queries apply below 620px, and a bare .gr-track--rev would LOSE to
   .gr-revs--dark .gr-track--rev above it on specificity — the footer would
   sit at two cards on a phone while the home page went to one. Matching its
   specificity lets source order settle it, which is what the ordering rule
   is for. */
@media (max-width:1180px){
  .gr-revs--dark .gr-track--rev{--gr-per:2}
}
@media (max-width:620px){
  .gr-revs .gr-track--rev{--gr-per:1}
}
