/* The references page. It sits on the landing page's styles (landing.css) and adds only what is new here. */

/* Hero: the landing hero, with a tilted wall of well-known clients where the landing page has the phone */
header.rf-hero { padding-bottom: 88px; }
.rf-visual { padding: 24px 0 40px; }
.rf-collage { display: grid; grid-template-columns: repeat(4, 112px); gap: 14px; transform: perspective(1200px) rotateY(-14deg) rotateX(6deg) rotate(-4deg); }
.rf-collage span { display: grid; place-items: center; height: 88px; padding: 14px 16px; border-radius: 16px; background: #fff; box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .7); }
.rf-collage span:nth-child(odd) { transform: translateY(10px); }
.rf-collage span.is-dark { background: var(--ai-ink); }
.rf-collage img { max-width: 100%; max-height: 50px; object-fit: contain; }

/* Logo wall: logos come in every shape and colour, so each sits greyed on an equal tile and shows its colours on hover */
.rf .rf-logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.rf-logo { display: grid; place-items: center; height: 92px; padding: 14px 20px; border: 1px solid var(--ai-line); border-radius: 16px; background: #fff; transition: border-color .2s ease; }
.rf-logo.is-light { border-color: var(--ai-ink); background: var(--ai-ink); }
.rf-logo img { max-width: 100%; max-height: 56px; object-fit: contain; filter: grayscale(1); opacity: .75; transition: filter .2s ease, opacity .2s ease; }
.rf-logo:hover { border-color: var(--ai-ink); }
.rf-logo:hover img { filter: none; opacity: 1; }
.rf-show-all { position: absolute; opacity: 0; pointer-events: none; }

/* Sector filters: one radio per sector; the matching :has() rules are written by the template from the list of sectors */
.rf-filters { display: flex; gap: 8px; margin: 0 0 32px; padding: 0 0 4px; border: 0; overflow-x: auto; scrollbar-width: none; }
.rf-filters::-webkit-scrollbar { display: none; }
@media (hover: hover) { .rf-filters { scrollbar-width: thin; } }
/* Auto margins centre the row while it fits and let it scroll from the first pill once it does not */
.rf-filters label { flex: none; }
.rf-filters label:first-of-type { margin-left: auto; }
.rf-filters label:last-of-type { margin-right: auto; }
.rf-filters input { position: absolute; opacity: 0; pointer-events: none; }
.rf-filters label { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 9px 16px; border: 1px solid var(--ai-line); border-radius: 999px; background: #fff; font-size: 15px; font-weight: 700; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.rf-filters label:hover { border-color: var(--ai-ink); }
.rf-filters label span { min-width: 24px; padding: 1px 7px; border-radius: 999px; background: var(--ai-paper); font-size: 12px; text-align: center; }
.rf-filters input:checked + label { border-color: var(--ai-ink); background: var(--ai-ink); color: #fff; }
.rf-filters input:checked + label span { background: var(--ai-yellow); color: #111; }
.rf-filters input:focus-visible + label { outline: 3px solid var(--ai-ink); outline-offset: 2px; }
.rf .rf-more { display: none; }

.rf .rf-final-quote { margin-bottom: 0; font-family: Montserrat, sans-serif; font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; line-height: 1.35; color: #fff; text-wrap: balance; }
.rf-final-quote b { color: var(--ai-yellow); }
.rf .rf-final-title { margin-top: 48px; font-size: clamp(24px, 2.6vw, 32px); }

@media (max-width: 575.98px) {
    header.rf-hero { padding-bottom: 64px; }
    .rf-visual { padding: 8px 0 16px; }
    .rf-collage { grid-template-columns: repeat(4, 74px); gap: 8px; }
    .rf-collage span { height: 56px; padding: 8px; border-radius: 12px; }
    .rf-collage img { max-height: 36px; }
    .rf .rf-logos { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .rf-logo { height: 72px; padding: 10px 12px; border-radius: 12px; }
    .rf-logo img { max-height: 44px; }
    /* On a phone the wall would be over seventy rows long, so it opens with the first thirty */
    .rf-filters { margin: 0 -12px 24px; padding: 0 12px 4px; }
    /* A chosen sector is short enough to show whole, so only the full list is folded */
    .rf-wall:has(#rf-filter-all:checked) .rf-show-all:not(:checked) ~ .rf-logos .rf-logo:nth-child(n + 31) { display: none; }
    .rf .rf-wall:has(#rf-filter-all:checked) .rf-more { display: flex; justify-content: center; width: 100%; margin-top: 20px; border-color: var(--ai-ink); background: transparent; cursor: pointer; }
    .rf .rf-wall #rf-show-all:checked ~ .rf-more { display: none; }
    .rf-show-all:focus-visible ~ .rf-more { outline: 3px solid var(--ai-ink); outline-offset: 3px; }
}
