/* Owner 2026-11-22: the gallery as albums — round highlights (like Instagram) for the categories, the featured album as a
   wide banner, album cards that open like a folder (two more photos peek out behind the cover), and the album page with
   its story (a graduate's words) and captions. Builds on britishey.css tokens. */

.b-gal__empty { padding: 40px 0; color: var(--ink-soft); text-align: center; }

/* Round highlights */
.b-highlights { display: flex; gap: clamp(14px, 3vw, 28px); margin: 34px 0 6px; padding: 6px 2px 10px; overflow-x: auto; scrollbar-width: thin; scroll-snap-type: x proximity; }
.b-highlight { flex: 0 0 auto; display: grid; justify-items: center; gap: 8px; width: 92px; padding: 0; border: 0; background: none; color: var(--ink); font: 700 14px/1.25 var(--sans); text-align: center; cursor: pointer; scroll-snap-align: start; }
.b-highlight__ring { display: grid; place-items: center; width: 84px; height: 84px; padding: 3px; border-radius: 50%; background: conic-gradient(from 210deg, var(--red), var(--hi), var(--blue), var(--red)); transition: transform .2s ease; }
.b-highlight__ring > * { width: 100%; height: 100%; border: 3px solid #fff; border-radius: 50%; object-fit: cover; background: var(--feint); }
.b-highlight__all { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; overflow: hidden; background: #fff; }
.b-highlight__all img { width: 100%; height: 100%; object-fit: cover; }
.b-highlight[aria-pressed="false"] .b-highlight__ring { background: var(--rule); }
.b-highlight:hover .b-highlight__ring, .b-highlight:focus-visible .b-highlight__ring { transform: translateY(-3px) rotate(-3deg); }
.b-highlight:focus-visible { outline: none; }
.b-highlight:focus-visible .b-highlight__name { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 4px; }
.b-highlight[aria-pressed="true"] .b-highlight__name { color: var(--red); }
.b-highlight__name { max-width: 100%; }
.b-gal__lead { margin: 0 0 18px; color: var(--ink-soft); font-style: italic; font-family: var(--serif); font-size: 18px; }
.b-gal__lead:empty { margin: 0; }

/* The featured album */
.b-feature { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); margin: 18px 0 44px; overflow: hidden; border-radius: var(--r-l); background: var(--ink); color: #fff; box-shadow: 12px 12px 0 var(--red); }
.b-feature[hidden] { display: none; }
.b-feature__media { display: block; min-height: 340px; overflow: hidden; }
.b-feature__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.b-feature:hover .b-feature__media img { transform: scale(1.04); }
.b-feature__body { display: grid; align-content: center; justify-items: start; gap: 12px; padding: clamp(24px, 4vw, 44px); }
.b-feature__cat { padding: 4px 14px; border-radius: var(--r-s); background: var(--hi); color: var(--ink); font-size: 12.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; transform: skewX(var(--skew)); }
.b-feature__title { margin: 0; font: 400 clamp(28px, 3.2vw, 42px)/1.1 var(--serif); color: #fff; }
.b-feature__body p { margin: 0; color: var(--on-ink); line-height: 1.6; }
.b-feature__meta { font-size: 14px; font-weight: 700; color: var(--hi) !important; }

/* Album cards */
.b-albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 46px 34px; padding-top: 18px; }
.b-album[hidden] { display: none; }
.b-album__link { display: grid; gap: 22px; color: inherit; text-decoration: none; }
.b-album__frame { position: relative; display: block; }
.b-album__cover, .b-album__behind { aspect-ratio: 4 / 3; border: 6px solid #fff; border-radius: var(--r-m); }
.b-album__cover { position: relative; z-index: 2; display: block; overflow: hidden; background: var(--feint); box-shadow: 8px 8px 0 var(--shade); transition: transform .35s ease, box-shadow .35s ease; }
.b-album__cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.b-album__behind { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; box-sizing: border-box; object-fit: cover; box-shadow: 0 6px 18px rgba(20, 39, 74, .18); transition: transform .35s ease; }
.b-album__behind--1 { transform: rotate(-3deg) translate(-4px, 6px); }
.b-album__behind--2 { transform: rotate(3.5deg) translate(6px, 4px); }
.b-album__link:hover .b-album__behind--1, .b-album__link:focus-visible .b-album__behind--1 { transform: rotate(-9deg) translate(-26px, -10px); }
.b-album__link:hover .b-album__behind--2, .b-album__link:focus-visible .b-album__behind--2 { transform: rotate(9deg) translate(26px, -14px); }
.b-album__link:hover .b-album__cover, .b-album__link:focus-visible .b-album__cover { transform: translateY(-4px); box-shadow: 10px 10px 0 var(--red); }
.b-album:nth-child(3n + 2) .b-album__link:hover .b-album__cover { box-shadow: 10px 10px 0 var(--blue); }
.b-album__link:focus-visible { outline: none; }
.b-album__count { position: absolute; right: 10px; bottom: 10px; padding: 4px 11px; border-radius: 999px; background: var(--hi); color: var(--ink); font-size: 13px; font-weight: 800; }
.b-album__body { display: grid; gap: 6px; }
.b-album__cat { justify-self: start; color: var(--red); font-size: 12.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.b-album__title { font: 400 25px/1.2 var(--serif); color: var(--ink); }
.b-album__link:hover .b-album__title { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 5px; }
.b-album__text { display: -webkit-box; overflow: hidden; color: var(--ink-soft); line-height: 1.55; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.b-album__meta { color: var(--ink-soft); font-size: 13.5px; font-weight: 700; }

/* The album page */
.b-gal__back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; color: var(--blue); font-weight: 700; text-decoration: none; }
.b-gal__back:hover { color: var(--red); }
.b-story { display: grid; gap: 28px; margin-bottom: 40px; }
.b-story.has-quote { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.b-story__text { display: grid; justify-items: start; gap: 16px; }
.b-story__lead { margin: 0; font: 400 clamp(21px, 2.2vw, 27px)/1.45 var(--serif); color: var(--ink); }
.b-story__meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.b-story__meta li { padding: 5px 12px; border-radius: 999px; background: var(--blotter); border: 1px solid var(--rule); color: var(--ink); font-size: 14px; font-weight: 700; }
.b-story__quote { position: relative; margin: 0; padding: 28px 28px 22px; border-radius: var(--r-l); background: var(--blotter); border-left: 6px solid var(--hi); }
.b-story__quote::before { content: "\201C"; position: absolute; top: -18px; left: 18px; color: var(--red); font: 400 90px/1 var(--serif); }
.b-story__quote blockquote { margin: 0 0 16px; color: var(--ink); font: 400 19px/1.6 var(--serif); font-style: italic; }
.b-story__quote figcaption { display: flex; align-items: center; gap: 12px; }
.b-story__quote figcaption img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: 0 2px 8px var(--shade); }
.b-story__quote figcaption span { display: grid; }
.b-story__quote figcaption strong { color: var(--ink); font-family: var(--hand); font-size: 25px; line-height: 1.1; }
.b-story__quote figcaption small { color: var(--ink-soft); font-size: 13.5px; }
.b-gal__wall figcaption { margin-top: 8px; color: var(--ink-soft); font-size: 14.5px; line-height: 1.45; }
.b-lightbox__caption { margin: 0; padding: 12px 16px 0; color: #fff; text-align: center; font-size: 15px; }
.b-gal__more { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--rule); }
.b-gal__more .b-h2 { margin: 0 0 10px; font-size: clamp(28px, 3vw, 40px); }

/* On a course page */
.b-moments .b-albums { padding-top: 8px; }

@media (max-width: 860px) {
    .b-feature { grid-template-columns: minmax(0, 1fr); box-shadow: 8px 8px 0 var(--red); }
    .b-feature__media { min-height: 220px; aspect-ratio: 16 / 10; }
    .b-story.has-quote { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    .b-album__behind, .b-album__cover, .b-feature__media img, .b-highlight__ring { transition: none; }
}
