/* =========================================
   GALLERY PAGE
========================================= */

.gallery-hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  padding: 170px 9% 130px;
  background: #080d18;
}

.gallery-hero-image,
.gallery-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.gallery-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  filter: saturate(0.78);
}

.gallery-hero-overlay {
  background:
    linear-gradient(
      90deg,
      rgba(8, 13, 24, 0.96) 0%,
      rgba(8, 13, 24, 0.82) 38%,
      rgba(8, 13, 24, 0.3) 100%
    ),
    linear-gradient(0deg, rgba(8, 13, 24, 0.85) 0%, transparent 45%);
}

.gallery-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 850px;
}

.gallery-hero-content .section-eyebrow {
  display: inline-block;
  margin-bottom: 30px;
  color: var(--gold-sand);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.gallery-hero-content h1 {
  margin: 0;
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: clamp(64px, 10vw, 132px);
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.075em;
}

.gallery-hero-content h1 span {
  color: var(--gold-sand);
}

.gallery-hero-content p {
  max-width: 540px;
  margin: 34px 0 0;
  color: rgba(244, 240, 232, 0.78);
  font-size: 16px;
  line-height: 1.9;
}

.gallery-scroll-link {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-top: 42px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(212, 183, 138, 0.55);
  color: var(--ivory);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-decoration: none;
  transition:
    gap 0.3s ease,
    color 0.3s ease;
}

.gallery-scroll-link:hover {
  gap: 27px;
  color: var(--gold-sand);
}

.gallery-scroll-link span {
  color: var(--gold-sand);
  font-size: 18px;
}

.gallery-hero-bottom {
  position: absolute;
  right: 9%;
  bottom: 35px;
  left: 9%;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: rgba(244, 240, 232, 0.62);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

/* =========================================
   GALLERY INTRO
========================================= */

.gallery-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 60px;
  padding: 125px 10% 115px;
  background: #101a29;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.gallery-intro-inner {
  max-width: 760px;
}

.gallery-intro .section-eyebrow,
.gallery-collection .section-eyebrow {
  display: block;
  margin-bottom: 25px;
  color: var(--gold-sand);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.gallery-intro h2 {
  margin: 0;
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: clamp(42px, 6vw, 76px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.065em;
}

.gallery-intro h2 span,
.gallery-collection-heading h2 span {
  color: var(--gold-sand);
}

.gallery-intro-inner > p {
  max-width: 620px;
  margin: 30px 0 0;
  color: rgba(244, 240, 232, 0.68);
  font-size: 15px;
  line-height: 1.95;
}

.gallery-intro-index {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 130px;
  padding-bottom: 7px;
  color: rgba(244, 240, 232, 0.5);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-align: right;
}

.gallery-intro-index span:first-child {
  color: var(--gold-sand);
  font-size: 13px;
}

/* =========================================
   GALLERY COLLECTION
========================================= */

.gallery-collection {
  padding: 120px 8% 110px;
  background: #080d18;
}

.gallery-collection-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  margin-bottom: 55px;
}

.gallery-collection-heading .section-eyebrow {
  margin-bottom: 18px;
}

.gallery-collection-heading h2 {
  margin: 0;
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: clamp(36px, 5vw, 62px);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1.08;
}

.gallery-collection-heading > p {
  margin: 0 0 7px;
  color: rgba(244, 240, 232, 0.45);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.17em;
  white-space: nowrap;
}

/* Asymmetric editorial grid */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 245px;
  grid-auto-flow: dense;
  gap: 16px;
}

.gallery-item {
  position: relative;
  display: block;
  min-width: 0;
  overflow: hidden;
  isolation: isolate;
  background: #142333;
  text-decoration: none;
}

.gallery-item::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(8, 13, 24, 0.12) 0%,
    transparent 35%,
    rgba(8, 13, 24, 0.52) 100%
  );
  opacity: 0.8;
  transition: opacity 0.4s ease;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 0.75s cubic-bezier(0.2, 0.7, 0.2, 1),
    filter 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.065);
  filter: saturate(1.08);
}

.gallery-item:hover::after {
  opacity: 1;
}

.gallery-item-tall {
  grid-row: span 2;
}

.gallery-item-wide {
  grid-column: span 2;
}

.gallery-item-award img {
  object-fit: contain;
  padding: 25px;
  background: #101a29;
}

