/* Premium project gallery — intentionally isolated from the homepage and admin styles. */
.gallery-page{--g-forest:#13261c;--g-forest2:#203b2b;--g-paper:#faf7f1;--g-cream:#f1ece1;--g-brass:#bd914c;--g-ink:#19231c;--g-muted:#72796f;--g-line:rgba(25,35,28,.12);background:var(--g-paper);color:var(--g-ink)}
.gallery-wrap{width:min(1240px,calc(100% - 48px));margin-inline:auto}
.gallery-hero{position:relative;isolation:isolate;overflow:hidden;min-height:490px;padding:190px 0 84px;background:radial-gradient(ellipse at 88% 22%,rgba(189,145,76,.18),transparent 34%),linear-gradient(120deg,#f9f6ef,#eee9dd)}
.gallery-hero-inner{position:relative;z-index:2}.gallery-kicker{font-size:11px;letter-spacing:.19em;font-weight:800;color:var(--g-brass)}
.gallery-display{font-family:var(--display,Georgia,serif);font-weight:500;letter-spacing:-.045em;line-height:1.02;color:var(--g-forest)}
.gallery-display em{font-weight:400;color:var(--g-brass)}
.gallery-hero h1{font-size:clamp(52px,8vw,104px);max-width:850px;margin:24px 0 20px}
.gallery-hero p{max-width:600px;color:#657066;font-size:clamp(16px,1.6vw,19px);line-height:1.8}
.gallery-hero-link{display:inline-flex;align-items:center;gap:18px;margin-top:30px;padding-bottom:8px;border-bottom:1px solid var(--g-brass);font-size:14px;font-weight:800;color:var(--g-forest)}
.gallery-hero-link span{font-size:20px;color:var(--g-brass)}.gallery-hero-note{display:flex;align-items:center;gap:12px;margin-top:64px;font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:#7d8379;font-weight:700}.gallery-note-line{width:42px;height:1px;background:var(--g-brass)}
.gallery-hero-orb{position:absolute;z-index:1;width:390px;height:390px;border:1px solid rgba(189,145,76,.18);border-radius:50%;right:8%;top:90px;pointer-events:none}.gallery-hero-orb:before,.gallery-hero-orb:after{content:"";position:absolute;border:1px solid rgba(19,38,28,.08);border-radius:50%;inset:35px}.gallery-hero-orb:after{inset:78px}
.gallery-section{padding:92px 0 118px}.gallery-heading-row{display:flex;justify-content:space-between;align-items:end;gap:30px;margin-bottom:36px}.gallery-heading-row h2{font-size:clamp(42px,5.5vw,68px);margin:14px 0}.gallery-heading-row h2 span{color:var(--g-brass)}.gallery-intro{max-width:570px;color:var(--g-muted);font-size:16px}.gallery-count{display:flex;align-items:baseline;gap:9px;padding:0 0 8px;color:var(--g-muted);font-size:12px;white-space:nowrap}.gallery-count strong{font-family:var(--display,Georgia,serif);font-size:40px;font-weight:500;color:var(--g-forest)}
.gallery-filters{display:flex;gap:9px;flex-wrap:wrap;margin:38px 0 28px}.gallery-filter{border:1px solid var(--g-line);background:transparent;color:#5e685f;border-radius:999px;padding:10px 17px;font:600 12px var(--sans,Arial,sans-serif);cursor:pointer;transition:background .2s,color .2s,border-color .2s}.gallery-filter:hover,.gallery-filter.is-active{background:var(--g-forest);border-color:var(--g-forest);color:#fff}
.gallery-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px 22px}.gallery-card{min-width:0;background:#fff;border:1px solid rgba(25,35,28,.08);border-radius:20px;overflow:hidden;box-shadow:0 8px 28px rgba(19,38,28,.045);transition:transform .3s ease,box-shadow .3s ease}.gallery-card:hover{transform:translateY(-5px);box-shadow:0 22px 50px rgba(19,38,28,.12)}.gallery-card[hidden]{display:none}
.gallery-image-link{position:relative;display:block;aspect-ratio:4/3;overflow:hidden;background:linear-gradient(135deg,#e8e2d6,#d5d0c4)}.gallery-image-link img{width:100%;height:100%;display:block;object-fit:cover;transition:transform .65s cubic-bezier(.2,.7,.2,1)}.gallery-card:hover .gallery-image-link img{transform:scale(1.055)}.gallery-image-index{position:absolute;left:15px;top:15px;display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:rgba(250,247,241,.9);backdrop-filter:blur(10px);font-size:10px;font-weight:800;color:var(--g-forest)}.gallery-image-open{position:absolute;right:15px;bottom:15px;display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:var(--g-forest);color:#fff;font-size:18px;opacity:0;transform:translateY(5px);transition:.25s}.gallery-card:hover .gallery-image-open,.gallery-image-link:focus-visible .gallery-image-open{opacity:1;transform:none}
.gallery-card-caption{padding:20px 21px 23px}.gallery-card-meta{display:flex;justify-content:space-between;gap:12px;align-items:center;color:var(--g-brass);font-size:9px;letter-spacing:.12em;text-transform:uppercase;font-weight:800}.gallery-card-meta span:last-child{color:#a0a69d}.gallery-card-caption h3{font-size:19px;line-height:1.3;letter-spacing:-.025em;color:var(--g-forest);margin:13px 0 8px}.gallery-card-caption p{font-size:12px;line-height:1.75;color:var(--g-muted);margin:0;min-height:42px}
.gallery-empty-filter{padding:36px;text-align:center;color:var(--g-muted)}.gallery-empty-state{padding:70px 24px;text-align:center;background:#fff;border:1px solid var(--g-line);border-radius:26px}.gallery-empty-icon{display:grid;place-items:center;width:58px;height:58px;margin:0 auto 20px;border-radius:18px;background:#f1e8d8;color:var(--g-brass);font-size:27px}.gallery-empty-state h3{font-family:var(--display,Georgia,serif);font-size:32px;font-weight:500;color:var(--g-forest);margin-bottom:10px}.gallery-empty-state p{max-width:540px;margin:0 auto 24px;color:var(--g-muted);font-size:14px}.gallery-empty-state code{font-size:12px;background:#f4f1e9;padding:3px 6px;border-radius:5px;overflow-wrap:anywhere}
.gallery-cta{padding:74px 0;background:var(--g-forest);color:#fff}.gallery-cta-inner{display:flex;justify-content:space-between;align-items:center;gap:30px}.gallery-cta .gallery-kicker{color:var(--g-brass)}.gallery-cta h2{font-size:clamp(40px,5vw,62px);color:#fff;margin:15px 0}.gallery-cta h2 em{color:#d9b777}.gallery-cta p{color:rgba(255,255,255,.68);font-size:14px}.gallery-cta .btn{flex:none}.gallery-footer{margin:0}
.gallery-page :focus-visible{outline:3px solid var(--g-brass);outline-offset:4px}
@media(max-width:900px){.gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.gallery-hero-orb{right:-100px;opacity:.65}.gallery-hero{min-height:450px}}
@media(max-width:620px){.gallery-wrap{width:min(100% - 34px,1240px)}.gallery-hero{padding:145px 0 58px;min-height:0}.gallery-hero h1{font-size:clamp(48px,14vw,70px)}.gallery-hero-note{margin-top:42px}.gallery-hero-orb{width:250px;height:250px;right:-150px;top:150px}.gallery-section{padding:65px 0 78px}.gallery-heading-row{display:block}.gallery-count{margin-top:22px}.gallery-filters{flex-wrap:nowrap;overflow-x:auto;padding-bottom:8px;margin-top:28px;scrollbar-width:thin}.gallery-filter{white-space:nowrap}.gallery-grid{grid-template-columns:1fr;gap:19px}.gallery-card-caption{padding:18px}.gallery-card-caption p{min-height:0}.gallery-image-open{opacity:1;transform:none}.gallery-cta{padding:58px 0}.gallery-cta-inner{align-items:flex-start;flex-direction:column}.gallery-cta .btn{white-space:normal}.gallery-empty-state{padding:48px 18px}}
@media(prefers-reduced-motion:reduce){.gallery-page *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* Hero feature carousel: uses the same images as the project collection. */
.gallery-hero{min-height:590px;padding:145px 0 72px;display:flex;align-items:center}
.gallery-hero-inner{display:grid;grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr);align-items:center;gap:clamp(34px,5vw,76px)}
.gallery-hero-copy{position:relative;z-index:2;max-width:620px}
.gallery-hero h1{font-size:clamp(52px,6.3vw,88px);max-width:620px;margin:24px 0 20px}
.gallery-hero-carousel{position:relative;z-index:2;min-width:0;max-width:650px;width:100%;justify-self:end;padding:12px 12px 0;border:1px solid rgba(189,145,76,.22);border-radius:28px;background:rgba(255,255,255,.42);box-shadow:0 24px 70px rgba(37,43,32,.12);backdrop-filter:blur(8px)}
.gallery-hero-slides{position:relative;overflow:hidden;aspect-ratio:1.18/1;border-radius:19px;background:linear-gradient(135deg,#e8e2d6,#cfc8b9)}
.gallery-hero-slide{position:absolute;inset:0;margin:0;opacity:0;visibility:hidden;transform:scale(1.035);transition:opacity .85s ease,transform 5.8s ease,visibility .85s}
.gallery-hero-slide.is-active{opacity:1;visibility:visible;transform:scale(1)}
.gallery-hero-slide img{display:block;width:100%;height:100%;object-fit:cover}
.gallery-hero-slide:after{content:"";position:absolute;inset:35% 0 0;background:linear-gradient(transparent,rgba(12,25,18,.72));pointer-events:none}
.gallery-hero-slide figcaption{position:absolute;z-index:1;left:clamp(18px,3vw,32px);right:20px;bottom:clamp(18px,3vw,30px);display:grid;gap:7px;color:#fff}
.gallery-hero-slide figcaption span{font-size:9px;letter-spacing:.17em;text-transform:uppercase;font-weight:800;color:#e4c58f}
.gallery-hero-slide figcaption strong{font-family:var(--display,Georgia,serif);font-size:clamp(22px,2.8vw,34px);font-weight:500;line-height:1.12}
.gallery-hero-carousel-bottom{display:flex;align-items:center;justify-content:space-between;padding:13px 5px 12px;color:var(--g-muted);font-size:11px;letter-spacing:.08em}
.gallery-hero-carousel-count strong{color:var(--g-forest);font-size:14px}
.gallery-hero-carousel-controls{display:flex;gap:7px}
.gallery-hero-carousel-controls button{width:35px;height:35px;border:1px solid var(--g-line);border-radius:50%;background:#fff;color:var(--g-forest);font-size:15px;cursor:pointer;transition:background .2s,color .2s,border-color .2s}
.gallery-hero-carousel-controls button:hover{background:var(--g-forest);border-color:var(--g-forest);color:#fff}
.gallery-hero-progress{height:2px;overflow:hidden;background:rgba(19,38,28,.1);border-radius:2px;margin:0 5px 10px}
.gallery-hero-progress span{display:block;width:0;height:100%;background:var(--g-brass)}
.gallery-hero-carousel.is-playing .gallery-hero-progress span{animation:galleryHeroProgress 5.5s linear forwards}
@keyframes galleryHeroProgress{from{width:0}to{width:100%}}
.gallery-hero-visual{position:relative;z-index:1;justify-self:end;width:min(100%,560px);height:440px;display:grid;place-items:center;border-radius:30px;background:radial-gradient(circle at 50% 45%,rgba(189,145,76,.16),transparent 55%);}
.gallery-hero-visual span{font:500 clamp(34px,5vw,64px)/1.05 var(--display,Georgia,serif);color:var(--g-forest);text-align:center}.gallery-hero-visual em{color:var(--g-brass)}
@media(max-width:900px){.gallery-hero{padding:135px 0 64px}.gallery-hero-inner{grid-template-columns:1fr 1fr;gap:25px}.gallery-hero h1{font-size:clamp(48px,7vw,70px)}.gallery-hero-note{margin-top:38px}.gallery-hero-carousel{padding:8px 8px 0;border-radius:20px}.gallery-hero-slides{border-radius:14px;aspect-ratio:.92/1}}
@media(max-width:620px){.gallery-hero{padding:125px 0 55px}.gallery-hero-inner{grid-template-columns:1fr;gap:30px}.gallery-hero h1{font-size:clamp(50px,13vw,72px)}.gallery-hero p{font-size:15px}.gallery-hero-note{margin-top:30px}.gallery-hero-carousel{justify-self:stretch;max-width:none;padding:8px 8px 0}.gallery-hero-slides{aspect-ratio:1.08/1}.gallery-hero-slide figcaption strong{font-size:26px}.gallery-hero-visual{height:260px;width:100%}}
@media(prefers-reduced-motion:reduce){.gallery-hero-slide,.gallery-hero-carousel-controls button{transition:none!important}.gallery-hero-carousel.is-playing .gallery-hero-progress span{animation:none;width:100%}}


/* Image recovery and refined card rhythm. */
.gallery-card-caption{display:flex;flex-direction:column;align-items:stretch;gap:0}
.gallery-card-meta{line-height:1.5}
.gallery-card-caption h3{margin:14px 0 9px;overflow-wrap:anywhere}
.gallery-card-caption p{min-height:0;margin:0;max-width:58ch;font-size:13px;line-height:1.75}
.gallery-image-link,.gallery-hero-slides{position:relative}
.gallery-image-link img.is-broken,.gallery-hero-slide img.is-broken{display:none}
.gallery-image-fallback{position:absolute;inset:0;display:grid;place-items:center;padding:24px;text-align:center;color:#6c746b;background:radial-gradient(circle at 50% 35%,rgba(189,145,76,.16),transparent 48%),linear-gradient(135deg,#eee9df,#dcd5c8);font:600 13px/1.5 var(--sans,Arial,sans-serif);letter-spacing:.03em}
.gallery-hero-slide .gallery-image-fallback{color:#fff;background:linear-gradient(135deg,#33483b,#17291f);font-size:15px}
@media(max-width:620px){.gallery-card-caption p{font-size:13px}}
