/* image-reel.css - the "reel" image block (image-reel.js): the home steps' track, caption and controls, sized for a content column */

.reel {
    --reel-card: 78%;
    --reel-gap: clamp(0.8rem, 1.8vw, 1.4rem);
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

/* one row of photos; the next one peeks in from the right */
.reel-track {
    list-style: none;
    display: flex;
    gap: var(--reel-gap);
    /* room on every side for the shadows, since the scroller clips them; the margin keeps the column edge */
    --reel-room: 22px;
    --reel-tail: 4.4rem;
    margin: 0 calc(-1 * var(--reel-room));
    padding: 1rem var(--reel-room) var(--reel-tail);
    scroll-padding-inline: var(--reel-room);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    /* the photo peeking in on the right fades out instead of being cut */
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 14%), transparent);
            mask-image: linear-gradient(to right, #000 calc(100% - 14%), transparent);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.reel-track::-webkit-scrollbar { display: none; }
/* live: image-reel.js moves the row, one swipe or trackpad flick per photo; the browser's own scroll and snap would fight it */
.reel-track.is-live {
    overflow: hidden;
    scroll-snap-type: none;
    touch-action: pan-y;
}
/* room after the last photo so it can sit at the start like the others */
.reel-track::after {
    content: '';
    flex: 0 0 max(0px, calc(100% - var(--reel-card) - var(--reel-gap)));
}

.reel-card {
    flex: 0 0 var(--reel-card);
    min-width: 0;
    scroll-snap-align: start;
}

.reel-figure {
    position: relative;
    margin: 0;
    aspect-ratio: 16 / 9;
    max-height: 60vh;
    /* a real radius: scroll-ring.js walks the light round this exact curve */
    border-radius: 28px;
    overflow: hidden;
    background-color: #e4ebe6;
    /* the home step cards' layered shadow */
    box-shadow: 0 1px 2px rgba(27,27,24,0.06),
                0 10px 22px rgba(27,27,24,0.07),
                0 28px 58px rgba(27,27,24,0.10);
}
.reel-figure > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* a glass sheen off the top-left and a light top edge, over the photo */
.reel-figure::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(120% 90% at 8% 0%, rgba(255,255,255,0.20), rgba(255,255,255,0.05) 40%, transparent 70%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), inset 0 0 0 1px rgba(255,255,255,0.10);
}
/* the rim light (scroll-ring.js), plain white, run once round the incoming photo */
.reel-figure .ring { z-index: 3; opacity: 0; --ring-mix: 0; }

/* no JS: each caption sits under its own photo */
.reel-caption {
    margin: 0.8rem 0.2rem 0;
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--text-body);
}

