/* Albums accordion, justified galleries, album sheet, photo viewer. Injected by js/album-modal.js. */
html.is-locked { overflow: hidden; }

/* ---------- mounts align with the main column ---------- */
.el, .gal { margin: clamp(32px, 5vw, 64px) var(--gutter) 0 calc(var(--rule-x) + var(--gap)); }
@media (max-width: 700px) { .el, .gal { margin-left: var(--gutter); } }
.gal__more { margin-top: 24px; }
.gal__more[hidden] { display: none; }
.gal__sentinel, .el__sentinel { height: 1px; }

/* ---------- vertical elastic accordion ---------- */
.el { --el-band: 88px; --el-open: 62vh; --el-ease: cubic-bezier(0.25, 1, 0.5, 1); }
@media (max-width: 700px) { .el { --el-band: 72px; --el-open: 56vh; } .el-band__open { grid-template-columns: minmax(0, 1fr); } }
.el__list { display: grid; gap: 4px; }
.el__group { display: grid; gap: 4px; transition: grid-template-rows 1.4s var(--el-ease); }
.el-band { position: relative; display: block; width: 100%; min-height: 0; height: 100%; padding: 0; border: 0; overflow: hidden; background: var(--ink); color: var(--paper); font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.el-band:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.el-band__bg { position: absolute; inset: -60px; z-index: 0; background: var(--el-bg) center / cover no-repeat; filter: blur(30px) brightness(0.45); opacity: 0; transition: opacity 1.4s var(--el-ease); }
.el-band[data-active] .el-band__bg { opacity: 1; }
.el-band__img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; filter: brightness(0.5); transform: scale(1.1); transition: filter 1.4s var(--el-ease), transform 1.4s var(--el-ease); }
@media (hover: hover) { .el-band:not([data-active]):hover .el-band__img { filter: brightness(0.75); } }
.el-band[data-active] .el-band__img { object-fit: contain; object-position: 50% 50%; filter: brightness(1); transform: scale(1); }
.el-band__shade { position: absolute; inset: 0; z-index: 2; background: linear-gradient(to top, rgb(0 0 0 / 0.8), rgb(0 0 0 / 0) 55%); opacity: 0; transition: opacity 1.4s var(--el-ease); }
.el-band[data-active] .el-band__shade { opacity: 1; }

.el-band__row { position: absolute; z-index: 3; left: 0; right: 0; top: 0; height: var(--el-band); display: flex; align-items: center; gap: 16px; padding: 0 clamp(16px, 2vw, 28px); font-size: var(--fs-row); transition: opacity 0.6s; }
.el-band__no { flex: none; width: 2.2em; font-variant-numeric: tabular-nums; opacity: 0.7; }
.el-band__title { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 500; }
.el-band__n { flex: none; opacity: 0.7; font-size: 0.85em; }
.el-band[data-active] .el-band__row { opacity: 0; }

.el-band__open { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; justify-items: start; gap: 12px 20px; padding: clamp(16px, 3vw, 40px); visibility: hidden; opacity: 0; transform: translateY(16px); transition: opacity 0.6s, transform 0.6s, visibility 0s 0.6s; }
.el-band[data-active] .el-band__open { visibility: visible; opacity: 1; transform: none; transition: opacity 1.2s var(--el-ease) 0.4s, transform 1.2s var(--el-ease) 0.4s, visibility 0s; }
.el-band__chip { grid-column: 1 / -1; padding: 6px 12px; border: 1px solid rgb(255 255 255 / 0.6); border-radius: 999px; font-size: 13px; font-weight: 500; }
.el-band__big { max-width: 100%; font-size: clamp(34px, 5vw, 80px); font-weight: 500; line-height: 0.92; letter-spacing: -0.04em; overflow-wrap: anywhere; }
.el-band__cta { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 999px; background: var(--paper); color: var(--ink); font-size: 15px; font-weight: 600; }
.el-band__arrow { width: 14px; height: 14px; margin-left: 8px; } /* svg, not the ↗ glyph: iOS draws that as an emoji */

