.gallery-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 76% 9%, rgba(143, 29, 43, .24), transparent 28rem),
    linear-gradient(135deg, #11080b 0%, #070506 48%, #1c0b10 100%);
}
.gallery-page::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .22;
  background: repeating-linear-gradient(90deg, transparent 0 96px, rgba(243, 234, 216, .025) 97px 98px);
}
.gallery-header {
  position: fixed;
  z-index: 150;
  inset: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  min-height: 76px;
  padding: 0 clamp(20px, 4vw, 70px);
  background: linear-gradient(to bottom, rgba(13, 7, 9, .94), rgba(13, 7, 9, .12));
}
.gallery-back, .gallery-brand { text-decoration: none; }
.gallery-back {
  justify-self: start;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .08em;
  transition: color .3s ease, transform .3s ease;
}
.gallery-back:hover { color: var(--ivory); transform: translateX(-3px); }
.gallery-brand {
  color: var(--ivory);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .22em;
}
.gallery-brand span { color: var(--champagne); font-size: 11px; letter-spacing: .1em; }
.gallery-header-count {
  justify-self: end;
  color: var(--champagne);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .18em;
}
.gallery-hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(770px, 88vh);
  padding: 150px 22px 90px;
  text-align: center;
  overflow: hidden;
}
.gallery-hero::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 1px;
  height: 92px;
  background: linear-gradient(to bottom, transparent, rgba(217, 195, 160, .65));
}
.gallery-hero > * { position: relative; z-index: 1; }
.gallery-hero__ornament {
  position: absolute;
  top: 25%;
  left: 50%;
  width: min(70vw, 520px);
  aspect-ratio: 1;
  transform: translateX(-50%);
  opacity: .5;
  border: 1px solid rgba(217, 195, 160, .18);
  border-radius: 50%;
  box-shadow: 0 0 0 42px rgba(217, 195, 160, .025), 0 0 0 84px rgba(217, 195, 160, .018);
}
.gallery-hero__ornament::before, .gallery-hero__ornament::after {
  content: '';
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(217, 195, 160, .12);
  transform: rotate(45deg);
}
.gallery-hero__ornament::after { transform: rotate(-45deg); }
.gallery-hero__ornament span { position: absolute; top: -4px; left: 50%; width: 7px; height: 7px; border: 1px solid var(--champagne); border-radius: 50%; background: var(--ink); }
.gallery-hero__ornament span:nth-child(2) { top: auto; bottom: -4px; }
.gallery-hero__ornament span:nth-child(3) { top: 50%; left: auto; right: -4px; }
.gallery-hero h1 {
  margin: 28px 0 28px;
  font: 500 clamp(4.5rem, 11vw, 10rem) / .85 var(--display);
  letter-spacing: -.075em;
}
.gallery-hero h1 em { color: var(--champagne); font-style: normal; }
.gallery-hero__intro { max-width: 410px; margin: 0; color: var(--muted); font-size: 15px; }
.gallery-hero__meta { display: flex; align-items: center; gap: 16px; margin-top: 44px; color: var(--champagne); font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.gallery-hero__meta strong { color: var(--ivory); font-size: 16px; }
.gallery-hero__rule { width: 42px; height: 1px; background: rgba(217, 195, 160, .48); }
.gallery-room { position: relative; padding: 110px clamp(22px, 8vw, 130px) 150px; background: rgba(5, 3, 4, .33); }
.gallery-room__top { width: min(1180px, 100%); margin: 0 auto 45px; display: flex; align-items: end; justify-content: space-between; gap: 40px; }
.gallery-room h2 { margin: 22px 0 0; font: 500 clamp(3.8rem, 7vw, 7rem) / .9 var(--display); letter-spacing: -.065em; }
.gallery-room__note { max-width: 330px; margin: 0 0 8px; color: var(--muted); }
.gallery-toolbar { width: min(1180px, 100%); margin: 0 auto 32px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid rgba(217, 195, 160, .2); border-bottom: 1px solid rgba(217, 195, 160, .2); }
.gallery-filters { display: flex; align-items: center; gap: 5px; overflow-x: auto; scrollbar-width: none; }
.gallery-filters::-webkit-scrollbar { display: none; }
.gallery-filter { min-height: 45px; padding: 0 14px; color: var(--muted); border: 0; background: transparent; font-size: 11px; white-space: nowrap; transition: color .25s ease, background-color .25s ease; }
.gallery-filter:hover, .gallery-filter.is-active { color: var(--ivory); background: rgba(217, 195, 160, .12); }
.gallery-filter.is-active { box-shadow: inset 0 -2px var(--champagne); }
.gallery-toolbar__hint { flex: 0 0 auto; color: rgba(243, 234, 216, .42); font-size: 10px; letter-spacing: .08em; }
.gallery-grid { width: min(1180px, 100%); margin: 0 auto; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); align-items: start; }
.gallery-photo { position: relative; grid-column: span 4; min-width: 0; padding: 0; color: var(--ivory); border: 0; background: transparent; text-align: left; opacity: 0; transform: translate3d(0, 20px, 0); animation: gallery-card-in .7s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: calc(var(--photo-index, 0) * 55ms); }
.gallery-photo:nth-child(3n + 2) { margin-top: 44px; }
.gallery-photo:nth-child(5n + 1) { grid-column: span 5; }
.gallery-photo:nth-child(5n + 2) { grid-column: span 3; }
.gallery-photo__media { position: relative; display: block; overflow: hidden; aspect-ratio: .82; border: 1px solid rgba(217, 195, 160, .34); background: #1a0d11; box-shadow: 14px 22px 35px rgba(0, 0, 0, .28); }
.gallery-photo:nth-child(3n + 2) .gallery-photo__media { aspect-ratio: 1 / 1.18; }
.gallery-photo:nth-child(4n + 3) .gallery-photo__media { aspect-ratio: 1 / .86; }
.gallery-photo__media::after { content: ''; position: absolute; inset: 0; pointer-events: none; border: 10px solid rgba(10, 5, 7, .12); box-shadow: inset 0 0 0 1px rgba(255, 244, 201, .18); }
.gallery-photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .7, .2, 1), filter .7s ease; }
.gallery-photo:hover img, .gallery-photo:focus-visible img { transform: scale(1.045); filter: saturate(1.08); }
.gallery-photo__caption { display: flex; justify-content: space-between; gap: 16px; margin-top: 13px; color: var(--champagne); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.gallery-photo__caption span:last-child { color: rgba(243, 234, 216, .45); font-variant-numeric: tabular-nums; }
.gallery-empty { grid-column: 2 / 12; min-height: 350px; display: grid; place-items: center; padding: 70px 22px; border: 1px solid rgba(217, 195, 160, .3); background: radial-gradient(circle at 50% 0, rgba(143, 29, 43, .23), transparent 70%), #12090d; text-align: center; }
.gallery-empty__seal { display: grid; place-items: center; width: 86px; height: 86px; margin: 0 auto 24px; border: 1px solid var(--champagne); border-radius: 50%; color: var(--champagne); font: 500 28px var(--display); transform: rotate(-12deg); }
.gallery-empty h3 { margin: 0 0 10px; font: 500 32px / 1 var(--display); }
.gallery-empty p { max-width: 390px; margin: 0; color: var(--muted); }
.gallery-note { width: min(920px, calc(100% - 44px)); margin: 0 auto; padding: 84px 0 150px; display: grid; grid-template-columns: 100px minmax(0, 1fr) auto; align-items: start; gap: 36px; }
.gallery-note__number { color: var(--champagne); font: 500 28px / 1 var(--display); }
.gallery-note p:last-child { max-width: 430px; margin: 14px 0 0; color: var(--muted); }
.gallery-note__back { align-self: end; color: var(--ivory); font-size: 12px; text-underline-offset: 6px; }
.gallery-note__back span { color: var(--champagne); }
.gallery-footer { display: flex; justify-content: space-between; gap: 20px; padding: 24px clamp(22px, 8vw, 130px); color: rgba(243, 234, 216, .5); border-top: 1px solid rgba(217, 195, 160, .18); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.gallery-lightbox { width: min(94vw, 1180px); max-width: none; padding: 0; color: var(--ivory); border: 1px solid rgba(217, 195, 160, .5); background: #0b0608; box-shadow: 0 30px 100px rgba(0, 0, 0, .7); }
.gallery-lightbox::backdrop { background: rgba(3, 1, 2, .88); backdrop-filter: blur(7px); }
.gallery-lightbox__stage { min-height: min(84vh, 840px); display: grid; grid-template-columns: 70px minmax(0, 1fr) 70px; align-items: center; gap: 18px; padding: 38px 28px 28px; }
.gallery-lightbox figure { min-width: 0; margin: 0; text-align: center; }
.gallery-lightbox img { display: block; width: min(100%, 900px); max-height: 74vh; margin: 0 auto; object-fit: contain; }
.gallery-lightbox figcaption { display: flex; justify-content: space-between; gap: 16px; margin-top: 16px; color: var(--champagne); font-size: 11px; letter-spacing: .15em; text-transform: uppercase; }
.gallery-lightbox figcaption span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.gallery-lightbox__arrow, .gallery-lightbox__close { color: var(--ivory); border: 1px solid rgba(217, 195, 160, .42); background: transparent; transition: color .25s ease, background-color .25s ease; }
.gallery-lightbox__arrow { width: 52px; height: 52px; font-size: 22px; }
.gallery-lightbox__arrow:hover { color: var(--ink); background: var(--champagne); }
.gallery-lightbox__close { position: absolute; z-index: 2; top: 12px; right: 14px; width: 42px; height: 42px; border: 0; font-size: 30px; line-height: 1; }
.gallery-lightbox__close:hover { color: var(--champagne); }
@keyframes gallery-card-in { to { opacity: 1; transform: translate3d(0, 0, 0); } }
@media (prefers-reduced-motion: reduce) {
  .gallery-photo { opacity: 1; transform: none; animation: none; }
  .gallery-photo img { transition: none; }
}
@media (max-width: 767px) {
  .gallery-header { min-height: 58px; padding: 0 16px; background: rgba(13, 7, 9, .9); backdrop-filter: blur(9px); }
  .gallery-back span { display: none; }
  .gallery-back { font-size: 20px; }
  .gallery-brand { font-size: 12px; letter-spacing: .12em; }
  .gallery-brand span { font-size: 9px; }
  .gallery-header-count { font-size: 9px; }
  .gallery-hero { min-height: min(700px, 86svh); padding: 120px 22px 86px; }
  .gallery-hero h1 { font-size: clamp(4.1rem, 18vw, 7rem); }
  .gallery-hero__intro { font-size: 14px; }
  .gallery-hero__meta { gap: 10px; font-size: 8px; letter-spacing: .1em; }
  .gallery-room { padding: 86px 22px 110px; }
  .gallery-room__top { display: block; margin-bottom: 30px; }
  .gallery-room h2 { font-size: clamp(3.6rem, 16vw, 6rem); }
  .gallery-room__note { margin-top: 22px; }
  .gallery-toolbar { display: block; padding: 0; }
  .gallery-filters { margin-inline: -8px; }
  .gallery-toolbar__hint { display: block; padding: 12px 0; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
  .gallery-photo, .gallery-photo:nth-child(5n + 1), .gallery-photo:nth-child(5n + 2) { grid-column: span 1; }
  .gallery-photo:nth-child(3n + 2) { margin-top: 22px; }
  .gallery-photo__media, .gallery-photo:nth-child(3n + 2) .gallery-photo__media, .gallery-photo:nth-child(4n + 3) .gallery-photo__media { aspect-ratio: .76; }
  .gallery-photo__media::after { border-width: 6px; }
  .gallery-photo__caption { display: block; margin-top: 9px; font-size: 8px; line-height: 1.5; }
  .gallery-photo__caption span:last-child { display: block; margin-top: 2px; }
  .gallery-empty { grid-column: 1 / -1; min-height: 300px; }
  .gallery-note { width: calc(100% - 44px); grid-template-columns: 1fr; gap: 18px; padding-block: 70px 110px; }
  .gallery-note__back { margin-top: 12px; }
  .gallery-footer { display: block; padding: 22px; line-height: 2; }
  .gallery-lightbox { width: calc(100vw - 24px); }
  .gallery-lightbox__stage { min-height: 70svh; grid-template-columns: 42px minmax(0, 1fr) 42px; gap: 6px; padding: 38px 8px 20px; }
  .gallery-lightbox__arrow { width: 38px; height: 44px; font-size: 18px; }
  .gallery-lightbox figcaption { display: block; margin-inline: 6px; font-size: 9px; line-height: 1.7; }
  .gallery-lightbox figcaption span:last-child { display: block; }
}
