.gallery-page {
  background: #1d1814;
}

.gallery-hero {
  min-height: 0;
  display: flex;
  align-items: flex-end;
  padding: 8.5rem clamp(1.35rem, 5.5vw, 6rem) 3.5rem;
  color: var(--chalk);
  background:
    radial-gradient(circle at 78% 18%, rgba(199, 164, 91, 0.15), transparent 32%),
    linear-gradient(135deg, #1b1511 0%, #30251e 58%, #211914 100%);
  border-bottom: 1px solid rgba(226, 201, 130, 0.18);
}

.gallery-hero__inner {
  width: min(100%, 1640px);
  margin: 0 auto;
}

.gallery-kicker {
  margin: 0 0 0.8rem;
  color: var(--gold-soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.gallery-hero h1 {
  max-width: 820px;
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(3.7rem, 6vw, 6.6rem);
  font-weight: 300;
  letter-spacing: -0.055em;
  line-height: 0.88;
}

.gallery-hero h1 em {
  color: var(--gold-soft);
  font-weight: 300;
}

.gallery-hero__footer {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: clamp(2rem, 5vw, 6rem);
  align-items: center;
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 250, 240, 0.2);
}

.gallery-hero__footer > p {
  max-width: 760px;
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.25rem, 1.65vw, 1.75rem);
  line-height: 1.3;
}

.gallery-raw-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
}

.gallery-raw-note > span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--gold-soft);
  border-radius: 50%;
  color: var(--gold-soft);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.gallery-raw-note p {
  margin: 0;
  color: rgba(255, 250, 240, 0.7);
  font-size: 0.86rem;
  line-height: 1.7;
}

.gallery-raw-note strong {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--chalk);
  font-weight: 500;
}

.gallery-collection {
  padding: clamp(2.5rem, 4vw, 4rem) clamp(0.85rem, 2.2vw, 2.5rem) clamp(5rem, 9vw, 9rem);
  background: #e9dfd0;
}

.gallery-intro {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  width: min(100%, 1740px);
  margin: 0 auto 1rem;
  padding: 0 0 1rem;
  border-bottom: 1px solid rgba(32, 26, 22, 0.24);
  color: rgba(32, 26, 22, 0.68);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gallery-intro p { margin: 0; }
.gallery-intro span { color: var(--wine); }

.gallery-order-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2rem;
  width: min(100%, 1740px);
  margin: 0 auto 1.5rem;
  padding: clamp(1.25rem, 2vw, 1.8rem) clamp(1.25rem, 2.4vw, 2.25rem);
  color: var(--chalk);
  background: #2b211b;
  border-left: 3px solid var(--gold);
}

.gallery-order-cta__label {
  margin: 0 0 0.35rem;
  color: var(--gold-soft);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.gallery-order-cta h2 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.55rem, 2vw, 2.2rem);
  font-weight: 400;
  line-height: 1.05;
}

.gallery-order-cta div > p:last-child {
  max-width: 760px;
  margin: 0.45rem 0 0;
  color: rgba(255, 250, 240, 0.7);
  font-size: 0.84rem;
  line-height: 1.55;
}

.gallery-order-cta > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 48px;
  padding: 0 1.15rem;
  color: #221912;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.gallery-order-cta > a:hover { transform: translateY(-2px); }

.gallery-grid {
  width: min(100%, 1740px);
  margin: 0 auto;
  columns: 4 280px;
  column-gap: clamp(0.65rem, 1.2vw, 1.2rem);
}

.gallery-item {
  position: relative;
  margin: 0 0 clamp(0.65rem, 1.2vw, 1.2rem);
  break-inside: avoid;
}

.gallery-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: var(--chalk);
  background: #cfc1ad;
  cursor: zoom-in;
}

html.js .gallery-card:not(.is-loaded)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(105deg, #c9baa5 28%, #e5d9c7 43%, #c9baa5 58%);
  background-size: 240% 100%;
  animation: gallery-loading 1.25s ease-in-out infinite;
}