/* the names of the people tagged in a photo (image-reel.js), under its caption */
.reel-with {
    margin: 0.3rem 0.2rem 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* a single photo: the names line below replaces the plain one; this stays for screen readers */
.reel--single .reel-with {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* live: the captions and names stay for screen readers only; the active ones are shown in .reel-copy and .reel-people */
.reel-track.is-live :is(.reel-caption, .reel-with) {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* the photo in hand at full strength; the rest wait smaller and faded */
.reel-track.is-live .reel-card { cursor: pointer; }
.reel-track.is-live .reel-card.is-active { cursor: zoom-in; }
/* registered so the zoom can ease between waiting and active */
@property --zoom {
    syntax: '<number>';
    inherits: true;
    initial-value: 1;
}
.reel-track.is-live .reel-figure {
    /* the waiting photos' zoom, headroom for the parallax; the tags follow it */
    --zoom: 1.16;
    scale: 0.94;
    opacity: 0.55;
    transform-origin: 50% 100%;
    transition: scale 0.9s var(--apple-ease), opacity 0.9s ease, box-shadow 0.9s ease, --zoom 0.9s var(--apple-ease);
}
/* the waiting photos lose their colour, as the home steps' scenes do */
.reel-track.is-live .reel-figure > img {
    filter: saturate(0.35) brightness(0.96);
    /* parallax: image-reel.js sets --drift from -1 to 1; the shift never runs past the zoom's headroom */
    transform: translateX(calc(var(--drift, 0) * (1 - var(--zoom)) * 50%)) scale(var(--zoom));
    transition: filter 0.9s ease;
    will-change: transform;
}
/* the active photo unzoomed, so no one at its edges is cut off */
.reel-track.is-live .is-active .reel-figure { scale: 1; opacity: 1; --zoom: 1; }
.reel-track.is-live .is-active .reel-figure > img { filter: none; }
.reel-track.is-live .reel-card:not(.is-active) .reel-figure { box-shadow: 0 1px 2px rgba(27,27,24,0.04), 0 8px 18px rgba(27,27,24,0.05); }

/* entrance: the photos rise in one after another, the first time the reel is on screen */
.reel.is-waiting .reel-card { opacity: 0; transform: translateY(28px) scale(0.98); }
.reel.is-in .reel-card {
    transition: opacity 0.85s var(--apple-ease), transform 0.85s var(--apple-ease);
    transition-delay: calc(min(var(--i, 0), 3) * 0.1s);
}
.reel.is-waiting .reel-foot { opacity: 0; transform: translateY(12px); }
.reel.is-in .reel-foot { transition: opacity 0.8s ease 0.3s, transform 0.8s var(--apple-ease) 0.3s; }

/* ── under the track: the active caption on the left, the controls on the right ── */
.reel-foot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem clamp(1.5rem, 4vw, 3rem);
    align-items: center;
    /* sits back up inside the track's shadow room, close under the photos */
    position: relative;
    z-index: 1;
    margin-top: calc(1.4rem - 4.4rem);
}
.reel-copy {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    max-width: 48ch;
    /* three lines of room, so the controls barely move between photos */
    min-height: 4.8em;
    font-family: 'Quicksand', sans-serif;
    font-size: clamp(0.92rem, calc(1.05vw * var(--fs-scale, 1)), 1.02rem);
    font-weight: 300;
    line-height: 1.6;
    color: var(--text-body);
    transition: opacity 0.3s ease, transform 0.3s ease, filter 0.3s ease;
}
.reel-copy:empty { min-height: 0; }
.reel-copy.is-swapping { opacity: 0; transform: translateY(6px); filter: blur(6px); }

/* "In this photo: A, B" under the words; the line keeps its room while any photo has people */
.reel-people {
    grid-column: 1;
    grid-row: 2;
    margin: -0.5rem 0 0;
    min-height: 1.6em;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--text-muted);
    transition: opacity 0.3s ease, transform 0.3s ease, filter 0.3s ease;
}
.reel:not(.has-people) .reel-people { display: none; }
.reel-people.is-swapping { opacity: 0; transform: translateY(6px); filter: blur(6px); }
.reel-person {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-weight: 500;
    color: var(--text-body);
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, currentColor 30%, transparent);
    text-underline-offset: 3px;
    cursor: pointer;
    transition: text-decoration-color 0.2s ease;
}
.reel-person:hover { text-decoration-color: currentColor; }
/* someone without a Team card: just the name */
span.reel-person { text-decoration: none; cursor: default; }
.reel-person:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 3px; }

.reel-nav {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}
.reel-nav[hidden] { display: none; }

/* the dots in a glass pill, the arrows and pause as glass discs - the home steps' build */
.reel-dots {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 44px;
    padding: 0 18px;
    border-radius: 50px;
    background: linear-gradient(160deg, rgba(27,27,24,0.10) 0%, rgba(27,27,24,0.05) 100%);
    border: 1px solid rgba(27,27,24,0.12);
    box-shadow: 0 4px 20px rgba(27,27,24,0.08),
                inset 0 1px 0 rgba(255,255,255,0.55),
                inset 0 -1px 0 rgba(27,27,24,0.05);
}
.reel-ctrl {
    width: 44px;
    height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(27,27,24,0.12);
    background: rgba(255,255,255,0.55);
    color: rgba(27,27,24,0.66);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.25s ease, color 0.25s ease, transform 0.09s ease;
}
.reel-ctrl:active { transform: scale(0.9); }
.reel-ctrl svg { width: 17px; height: 17px; display: block; }
.reel-ctrl:focus-visible,
.reel-dot:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.reel-ctrl[aria-disabled="true"] { opacity: 0.35; cursor: default; }

.reel-dot {
    position: relative;
    width: 10px;
    height: 10px;
    padding: 0;
    border: none;
    border-radius: 50px;
    background: rgba(27,27,24,0.20);
    overflow: hidden;
    cursor: pointer;
    transition: width 0.45s var(--apple-ease), background 0.3s ease;
}
.reel-dot.is-active { width: 46px; }
/* the active dot doubles as the timer */
.reel-dot-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    border-radius: inherit;
    background: rgba(27,27,24,0.55);
    pointer-events: none;
}

