:root {
    --gallery-ink: var(--ink);
    --gallery-muted: var(--muted);
    --gallery-cream: var(--cream);
    --gallery-card: var(--card);
    --gallery-line: var(--line);
    --gallery-peach: var(--peach);
    --gallery-bronze: var(--bronze);
}

.gallery-skip-link { background: var(--peach); left: 16px; padding: 8px 14px; position: fixed; top: -100px; z-index: 100; }
.gallery-skip-link:focus { top: 16px; }
.gallery-shell { margin: 0 auto; max-width: 1280px; padding-left: 32px; padding-right: 32px; width: 100%; }
.gallery-hero { padding: 185px 0 106px; }
.gallery-eyebrow { align-items: center; color: var(--bronze); display: flex; font-size: 11px; font-weight: 700; letter-spacing: .2em; margin: 0 0 18px; text-transform: uppercase; }
.gallery-eyebrow span { background: currentColor; display: inline-block; height: 1px; margin-right: 12px; width: 40px; }
.gallery-hero h1, .gallery-section-heading h2, .gallery-empty h3 { font-family: "Playfair Display", Georgia, serif; font-weight: 500; letter-spacing: -.04em; line-height: 1.02; margin: 0; }
.gallery-hero h1 { font-size: clamp(48px, 7vw, 90px); max-width: 900px; }
.gallery-hero em, .gallery-section-heading em, .gallery-empty em { color: var(--bronze-deep); font-style: italic; }
.gallery-hero__intro { color: var(--muted); font-size: 15px; line-height: 1.75; margin: 28px 0 0; max-width: 520px; }
.gallery-work { padding: 20px 0 130px; }
.gallery-section-heading { align-items: end; border-top: 1px solid var(--line); display: flex; justify-content: space-between; padding-top: 34px; }
.gallery-section-heading h2 { font-size: clamp(36px, 5vw, 62px); }
.gallery-section-heading__copy { color: var(--muted); font-size: 13px; margin: 0 0 7px; }
.gallery-grid { column-count: 3; column-gap: 22px; margin-top: 48px; }
.gallery-card { break-inside: avoid; margin: 0 0 22px; }
.gallery-card__button { background: var(--card); border: 0; border-radius: 22px; display: block; overflow: hidden; padding: 0; position: relative; width: 100%; }
.gallery-card__button::after { background: linear-gradient(180deg, transparent 60%, rgba(27, 21, 16, .22)); content: ""; inset: 0; opacity: 0; pointer-events: none; position: absolute; transition: opacity .3s ease; }
.gallery-card__button img { display: block; height: auto; max-height: 760px; object-fit: cover; transition: transform .6s cubic-bezier(.22, 1, .36, 1); width: 100%; }
.gallery-card__button:hover img, .gallery-card__button:focus-visible img { transform: scale(1.035); }
.gallery-card__button:hover::after, .gallery-card__button:focus-visible::after { opacity: 1; }
.gallery-card__zoom { align-items: center; background: rgba(255, 253, 249, .93); border-radius: 50%; bottom: 17px; display: flex; font-size: 25px; height: 42px; justify-content: center; line-height: 1; opacity: 0; position: absolute; right: 17px; transform: translateY(5px); transition: opacity .25s ease, transform .25s ease; width: 42px; z-index: 1; }
.gallery-card__button:hover .gallery-card__zoom, .gallery-card__button:focus-visible .gallery-card__zoom { opacity: 1; transform: translateY(0); }
.gallery-card__caption { color: var(--muted); font-size: 12px; margin: 10px 4px 0; }
.gallery-empty { border: 1px solid var(--line); border-radius: 24px; margin-top: 48px; padding: 80px 30px; text-align: center; }
.gallery-empty .gallery-eyebrow { justify-content: center; }
.gallery-empty h3 { font-size: clamp(36px, 5vw, 58px); }
.gallery-empty > p:last-child { color: var(--muted); margin: 20px 0 0; }

.gallery-lightbox { align-items: center; display: flex; inset: 0; justify-content: center; opacity: 0; pointer-events: none; position: fixed; visibility: hidden; transition: opacity .2s ease; z-index: 80; }
.gallery-lightbox.is-open { opacity: 1; pointer-events: auto; visibility: visible; }
.gallery-lightbox__backdrop { background: rgba(27, 21, 16, .78); border: 0; inset: 0; position: absolute; }
.gallery-lightbox__panel { max-height: calc(100dvh - 64px); max-width: min(calc(100vw - 144px), 1000px); position: relative; z-index: 1; }
.gallery-lightbox__panel img { border-radius: 14px; display: block; max-height: calc(100dvh - 152px); max-width: 100%; object-fit: contain; touch-action: pan-y pinch-zoom; }
.gallery-lightbox__panel p { color: #fff; font-size: 13px; margin: 10px 0 0; text-align: center; }
.gallery-lightbox__panel .gallery-lightbox__counter { color: rgba(255,255,255,.75); font-size: 12px; font-variant-numeric: tabular-nums; margin-top: 6px; }
.gallery-lightbox__nav { align-items: center; background: var(--card); border: 0; border-radius: 50%; color: var(--ink); display: flex; height: 48px; justify-content: center; position: absolute; top: 50%; transform: translateY(-50%); transition: background .2s ease; width: 48px; z-index: 2; }
.gallery-lightbox__nav[hidden] { display: none; }
.gallery-lightbox__nav:hover { background: var(--peach); }
.gallery-lightbox__nav svg { fill: none; height: 24px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; width: 24px; }
.gallery-lightbox__nav--previous { left: 16px; }
.gallery-lightbox__nav--next { right: 16px; }
.gallery-lightbox__close { background: var(--card); border: 0; border-radius: 50%; font-size: 25px; height: 44px; line-height: 1; position: absolute; right: -12px; top: -12px; width: 44px; z-index: 2; }
body.gallery-lightbox-open, body.homepage-menu-open { overflow: hidden; }
.homepage-shell-scrolled { background: rgba(247,241,232,.88) !important; box-shadow: 0 10px 30px -18px rgba(27,21,16,.35); backdrop-filter: blur(24px); }
.homepage-mobile-panel { overflow-y: auto; max-width: 100vw; }
.homepage-subscribe-error { color: #e0705a; font-size: 12px; margin-top: 8px; }
.gallery-page :focus-visible { outline: 2px solid var(--bronze); outline-offset: 4px; }

@media (max-width: 980px) { .gallery-grid { column-count: 2; } }
@media (max-width: 720px) {
    .gallery-shell { padding-left: 20px; padding-right: 20px; }
    .gallery-hero { padding: 145px 0 72px; }
    .gallery-hero h1 { font-size: clamp(43px, 13vw, 67px); }
    .gallery-section-heading { align-items: start; flex-direction: column; gap: 18px; }
    .gallery-section-heading__copy { margin: 0; }
    .gallery-work { padding-bottom: 80px; }
    .gallery-grid { column-gap: 14px; margin-top: 32px; }
    .gallery-card { margin-bottom: 14px; }
    .gallery-card__button { border-radius: 15px; }
    .gallery-card__zoom { display: none; }
    .gallery-lightbox__panel { max-width: calc(100vw - 32px); margin-bottom: 60px; }
    .gallery-lightbox__panel img { max-height: calc(100dvh - 210px); }
    .gallery-lightbox__nav { bottom: max(16px, env(safe-area-inset-bottom)); height: 44px; top: auto; transform: none; width: 44px; }
}
@media (prefers-reduced-motion: reduce) {
    .gallery-page *, .gallery-page *::before, .gallery-page *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