@keyframes gallery-loading {
  to { background-position-x: -240%; }
}

.gallery-card img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.7s var(--ease), opacity 0.35s ease;
}

.gallery-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 62%, rgba(15, 10, 7, 0.55));
  opacity: 0.45;
  transition: opacity 0.35s ease;
}

.gallery-card__number,
.gallery-card__open {
  position: absolute;
  z-index: 3;
  bottom: 0.8rem;
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gallery-card__number { left: 0.85rem; }
.gallery-card__open { right: 0.85rem; opacity: 0; transform: translateY(4px); transition: opacity 0.25s ease, transform 0.25s ease; }
.gallery-card:hover img { transform: scale(1.025); }
.gallery-card:hover::after { opacity: 0.85; }
.gallery-card:hover .gallery-card__open { opacity: 1; transform: none; }
.gallery-card:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.gallery-lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--chalk);
  background: rgba(15, 11, 8, 0.97);
}

.gallery-lightbox::backdrop { background: rgba(10, 7, 5, 0.9); }
.gallery-lightbox[open] { display: grid; grid-template-rows: auto 1fr; }

.gallery-lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  padding: 0.8rem clamp(1rem, 2vw, 2rem);
  border-bottom: 1px solid rgba(255, 250, 240, 0.16);
}

.gallery-lightbox__bar p {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.gallery-lightbox__bar small {
  margin-left: 1rem;
  color: var(--gold-soft);
  font-size: 0.62rem;
  text-transform: uppercase;
}

.gallery-lightbox__actions,
.gallery-lightbox__zoom {
  display: flex;
  align-items: center;
}

.gallery-lightbox__actions { gap: 0.75rem; }

.gallery-lightbox__zoom {
  min-height: 42px;
  border: 1px solid rgba(255, 250, 240, 0.22);
}

.gallery-lightbox__zoom button {
  width: 40px;
  min-height: 40px;
  padding: 0;
  border: 0;
  color: var(--chalk);
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
}

.gallery-lightbox__zoom button:hover:not(:disabled) {
  color: #221912;
  background: var(--gold-soft);
}

.gallery-lightbox__zoom button:disabled { opacity: 0.3; cursor: default; }

.gallery-lightbox__zoom output {
  min-width: 52px;
  color: rgba(255, 250, 240, 0.72);
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  text-align: center;
}

.gallery-lightbox__copy {
  min-height: 42px;
  padding: 0 0.9rem;
  border: 1px solid rgba(255, 250, 240, 0.22);
  color: rgba(255, 250, 240, 0.8);
  background: transparent;
  cursor: pointer;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gallery-lightbox__copy:hover,
.gallery-lightbox__copy.is-copied {
  color: #221912;
  background: var(--gold-soft);
  border-color: var(--gold-soft);
}

.gallery-lightbox__close {
  min-height: 42px;
  padding: 0 1rem;
  border: 1px solid rgba(255, 250, 240, 0.3);
  color: var(--chalk);
  background: transparent;
  cursor: pointer;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.gallery-lightbox__stage {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  align-items: center;
  min-height: 0;
  padding: 1.2rem;
}

.gallery-lightbox__stage::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 42px;
  height: 42px;
  margin: -21px 0 0 -21px;
  border: 2px solid rgba(255, 250, 240, 0.18);
  border-top-color: var(--gold-soft);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.gallery-lightbox__stage.is-loading::before {
  opacity: 1;
  animation: gallery-spinner 0.8s linear infinite;
}

.gallery-lightbox__stage.is-loading img { opacity: 0.28; }

@keyframes gallery-spinner {
  to { transform: rotate(1turn); }
}

.gallery-lightbox__stage img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 110px);
  margin: auto;
  object-fit: contain;
  transition: opacity 0.2s ease;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
}

.gallery-lightbox__viewport {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--gold) rgba(255, 255, 255, 0.08);
}