@media (hover: hover) {
    .reel-ctrl:hover { background: rgba(255,255,255,0.88); color: var(--paper-ink); }
    .reel-ctrl[aria-disabled="true"]:hover { background: rgba(255,255,255,0.55); color: rgba(27,27,24,0.66); }
    .reel-dot:hover { background: rgba(27,27,24,0.38); }
}

/* no autoplay under reduce motion, so nothing for the pause button to pause */
html[data-reduce-motion] .reel-pause { display: none; }
html[data-reduce-motion] :is(.reel-copy, .reel-people),
html[data-reduce-motion] .reel-track.is-live :is(.reel-figure, .reel-figure > img) { transition: none; }
html[data-reduce-motion] .reel-track.is-live .reel-figure { --zoom: 1; }
html[data-reduce-motion] .reel-track.is-live .reel-figure > img { transform: none; }
html[data-reduce-motion] .reel-figure .ring { display: none; }

/* phone: a wider photo, the controls centred above the words */
@media (max-width: 680px) {
    .reel { --reel-card: 86%; }
    .reel-figure { border-radius: 22px; }
    .reel-foot { grid-template-columns: minmax(0, 1fr); }
    .reel-nav  { grid-column: 1; justify-content: center; gap: 8px; }
    .reel-copy { grid-row: 2; }
    .reel-people { grid-row: 3; }
    .reel-dots { height: 40px; padding: 0 14px; gap: 8px; }
    .reel-ctrl { width: 40px; height: 40px; }
    .reel-dot { width: 8px; height: 8px; }
    .reel-dot.is-active { width: 34px; }
}

/* ── steps: the home "recovery process" track for photos - three portrait cards across, a title on each ── */
.reel--steps {
    --reel-ratio: 4 / 5;
    /* cqi: the track's own width, so the card height can follow it while the card width changes */
    --reel-card: calc((100cqi - 2 * var(--reel-gap)) / 3);
}
@property --reel-fade {
    syntax: '<percentage>';
    inherits: false;
    initial-value: 0%;
}
/* the right edge fades only while more of the row waits off it (image-reel.js sets .has-more) */
.reel--steps .reel-track {
    container-type: inline-size;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - var(--reel-fade)), transparent);
            mask-image: linear-gradient(to right, #000 calc(100% - var(--reel-fade)), transparent);
    transition: --reel-fade 0.6s ease;
}
.reel--steps .reel-track.has-more { --reel-fade: 10%; }
/* no spacer: the closing cards share the last stop, so a short row never slides out and leaves a gap */
.reel--steps .reel-track::after { content: none; }
/* a wide photo's card opens out while active (--open, set by image-reel.js), in step with the slide */
.reel--steps .reel-card { transition: flex-basis 1.1s var(--apple-ease); }
.reel--steps.is-in .reel-card {
    transition: opacity 0.85s var(--apple-ease), transform 0.85s var(--apple-ease), flex-basis 1.1s var(--apple-ease);
    transition-delay: calc(min(var(--i, 0), 3) * 0.1s), calc(min(var(--i, 0), 3) * 0.1s), 0s;
}
.reel--steps .reel-card.is-active { flex-basis: min(calc(var(--reel-card) * var(--open, 1)), 100cqi); }
html[data-reduce-motion] .reel--steps .reel-card { transition: none; }
/* the height stays the portrait card's, so opening only widens the window on the photo */
.reel--steps .reel-figure {
    aspect-ratio: auto;
    height: calc(var(--reel-card) / (var(--reel-ratio)));
    max-height: none;
    border-radius: 26px;
}
/* a soft shade at the top edge, so the title reads on any photo */
.reel--steps .reel-figure::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(15,18,15,0.42), rgba(15,18,15,0) 32%);
}
.reel-title {
    position: absolute;
    z-index: 3;
    top: 0;
    left: 0;
    right: 0;
    margin: 0;
    /* room on the right for the view-larger button */
    padding: 1.1rem 3.6rem 1.1rem 1.25rem;
    font-family: 'Quicksand', sans-serif;
    font-size: clamp(0.98rem, calc(1.2vw * var(--fs-scale, 1)), 1.15rem);
    font-weight: 400;
    line-height: 1.3;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.45);
}
/* phone: one card and a slice of the next, as on home */
@media (max-width: 680px) {
    .reel--steps { --reel-card: 72cqi; }
    .reel--steps .reel-figure { border-radius: 20px; }
    .reel-title { padding: 0.95rem 1.05rem; }
}

