/* Loaded directly by the about template. */
.about-story-section {
  padding-top: clamp(4.5rem, 8vw, 7.5rem);
  scroll-margin-top: 2rem;
}

.about-story-section + .about-story-section {
  margin-top: clamp(4.5rem, 8vw, 7.5rem);
  border-top: 1px solid var(--color-border);
}

.about-story-copy {
  display: grid;
  grid-template-columns: minmax(4rem, 0.16fr) minmax(0, 0.84fr);
  column-gap: clamp(1rem, 3vw, 2.5rem);
  width: min(100%, 66rem);
  margin-inline: auto;
}

.about-story-copy > * {
  grid-column: 2;
}

.about-story-copy .about-story-index {
  grid-row: 1 / span 2;
  grid-column: 1;
  margin: 0.4rem 0 0;
  font-family: var(--font-barlow-condensed), sans-serif;
  font-size: clamp(2.2rem, 4vw, 3.75rem);
  font-weight: 800;
  line-height: 1;
  color: var(--crimson-11);
}

.about-story-copy h2 {
  max-width: 16ch;
  margin-top: 0;
  font-size: clamp(3.15rem, 6vw, 5.75rem);
  line-height: 0.9;
}

.about-story-gallery {
  width: min(100%, 74rem);
  margin: clamp(2.5rem, 5vw, 4.5rem) auto 0;
}

.about-story-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.5rem, 1vw, 0.9rem);
  align-items: start;
}

.about-story-gallery-item {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  aspect-ratio: var(--gallery-image-aspect-ratio);
  padding: 0;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--mauve-3);
  border: 0;
  border-radius: clamp(1rem, 2vw, 1.75rem);
}

.about-story-gallery-item img {
  object-fit: cover;
  object-position: center;
  transition:
    filter 500ms ease,
    transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.about-story-gallery-item:hover img {
  filter: saturate(1.06) contrast(1.02);
  transform: scale(1.018);
}

.about-story-gallery-item:focus-visible {
  outline: 3px solid var(--crimson-9);
  outline-offset: 3px;
}

.about-story-gallery-expand {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  z-index: 2;
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  padding: 0.5rem 0.7rem;
  font-size: 0.66rem;
  font-weight: 800;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgb(24 18 23 / 76%);
  border: 1px solid rgb(255 255 255 / 32%);
  border-radius: 999px;
  backdrop-filter: blur(0.65rem);
}

.about-story-gallery-expand svg {
  width: 0.9rem;
  height: 0.9rem;
}

.about-story-gallery figcaption {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1rem;
  font-size: 0.78rem;
  font-weight: 750;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.about-story-gallery figcaption::before {
  width: 2.5rem;
  height: 1px;
  content: "";
  background: var(--crimson-9);
}

@media (max-width: 40rem) {
  .about-story-section {
    padding-top: 3.75rem;
  }

  .about-story-section + .about-story-section {
    margin-top: 3.75rem;
  }

  .about-story-copy {
    display: block;
  }

  .about-story-copy .about-story-index {
    margin-bottom: 1rem;
    font-size: 2.5rem;
  }

  .about-story-gallery-grid {
    grid-template-rows: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    aspect-ratio: auto;
  }

  .about-story-gallery-item {
    width: 100%;
    aspect-ratio: var(--gallery-image-aspect-ratio);
    background: var(--mauve-3);
  }

  .about-story-gallery-item:first-child {
    grid-row: 1;
    grid-column: 1 / -1;
  }

  .about-story-gallery-expand {
    right: 0.65rem;
    bottom: 0.65rem;
    padding: 0.45rem;
  }

  .about-story-gallery-expand span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    white-space: nowrap;
    border: 0;
    clip: rect(0, 0, 0, 0);
  }

  .about-story-gallery figcaption {
    align-items: flex-start;
    font-size: 0.68rem;
    line-height: 1.5;
  }
}

@media (min-width: 40.001rem) and (max-width: 52rem) {
  .about-story-gallery-expand span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    white-space: nowrap;
    border: 0;
    clip: rect(0, 0, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-story-gallery-item img {
    transition: none;
  }
}