.gallery-item-number {
  position: absolute;
  z-index: 2;
  bottom: 19px;
  left: 20px;
  color: rgba(244, 240, 232, 0.85);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.gallery-item-expand {
  position: absolute;
  z-index: 2;
  right: 17px;
  bottom: 14px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(244, 240, 232, 0.55);
  border-radius: 50%;
  color: var(--ivory);
  font-size: 17px;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.gallery-item:hover .gallery-item-expand {
  opacity: 1;
  transform: translateY(0);
}

.gallery-end-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-top: 70px;
}

.gallery-end-note span {
  width: 55px;
  height: 1px;
  background: rgba(212, 183, 138, 0.45);
}

.gallery-end-note p {
  margin: 0;
  color: rgba(244, 240, 232, 0.48);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

/* =========================================
   CSS LIGHTBOX
========================================= */

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-items: center;
  padding: 65px 6%;
  background: rgba(3, 7, 14, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.gallery-lightbox:target {
  display: grid;
}

.gallery-lightbox img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 135px);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 25px 100px rgba(0, 0, 0, 0.5);
  animation: galleryImageReveal 0.35s ease both;
}

.gallery-lightbox-close {
  position: absolute;
  top: 25px;
  right: 35px;
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  border: 1px solid rgba(244, 240, 232, 0.25);
  border-radius: 50%;
  color: var(--ivory);
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
  text-decoration: none;
  transition:
    color 0.3s ease,
    border-color 0.3s ease,
    transform 0.3s ease;
}

.gallery-lightbox-close:hover {
  color: var(--gold-sand);
  border-color: var(--gold-sand);
  transform: rotate(90deg);
}

.gallery-lightbox > span {
  position: absolute;
  bottom: 25px;
  left: 50%;
  color: rgba(244, 240, 232, 0.65);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  transform: translateX(-50%);
}

@keyframes galleryImageReveal {
  from {
    opacity: 0;
    transform: scale(0.97);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* =========================================
   GALLERY CTA
========================================= */

.gallery-cta {
  position: relative;
  overflow: hidden;
}

.gallery-cta::before {
  position: absolute;
  top: -180px;
  right: -100px;
  width: 480px;
  height: 480px;
  border: 1px solid rgba(212, 183, 138, 0.09);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.gallery-cta::after {
  position: absolute;
  top: -100px;
  right: -20px;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(212, 183, 138, 0.07);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.gallery-cta .about-cta-inner {
  position: relative;
  z-index: 1;
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 1100px) {
  .gallery-grid {
    grid-auto-rows: 210px;
    gap: 13px;
  }

  .gallery-collection {
    padding-right: 6%;
    padding-left: 6%;
  }
}

@media (max-width: 768px) {
  .gallery-hero {
    min-height: 78vh;
    padding: 150px 7% 120px;
  }

  .gallery-hero-content h1 {
    font-size: clamp(60px, 13vw, 95px);
  }

  .gallery-hero-content p {
    max-width: 480px;
    font-size: 14px;
  }

  .gallery-hero-bottom {
    right: 7%;
    left: 7%;
    font-size: 8px;
  }

  .gallery-intro {
    flex-direction: column;
    align-items: flex-start;
    gap: 35px;
    padding: 90px 7%;
  }

  .gallery-intro-index {
    flex-direction: row;
    gap: 20px;
    text-align: left;
  }

  .gallery-collection {
    padding: 90px 5% 80px;
  }

  .gallery-collection-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 35px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 220px;
    gap: 11px;
  }

  .gallery-item-wide {
    grid-column: span 2;
  }

  .gallery-lightbox {
    padding: 65px 4%;
  }

  .gallery-lightbox-close {
    top: 15px;
    right: 17px;
  }
}

@media (max-width: 480px) {
  .gallery-hero {
    min-height: 76vh;
    padding: 135px 7% 115px;
  }

  .gallery-hero-content h1 {
    font-size: 62px;
  }

  .gallery-hero-content p {
    margin-top: 25px;
    font-size: 13px;
    line-height: 1.8;
  }

  .gallery-hero-bottom {
    bottom: 23px;
    font-size: 7px;
    letter-spacing: 0.12em;
  }

  .gallery-intro {
    padding: 75px 7%;
  }

  .gallery-intro h2 {
    font-size: 43px;
  }

  .gallery-intro-inner > p {
    font-size: 13px;
  }

  .gallery-collection {
    padding: 75px 5% 65px;
  }

  .gallery-collection-heading h2 {
    font-size: 38px;
  }

  .gallery-collection-heading > p {
    font-size: 8px;
  }

  .gallery-grid {
    grid-auto-rows: 155px;
    gap: 8px;
  }

  .gallery-item-number {
    bottom: 12px;
    left: 12px;
    font-size: 9px;
  }

  .gallery-item-expand {
    right: 9px;
    bottom: 7px;
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  .gallery-item-award img {
    padding: 12px;
  }

  .gallery-end-note {
    gap: 12px;
    margin-top: 45px;
  }

  .gallery-end-note span {
    width: 30px;
  }

  .gallery-end-note p {
    font-size: 8px;
  }

  .gallery-lightbox {
    padding: 55px 3%;
  }

  .gallery-lightbox img {
    max-height: calc(100vh - 115px);
  }

  .gallery-lightbox-close {
    width: 39px;
    height: 39px;
    font-size: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-item img,
  .gallery-item-expand,
  .gallery-scroll-link,
  .gallery-lightbox-close {
    transition: none;
  }

  .gallery-lightbox img {
    animation: none;
  }
}