/* ── tags: who is in the photo (images[].people) - avatar markers on the active photo, one lit at a time opens to name and role ── */
.reel-tags {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
}
/* a point on the photo: --tx/--ty from image-reel.js (the crop), moved here by the photo's zoom and drift */
.reel-tag {
    position: absolute;
    left: calc(50% + (var(--tx, 50%) - 50%) * var(--zoom, 1) + var(--drift, 0) * (1 - var(--zoom, 1)) * 50%);
    top: calc(50% + (var(--ty, 50%) - 50%) * var(--zoom, 1));
    width: 0;
    height: 0;
}
.reel-tag.is-out { display: none; }
.reel-tag.is-lit { z-index: 1; }
.reel-tag-pill {
    position: absolute;
    top: -16px;
    left: -16px;
    display: flex;
    align-items: center;
    padding: 2px;
    border-radius: 50px;
    background: rgba(255,255,255,0.92);
    color: #fff;
    white-space: nowrap;
    box-shadow: 0 0 0 4px rgba(255,255,255,0.22), 0 6px 18px rgba(0,0,0,0.28);
    opacity: 0;
    scale: 0.4;
    transform-origin: 16px 50%;
    transition: opacity 0.3s ease, scale 0.5s var(--apple-ease), background 0.35s ease, padding 0.45s var(--apple-ease), translate 0.45s var(--apple-ease);
}
/* past the middle of the photo the label opens to the left */
.reel-tag.is-flip .reel-tag-pill {
    left: auto;
    right: -16px;
    flex-direction: row-reverse;
    transform-origin: calc(100% - 16px) 50%;
}
.reel-tag-pill .reel-avatar { width: 28px; height: 28px; }
.reel-tag-words {
    display: grid;
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    line-height: 1.25;
    font-family: 'Quicksand', sans-serif;
    transition: max-width 0.5s var(--apple-ease), opacity 0.25s ease, margin 0.5s var(--apple-ease);
}
.reel-tag-name { font-size: 0.76rem; font-weight: 600; }
.reel-tag-role { font-size: 0.64rem; opacity: 0.78; }

/* shown: every marker on the active photo, one after another */
.reel.show-tags .reel-card.is-active .reel-tag-pill,
.reel-card.is-active .reel-tag.is-lit .reel-tag-pill {
    opacity: 1;
    scale: 1;
    pointer-events: auto;
    cursor: pointer;
}
.reel.show-tags .reel-card.is-active .reel-tag-pill { transition-delay: calc(var(--n, 0) * 70ms); }
/* lit: the marker opens into a dark glass label, slid in by --shift (image-reel.js) where it would run off the photo */
.reel-card.is-active .reel-tag.is-lit .reel-tag-pill {
    translate: var(--shift, 0px) 0;
    padding-right: 13px;
    background: rgba(20,24,20,0.62);
    -webkit-backdrop-filter: blur(12px) saturate(1.4);
            backdrop-filter: blur(12px) saturate(1.4);
    transition-delay: 0s;
}
.reel-card.is-active .reel-tag.is-flip.is-lit .reel-tag-pill { padding-right: 2px; padding-left: 13px; }
.reel-card.is-active .reel-tag.is-lit .reel-tag-words { max-width: 16em; opacity: 1; margin-left: 8px; }
.reel-card.is-active .reel-tag.is-flip.is-lit .reel-tag-words { margin-left: 0; margin-right: 8px; text-align: right; }
/* the open name links to the Team card */
.reel-tag-name { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 2px; transition: text-decoration-color 0.2s ease; }
.reel-tag-words:hover .reel-tag-name { text-decoration-color: currentColor; }

/* the round avatar: the member's team photo, or their initials */
.reel-avatar {
    display: block;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 22%;
    background: #c9d3c6;
}
.reel-avatar.is-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #2C3A2C;
}

