/* Gallery page styles — scoped to main */
main {
  display: block;
}

/* Gallery Hero */
.gallery-hero {
  padding-block: var(--space-8);
}

.gallery-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  grid-template-areas:
    "content media"
    "stats stats";
  gap: var(--space-6);
  align-items: start;
}

.gallery-hero__content {
  grid-area: content;
  min-width: 0;
}

.gallery-hero__eyebrow {
  margin-bottom: var(--space-4);
}

.gallery-hero__title {
  font-size: var(--text-h1);
  line-height: var(--leading-h1);
  margin-bottom: var(--space-5);
  max-width: 12ch;
}

.gallery-hero__lead {
  font-size: var(--text-body-large);
  line-height: var(--leading-body);
  max-width: 65ch;
  margin-bottom: var(--space-4);
}

.gallery-hero__support {
  max-width: 65ch;
  margin-bottom: 0;
  color: var(--color-ink-muted);
}

.gallery-hero__media {
  grid-area: media;
  min-width: 0;
  margin: 0;
}

.gallery-hero__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-subtle);
}

.gallery-hero__media figcaption {
  margin-top: var(--space-2);
  font-size: var(--text-caption);
  color: var(--color-ink-muted);
}

.gallery-hero__stats {
  grid-area: stats;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
  padding-top: var(--space-6);
  border-top: var(--border-light);
}

.gallery-hero__stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}

.gallery-hero__stat-value {
  font-family: var(--font-heading);
  font-size: var(--text-h2);
  line-height: var(--leading-h2);
  color: var(--color-accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.gallery-hero__stat-label {
  font-size: var(--text-body);
  color: var(--color-ink-muted);
}

/* Gallery Grid */
.gallery-grid-section {
  padding-block: var(--space-8);
}

.gallery-grid-section__heading {
  margin-bottom: var(--space-6);
}

.gallery-grid-section__heading .badge {
  margin-bottom: var(--space-4);
}

.gallery-grid-section__heading h2 {
  margin-bottom: var(--space-3);
}

.gallery-grid-section__lead {
  max-width: 65ch;
  color: var(--color-ink-muted);
  margin-bottom: 0;
}

.gallery-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
}

.gallery-grid__item {
  min-width: 0;
  display: flex;
}

.gallery-grid__link {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  background-color: var(--color-bg-base);
  border: var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-subtle);
  overflow: hidden;
  transition: transform var(--transition-transform), box-shadow var(--transition-color);
}

.gallery-grid__link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  color: inherit;
}

.gallery-grid__link img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 0;
  display: block;
}

.gallery-grid__caption {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-caption);
  line-height: var(--leading-caption);
  color: var(--color-ink-muted);
  max-width: 45ch;
}

/* Themed Highlights */
.themed-highlights {
  padding-block: var(--space-8);
  background-color: rgba(201, 206, 211, 0.18);
}

.themed-highlights__heading {
  margin-bottom: var(--space-6);
}

.themed-highlights__heading .badge {
  margin-bottom: var(--space-4);
}

.themed-highlights__heading h2 {
  margin-bottom: var(--space-3);
}

.themed-highlights__lead {
  max-width: 65ch;
  color: var(--color-ink-muted);
  margin-bottom: 0;
}

.themed-highlights__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
}

.themed-highlights__card {
  background-color: var(--color-bg-base);
  border: var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-subtle);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}

.themed-highlights__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-sm);
  background-color: rgba(62, 99, 200, 0.12);
  color: var(--color-accent-blue);
  margin-bottom: var(--space-2);
}

.themed-highlights__card h3 {
  margin-bottom: 0;
}

.themed-highlights__card p {
  max-width: 55ch;
  margin-bottom: 0;
}

.themed-highlights__card .content-list {
  margin-bottom: 0;
}

/* Behind the Scenes */
.behind-scenes {
  padding-block: var(--space-8);
}

.behind-scenes__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: var(--space-6);
  align-items: center;
}

.behind-scenes__content {
  min-width: 0;
}

.behind-scenes__content .badge {
  margin-bottom: var(--space-4);
}

.behind-scenes__content h2 {
  margin-bottom: var(--space-4);
}

.behind-scenes__lead {
  max-width: 65ch;
  margin-bottom: var(--space-4);
}

.behind-scenes__content .content-list {
  margin-bottom: var(--space-4);
}

.behind-scenes__content .content-list li {
  max-width: 55ch;
}

.behind-scenes__support {
  max-width: 65ch;
  color: var(--color-ink-muted);
  margin-bottom: 0;
}

.behind-scenes__media {
  min-width: 0;
  margin: 0;
}

.behind-scenes__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-subtle);
}

.behind-scenes__media figcaption {
  margin-top: var(--space-2);
  font-size: var(--text-caption);
  color: var(--color-ink-muted);
}

/* Testimonial */
.testimonial {
  padding-block: var(--space-9);
}

.testimonial__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-5);
  max-width: 52rem;
  margin-inline: auto;
}

.testimonial__inner .badge {
  margin-bottom: 0;
}

.testimonial__inner h2 {
  margin-bottom: 0;
}

