.gallery-section {position:relative; background:var(--brand-bc1); padding:8rem 2.4rem; overflow:clip;}
.gallery-heading {max-width:80rem; margin:0 auto 5.6rem; text-align:center;}
.gallery-eyebrow,.gallery-instruction,.gallery-index,.gallery-credit,.gallery-viewer-label {font-family:var(--font-body);font-size:.9rem;line-height:1.8;letter-spacing:.22rem;text-transform:uppercase;}
.gallery-eyebrow {color:var(--brand-bc4);margin-bottom:2.4rem;}
.gallery-heading h2 {font-family:var(--font-heading);font-weight:200;font-size:clamp(5.8rem,7vw,9.6rem);line-height:1.08;letter-spacing:-.2rem;}
.gallery-word {display:inline-block;position:relative;vertical-align:top;-webkit-backface-visibility:hidden;backface-visibility:hidden;transform:translateZ(0);will-change:transform,opacity,filter;}
.gallery-description {font-size:1.6rem;font-weight:300;line-height:1.5;max-width:39rem;margin:2.4rem auto;color:color-mix(in srgb,var(--brand-bc5) 75%,transparent);text-wrap:balance;}
.gallery-instruction {color:color-mix(in srgb,var(--brand-bc5) 50%,transparent);}
.gallery-grid {display:grid;grid-template-columns:minmax(0,1fr);gap:4rem;max-width:160rem;margin:auto;align-items:start;}
.gallery-item {min-width:0;}
.gallery-open {display:block;width:100%;padding:0;background:none;color:inherit;text-align:left;cursor:zoom-in;}
.gallery-frame {position:relative;display:block;overflow:clip;aspect-ratio:4/5;background:var(--brand-bc2);-webkit-clip-path:inset(0% 0% 0% 0%);clip-path:inset(0% 0% 0% 0%);-webkit-backface-visibility:hidden;backface-visibility:hidden;transform:translateZ(0);will-change:clip-path,-webkit-clip-path;}
.gallery-item:first-child .gallery-frame {aspect-ratio:16/10;}
.gallery-media {display:block;width:100%;height:100%;}
.gallery-photo {position:relative !important;display:block;width:100%;height:100%;object-fit:cover;transition:transform 1s var(--easing-bezzy2),opacity .6s;opacity:.9;}
.gallery-expand {position:absolute;right:1.6rem;bottom:1.6rem;display:grid;place-items:center;width:4rem;height:4rem;border:1px solid #f2f1ed66;border-radius:50%;background:#0c0c0c55;backdrop-filter:blur(4px);font-size:2rem;font-weight:200;transition:background .4s,transform .4s;}
.gallery-caption {display:flex;justify-content:space-between;align-items:baseline;gap:1.6rem;padding-top:1.6rem;border-top:1px solid #f2f1ed22;margin-top:1.6rem;}
.gallery-title {font-family:var(--font-heading);font-size:3rem;font-weight:200;line-height:1.2;}
.gallery-index {color:#f2f1ed88;white-space:nowrap;}
.gallery-credit {display:block;margin-top:4.8rem;text-align:center;color:#f2f1ed88;letter-spacing:.12rem;text-transform:none;}
.gallery-credit a {text-decoration:underline;text-underline-offset:.3rem;}
.gallery-open:focus-visible {outline:1px solid var(--brand-bc4);outline-offset:.8rem;}
@media (hover:hover) and (pointer:fine) {
 .gallery-open:hover .gallery-photo {transform:scale(1.045);opacity:1;}
 .gallery-open:hover .gallery-expand {background:var(--brand-bc3);transform:rotate(90deg);}
}
@media (min-width:768px) {
 .gallery-section {padding:10rem 3.2rem;}
 .gallery-heading {margin-bottom:8rem;}
 .gallery-grid {grid-template-columns:repeat(12,minmax(0,1fr));gap:6.4rem 3.2rem;}
 .gallery-item:nth-child(1) {grid-column:1/8;}
 .gallery-item:nth-child(2) {grid-column:9/13;margin-top:10rem;}
 .gallery-item:nth-child(3) {grid-column:1/5;}
 .gallery-item:nth-child(4) {grid-column:6/13;margin-top:8rem;}
 .gallery-item:nth-child(5) {grid-column:1/6;}
 .gallery-item:nth-child(6) {grid-column:7/13;margin-top:12rem;}
 .gallery-item:nth-child(4) .gallery-frame,.gallery-item:nth-child(6) .gallery-frame {aspect-ratio:4/3;}
 .gallery-description {font-size:1.8rem;}
}
@media (min-width:1200px) {.gallery-section {padding:12rem var(--space-col);} .gallery-grid {column-gap:4.8rem;}}
/* The native modal occupies the top layer, above the existing fixed header. */
.gallery-viewer {position:fixed;inset:0;width:100%;max-width:none;height:100%;max-height:none;margin:0;border:0;padding:0;background:#090909f5;color:var(--brand-bc5);overflow:auto;overscroll-behavior:contain;}
.gallery-viewer:not([open]) {display:none;}
.gallery-viewer::backdrop {background:#000c;backdrop-filter:blur(10px);}
.gallery-viewer-inner {min-height:100%;display:flex;flex-direction:column;padding:2.4rem;}
.gallery-viewer-toolbar {display:flex;justify-content:space-between;align-items:center;gap:2rem;flex:none;}
.gallery-viewer-label {color:#f2f1ed99;}
.gallery-icon-button {display:grid;place-items:center;width:4.4rem;height:4.4rem;border:1px solid #f2f1ed44;color:inherit;cursor:pointer;background:#0c0c0c55;transition:background .3s;}
.gallery-icon-button:hover {background:var(--brand-bc3);}
.gallery-icon-button svg {width:1.8rem;height:1.8rem;fill:none;stroke:currentColor;stroke-width:1;}
.gallery-viewer-stage {position:relative;display:grid;place-items:center;flex:1;min-height:0;padding:2.4rem 0;}
.gallery-viewer-image {display:block;max-width:100%;width:auto;height:auto;max-height:calc(100svh - 25rem);object-fit:contain;}
.gallery-viewer-footer {display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:2.4rem;flex:none;}
.gallery-viewer-title {font-family:var(--font-heading);font-size:3.6rem;line-height:1.1;font-weight:200;letter-spacing:-.08rem;}
.gallery-viewer-source {display:inline-block;font-size:1.1rem;line-height:1.6;color:#f2f1ed99;margin-top:.8rem;text-decoration:underline;text-underline-offset:.3rem;}
.gallery-viewer-controls {display:flex;align-items:center;gap:1.6rem;}
.gallery-viewer-counter {min-width:5rem;text-align:center;font-size:1rem;letter-spacing:.15rem;}
.gallery-viewer-status {position:absolute;bottom:.4rem;left:0;right:0;text-align:center;font-size:1.1rem;color:#f2f1edaa;}
html.gallery-viewer-open,html.gallery-viewer-open body {overflow:hidden !important;}
@media (min-width:768px) {
 .gallery-viewer-inner {padding:3.2rem 4.8rem;}
 .gallery-viewer-stage {padding:2.4rem 4.8rem;}
 .gallery-viewer-image {max-height:calc(100svh - 21rem);}
 .gallery-viewer-title {font-size:4.8rem;}
}
@media (prefers-reduced-motion:reduce) {
 .gallery-section *,.gallery-viewer * {animation:none !important;transition:none !important;scroll-behavior:auto !important;}
 .gallery-frame {clip-path:none !important;}
 .gallery-media,.gallery-photo,.gallery-word {transform:none !important;filter:none !important;opacity:1 !important;visibility:visible !important;}
}
