.gallery-page { --gallery-accent: #e8a34a; background: #080807; }
.gallery-page--haunted { --gallery-accent: #a12b25; background: #050505; }
.gallery-page .site-header { background: linear-gradient(180deg,rgba(0,0,0,.62),transparent); }

.gallery-hero { position: relative; display: grid; align-items: end; min-height: 94svh; padding: 145px clamp(24px,6vw,104px) clamp(66px,8vw,120px); overflow: hidden; isolation: isolate; }
.gallery-hero-media { position: absolute; z-index: -4; inset: -5%; background-image: var(--cover); background-position: center; background-size: cover; filter: brightness(.5) saturate(.72) contrast(1.2); animation: gallery-cover-in 1.7s var(--ease-out) both; }
.gallery-hero::before { content: ""; position: absolute; z-index: -3; inset: 0; background: linear-gradient(90deg,rgba(0,0,0,.87),rgba(0,0,0,.15) 65%,rgba(0,0,0,.42)),linear-gradient(0deg,#080807,transparent 46%,rgba(0,0,0,.24)); }
.gallery-hero::after { content: ""; position: absolute; z-index: -2; right: 0; bottom: 0; left: 0; height: 1px; background: linear-gradient(90deg,transparent,var(--gallery-accent),transparent); opacity: .6; box-shadow: 0 0 18px var(--gallery-accent); }
.gallery-page--haunted .gallery-hero-media { filter: brightness(.36) saturate(.42) contrast(1.35) hue-rotate(-8deg); }
.gallery-page--haunted .gallery-hero::before { background: radial-gradient(circle at 70% 45%,transparent,rgba(30,0,0,.25) 40%,rgba(0,0,0,.75)),linear-gradient(90deg,rgba(0,0,0,.92),rgba(0,0,0,.24)),linear-gradient(0deg,#050505,transparent 48%); }
.gallery-hero-content { width: min(1180px,100%); }
.gallery-kicker { margin: 0 0 clamp(28px,4vw,50px); color: var(--gallery-accent); font-size: 10px; font-weight: 720; letter-spacing: .28em; text-transform: uppercase; }
.gallery-hero h1 { margin: 0; font-size: clamp(72px,14vw,220px); font-weight: 760; line-height: .75; letter-spacing: -.075em; text-transform: uppercase; text-shadow: 0 10px 44px rgba(0,0,0,.5); }
.gallery-hero h1 span { display: block; margin-left: clamp(25px,13vw,220px); color: transparent; font-size: .64em; font-weight: 430; -webkit-text-stroke: 1px rgba(255,255,255,.84); }
.gallery-deck { display: flex; align-items: end; justify-content: space-between; gap: 30px; max-width: 960px; margin: clamp(42px,6vw,76px) 0 0 clamp(20px,9vw,150px); padding-top: 20px; border-top: 1px solid rgba(255,255,255,.22); }
.gallery-deck p { max-width: 560px; margin: 0; color: rgba(255,255,255,.66); font-size: clamp(14px,1.3vw,19px); line-height: 1.6; }
.gallery-deck a { display: grid; place-items: center; width: 54px; height: 54px; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.4); border-radius: 50%; color: var(--gallery-accent); text-decoration: none; transition: .3s ease; }
.gallery-deck a:hover { background: #fff; border-color: #fff; color: #090909; transform: translateY(4px); }

.archive { min-height: 100vh; padding: clamp(100px,12vw,190px) clamp(14px,3vw,48px) 150px; }
.archive-head { display: grid; grid-template-columns: minmax(180px,.7fr) minmax(0,2fr) auto; align-items: end; gap: 5vw; margin: 0 clamp(10px,3vw,55px) clamp(70px,8vw,120px); }
.archive-head .section-index { margin: 0 0 12px; }
.archive-head h2 { margin: 0; font-size: clamp(52px,8.4vw,140px); font-weight: 680; line-height: .8; letter-spacing: -.065em; }
.archive-count { margin: 0 0 9px; color: #716d66; font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; white-space: nowrap; }
.archive-count span { color: var(--gallery-accent); }

.gallery-grid { display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); grid-auto-flow: dense; gap: clamp(7px,1vw,15px); max-width: 1740px; margin: 0 auto; }
.gallery-item { position: relative; grid-column: span 3; width: 100%; min-width: 0; margin: 0; padding: 0; overflow: hidden; border: 0; background: #151412; color: #fff; cursor: zoom-in; aspect-ratio: var(--ratio); text-align: left; isolation: isolate; }
.gallery-item.is-wide { grid-column: span 6; }
.gallery-item.is-medium { grid-column: span 4; }
.gallery-item.is-tall { grid-row: span 2; }
.gallery-item::before { content: ""; position: absolute; z-index: 2; inset: 0; border: 1px solid rgba(255,255,255,.1); pointer-events: none; transition: border-color .35s ease; }
.gallery-item::after { content: ""; position: absolute; z-index: 1; inset: 0; background: radial-gradient(circle at var(--pointer-x,50%) var(--pointer-y,50%),rgba(239,173,76,.2),transparent 38%),linear-gradient(0deg,rgba(0,0,0,.72),transparent 45%); opacity: 0; transition: opacity .45s ease; }
.gallery-page--haunted .gallery-item::after { background: radial-gradient(circle at var(--pointer-x,50%) var(--pointer-y,50%),rgba(143,20,20,.28),transparent 40%),linear-gradient(0deg,rgba(0,0,0,.78),transparent 48%); }
.gallery-item img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; filter: saturate(.72) contrast(1.09); transform: scale(1.018); transition: opacity .6s ease,transform .85s var(--ease-out),filter .55s ease; }
.gallery-item img.is-loaded { opacity: 1; }
.gallery-page--haunted .gallery-item img { filter: saturate(.48) contrast(1.2) brightness(.83); }
.gallery-item span { position: absolute; z-index: 3; right: 16px; bottom: 14px; color: rgba(255,255,255,.74); font-size: 9px; font-weight: 700; letter-spacing: .18em; opacity: 0; transform: translateY(8px); transition: opacity .35s ease,transform .35s var(--ease-out); }
.gallery-item:hover::before, .gallery-item:focus-visible::before { border-color: rgba(255,255,255,.44); }
.gallery-item:hover::after, .gallery-item:focus-visible::after { opacity: 1; }
.gallery-item:hover img, .gallery-item:focus-visible img { filter: saturate(1) contrast(1.03); transform: scale(1.055); }
.gallery-page--haunted .gallery-item:hover img, .gallery-page--haunted .gallery-item:focus-visible img { filter: saturate(.7) contrast(1.15) brightness(.9); }
.gallery-item:hover span, .gallery-item:focus-visible span { opacity: 1; transform: none; }
.gallery-loader { display: grid; place-items: center; min-height: 130px; color: #6e6962; font-size: 9px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.gallery-loader i { width: 5px; height: 5px; margin-bottom: 13px; border-radius: 50%; background: var(--gallery-accent); box-shadow: 0 0 16px var(--gallery-accent); animation: pulse 1.5s infinite; }

.gallery-next { position: relative; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 30px; min-height: 260px; padding: 55px clamp(24px,6vw,104px); overflow: hidden; border-top: 1px solid var(--line); background: #070706; text-decoration: none; isolation: isolate; }
.gallery-next::before { content: ""; position: absolute; z-index: -1; inset: -20% 0; background-image: linear-gradient(90deg,rgba(0,0,0,.88),rgba(0,0,0,.35),rgba(0,0,0,.76)),var(--next-image); background-position: center; background-size: cover; opacity: .32; filter: saturate(.55); transition: opacity .5s ease,transform 1s var(--ease-out); }
.gallery-next:hover::before { opacity: .7; transform: scale(1.025); }
.gallery-next small { color: var(--gallery-accent); font-size: 9px; font-weight: 700; letter-spacing: .23em; text-transform: uppercase; }
.gallery-next strong { font-size: clamp(48px,8vw,120px); font-weight: 700; line-height: .8; letter-spacing: -.06em; text-transform: uppercase; }
.gallery-next i { color: var(--gallery-accent); font-size: 32px; font-style: normal; transition: transform .35s var(--ease-out); }
.gallery-next:hover i { transform: translate(8px,-8px); }

.lightbox { width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; padding: 0; overflow: hidden; border: 0; background: rgba(3,3,3,.95); color: #fff; opacity: 0; transition: opacity .25s ease,display .25s allow-discrete,overlay .25s allow-discrete; }
.lightbox[open] { display: grid; place-items: center; opacity: 1; }
.lightbox::backdrop { background: rgba(0,0,0,.86); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.lightbox-shell { position: relative; display: grid; place-items: center; width: 100%; height: 100%; padding: 70px 9vw 64px; }
.lightbox-figure { display: grid; place-items: center; width: 100%; height: 100%; margin: 0; }
.lightbox-image { display: block; width: auto; max-width: min(86vw,1400px); height: auto; max-height: calc(100vh - 145px); object-fit: contain; opacity: 0; transform: scale(.985); filter: drop-shadow(0 30px 70px rgba(0,0,0,.75)); transition: opacity .22s ease,transform .4s var(--ease-out); }
.lightbox-image.is-ready { opacity: 1; transform: none; }
.lightbox-close, .lightbox-nav { position: absolute; z-index: 2; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.24); border-radius: 50%; background: rgba(8,8,8,.38); color: #fff; cursor: pointer; transition: background .25s ease,color .25s ease,border-color .25s ease; }
.lightbox-close:hover, .lightbox-close:focus-visible, .lightbox-nav:hover, .lightbox-nav:focus-visible { background: #fff; border-color: #fff; color: #090909; }
.lightbox-close { top: 23px; right: 28px; width: 46px; height: 46px; font-size: 22px; font-weight: 300; }
.lightbox-nav { top: 50%; width: 54px; height: 54px; font-size: 25px; transform: translateY(-50%); }
.lightbox-prev { left: 28px; }
.lightbox-next { right: 28px; }
.lightbox-caption { position: absolute; right: 0; bottom: 25px; left: 0; margin: 0; color: #858078; font-size: 9px; font-weight: 700; letter-spacing: .22em; text-align: center; text-transform: uppercase; }
.lightbox-caption span { color: var(--gallery-accent); }
.lightbox-original { position: absolute; right: 28px; bottom: 26px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.25); color: #8b867f; font-size: 8px; font-weight: 700; letter-spacing: .18em; text-decoration: none; text-transform: uppercase; transition: color .25s ease,border-color .25s ease; }
.lightbox-original:hover, .lightbox-original:focus-visible { color: #fff; border-bottom-color: var(--gallery-accent); }

@keyframes gallery-cover-in { from { opacity: 0; transform: scale(1.12); } to { opacity: 1; transform: scale(1); } }

@media (max-width: 980px) {
  .gallery-grid { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .gallery-item { grid-column: span 2; }
  .gallery-item.is-wide { grid-column: span 4; }
  .gallery-item.is-medium { grid-column: span 3; }
  .archive-head { grid-template-columns: 1fr 2fr; }
  .archive-count { grid-column: 2; }
}

@media (max-width: 680px) {
  .gallery-hero { min-height: 88svh; padding: 118px 20px 70px; }
  .gallery-hero h1 { font-size: clamp(61px,21vw,108px); }
  .gallery-hero h1 span { margin-left: 8vw; font-size: .61em; }
  .gallery-deck { margin-top: 42px; margin-left: 8vw; }
  .gallery-deck p { font-size: 14px; }
  .archive { padding: 96px 7px 110px; }
  .archive-head { display: block; margin: 0 13px 62px; }
  .archive-head .section-index { margin-bottom: 52px; }
  .archive-count { margin-top: 24px; }
  .gallery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
  .gallery-item, .gallery-item.is-medium { grid-column: span 1; min-height: 150px; }
  .gallery-item.is-wide { grid-column: span 2; }
  .gallery-item:nth-child(5n) { grid-column: span 2; }
  .gallery-next { grid-template-columns: 1fr auto; min-height: 220px; padding: 48px 20px; }
  .gallery-next small { grid-column: 1/-1; }
  .lightbox-shell { padding: 72px 14px 68px; }
  .lightbox-image { max-width: calc(100vw - 28px); max-height: calc(100vh - 160px); }
  .lightbox-close { top: 16px; right: 16px; width: 44px; height: 44px; }
  .lightbox-nav { top: auto; bottom: 15px; width: 46px; height: 46px; transform: none; }
  .lightbox-prev { left: 16px; }
  .lightbox-next { right: 16px; }
  .lightbox-caption { bottom: 31px; }
  .lightbox-original { top: 29px; right: 78px; bottom: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-hero-media { animation: none; }
  .gallery-item img { transform: none; }
  .gallery-page--haunted .gallery-hero::before { background: linear-gradient(90deg,rgba(0,0,0,.9),rgba(0,0,0,.35)),linear-gradient(0deg,#050505,transparent 50%); }
}

@starting-style { .lightbox[open] { opacity: 0; } }