/* the people button on the active photo: how many are tagged; pressed while the tags show */
.reel-people-btn {
    position: absolute;
    z-index: 4;
    left: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 30px;
    padding: 0 11px 0 9px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.24);
    background: rgba(20,24,20,0.5);
    -webkit-backdrop-filter: blur(10px) saturate(1.4);
            backdrop-filter: blur(10px) saturate(1.4);
    color: #fff;
    font: 600 0.74rem/1 'Quicksand', sans-serif;
    cursor: pointer;
    transition: opacity 0.4s ease, visibility 0s, background 0.25s ease, color 0.25s ease;
}
.reel-people-btn svg { width: 15px; height: 15px; display: block; }
.reel-people-btn[aria-pressed="true"] { background: rgba(255,255,255,0.92); color: #1B1B18; }
.reel-people-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.reel-track.is-live .reel-card:not(.is-active) .reel-people-btn {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}
html[data-reduce-motion] :is(.reel-tag-pill, .reel-tag-words, .reel-people-btn) { transition: none; }

/* view larger: on the active photo, shown on hover or keyboard focus; a click on the photo does the same */
.reel-zoom-btn {
    position: absolute;
    z-index: 4;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.24);
    background: rgba(20,24,20,0.5);
    -webkit-backdrop-filter: blur(10px) saturate(1.4);
            backdrop-filter: blur(10px) saturate(1.4);
    color: #fff;
    cursor: zoom-in;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.reel-zoom-btn svg { width: 14px; height: 14px; display: block; }
@media (hover: hover) {
    .reel-card.is-active .reel-figure:hover .reel-zoom-btn { opacity: 1; }
}
.reel-zoom-btn:focus-visible { opacity: 1; }
.reel-zoom-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.reel-track.is-live .reel-card:not(.is-active) .reel-zoom-btn { visibility: hidden; }
html[data-reduce-transparency] .reel-zoom-btn { background: #1E241E; -webkit-backdrop-filter: none; backdrop-filter: none; }

/* ── the photo viewer (image-reel.js openViewer): the photo whole and large over a dark ground, its people at the side ── */
.reel-viewer {
    --side: 260px;
    /* fixed and full: global.css's reset and team.css's :where(.leaves-container ~ *) undo the dialog's own */
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 4.25rem 5.5rem 1.5rem;
    border: 0;
    background: transparent;
    color: #fff;
    overflow: hidden;
    overscroll-behavior: contain;
    touch-action: pinch-zoom;
}
.reel-viewer[open] {
    display: grid;
    /* one column, the screen's width: a row of faces wider than a phone scrolls instead of widening the photo */
    grid-template-columns: minmax(0, 1fr);
    place-items: center;
    align-content: center;
    gap: 1rem;
    animation: reel-viewer-in 0.35s ease;
}
.reel-viewer::backdrop { background: rgba(10,12,10,0.95); }
.reel-viewer[open]::backdrop { animation: reel-viewer-in 0.35s ease; }
@keyframes reel-viewer-in { from { opacity: 0; } }
/* the page under it holds still */
html:has(.reel-viewer[open]) { overflow: hidden; }

/* the photo and its people panel side by side, centred together; the panel starts level with the photo's top */
.reel-viewer-stage {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 2rem;
    max-width: 100%;
    max-height: 100%;
    min-height: 0;
}
.reel-viewer-figure {
    flex: 0 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 0;
    max-width: 100%;
    max-height: 100%;
    min-height: 0;
}
.reel-viewer-photo {
    position: relative;
    display: flex;
    justify-content: center;
    max-width: 100%;
    min-height: 0;
}
.reel-viewer-photo img {
    display: block;
    max-width: min(100%, 1400px);
    max-height: calc(100dvh - 12.5rem);
    width: auto;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
    transition: opacity 0.16s ease;
}
.reel-viewer-photo img.is-out { opacity: 0; }
/* no caption and no people: the photo takes the room they would have had */
.reel-viewer:not(.has-words):not(.has-people):not(.is-zoomed) .reel-viewer-photo img { max-height: calc(100dvh - 6rem); }
.reel-viewer:not(.has-words) .reel-viewer-words { display: none; }
.reel-viewer.is-doc .reel-viewer-photo img { cursor: zoom-in; }
/* zoomed: a page of text at reading size, the viewer scrolls; the controls stay put */
.reel-viewer.is-zoomed { display: block; overflow-y: auto; touch-action: pan-y pinch-zoom; scrollbar-width: thin; }
.reel-viewer.is-zoomed :is(.reel-viewer-stage, .reel-viewer-figure, .reel-viewer-photo) { max-height: none; width: 100%; }
.reel-viewer.is-zoomed .reel-viewer-photo img { max-height: none; width: min(100%, 1300px); cursor: zoom-out; }
.reel-viewer.is-zoomed :is(.reel-viewer-btn, .reel-viewer-count) { position: fixed; z-index: 2; }
/* where a person stands: a ring that appears while their name in the panel is pointed at (image-reel.js lays the layer over the photo) */
.reel-viewer-spots { position: absolute; pointer-events: none; }
.reel-viewer-spot {
    position: absolute;
    width: 56px;
    height: 56px;
    translate: -50% -50%;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 6px rgba(255,255,255,0.18), 0 6px 20px rgba(0,0,0,0.35);
    opacity: 0;
    scale: 0.6;
    transition: opacity 0.25s ease, scale 0.4s var(--apple-ease);
}
.reel-viewer-spot.is-lit { opacity: 1; scale: 1; }
.reel-viewer-words {
    /* as wide as the photo, never wider, so it cannot push the panel away */
    align-self: stretch;
    contain: inline-size;
    text-align: center;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.88rem;
    font-weight: 300;
    line-height: 1.55;
    color: rgba(255,255,255,0.78);
}
.reel-viewer-title { display: block; margin-bottom: 2px; font-size: 1rem; font-weight: 500; color: #fff; }

/* the people panel: slides in from the right, a face, name and role for each, linking to their Team card */
.reel-viewer-side {
    display: none;
    flex: none;
    width: var(--side);
    max-height: calc(100dvh - 12.5rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1.1rem 0.6rem 0.6rem;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.06);
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}
.reel-viewer.has-people .reel-viewer-side { display: block; }
.reel-viewer-side.is-in { animation: reel-viewer-side 0.55s var(--apple-ease) both; }
@keyframes reel-viewer-side { from { opacity: 0; translate: 28px 0; } }
.reel-viewer-side-label {
    margin: 0 0 0.45rem;
    padding: 0 0.6rem;
    font: 600 0.64rem/1.4 'Quicksand', sans-serif;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
}
.reel-viewer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.reel-viewer-person {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 0.6rem;
    border-radius: 14px;
    color: #fff;
    text-decoration: none;
    transition: background 0.2s ease;
}
a.reel-viewer-person:hover { background: rgba(255,255,255,0.08); }
.reel-viewer-person .reel-avatar { width: 46px; height: 46px; box-shadow: 0 0 0 2px rgba(255,255,255,0.18); }
.reel-viewer-person .reel-avatar.is-initials { font-size: 0.8rem; }
.reel-viewer-person-words { display: grid; min-width: 0; font-family: 'Quicksand', sans-serif; line-height: 1.3; }
.reel-viewer-person-name { font-size: 0.9rem; font-weight: 500; }
.reel-viewer-person-role { font-size: 0.72rem; color: rgba(255,255,255,0.6); }

.reel-viewer-count {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    margin: 0;
    font: 500 0.78rem/1 'Quicksand', sans-serif;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.65);
}
/* close, previous, next: dark glass discs */
.reel-viewer-btn {
    position: absolute;
    width: 44px;
    height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.08);
    color: #fff;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.09s ease;
}
.reel-viewer-btn[hidden] { display: none; }
.reel-viewer-btn svg { width: 18px; height: 18px; display: block; }
.reel-viewer-btn:hover { background: rgba(255,255,255,0.18); }
.reel-viewer-btn:active { transform: scale(0.92); }
.reel-viewer-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
a.reel-viewer-person:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.reel-viewer-btn[aria-disabled="true"] { opacity: 0.3; cursor: default; }
.reel-viewer-close { top: 0.9rem; right: 1rem; }
.reel-viewer-zoom { top: 0.9rem; right: calc(1rem + 44px + 0.6rem); }
.reel-viewer-prev, .reel-viewer-next { top: 50%; translate: 0 -50%; }
.reel-viewer-prev { left: 1rem; }
.reel-viewer-next { right: 1rem; }

/* narrower: the people go under the photo, a row of faces with first lines of their names */
@media (max-width: 860px) {
    .reel-viewer { padding: 4rem 16px 1.5rem; }
    .reel-viewer-stage { flex-direction: column; align-items: center; gap: 1rem; width: 100%; }
    .reel-viewer-figure { max-width: 100%; }
    .reel-viewer.has-people .reel-viewer-photo img { max-height: calc(100dvh - 21rem); }
    .reel-viewer-side {
        width: 100%;
        max-width: 560px;
        height: auto;
        max-height: none;
        margin: 0;
        padding: 0;
        overflow: visible;
        border: 0;
        background: none;
        box-shadow: none;
    }
    .reel-viewer-side-label { text-align: center; }
    .reel-viewer-list {
        display: flex;
        gap: 4px;
        justify-content: safe center;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .reel-viewer-list::-webkit-scrollbar { display: none; }
    .reel-viewer-person { flex-direction: column; gap: 6px; width: 80px; padding: 6px 2px; text-align: center; }
    .reel-viewer-person .reel-avatar { width: 44px; height: 44px; }
    .reel-viewer-person-name { font-size: 0.72rem; }
    .reel-viewer-person-role { display: none; }
}
/* phone: the arrows sit under everything, where the thumb is */
@media (max-width: 680px) {
    .reel-viewer { padding-bottom: 5.5rem; }
    .reel-viewer-photo img { max-height: calc(100dvh - 16rem); }
    .reel-viewer:not(.has-words):not(.has-people):not(.is-zoomed) .reel-viewer-photo img { max-height: calc(100dvh - 10rem); }
    /* a thumb pinches to zoom; the PDF link is the way to read it close */
    .reel-viewer-zoom { display: none; }
    .reel-viewer.has-people .reel-viewer-photo img { max-height: calc(100dvh - 24rem); }
    .reel-viewer-prev, .reel-viewer-next { top: auto; bottom: 1.25rem; translate: none; }
    .reel-viewer-prev { left: calc(50% - 52px); }
    .reel-viewer-next { right: calc(50% - 52px); }
}
html[data-reduce-motion] .reel-viewer[open],
html[data-reduce-motion] .reel-viewer[open]::backdrop,
html[data-reduce-motion] .reel-viewer-side.is-in { animation: none; }
html[data-reduce-motion] :is(.reel-viewer-photo img, .reel-viewer-spot) { transition: none; }
html[data-reduce-transparency] .reel-viewer::backdrop { background: #0A0C0A; }
html[data-reduce-transparency] .reel-viewer-side { background: #1B1F1C; }

/* ── dark ── */
html[data-dark] .reel-figure {
    background-color: #1B1F1C;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3), 0 10px 22px rgba(0,0,0,0.3), 0 28px 58px rgba(0,0,0,0.4);
}
html[data-dark] .reel-figure::after { background: radial-gradient(120% 90% at 8% 0%, rgba(255,255,255,0.10), transparent 60%); }
html[data-reduce-transparency] .reel-figure::after { display: none; }
html[data-dark] .reel-ctrl {
    background: var(--d-glass);
    border-color: var(--d-glass-border);
    color: var(--text-muted);
}
html[data-dark] .reel-dots {
    background: linear-gradient(160deg, rgba(255,255,255,0.09) 0%, rgba(255,255,255,0.04) 100%);
    border-color: var(--d-glass-border);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.10);
}
html[data-dark] .reel-dot { background: rgba(237,241,234,0.22); }
html[data-dark] .reel-dot-fill { background: rgba(237,241,234,0.6); }
@media (hover: hover) {
    html[data-dark] .reel-ctrl:hover { background: var(--d-glass-strong); color: var(--text-strong); }
    html[data-dark] .reel-ctrl[aria-disabled="true"]:hover { background: var(--d-glass); color: var(--text-muted); }
    html[data-dark] .reel-dot:hover { background: rgba(237,241,234,0.42); }
}

/* ── reduce transparency: solid controls ── */
html[data-reduce-transparency] .reel-ctrl,
html[data-reduce-transparency] .reel-dots {
    background: #e7eae0 !important;
    border-color: rgba(40, 55, 40, 0.28) !important;
}
html[data-dark][data-reduce-transparency] .reel-ctrl,
html[data-dark][data-reduce-transparency] .reel-dots {
    background:   #1E241E !important;
    border-color: rgba(255,255,255,0.18) !important;
}

/* ── tags: solid ── */
html[data-reduce-transparency] .reel-card.is-active .reel-tag.is-lit .reel-tag-pill,
html[data-reduce-transparency] .reel-people-btn:not([aria-pressed="true"]) {
    background: #1E241E;
    -webkit-backdrop-filter: none;
            backdrop-filter: none;
}