.testimonial__quote {
  margin: 0;
  padding: 0;
  border-inline-start: none;
  background: none;
  font-size: var(--text-h3);
  line-height: var(--leading-h3);
  color: var(--color-text-on-dark);
  max-width: 70ch;
}

.testimonial__quote p {
  font-family: var(--font-heading);
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  margin-bottom: var(--space-4);
}

.testimonial__attribution {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--color-text-on-dark);
  margin-top: var(--space-3);
}

.testimonial__support {
  max-width: 60ch;
  color: rgba(244, 242, 236, 0.8);
  margin-bottom: 0;
}

/* Process Teaser */
.process-teaser {
  padding-block: var(--space-8);
}

.process-teaser__heading {
  margin-bottom: var(--space-6);
}

.process-teaser__heading .badge {
  margin-bottom: var(--space-4);
}

.process-teaser__heading h2 {
  margin-bottom: var(--space-3);
}

.process-teaser__lead {
  max-width: 65ch;
  color: var(--color-ink-muted);
  margin-bottom: 0;
}

.process-teaser__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
}

.process-teaser__step {
  background-color: var(--color-bg-base);
  border: var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-subtle);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
}

.process-teaser__number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: var(--color-accent-blue);
  color: var(--color-text-on-accent);
  font-family: var(--font-heading);
  font-size: var(--text-body);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.process-teaser__step h3 {
  margin-bottom: 0;
}

.process-teaser__step p {
  max-width: 45ch;
  margin-bottom: 0;
}

.process-teaser__link {
  margin-top: var(--space-5);
  margin-bottom: 0;
}

.process-teaser__link a {
  font-family: var(--font-heading);
  font-size: var(--text-caption);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--color-accent-blue);
}

.process-teaser__link a:hover {
  color: var(--color-ink-strong);
}

/* Gallery CTA */
.gallery-cta {
  padding-block: var(--space-9);
}

.gallery-cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-5);
  max-width: 48rem;
  margin-inline: auto;
}

.gallery-cta__inner .badge {
  margin-bottom: 0;
}

.gallery-cta__inner h2 {
  margin-bottom: 0;
}

.gallery-cta__lead {
  max-width: 60ch;
  margin-bottom: 0;
}

.gallery-cta__contact {
  max-width: 60ch;
  color: rgba(244, 242, 236, 0.85);
  margin-bottom: 0;
}

.gallery-cta__contact a {
  color: var(--color-text-on-dark);
  text-decoration-color: rgba(244, 242, 236, 0.6);
}

.gallery-cta__contact a:hover {
  color: var(--color-accent-lime);
}

.gallery-cta__inner .btn {
  margin-top: var(--space-2);
}

/* Lightbox */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  background-color: rgba(36, 39, 44, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.gallery-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.gallery-lightbox__dialog {
  position: relative;
  width: min(90vw, 75rem);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  background-color: var(--color-bg-base);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  padding: var(--space-4);
}

.gallery-lightbox__media {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-lightbox__media img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  display: block;
}

.gallery-lightbox__caption {
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--color-ink-strong);
  text-align: center;
  padding-inline: var(--space-3);
}

.gallery-lightbox__close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background-color: var(--color-surface-dark);
  color: var(--color-text-on-dark);
  font-family: var(--font-heading);
  font-size: var(--text-body);
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--transition-color), transform var(--transition-transform);
}

.gallery-lightbox__close:hover {
  background-color: #3A3E45;
}

.gallery-lightbox__close:active {
  transform: scale(0.98);
}

/* Responsive */
@media (max-width: 63.9375rem) {
  .gallery-hero__grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "content"
      "media"
      "stats";
    gap: var(--space-5);
  }

  .gallery-hero__title {
    max-width: none;
  }

  .gallery-hero__lead,
  .gallery-hero__support {
    max-width: none;
  }

  .gallery-hero__stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .themed-highlights__grid,
  .process-teaser__steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .behind-scenes__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-5);
  }
}

@media (max-width: 47.9375rem) {
  .gallery-hero {
    padding-block: var(--space-7);
  }

  .gallery-hero__title {
    font-size: 2.25rem;
  }

  .gallery-hero__stats {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-4);
  }

  .gallery-hero__stat {
    flex-direction: row;
    align-items: baseline;
    gap: var(--space-3);
  }

  .gallery-hero__stat-value {
    font-size: var(--text-h3);
    min-width: 5rem;
  }

  .gallery-grid-section,
  .themed-highlights,
  .behind-scenes,
  .process-teaser {
    padding-block: var(--space-7);
  }

  .gallery-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .gallery-grid__caption {
    max-width: none;
  }

  .themed-highlights__grid,
  .process-teaser__steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .testimonial,
  .gallery-cta {
    padding-block: var(--space-7);
  }

  .testimonial__quote {
    font-size: var(--text-h4);
    line-height: var(--leading-h4);
  }

  .gallery-lightbox__dialog {
    width: 100%;
    max-height: 85vh;
  }

  .gallery-lightbox__media img {
    max-height: 60vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-grid__link,
  .gallery-lightbox,
  .gallery-lightbox__close {
    transition: none;
  }
}