/* ---------- halo reel ---------- */
.hr { position: relative; z-index: 2; isolation: isolate; margin: clamp(32px, 5vw, 64px) var(--gutter) 0; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; outline: 0; }
.hr:active { cursor: grabbing; }
.hr:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.hr__card { position: absolute; left: 50%; top: 50%; padding: 0; border: 0; overflow: hidden; background: var(--grey); cursor: inherit; will-change: transform; -webkit-tap-highlight-color: transparent; }
.hr__card img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; pointer-events: none; -webkit-user-drag: none; }
.hr__dim { position: absolute; inset: 0; background: var(--ink); will-change: opacity; pointer-events: none; }

/* ---------- justified rows ---------- */
.jg { display: grid; gap: 8px; }
.jg-row { display: flex; gap: 8px; min-width: 0; }
.jg-item { display: block; min-width: 0; padding: 0; border: 0; background: var(--grey); cursor: zoom-in; }
.jg-item img { display: block; width: 100%; height: 100%; }
.jg-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.jg-item { position: relative; transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s; }
@media (hover: hover) { .jg-item:hover { transform: scale(1.04); z-index: 2; } }
.jg-item:focus-visible { transform: scale(1.04); z-index: 2; }
.jg[data-hot] .jg-item:not(:hover, :focus-visible) { opacity: 0.6; } /* data-hot set by hotGrid() in js/album-modal.js */
/* scroll reveal (js/gallery.js): hidden until its row is revealed; space is reserved by aspect-ratio */
.jg--reveal .jg-item:not(.is-shown) { opacity: 0 !important; transition: none; } /* beats the hover dimming rule */

/* ---------- album sheet ---------- */
.am { position: fixed; inset: 0; z-index: 80; overflow-y: auto; overscroll-behavior: contain; background: var(--paper); }
.am[hidden], .pv[hidden] { display: none; }
.am__bar { position: sticky; top: 0; z-index: 1; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 20px var(--gutter); background: var(--paper); border-bottom: 1px solid var(--hair); }
.am__title { font-size: clamp(30px, 4.4vw, 64px); font-weight: 500; line-height: 0.95; letter-spacing: -0.04em; }
.am__count { margin-top: 6px; color: var(--muted); }
.am__act { display: flex; flex-wrap: wrap; gap: 8px; }
.am__grid { padding: var(--gutter); }

/* ---------- full-screen viewer ---------- */
.pv { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgb(11 11 11 / 0.96); color: var(--paper); touch-action: pan-y; user-select: none; }
.pv__img { max-width: calc(100vw - 2 * var(--gutter)); max-height: calc(100vh - 140px); width: auto; height: auto; object-fit: contain; }
.pv__count { position: absolute; top: 22px; left: var(--gutter); font-variant-numeric: tabular-nums; opacity: 0.8; }
.pv__btn { position: absolute; min-height: 44px; padding: 0 18px; border: 1px solid rgb(255 255 255 / 0.6); border-radius: 999px; background: rgb(11 11 11 / 0.4); color: var(--paper); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
@media (hover: hover) { .pv__btn:hover { background: var(--paper); color: var(--ink); } }
.pv__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pv__close { top: 12px; right: var(--gutter); }
.pv__prev { bottom: 20px; left: var(--gutter); }
.pv__next { bottom: 20px; right: var(--gutter); }

@media (prefers-reduced-motion: reduce) {
  .jg-item, .jg-item:hover, .jg-item:focus-visible { transition: none; transform: none; }
  .jg[data-hot] .jg-item:not(:hover, :focus-visible) { opacity: 1; }
  .el__group, .el-band__img, .el-band__bg, .el-band__shade, .el-band__row, .el-band__open, .el-band[data-active] .el-band__open { transition: none; }
}
