/* ==========================================================================
   GALLERY PAGE
   Dusk & Olive
   ========================================================================== */

/* HERO */

.gallery-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 760px;
  height: 90svh;
  overflow: hidden;
  padding-top: var(--header-height);
  background: var(--color-bg-deep);
}

.gallery-hero__media {
  position: absolute;
  inset: 0;
  z-index: -4;
}

.gallery-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
}

.gallery-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      rgba(5, 6, 10, 0.98) 0%,
      rgba(5, 6, 10, 0.88) 30%,
      rgba(5, 6, 10, 0.52) 62%,
      rgba(5, 6, 10, 0.2) 100%
    ),
    linear-gradient(
      180deg,
      rgba(5, 6, 10, 0.5) 0%,
      rgba(5, 6, 10, 0.12) 42%,
      rgba(5, 6, 10, 0.94) 100%
    );
}

.gallery-hero__overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 44%, rgba(82, 33, 65, 0.42), transparent 34%),
    radial-gradient(
      circle at 74% 14%,
      rgba(217, 164, 204, 0.12),
      transparent 34%
    );
}

.gallery-hero__content {
  position: relative;
  z-index: 2;
  width: min(100%, 800px);
  margin-top: clamp(42px, 7vh, 96px);
}

.gallery-hero__eyebrow {
  margin-bottom: 20px;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-lilac-soft);
}

.gallery-hero h1 {
  max-width: 800px;
  margin-bottom: 24px;
  font-size: clamp(3.3rem, 7.4vw, 5.4rem);
  line-height: 0.92;
  text-transform: uppercase;
}

.gallery-hero p:not(.gallery-hero__eyebrow) {
  max-width: 800px;
  margin-bottom: 32px;
  font-size: clamp(1rem, 1.25vw, 1.12rem);
  line-height: 1.78;
  color: var(--color-text-soft);
}

.gallery-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* FEATURED */

.gallery-featured {
  position: relative;
  overflow: hidden;
}

.gallery-featured::before {
  content: '';
  position: absolute;
  right: -220px;
  top: 12%;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(82, 33, 65, 0.28), transparent 70%);
  pointer-events: none;
  filter: blur(10px);
}

.gallery-featured__layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(520px, 1fr);
  gap: clamp(36px, 7vw, 110px);
  align-items: center;
}

.gallery-featured__content h2 {
  max-width: 760px;
  margin-bottom: 24px;
  font-size: clamp(2.55rem, 5.4vw, 5.8rem);
}

.gallery-featured__content p {
  max-width: 620px;
  color: var(--color-text-soft);
}

.gallery-featured__mosaic {
  display: grid;
  grid-template-columns: 1fr 0.78fr;
  grid-template-rows: repeat(2, 260px);
  gap: 16px;
}

.gallery-featured__item {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(217, 164, 204, 0.18);
  border-radius: var(--radius-lg);
  background: var(--color-bg-soft);
  box-shadow: var(--shadow-card);
}

.gallery-featured__item--large {
  grid-row: span 2;
}

.gallery-featured__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-featured__item::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 42%, rgba(7, 8, 13, 0.78)),
    radial-gradient(
      circle at 50% 0%,
      rgba(217, 164, 204, 0.12),
      transparent 48%
    );
}

.gallery-featured__item figcaption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-lilac-soft);
}

/* COLLECTION */

.gallery-collection {
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(217, 164, 204, 0.12);
  border-bottom: 1px solid rgba(217, 164, 204, 0.12);
  background:
    radial-gradient(circle at 10% 0%, rgba(82, 33, 65, 0.24), transparent 34%),
    linear-gradient(180deg, rgba(10, 11, 18, 0.96), rgba(6, 7, 12, 0.98));
}

.gallery-collection__head {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.68fr);
  gap: clamp(24px, 5vw, 76px);
  align-items: end;
  margin-bottom: clamp(36px, 5vw, 66px);
}

.gallery-collection__head .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: -8px;
}

.gallery-collection__head h2 {
  max-width: 830px;
  font-size: clamp(2.45rem, 5.2vw, 5.5rem);
}

.gallery-collection__head p:not(.eyebrow) {
  max-width: 500px;
  justify-self: end;
  color: var(--color-text-muted);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 260px;
  gap: 16px;
}

.gallery-card {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(217, 164, 204, 0.16);
  border-radius: var(--radius-lg);
  background: var(--color-bg-soft);
  box-shadow: var(--shadow-card);
}

.gallery-card--wide {
  grid-column: span 2;
}

.gallery-card--tall {
  grid-row: span 2;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 0.7s ease,
    opacity var(--transition-base);
}

.gallery-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 30%, rgba(7, 8, 13, 0.86) 100%),
    radial-gradient(circle at 50% 0%, rgba(217, 164, 204, 0.1), transparent 48%);
}

.gallery-card::after {
  content: '';
  position: absolute;
  inset: 10px;
  z-index: 2;
  border: 1px solid rgba(217, 164, 204, 0.1);
  border-radius: calc(var(--radius-lg) - 10px);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.gallery-card:hover img {
  transform: scale(1.045);
  opacity: 0.92;
}

.gallery-card:hover::after {
  opacity: 1;
}

.gallery-card figcaption {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 3;
  display: grid;
  gap: 8px;
}

.gallery-card figcaption span {
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-lilac-soft);
}

.gallery-card figcaption strong {
  font-family: var(--font-heading);
  font-size: clamp(1.45rem, 2.2vw, 2.3rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--color-text);
}

/* STORY */