.gallery-lightbox__viewport.is-zoomed {
  display: block;
  text-align: center;
}

.gallery-lightbox__viewport.is-zoomed img {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}

.gallery-lightbox__nav {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 1px solid rgba(255, 250, 240, 0.28);
  border-radius: 50%;
  color: var(--chalk);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  font-size: 1.25rem;
}

.gallery-lightbox__close:hover,
.gallery-lightbox__nav:hover { color: #221912; background: var(--gold-soft); border-color: var(--gold-soft); }

@media (max-width: 1100px) {
  .gallery-hero { min-height: auto; padding-top: 9rem; }
  .gallery-hero__footer { grid-template-columns: 1fr; gap: 2.5rem; }
  .gallery-raw-note { max-width: 620px; }
  .gallery-grid { columns: 3 230px; }
}

@media (max-width: 720px) {
  .gallery-hero { padding: 7.25rem 1.35rem 2.25rem; }
  .gallery-kicker { margin-bottom: 0.6rem; }
  .gallery-hero h1 { font-size: clamp(3.35rem, 15vw, 4.5rem); line-height: 0.86; }
  .gallery-hero h1 em { display: block; }
  .gallery-hero__footer { gap: 1.35rem; margin-top: 1.75rem; padding-top: 1rem; }
  .gallery-hero__footer > p { font-size: 1.15rem; line-height: 1.35; }
  .gallery-raw-note { gap: 0.75rem; }
  .gallery-raw-note > span { width: 42px; height: 42px; font-size: 0.56rem; }
  .gallery-raw-note p { font-size: 0.78rem; line-height: 1.5; }
  .gallery-collection { padding-top: 2rem; padding-inline: 0.65rem; }
  .gallery-intro { display: grid; grid-template-columns: 1fr 1fr; padding-inline: 0.25rem; }
  .gallery-intro p:last-child { grid-column: 1 / -1; }
  .gallery-order-cta { grid-template-columns: 1fr; gap: 1rem; padding: 1.15rem; }
  .gallery-order-cta h2 { font-size: 1.55rem; }
  .gallery-order-cta > a { width: 100%; min-height: 46px; }
  .gallery-grid { columns: 2 145px; column-gap: 0.55rem; }
  .gallery-item { margin-bottom: 0.55rem; }
  .gallery-card__open { display: none; }
  .gallery-lightbox__stage { grid-template-columns: 1fr; padding: 0.7rem; }
  .gallery-lightbox__stage img { max-height: calc(100vh - 100px); }
  .gallery-lightbox__bar small { display: none; }
  .gallery-lightbox__actions { gap: 0.45rem; }
  .gallery-lightbox__zoom output { min-width: 44px; }
  .gallery-lightbox__zoom button { width: 36px; }
  .gallery-lightbox__copy { padding-inline: 0.65rem; font-size: 0.6rem; }
  .gallery-lightbox__nav { position: absolute; z-index: 1; top: 50%; width: 44px; height: 44px; background: rgba(20, 14, 10, 0.72); }
  .gallery-lightbox__nav--previous { left: 0.8rem; }
  .gallery-lightbox__nav--next { right: 0.8rem; }
}

@media (max-width: 420px) {
  .gallery-grid { columns: 1; }
  .gallery-item { margin-bottom: 0.75rem; }
  .gallery-lightbox__bar { padding-inline: 0.6rem; }
  .gallery-lightbox__actions { gap: 0.3rem; }
  .gallery-lightbox__zoom output { display: none; }
  .gallery-lightbox__zoom button { width: 32px; }
  .gallery-lightbox__copy,
  .gallery-lightbox__close { padding-inline: 0.55rem; }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-card img,
  .gallery-card__open { transition: none; }
  html.js .gallery-card:not(.is-loaded)::before,
  .gallery-lightbox__stage.is-loading::before { animation: none; }
}
