.gallery-page-hero {
    min-height: calc(100svh - 69px);
    isolation: isolate;
    background: radial-gradient(circle at 82% 18%, rgba(200,184,223,.28), transparent 22%), linear-gradient(120deg,var(--bg) 0 58%,#ded3c5 58% 100%);
}

.gallery-page-hero::before {
    content: 'MEMORIES';
    position: absolute;
    left: -3vw;
    bottom: -4vw;
    z-index: -2;
    color: transparent;
    font-family: 'Cormorant Garamond',serif;
    font-size: clamp(170px,23vw,410px);
    line-height: .68;
    letter-spacing: -.07em;
    white-space: nowrap;
    -webkit-text-stroke: 1px rgba(31,30,27,.09);
}

.gallery-hero-grid {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: clamp(55px,8vw,120px);
    align-items: center;
    padding: 70px 0;
}

.gallery-hero-copy { position: relative; z-index: 2; }
.gallery-hero-copy .eyebrow { display:flex; align-items:center; gap:12px; }
.gallery-hero-copy .eyebrow::before { content:''; width:36px; height:1px; background:currentColor; }
.gallery-hero-copy h1 { font-size:clamp(78px,9vw,138px); }
.gallery-hero-copy .lead { margin:34px 0 26px; font-size:18px; }

.gallery-hero-collage { position:relative; min-height:650px; }
.gallery-hero-collage::before { content:''; position:absolute; inset:6% 0 8% 9%; border:1px solid rgba(31,30,27,.3); transform:rotate(3deg); }
.gallery-hero-main { position:absolute; top:2%; right:0; width:76%; height:82%; box-shadow:0 30px 65px rgba(31,30,27,.2); transform:rotate(2deg); }
.gallery-hero-small { position:absolute; left:0; bottom:1%; z-index:2; width:43%; height:38%; border:9px solid var(--bg); box-shadow:0 20px 40px rgba(31,30,27,.18); transform:rotate(-5deg); }
.gallery-hero-extra { position:absolute; z-index:3; width:31%; height:24%; border:7px solid var(--bg); box-shadow:0 16px 34px rgba(31,30,27,.17); }
.gallery-hero-extra-one { top:-2%; left:3%; transform:rotate(-4deg); }
.gallery-hero-extra-two { right:-3%; bottom:1%; transform:rotate(5deg); }
.gallery-hero-label { position:absolute; top:25%; left:-2%; z-index:4; font-family:'Cormorant Garamond',serif; font-size:clamp(28px,3vw,44px); font-style:italic; line-height:.85; transform:rotate(-7deg); }
.gallery-hero-count { position:absolute; right:1%; bottom:27%; z-index:4; padding:13px 15px; background:var(--olive); color:var(--paper); font-size:8px; line-height:1.6; letter-spacing:.14em; text-align:center; transform:rotate(4deg); }

.gallery-page-section { background:#e9e1d6; }
.gallery-page-intro { display:grid; grid-template-columns:1.15fr .85fr; align-items:end; gap:50px; margin-bottom:28px; padding-bottom:22px; border-bottom:1px solid rgba(31,30,27,.3); }
.gallery-page-intro h2 { margin:8px 0 0; font-size:clamp(45px,5vw,72px); }
.gallery-page-intro > p { max-width:430px; margin:0 0 7px; color:var(--muted); line-height:1.65; }

.gallery-browser { display:grid; grid-template-columns:1fr; gap:18px; align-items:start; }
.gallery-filter-bar { position:sticky; top:69px; z-index:8; display:grid; grid-template-columns:1fr 220px 160px auto; gap:12px; align-items:end; padding:14px; border:1px solid rgba(31,30,27,.28); background:rgba(251,250,247,.9); box-shadow:0 12px 28px rgba(31,30,27,.08); backdrop-filter:blur(14px); }
.gallery-filter-title { display:flex; min-height:48px; flex-direction:column; justify-content:center; padding:0 8px; }
.gallery-filter-title strong { margin-top:3px; font-family:'Cormorant Garamond',serif; font-size:25px; font-weight:500; }
.gallery-filter-bar label { display:grid; gap:6px; }
.gallery-filter-bar label > span { font-size:8px; font-weight:700; letter-spacing:.15em; text-transform:uppercase; }
.gallery-filter-bar select { width:100%; min-height:48px; padding:0 42px 0 13px; border:1px solid rgba(31,30,27,.35); border-radius:0; background:var(--paper); color:var(--ink); font:inherit; font-size:13px; cursor:pointer; }
.gallery-filter-reset { min-height:48px; padding:0 16px; border:1px solid var(--ink); background:var(--ink); color:var(--paper); font:inherit; font-size:8px; font-weight:700; letter-spacing:.13em; text-transform:uppercase; cursor:pointer; transition:background .25s ease,color .25s ease; }
.gallery-filter-reset:hover { background:transparent; color:var(--ink); }
.gallery-filter-pane { position:sticky; top:92px; border:1px solid rgba(31,30,27,.28); background:rgba(251,250,247,.64); backdrop-filter:blur(12px); }
.gallery-filter-heading { display:flex; justify-content:space-between; align-items:center; padding:19px 18px; border-bottom:1px solid rgba(31,30,27,.2); }
.gallery-filter-heading strong { font-family:'Cormorant Garamond',serif; font-size:22px; font-weight:500; }
.gallery-filters { display:grid; padding:8px; }
.gallery-filter-group { display:grid; }
.gallery-filter-group + .gallery-filter-group { margin-top:10px; padding-top:10px; border-top:1px solid rgba(31,30,27,.2); }
.gallery-filter-group > p { margin:0; padding:8px 11px 6px; color:var(--muted); font-size:8px; font-weight:700; letter-spacing:.16em; text-transform:uppercase; }
.gallery-filters button { display:flex; min-height:46px; justify-content:space-between; align-items:center; padding:10px 11px; border:0; border-bottom:1px solid rgba(31,30,27,.13); background:transparent; color:var(--ink); font:inherit; font-size:9px; font-weight:700; letter-spacing:.12em; text-align:left; text-transform:uppercase; cursor:pointer; transition:background .25s ease,color .25s ease,padding .25s ease; }
.gallery-filters button:last-child { border-bottom:0; }
.gallery-filters button small { display:grid; width:26px; height:26px; place-items:center; border:1px solid currentColor; border-radius:50%; font-size:7px; opacity:.65; }
.gallery-filters button:hover { padding-left:17px; background:rgba(216,200,179,.3); }
.gallery-filters button.active { padding-left:17px; background:var(--olive); color:var(--paper); }
.gallery-filter-note { margin:0; padding:16px 18px; border-top:1px solid rgba(31,30,27,.2); color:var(--muted); font-size:10px; line-height:1.55; }
.gallery-filter-toggle { display:none; }
.gallery-results { min-width:0; }

.gallery-album-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.gallery-album { position:relative; display:flex; min-width:0; flex-direction:column; overflow:hidden; border:1px solid rgba(31,30,27,.25); background:var(--paper); transition:opacity .3s ease,transform .4s ease,box-shadow .4s ease,border-color .4s ease; }
.gallery-album[hidden] { display:none; }
.gallery-album:nth-child(even) { background:#e5dacb; }
.gallery-album-preview { position:relative; height:260px; overflow:hidden; }
.gallery-album-preview img { width:100%; height:100%; margin:0; filter:saturate(.76); transition:transform .65s cubic-bezier(.2,.8,.2,1),filter .5s ease; }
.gallery-album-preview > span { position:absolute; right:12px; bottom:12px; z-index:2; padding:7px 9px; border-radius:999px; background:rgba(251,250,247,.88); color:var(--ink); font-size:8px; font-weight:700; letter-spacing:.1em; backdrop-filter:blur(8px); }
.gallery-album-copy { position:relative; z-index:2; display:flex; min-height:270px; flex:1; flex-direction:column; padding:26px; }
.gallery-album-copy h2 { margin:13px 0 15px; font-size:clamp(38px,3.5vw,52px); line-height:.88; overflow-wrap:anywhere; }
.gallery-album-copy p { margin:0 0 28px; color:var(--muted); font-size:14px; line-height:1.65; }
.gallery-album-action { align-self:flex-start; margin-top:auto; padding-bottom:5px; border-bottom:1px solid currentColor; font-size:9px; font-weight:700; letter-spacing:.13em; text-transform:uppercase; transition:transform .3s ease; }
.gallery-album::after { content:''; position:absolute; right:-80px; bottom:-80px; width:170px; height:170px; border:1px solid currentColor; border-radius:50%; opacity:.1; transition:transform .5s ease; }
.gallery-album:hover { z-index:2; transform:translateY(-7px); border-color:rgba(31,30,27,.55); box-shadow:0 24px 48px rgba(31,30,27,.14); }
.gallery-album:hover .gallery-album-preview img { transform:scale(1.055); filter:saturate(1); }
.gallery-album:hover .gallery-album-action { transform:translateX(5px); }
.gallery-album:hover::after { transform:scale(1.3); }
.gallery-no-results { padding:40px; border:1px solid rgba(31,30,27,.25); background:var(--paper); color:var(--muted); text-align:center; }

.gallery-page-grid { display:grid; grid-template-columns:repeat(12,1fr); grid-auto-rows:110px; gap:14px; }
.gallery-shot { position:relative; grid-column:span 4; grid-row:span 3; margin:0; overflow:hidden; background:var(--sand); }
.gallery-shot.shot-wide { grid-column:span 8; }
.gallery-shot.shot-tall { grid-row:span 5; }
.gallery-shot img { width:100%; height:100%; filter:saturate(.78); transition:transform .75s cubic-bezier(.2,.8,.2,1),filter .5s ease; }
.gallery-shot::after { content:''; position:absolute; inset:0; background:linear-gradient(to top,rgba(31,30,27,.64),transparent 50%); opacity:.65; transition:opacity .4s ease; }
.gallery-shot figcaption { position:absolute; right:18px; bottom:16px; left:18px; z-index:2; display:flex; justify-content:space-between; color:var(--paper); font-size:9px; letter-spacing:.15em; text-transform:uppercase; }
.gallery-shot:hover img { transform:scale(1.055); filter:saturate(1); }
.gallery-shot:hover::after { opacity:.85; }

@media(max-width:850px) {
    .gallery-page-hero { min-height:auto; }
    .gallery-hero-grid { grid-template-columns:1fr; gap:34px; padding:58px 0 70px; }
    .gallery-hero-copy h1 { font-size:clamp(68px,18vw,104px); }
    .gallery-hero-collage { min-height:530px; }
    .gallery-page-grid { grid-template-columns:repeat(2,1fr); grid-auto-rows:150px; gap:10px; }
    .gallery-page-intro { grid-template-columns:1fr; gap:16px; }
    .gallery-browser { grid-template-columns:1fr; gap:16px; }
    .gallery-filter-bar { position:static; grid-template-columns:1fr 1fr; }
    .gallery-filter-title { grid-column:1 / -1; flex-direction:row; justify-content:space-between; align-items:center; padding:0; }
    .gallery-filter-title strong { margin:0; }
    .gallery-filter-reset { grid-column:1 / -1; }
    .gallery-filter-pane { position:static; }
    .gallery-filter-heading,.gallery-filter-note { display:none; }
    .gallery-filters { display:flex; padding:8px; overflow-x:auto; scrollbar-width:none; }
    .gallery-filter-group { display:flex; align-items:center; flex:0 0 auto; }
    .gallery-filter-group + .gallery-filter-group { margin:0 0 0 8px; padding:0 0 0 8px; border-top:0; border-left:1px solid rgba(31,30,27,.2); }
    .gallery-filter-group > p { flex:0 0 auto; }
    .gallery-filters::-webkit-scrollbar { display:none; }
    .gallery-filters button { min-width:max-content; gap:12px; border-right:1px solid rgba(31,30,27,.13); border-bottom:0; }
    .gallery-filters button:hover,.gallery-filters button.active { padding-left:11px; }
    .gallery-album-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .gallery-shot,.gallery-shot.shot-wide { grid-column:span 1; grid-row:span 2; }
    .gallery-shot.shot-wide:first-child { grid-column:1 / -1; }
    .gallery-shot.shot-tall { grid-row:span 3; }
}

@media(max-width:560px) {
    .gallery-hero-grid { padding:44px 0 58px; }
    .gallery-hero-copy .lead { margin:25px 0 21px; font-size:16px; }
    .gallery-hero-copy .btn { width:100%; justify-content:center; }
    .gallery-hero-collage { min-height:410px; }
    .gallery-hero-main { width:80%; height:80%; }
    .gallery-hero-small { width:47%; height:36%; border-width:6px; }
    .gallery-hero-extra { border-width:5px; }
    .gallery-hero-extra-one { width:34%; height:23%; }
    .gallery-hero-extra-two { display:none; }
    .gallery-hero-label { display:none; }
    .gallery-hero-count { right:0; bottom:5%; }
    .gallery-page-intro { align-items:flex-start; flex-direction:column; }
    .gallery-filter-pane { width:100%; margin:0; border:1px solid rgba(31,30,27,.28); }
    .gallery-filter-bar { grid-template-columns:1fr; padding:12px; }
    .gallery-filter-title,.gallery-filter-reset { grid-column:auto; }
    .gallery-filter-toggle { display:grid; grid-template-columns:auto 1fr auto; width:100%; min-height:54px; align-items:center; gap:14px; padding:12px 15px; border:0; background:var(--paper); color:var(--ink); font:inherit; text-align:left; cursor:pointer; }
    .gallery-filter-toggle > span { font-size:8px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; }
    .gallery-filter-toggle strong { font-family:'Cormorant Garamond',serif; font-size:22px; font-weight:500; }
    .gallery-filter-toggle i { display:grid; width:30px; height:30px; place-items:center; border:1px solid rgba(31,30,27,.35); border-radius:50%; font-size:17px; font-style:normal; transition:transform .25s ease; }
    .gallery-filter-pane.open .gallery-filter-toggle i { transform:rotate(45deg); }
    .gallery-filters { display:none; padding:7px; overflow:visible; border-top:1px solid rgba(31,30,27,.2); }
    .gallery-filter-pane.open .gallery-filters { display:grid; }
    .gallery-filter-group { display:grid; }
    .gallery-filter-group + .gallery-filter-group { margin:8px 0 0; padding:8px 0 0; border-top:1px solid rgba(31,30,27,.2); border-left:0; }
    .gallery-filters button { width:100%; min-width:0; border-right:0; border-bottom:1px solid rgba(31,30,27,.13); }
    .gallery-album-grid { grid-template-columns:1fr; }
    .gallery-album-preview { height:240px; }
    .gallery-album-copy { min-height:245px; padding:22px; }
    .gallery-album-copy h2 { font-size:46px; }
    .gallery-page-grid { grid-auto-rows:105px; }
    .gallery-shot figcaption { right:12px; bottom:11px; left:12px; font-size:8px; }
}

@media(hover:none) {
    .gallery-shot:hover img { transform:none; }
}

@media(prefers-reduced-motion:reduce) {
    .gallery-shot img { transition:none; }
}
