/* Gallery hero — full-bleed studio photograph with --overlay-hero, copy offset
   left, preview stack right (DESIGN.md 60/40 asymmetric split).
   Mobile-first: one column, fluid widths only — no fixed pixel layout widths,
   no 100vw, no horizontal scroll at 320px.
   Tablet (>=48em): preview stack becomes two columns.
   Desktop (>=64em): 60/40 grid, preview stack beside the copy. */

.gallery-hero {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-block: var(--space-section);
  color: var(--color-text-on-dark);
  background-color: var(--color-primary-900);
}

.gallery-hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.gallery-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* DESIGN.md: exactly --overlay-hero over a hero photo, never a flat band. */
.gallery-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--overlay-hero);
}

.gallery-hero__container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
  display: grid;
  gap: var(--space-10);
}

/* Scroll-reveal: copy settles in once the section is in view. */
.gallery-hero__copy,
.gallery-hero__preview {
  opacity: 1;
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

/* The hidden start state is opt-in: only JS that can reveal it adds
   `is-animated`, so with JS off the copy is simply visible. */
@media (prefers-reduced-motion: no-preference) {
  .gallery-hero.is-animated .gallery-hero__copy,
  .gallery-hero.is-animated .gallery-hero__shot {
    opacity: 0;
    transform: translateY(var(--reveal-distance));
  }

  .gallery-hero.is-animated.is-ready .gallery-hero__copy,
  .gallery-hero.is-animated.is-ready .gallery-hero__shot {
    opacity: 1;
    transform: none;
  }

  .gallery-hero.is-animated.is-ready .gallery-hero__shot {
    transition-delay: var(--shot-delay, 0ms);
  }
}

.gallery-hero__shot {
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-normal) var(--ease-default);
}

.gallery-hero__eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: var(--letter-wide);
  text-transform: uppercase;
  color: var(--color-accent-200);
  margin-bottom: var(--space-4);
}

.gallery-hero__heading {
  font-family: var(--font-heading);
  font-size: clamp(2.1rem, 4.5vw + 1rem, 3.4rem);
  font-weight: var(--weight-bold);
  letter-spacing: var(--letter-tight);
  line-height: var(--leading-tight);
  color: var(--color-text-on-dark);
  text-wrap: balance;
}

.gallery-hero__subheading {
  margin-top: var(--space-5);
  max-width: var(--measure);
  font-size: var(--text-lg);
  line-height: var(--leading-normal);
  color: var(--color-neutral-100);
}

.gallery-hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.gallery-hero__ctas .btn {
  transition: background-color var(--duration-fast) var(--ease-default),
              transform var(--duration-fast) var(--ease-default);
}

.gallery-hero__ctas .btn--primary:hover { background-color: var(--color-primary-700); }
.gallery-hero__ctas .btn--secondary:hover { background-color: rgba(250, 250, 249, 0.14); }
.gallery-hero__ctas .btn:hover { transform: translateY(-2px); }

/* 40% column: stack of real studio photographs. */
.gallery-hero__preview {
  list-style: none;
  display: grid;
  gap: var(--space-4);
  min-width: 0;
}

.gallery-hero__figure {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(250, 250, 249, 0.22);
  box-shadow: var(--shadow-lg);
  background-color: var(--color-primary-800);
}

.gallery-hero__thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform var(--duration-normal) var(--ease-default);
}

.gallery-hero__shot:hover .gallery-hero__thumb { transform: scale(1.04); }
.gallery-hero__shot:hover { transform: translateY(-4px); }

.gallery-hero__caption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-neutral-50);
  background: linear-gradient(180deg, rgba(23, 44, 34, 0) 0%, rgba(23, 44, 34, 0.82) 60%);
}

/* Tablet: preview photographs side by side under the copy. */
@media (min-width: 48em) {
  .gallery-hero { min-height: 64vh; }

  .gallery-hero__preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-5);
  }

  .gallery-hero__shot:first-child { grid-column: span 2; }
}

/* Desktop: 60/40 split, preview stack in the narrow column. */
@media (min-width: 64em) {
  .gallery-hero { min-height: 72vh; }

  .gallery-hero__container {
    grid-template-columns: 3fr 2fr;
    align-items: center;
    gap: var(--space-12);
  }

  .gallery-hero__preview {
    grid-template-columns: minmax(0, 1fr);
    justify-self: end;
    width: 100%;
  }

  .gallery-hero__shot:first-child { grid-column: auto; }
  .gallery-hero__shot:nth-child(2) { margin-inline-start: var(--space-8); }
}
