/* D065: Gallery only. Bounded thumbnails and a native, progressively enhanced viewer. */
.gallery-page .gallery-serif { font-family:Georgia,'Times New Roman',serif; font-weight:400; font-style:italic; letter-spacing:-.055em; }
.gallery-page .gallery-hero { padding-block:2.5rem 3.5rem; }
.gallery-page .gallery-kicker { display:flex; align-items:center; gap:.65rem; margin-bottom:2rem; }
.gallery-page .gallery-title { display:grid; gap:1.5rem; }
.gallery-page h1 { font-size:clamp(3.5rem,12.5vw,12rem); line-height:.98; letter-spacing:-.07em; }
.gallery-page h1 .gallery-serif { padding-left:.2em; }
.gallery-page .gallery-margin-note { border-left:2px solid var(--orange); padding-left:1rem; font-size:.9375rem; color:var(--muted); }
.gallery-page .gallery-hero-bottom { display:grid; gap:1.5rem; margin-top:2.5rem; padding-top:1.5rem; border-top:1px solid var(--navy); }
.gallery-page .gallery-hero-statement { color:var(--navy); font:600 1.45rem/1.35 var(--heading); letter-spacing:-.04em; }
.gallery-page .gallery-hero-intro { max-width:52ch; color:var(--muted); }
.gallery-page .gallery-hero-intro .text-link { margin-top:1rem; }
.gallery-page .gallery-collection { background:#fffdfa; padding-block:3.5rem; }
.gallery-page .gallery-collection-heading { margin-bottom:2.5rem; }
.gallery-page .gallery-collection-heading h2 { margin-top:1rem; }
.gallery-page .gallery-grid { display:grid; gap:2rem; align-items:start; }
.gallery-page .gallery-item { min-width:0; margin:0; border:1px solid var(--border); border-radius:.5rem; background:white; }
.gallery-page .gallery-image-link { display:block; border-radius:.5rem; color:var(--navy); text-decoration:none; }
.gallery-page .gallery-thumbnail { display:block; aspect-ratio:4/3; padding:.75rem; border-radius:.5rem .5rem 0 0; background:#eef0ed; }
.gallery-page .gallery-thumbnail img { width:100%; height:100%; object-fit:contain; }
.gallery-page .gallery-video-thumbnail { position:relative; }
.gallery-page .gallery-video-play { position:absolute; inset:50% auto auto 50%; transform:translate(-50%,-50%); display:grid; place-items:center; width:3.25rem; height:3.25rem; padding-left:.2rem; border:2px solid white; border-radius:50%; background:rgb(4 30 66 / 90%); color:white; font-size:1.25rem; pointer-events:none; }
.gallery-page figcaption { padding:0 1rem 1rem; color:var(--muted); font-size:.9375rem; overflow-wrap:anywhere; white-space:pre-wrap; }
.gallery-page .gallery-view-label { display:flex; align-items:center; justify-content:space-between; gap:.5rem; min-height:48px; padding:.5rem 1rem; color:var(--navy); font-size:.875rem; }
.gallery-page .gallery-image-link:hover .gallery-view-label { background:var(--cream); text-decoration:underline; text-underline-offset:.25em; }
.gallery-page .gallery-perspective { background:#eef0ed; padding-block:3.5rem; }
.gallery-page .gallery-perspective-layout { display:grid; gap:2.5rem; }
.gallery-page .gallery-perspective-heading h2 { margin-top:1.75rem; font-size:clamp(2.4rem,5.2vw,5rem); }
.gallery-page .gallery-perspective-heading .text-link { margin-top:1.5rem; }
.gallery-page .gallery-perspective-copy>p:not(.lead) { margin-top:1.5rem; color:var(--muted); }
.gallery-page .gallery-detail { border-top:1px solid #bbc6c2; margin-top:2rem; padding-top:1.5rem; }
.gallery-page .gallery-detail h3 { font-size:1.6rem; }
.gallery-page .gallery-detail p { margin-top:.8rem; color:var(--muted); }
.gallery-page .gallery-perspective-copy>.text-link { margin-top:1.5rem; }
.gallery-page .gallery-contact { padding-block:3.5rem; background:var(--navy); color:#d3dce6; }
.gallery-page .gallery-contact-layout { display:grid; gap:2rem; }
.gallery-page .gallery-contact .eyebrow { color:#ffb65c; margin-bottom:1.5rem; }
.gallery-page .gallery-contact h2 { color:var(--cream); font-size:clamp(2.65rem,4.6vw,4.5rem); }
.gallery-page .gallery-contact-actions { max-width:42ch; }
.gallery-page .gallery-contact .button { margin-top:1.5rem; background:var(--orange); color:var(--navy); }
.gallery-page .gallery-contact .button:hover { background:#ffc078; }
.gallery-page .gallery-contact-phone { display:flex; align-items:center; flex-wrap:wrap; gap:.4rem; width:fit-content; min-height:48px; margin-top:.75rem; font-size:1rem; color:var(--cream); }
.gallery-page .gallery-contact-phone span { font-weight:600; }
.gallery-page .gallery-contact .gallery-contact-email { margin:.25rem 0 0; font-size:1rem; overflow-wrap:anywhere; }
.gallery-page .gallery-contact :focus-visible { outline-color:#ffc47a; box-shadow:none; }
@media(max-width:39.999rem) {
    .gallery-page h1 { font-size:clamp(2rem,1.5rem + 9vw,5rem); }
    .gallery-page :is(.gallery-perspective-heading,.gallery-contact) h2 { font-size:var(--phone-heading); }
}
@media(min-width:40rem) {
    .gallery-page .gallery-hero,.gallery-page .gallery-collection,.gallery-page .gallery-perspective,.gallery-page .gallery-contact { padding-block:4.5rem; }
    .gallery-page .gallery-title { grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:2rem; }
    .gallery-page .gallery-margin-note { margin-bottom:.5rem; }
    .gallery-page .gallery-hero-bottom,.gallery-page .gallery-perspective-layout,.gallery-page .gallery-contact-layout { grid-template-columns:repeat(2,minmax(0,1fr)); gap:3rem; }
    .gallery-page .gallery-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .gallery-page .gallery-contact-actions { padding-top:.25rem; }
}
@media(min-width:68.75rem) {
    .gallery-page .gallery-hero { padding-block:3.75rem 5rem; }
    .gallery-page .gallery-kicker { margin-bottom:2.75rem; }
    .gallery-page .gallery-title { grid-template-columns:minmax(0,1fr) 15rem; }
    .gallery-page .gallery-margin-note { margin-bottom:1rem; }
    .gallery-page .gallery-hero-bottom { grid-template-columns:1fr 1fr; gap:6rem; margin-top:3.5rem; padding-top:2rem; }
    .gallery-page .gallery-hero-statement { font-size:1.8rem; }
    .gallery-page .gallery-collection,.gallery-page .gallery-perspective,.gallery-page .gallery-contact { padding-block:6rem; }
    .gallery-page .gallery-collection-heading { display:flex; align-items:baseline; justify-content:space-between; gap:2rem; margin-bottom:3.5rem; }
    .gallery-page .gallery-collection-heading h2 { margin:0; }
    .gallery-page .gallery-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
    .gallery-page .gallery-perspective-layout { grid-template-columns:1fr 1fr; gap:6rem; }
    .gallery-page .gallery-perspective-copy { padding-top:.2rem; }
    .gallery-page .gallery-contact-layout { grid-template-columns:1fr 1fr; gap:6rem; align-items:center; }
}
/* The native modal makes the rest of the page inert; closed/unsupported dialogs stay hidden. */
.gallery-lightbox:not([open]) { display:none; }
.gallery-lightbox[open] { display:grid; grid-template-rows:auto minmax(0,1fr) auto; gap:.75rem; width:100%; max-width:none; height:100%; height:100dvh; max-height:none; margin:0; padding:max(1rem,env(safe-area-inset-top)) max(1rem,env(safe-area-inset-right)) max(1rem,env(safe-area-inset-bottom)) max(1rem,env(safe-area-inset-left)); border:0; background:rgb(4 30 66 / 97%); color:var(--cream); overflow:hidden; overscroll-behavior:contain; }
.gallery-lightbox::backdrop { background:rgb(4 30 66 / 50%); }
.gallery-lightbox-toolbar { display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.gallery-lightbox-position { font-variant-numeric:tabular-nums; }
.gallery-lightbox button { display:flex; align-items:center; justify-content:center; flex-shrink:0; width:48px; height:48px; padding:.6rem; border:1px solid #b7c5d3; border-radius:50%; background:var(--navy); color:white; cursor:pointer; }
.gallery-lightbox button:hover { background:#153d65; border-color:var(--orange); }
.gallery-lightbox button:focus-visible { outline-color:var(--orange); box-shadow:none; outline-offset:3px; }
.gallery-lightbox button[hidden] { display:none; }
.gallery-lightbox-stage { position:relative; display:grid; grid-template-columns:48px minmax(0,1fr) 48px; grid-template-rows:minmax(0,1fr) 48px; gap:.75rem; min-height:0; }
.gallery-lightbox-image { grid-column:1/-1; grid-row:1; width:100%; height:100%; min-height:0; object-fit:contain; user-select:none; -webkit-user-select:none; }
.gallery-lightbox-video { grid-column:1/-1; grid-row:1; width:100%; height:100%; min-height:0; object-fit:contain; }
.gallery-lightbox-video[hidden], .gallery-lightbox-image[hidden] { display:none; }
.gallery-lightbox-previous { grid-column:1; grid-row:2; }
.gallery-lightbox-previous svg { transform:rotate(180deg); }
.gallery-lightbox-next { grid-column:3; grid-row:2; }
.gallery-lightbox-details { width:min(100%,60rem); max-height:25vh; justify-self:center; overflow:auto; text-align:center; font-size:1rem; overflow-wrap:anywhere; }
.gallery-lightbox-caption { white-space:pre-wrap; }
.gallery-lightbox-caption:empty { display:none; }
.gallery-lightbox-error { color:#ffcf96; }
.gallery-lightbox-details:focus-visible { outline-color:var(--orange); box-shadow:none; }
html.gallery-lightbox-open { overflow:hidden; }
.gallery-lightbox-open body { position:fixed; top:var(--gallery-scroll-top); width:100%; padding-right:var(--gallery-scrollbar); }
@media(min-width:40rem) {
    .gallery-lightbox[open] { padding:max(1.5rem,env(safe-area-inset-top)) max(2rem,env(safe-area-inset-right)) max(1.5rem,env(safe-area-inset-bottom)) max(2rem,env(safe-area-inset-left)); }
    .gallery-lightbox-stage { grid-template-rows:minmax(0,1fr); gap:1rem; }
    .gallery-lightbox-image { grid-column:2; }
    .gallery-lightbox-video { grid-column:2; }
    .gallery-lightbox-previous,.gallery-lightbox-next { grid-row:1; align-self:center; }
}
.gallery-lightbox-stage.is-single { grid-template-rows:minmax(0,1fr); }
.gallery-lightbox-stage.is-single .gallery-lightbox-image { grid-column:1/-1; }