.gallery-story {
  position: relative;
  overflow: hidden;
}

.gallery-story__card {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(420px, 0.78fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  overflow: hidden;
  padding: clamp(28px, 5vw, 64px);
  border: 1px solid rgba(217, 164, 204, 0.2);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(
      circle at 12% 0%,
      rgba(217, 164, 204, 0.13),
      transparent 36%
    ),
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.055),
      rgba(255, 255, 255, 0.014)
    ),
    rgba(10, 11, 18, 0.82);
  box-shadow: var(--shadow-soft);
}

.gallery-story__content h2 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(2.4rem, 5vw, 5.2rem);
}

.gallery-story__content p {
  max-width: 640px;
  margin-bottom: 28px;
  color: var(--color-text-soft);
}

.gallery-story__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.gallery-story__links a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(217, 164, 204, 0.24);
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-lilac-soft);
  background: rgba(255, 255, 255, 0.035);
  transition:
    color var(--transition-base),
    border-color var(--transition-base),
    background var(--transition-base),
    box-shadow var(--transition-base);
}

.gallery-story__links a:hover {
  color: var(--color-text);
  border-color: rgba(217, 164, 204, 0.5);
  background: rgba(217, 164, 204, 0.075);
  box-shadow: 0 0 28px rgba(217, 164, 204, 0.08);
}

.gallery-story__image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(217, 164, 204, 0.18);
  border-radius: var(--radius-lg);
  background: var(--color-bg-soft);
}

.gallery-story__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-story__image::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 42%, rgba(7, 8, 13, 0.52)),
    radial-gradient(
      circle at 50% 0%,
      rgba(217, 164, 204, 0.12),
      transparent 48%
    );
}

/* CTA */

.gallery-cta {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 660px;
  overflow: hidden;
  padding-block: clamp(86px, 10vw, 140px);
  border-top: 1px solid rgba(217, 164, 204, 0.14);
  background: var(--color-bg-deep);
}

.gallery-cta__media {
  position: absolute;
  inset: 0;
  z-index: -4;
}

.gallery-cta__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-cta__overlay {
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(
      90deg,
      rgba(5, 6, 10, 0.94) 0%,
      rgba(5, 6, 10, 0.78) 44%,
      rgba(5, 6, 10, 0.38) 100%
    ),
    linear-gradient(180deg, rgba(5, 6, 10, 0.55), rgba(5, 6, 10, 0.92));
}

.gallery-cta__card {
  max-width: 760px;
  padding: clamp(30px, 5vw, 58px);
  border: 1px solid rgba(217, 164, 204, 0.28);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(
      circle at 12% 0%,
      rgba(217, 164, 204, 0.14),
      transparent 36%
    ),
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.07),
      rgba(255, 255, 255, 0.018)
    ),
    rgba(9, 10, 17, 0.82);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.gallery-cta__eyebrow {
  margin-bottom: 20px;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--color-lilac-soft);
}

.gallery-cta h2 {
  margin-bottom: 22px;
  font-size: clamp(2.55rem, 5.3vw, 5.7rem);
}

.gallery-cta p:not(.gallery-cta__eyebrow) {
  max-width: 620px;
  margin-bottom: 32px;
  color: var(--color-text-soft);
}

.gallery-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* RESPONSIVE */

@media (max-width: 1120px) {
  .gallery-featured__layout,
  .gallery-story__card {
    grid-template-columns: 1fr;
  }

  .gallery-featured__mosaic {
    grid-template-columns: 1fr 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gallery-card--wide {
    grid-column: span 2;
  }
}

@media (max-width: 820px) {
  .gallery-collection__head {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .gallery-collection__head .eyebrow {
    margin-bottom: 0;
  }

  .gallery-collection__head p:not(.eyebrow) {
    justify-self: start;
    max-width: 680px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 240px;
  }
}

@media (max-width: 768px) {
  .gallery-hero {
    align-items: flex-end;
    min-height: 720px;
    height: auto;
    padding-bottom: 74px;
  }

  .gallery-hero__media img {
    object-position: center top;
  }

  .gallery-hero__overlay {
    background: linear-gradient(
      180deg,
      rgba(5, 6, 10, 0.28) 0%,
      rgba(5, 6, 10, 0.66) 38%,
      rgba(5, 6, 10, 0.98) 100%
    );
  }

  .gallery-hero h1 {
    font-size: clamp(2.8rem, 12vw, 4.8rem);
  }

  .gallery-hero__actions,
  .gallery-cta__actions {
    display: grid;
  }

  .gallery-featured__mosaic {
    grid-template-rows: 260px 220px;
  }

  .gallery-story__card,
  .gallery-cta__card {
    border-radius: var(--radius-lg);
  }

  .gallery-cta {
    align-items: flex-end;
    min-height: 680px;
  }

  .gallery-cta__media img {
    object-position: center top;
  }

  .gallery-cta__overlay {
    background: linear-gradient(
      180deg,
      rgba(5, 6, 10, 0.22) 0%,
      rgba(5, 6, 10, 0.68) 38%,
      rgba(5, 6, 10, 0.98) 100%
    );
  }
}

@media (max-width: 560px) {
  .gallery-featured__mosaic,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-featured__item--large,
  .gallery-card--wide,
  .gallery-card--tall {
    grid-column: auto;
    grid-row: auto;
  }

  .gallery-grid {
    grid-auto-rows: 300px;
  }

  .gallery-story__card {
    padding: 24px;
  }

  .gallery-story__links {
    display: grid;
  }

  .gallery-story__links a {
    justify-content: center;
  }
}
