/* Shared by the homepage and /reviews/: stars, review cards, the moving columns, Read More, photo tiles and the two pop-ups.
   Uses the colour and spacing tokens each page defines in its own :root. Page-specific layout stays in the page. */

/* stars: a dim row of five with a filled row clipped on top, so 4.3 reads as 4.3 */
.rating { position: relative; display: inline-flex; width: fit-content; line-height: 0; }
.rating .row { display: inline-flex; gap: 3px; }
.rating svg { width: 20px; height: 20px; flex: none; }
.rating .base { color: rgba(207, 230, 215, .28); }
.rating .fill { position: absolute; inset: 0 auto 0 0; overflow: hidden; color: var(--amber); white-space: nowrap; }

/* review cards */
.card { break-inside: avoid; margin: 0 0 var(--s2); background: var(--card); border-radius: 16px; padding: 20px; box-shadow: var(--lift-1); }
.card .rating svg { width: 14px; height: 14px; }
.card .rating .row { gap: 2px; }
.card blockquote { margin-top: 10px; }
.card blockquote p { color: var(--ink); font-size: .95rem; line-height: 1.58; white-space: pre-line; }
.card footer { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px var(--s2); }
.card cite { font-style: normal; font-weight: 700; color: var(--green-ink); font-size: .9rem; }

/* long reviews show six lines while they move; Read More opens the whole thing */
.read-more { display: none; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--green-ink); font: inherit; font-weight: 600; font-size: .85rem; cursor: pointer; transition: border-color .2s ease, background-color .2s ease, transform .3s var(--spring); }
.read-more:hover { border-color: var(--ray); background: var(--chip-hover); transform: translateY(-1px); }
.read-more:active { transform: scale(.96); }
.mq-group .card.long blockquote p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; line-clamp: 6; overflow: hidden; }
.mq-group .card.long .read-more { display: inline-flex; }

/* moving columns: the cards drift up at slightly different speeds, two copies per column so the loop is seamless.
   Built by reviews.js; without it (or with reduced motion) the page's plain .cards columns show instead. */
.marquee { display: none; }
.wall.is-moving .cards { display: none; }
.wall.is-moving .marquee { display: flex; gap: var(--s2); height: var(--mq-height, min(940px, 86svh)); overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 8%, #000 92%, transparent); }
.mq-col { flex: 1 1 0; min-width: 0; }
.mq-track { display: flex; flex-direction: column; animation: mq-up var(--dur, 90s) linear infinite; }
.mq-group { display: flex; flex-direction: column; gap: var(--s2); padding-bottom: var(--s2); }
.mq-group .card { margin: 0; }
@keyframes mq-up { to { transform: translateY(-50%); } }
.marquee:hover .mq-track, .marquee:focus-within .mq-track, .marquee.is-paused .mq-track, .is-viewing .mq-track { animation-play-state: paused; }

.mq-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--green-ink); font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; box-shadow: var(--lift-1); transition: border-color .2s ease, background-color .2s ease, transform .3s var(--spring); }
.mq-toggle svg { width: 16px; height: 16px; flex: none; }
.mq-toggle:hover { border-color: var(--ray); background: var(--chip-hover); transform: translateY(-1px); }
.mq-toggle:active { transform: scale(.96); }
.mq-toggle .play, .mq-toggle[data-paused] .pause { display: none; }
.mq-toggle[data-paused] .play { display: inline; }
.mq-toggle[hidden] { display: none; }

/* customer photo tiles; tap opens the viewer */
.shot { position: relative; display: block; min-width: 0; min-height: 0; padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: zoom-in; background: var(--mist); }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease-out); }
.shot::before { content: ""; position: absolute; inset: 0; z-index: 1; background: #10504C; mix-blend-mode: multiply; opacity: .1; pointer-events: none; }
.shot::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(2, 18, 22, .3), transparent 45%); pointer-events: none; }
.shot:hover img { transform: scale(1.05); }
.shot:active img { transform: scale(1.02); transition-duration: .1s; }
.shot:focus-visible { outline-offset: -4px; z-index: 2; }

/* pop-ups: the photo viewer and the full text of a long review */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: #fff; overflow: hidden; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop, .readbox::backdrop { background: rgba(2, 18, 22, .9); }
.lightbox figure { margin: 0; display: grid; gap: 14px; justify-items: center; padding: 72px 16px 96px; max-width: 100%; }
@media (min-width: 640px) { .lightbox figure { padding: 72px 96px; } }
.lightbox img { display: block; max-width: min(1100px, 100%); max-height: calc(100dvh - 190px); width: auto; height: auto; border-radius: 12px; box-shadow: 0 2px 6px rgba(0, 0, 0, .3), 0 30px 60px -20px rgba(0, 0, 0, .6); }
@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] img, .readbox[open] { animation: pop-in .4s var(--ease-out); }
  @keyframes pop-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
}
.lightbox figcaption { max-width: 60ch; text-align: center; font-size: .97rem; line-height: 1.5; color: rgba(255, 255, 255, .86); }
.lightbox figcaption b { display: block; color: var(--mist); font-weight: 700; font-size: .88rem; margin-top: 4px; }
.lb-btn { position: fixed; z-index: 2; display: grid; place-items: center; width: 52px; height: 52px; border: 0; border-radius: 999px; cursor: pointer; color: #fff; background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .4); transition: background-color .2s ease, transform .35s var(--spring); }
.lb-btn svg { width: 22px; height: 22px; }
.lb-btn:hover { background: rgba(255, 255, 255, .22); }
.lb-btn:active { transform: scale(.92); transition-duration: .08s; }
.lb-btn[hidden] { display: none; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; margin-top: -26px; }
.lb-next { right: 16px; top: 50%; margin-top: -26px; }
@media (max-width: 639px) { .lb-prev, .lb-next { top: auto; bottom: 20px; margin-top: 0; } .lb-prev { left: calc(50% - 64px); } .lb-next { right: calc(50% - 64px); } }

.readbox { width: min(620px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); margin: auto; padding: 0; border: 0; border-radius: 22px; background: var(--card); color: var(--ink); overflow-y: auto; box-shadow: 0 2px 6px rgba(0, 0, 0, .2), 0 30px 60px -20px rgba(0, 0, 0, .55); }
.readbox .card { margin: 0; padding: var(--s4) var(--s3) var(--s3); background: none; box-shadow: none; outline: 0; }
@media (min-width: 640px) { .readbox .card { padding: var(--s4); } }
.readbox .card blockquote p { font-size: 1.06rem; line-height: 1.65; }
.readbox .card .rating svg { width: 16px; height: 16px; }
.rb-close { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 999px; cursor: pointer; color: var(--ink-2); background: transparent; transition: background-color .2s ease, color .2s ease, transform .35s var(--spring); }
.rb-close svg { width: 20px; height: 20px; }
.rb-close:hover { background: var(--chip-hover); color: var(--ink); }
.rb-close:active { transform: scale(.92); }

[data-theme="dark"] .card { outline: 1px solid rgba(207, 230, 215, .07); outline-offset: -1px; }
[data-theme="dark"] .card .rating .base { color: rgba(207, 230, 215, .2); }
[data-theme="dark"] .shot img { filter: brightness(.9); }
