:root {
  --brand: #39ff14;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  background: #ffffff;
  color: #171717;
}

.gallery {
  padding: 4rem 1rem;
}

.gallery__inner {
  max-width: 72rem;
  margin: 0 auto;
}

.gallery__header {
  max-width: 42rem;
  margin: 0 auto;
  text-align: center;
}

.gallery__heading {
  margin: 0;
  font-size: clamp(1.75rem, 1.4rem + 1.8vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #171717;
}

.gallery__subheading {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #737373;
}

.split {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow: hidden;
  border-radius: 1rem;
}

.panel {
  position: relative;
  height: 18rem;
  flex: 1;
  overflow: hidden;
}

.panel__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.panel__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent 60%);
  pointer-events: none;
}

.panel__dim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
}

.panel__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 1.25rem;
}

.panel__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 500;
  color: #ffffff;
}

.panel__category {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

@media (min-width: 640px) {
  .panel {
    height: 24rem;
  }
}

@media (min-width: 1024px) {
  .gallery {
    padding: 6rem 2rem;
  }

  .split {
    margin-top: 3.5rem;
    flex-direction: row;
    height: 32.5rem;
  }

  .panel {
    height: auto;
  }

  .panel__caption {
    padding: 1.5rem;
  }
}

/*
 * Gallery 05 — "split-panel hover pan / image emphasis" animation identity.
 * Same canonical transitions as `Gallery05.tailwind.css`. Scoped so this
 * never collides with another Resource's own animation layer. Entirely
 * disabled under reduced motion: both panels stay at their equal resting
 * width.
 */
@media (prefers-reduced-motion: no-preference) {
  .panel {
    transition: flex-grow 500ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .panel__image {
    transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .panel.is-emphasized {
    flex-grow: 1.15;
  }

  .panel.is-receded {
    flex-grow: 0.85;
  }

  .panel.is-emphasized .panel__image {
    transform: scale(1.08) translateX(-1%);
  }

  .panel__dim {
    transition: opacity 500ms ease;
  }

  .panel.is-receded .panel__dim {
    opacity: 1;
  }
}
