.gallery-page { background:#f7f3ea; color:#173329; }
.gallery-page .site-header { background:rgba(247,243,234,.94); border-bottom:1px solid rgba(23,51,41,.09); backdrop-filter:blur(14px); }
.gallery-page .main-nav a.active::after { transform:scaleX(1); }
.gallery-hero { position:relative; min-height:clamp(680px,88vh,920px); display:flex; align-items:flex-end; overflow:hidden; background:#173329; color:#fff; }
.gallery-hero-media,.gallery-hero-shade { position:absolute; inset:0; }
.gallery-hero-media img { width:100%; height:112%; object-fit:cover; object-position:center 44%; transform:scale(1.045); }
.gallery-hero-shade { background:linear-gradient(90deg,rgba(7,28,21,.82),rgba(7,28,21,.25) 62%,rgba(7,28,21,.1)),linear-gradient(0deg,rgba(7,28,21,.66),transparent 55%); }
.gallery-hero-copy { position:relative; z-index:2; padding-bottom:clamp(72px,10vh,120px); }
.gallery-hero-copy .section-kicker { color:#d9b968; }
.gallery-hero h1 { max-width:1000px; margin:12px 0 24px; color:#fff; font-family:"Playfair Display",Georgia,serif; font-size:clamp(4.4rem,9vw,8.4rem); font-weight:500; line-height:.86; letter-spacing:-.055em; }
.title-mask { display:block; overflow:hidden; padding-bottom:.08em; }
.title-mask > span { display:block; }
.gallery-hero-copy > p:not(.section-kicker) { max-width:560px; margin:0; color:rgba(255,255,255,.82); font-size:clamp(1rem,1.45vw,1.15rem); line-height:1.7; }
.gallery-scroll { display:inline-flex; align-items:center; gap:16px; margin-top:32px; color:#fff; font-size:.76rem; font-weight:700; letter-spacing:.1em; text-decoration:none; text-transform:uppercase; }
.gallery-scroll b { display:grid; width:42px; height:42px; place-items:center; border:1px solid rgba(255,255,255,.42); border-radius:50%; transition:transform .35s ease,background .35s ease; }
.gallery-scroll:hover b { transform:translateY(4px); background:rgba(255,255,255,.12); }
.gallery-hero-index { position:absolute; right:max(24px,calc((100vw - 1320px)/2)); bottom:54px; z-index:2; display:flex; align-items:center; gap:12px; color:rgba(255,255,255,.68); font-size:.7rem; font-weight:700; letter-spacing:.08em; }
.gallery-hero-index i { width:70px; height:1px; background:rgba(255,255,255,.45); }

.gallery-intro { padding:clamp(95px,12vw,165px) 0; }
.gallery-intro-grid { display:grid; grid-template-columns:minmax(0,1.12fr) minmax(300px,.62fr); align-items:end; gap:10vw; }
.gallery-intro h2 { margin:12px 0 0; font-family:"Playfair Display",Georgia,serif; font-size:clamp(3.25rem,6.5vw,6.5rem); font-weight:500; line-height:.94; letter-spacing:-.05em; }
.gallery-intro h2 em { color:#7c873f; font-weight:500; }
.gallery-intro-grid > div:last-child > p:first-child { margin:0; color:#586b64; font-size:1.08rem; line-height:1.8; }
.gallery-count { display:flex; align-items:center; gap:16px; margin:35px 0 0; }
.gallery-count strong { font-family:"Playfair Display",Georgia,serif; font-size:3.6rem; font-weight:500; line-height:1; }
.gallery-count span { color:#687871; font-size:.72rem; font-weight:700; letter-spacing:.08em; line-height:1.5; text-transform:uppercase; }

.gallery-collection { padding:0 0 clamp(100px,12vw,170px); background:#fffdf8; }
.gallery-toolbar { display:flex; flex-wrap:wrap; gap:8px; padding:34px 0 46px; border-top:1px solid rgba(23,51,41,.11); }
.filter-button { padding:11px 18px; border:1px solid rgba(23,51,41,.18); border-radius:999px; background:transparent; color:#24473a; cursor:pointer; font:700 .72rem/1 "DM Sans",sans-serif; letter-spacing:.08em; text-transform:uppercase; transition:background .3s ease,color .3s ease,border-color .3s ease; }
.filter-button:hover,.filter-button.active { border-color:#214b3c; background:#214b3c; color:#fff; }
.gallery-grid { display:grid; grid-template-columns:repeat(12,minmax(0,1fr)); grid-auto-flow:dense; gap:14px; }
.gallery-item { position:relative; grid-column:span 4; min-height:0; padding:0; overflow:hidden; border:0; border-radius:5px; background:#d9ddd3; cursor:zoom-in; }
.gallery-item.wide { grid-column:span 8; }
.gallery-item img { display:block; width:100%; height:100%; aspect-ratio:4/5; object-fit:cover; filter:saturate(.93); transition:transform 1s cubic-bezier(.2,.7,.2,1),filter .5s ease; }
.gallery-item.wide img { aspect-ratio:16/9; }
.gallery-item::after { content:"View"; position:absolute; right:16px; bottom:16px; display:grid; width:54px; height:54px; place-items:center; border:1px solid rgba(255,255,255,.62); border-radius:50%; background:rgba(13,39,30,.35); color:#fff; font-size:.65rem; font-weight:700; letter-spacing:.08em; opacity:0; transform:scale(.78); backdrop-filter:blur(6px); transition:opacity .35s ease,transform .45s cubic-bezier(.2,.7,.2,1); }
.gallery-item:hover img,.gallery-item:focus-visible img { transform:scale(1.035); filter:saturate(1.06); }
.gallery-item:hover::after,.gallery-item:focus-visible::after { opacity:1; transform:scale(1); }
.gallery-item[hidden] { display:none; }

.gallery-quote { padding:clamp(100px,13vw,180px) 0; background:#173329; color:#fff; text-align:center; }
.gallery-quote .section-kicker { color:#d9b968; }
.gallery-quote blockquote { max-width:1050px; margin:20px auto 42px; color:#fff; font-family:"Playfair Display",Georgia,serif; font-size:clamp(3.2rem,7vw,7rem); font-weight:500; line-height:.98; letter-spacing:-.05em; }

.lightbox { position:fixed; inset:0; z-index:1200; display:grid; grid-template-columns:90px minmax(0,1fr) 90px; align-items:center; padding:34px; opacity:0; visibility:hidden; pointer-events:none; transition:opacity .35s ease,visibility .35s ease; }
.lightbox.open { opacity:1; visibility:visible; pointer-events:auto; }
.lightbox-backdrop { position:absolute; inset:0; background:rgba(7,22,17,.96); backdrop-filter:blur(14px); }
.lightbox figure { position:relative; z-index:1; display:flex; max-width:min(1180px,100%); max-height:calc(100vh - 68px); flex-direction:column; align-items:center; justify-self:center; margin:0; }
.lightbox figure img { display:block; max-width:100%; max-height:calc(100vh - 135px); border-radius:3px; object-fit:contain; box-shadow:0 24px 80px rgba(0,0,0,.38); }
.lightbox figcaption { display:flex; width:100%; justify-content:space-between; gap:24px; padding-top:14px; color:#fff; font-size:.85rem; }
.lightbox figcaption small { color:rgba(255,255,255,.55); }
.lightbox-close,.lightbox-nav { position:relative; z-index:2; display:grid; place-items:center; border:1px solid rgba(255,255,255,.25); border-radius:50%; background:rgba(255,255,255,.04); color:#fff; cursor:pointer; transition:background .3s ease,transform .3s ease; }
.lightbox-close:hover,.lightbox-nav:hover { background:rgba(255,255,255,.14); }
.lightbox-close { position:absolute; top:25px; right:25px; width:48px; height:48px; font-size:1.8rem; }
.lightbox-nav { width:54px; height:54px; justify-self:center; font-size:1.35rem; }
.lightbox-nav:hover { transform:scale(1.06); }
body.lightbox-open { overflow:hidden; }

@media (max-width:900px) {
  .gallery-hero { min-height:760px; }
  .gallery-hero-shade { background:linear-gradient(0deg,rgba(7,28,21,.88),rgba(7,28,21,.24) 75%); }
  .gallery-intro-grid { grid-template-columns:1fr; gap:44px; }
  .gallery-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .gallery-item,.gallery-item.wide { grid-column:span 1; }
  .gallery-item.wide img { aspect-ratio:4/5; }
  .gallery-item:nth-child(1),.gallery-item:nth-child(7),.gallery-item:nth-child(9) { grid-column:span 2; }
  .gallery-item:nth-child(1) img,.gallery-item:nth-child(7) img,.gallery-item:nth-child(9) img { aspect-ratio:16/9; }
  .lightbox { grid-template-columns:58px minmax(0,1fr) 58px; padding:24px 12px; }
}

@media (max-width:650px) {
  .gallery-hero { min-height:700px; }
  .gallery-hero-media img { object-position:58% center; }
  .gallery-hero-copy { padding-bottom:65px; }
  .gallery-hero h1 { font-size:clamp(4rem,20vw,6rem); }
  .gallery-hero-index { display:none; }
  .gallery-intro h2 { font-size:clamp(3rem,14vw,4.7rem); }
  .gallery-toolbar { padding-bottom:30px; overflow-x:auto; flex-wrap:nowrap; scrollbar-width:none; }
  .gallery-toolbar::-webkit-scrollbar { display:none; }
  .filter-button { flex:0 0 auto; }
  .gallery-grid { gap:7px; }
  .gallery-item::after { display:none; }
  .gallery-quote blockquote { font-size:clamp(3rem,14vw,4.8rem); }
  .lightbox { display:block; padding:70px 14px 82px; }
  .lightbox figure { height:100%; justify-content:center; }
  .lightbox figure img { max-height:calc(100vh - 190px); }
  .lightbox-nav { position:absolute; bottom:22px; }
  .lightbox-prev { left:calc(50% - 66px); }
  .lightbox-next { right:calc(50% - 66px); }
  .lightbox-close { top:15px; right:15px; }
}

@media (prefers-reduced-motion:reduce) {
  .gallery-item img,.gallery-item::after,.lightbox { transition:none; }
}
