.page-gallery {
  background:
    radial-gradient(circle at top right, rgba(201, 184, 159, 0.22), transparent 26%),
    linear-gradient(180deg, rgba(243, 238, 227, 0.94), rgba(243, 238, 227, 1));
}

.page-gallery .site-header {
  background: rgba(245, 242, 234, 0.82);
}

.gallery-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.gallery-hero {
  padding: 40px 0 28px;
}

.gallery-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: clamp(20px, 4vw, 44px);
  align-items: stretch;
}

.gallery-hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 4vw, 40px) 0;
}

.gallery-hero__copy h1 {
  margin: 14px 0 0;
  font-size: clamp(58px, 8vw, 104px);
  line-height: 0.92;
  letter-spacing: -0.04em;
}

.gallery-hero__copy p:last-child {
  margin: 28px 0 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: 15px;
  line-height: 2;
}

.gallery-hero__media {
  position: relative;
  min-height: 420px;
  margin: 0;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.gallery-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-shell {
  padding: 24px 0 96px;
}

.gallery-intro {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: end;
  margin-bottom: 38px;
}

.gallery-intro h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.gallery-intro p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.gallery-lead-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-auto-rows: minmax(220px, 320px);
  gap: 16px;
  margin-bottom: 16px;
}

.gallery-grid {
  columns: 3;
  column-gap: 16px;
}

.gallery-card {
  position: relative;
  display: block;
  width: 100%;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  border-radius: 22px;
  overflow: hidden;
  background: #dcd6cb;
  box-shadow: 0 14px 30px rgba(36, 44, 39, 0.08);
  cursor: zoom-in;
  text-align: left;
  break-inside: avoid;
}

.gallery-card img {
  width: 100%;
  height: auto;
  transition: transform 0.5s ease, filter 0.3s ease;
}

.gallery-card:hover img,
.gallery-card:focus-visible img {
  transform: scale(1.02);
  filter: saturate(1.03);
}

.gallery-lead-grid .gallery-card,
.gallery-lead-grid .gallery-card img {
  height: 100%;
}

.gallery-lead-grid .gallery-card img {
  object-fit: cover;
}

.gallery-card.is-main {
  grid-row: span 2;
}

.gallery-card__label {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  max-width: calc(100% - 28px);
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(36, 44, 39, 0.66);
  backdrop-filter: blur(12px);
  font-size: 12px;
  line-height: 1.4;
}

.gallery-cta {
  padding: 0 0 108px;
}

.gallery-cta__inner {
  padding: clamp(32px, 6vw, 56px);
  border-radius: 28px;
  background: linear-gradient(135deg, var(--accent-deep), #6b8368);
  color: #fff;
  box-shadow: var(--shadow);
}

.gallery-cta__inner h2 {
  margin: 12px 0 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.gallery-cta__inner p:last-of-type {
  margin: 18px 0 0;
  max-width: 40rem;
  color: rgba(255, 255, 255, 0.8);
}

.gallery-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.gallery-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: transparent;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.gallery-button.is-primary {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}

.gallery-lightbox {
  width: 100vw;
  max-width: none;
  height: 100svh;
  max-height: none;
  margin: 0;
  padding: 68px 84px 38px;
  border: 0;
  background: rgba(18, 20, 18, 0.96);
  color: #fff;
}

.gallery-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.gallery-lightbox[open] {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 72px;
  align-items: center;
  gap: 12px;
}

.gallery-lightbox__figure {
  margin: 0 auto;
  max-width: min(1100px, 78vw);
  text-align: center;
}

.gallery-lightbox__figure img {
  max-width: 100%;
  max-height: calc(100svh - 160px);
  object-fit: contain;
}

.gallery-lightbox figcaption {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.gallery-lightbox__close,
.gallery-lightbox__nav {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.gallery-lightbox__close {
  position: absolute;
  top: 22px;
  right: 24px;
}

@media (max-width: 980px) {
  .gallery-hero__inner,
  .gallery-intro {
    grid-template-columns: 1fr;
  }

  .gallery-hero__media {
    min-height: 320px;
  }

  .gallery-lead-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .gallery-card.is-main {
    grid-row: auto;
  }

  .gallery-grid {
    columns: 2;
  }

  .gallery-lightbox {
    padding: 64px 18px 28px;
  }

  .gallery-lightbox[open] {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }
}

@media (max-width: 640px) {
  .gallery-hero {
    padding-top: 24px;
  }

  .gallery-shell {
    padding-bottom: 72px;
  }

  .gallery-hero__copy h1 {
    font-size: clamp(48px, 18vw, 72px);
  }

  .gallery-hero__media {
    min-height: 240px;
    border-radius: 20px;
  }

  .gallery-grid {
    columns: 1;
  }

  .gallery-lightbox[open] {
    grid-template-columns: 1fr;
  }

  .gallery-lightbox__nav {
    position: absolute;
    bottom: 18px;
  }

  .gallery-lightbox__nav.is-prev {
    left: 18px;
  }

  .gallery-lightbox__nav.is-next {
    right: 18px;
  }
}
