/* Photography layer: controlled-environment aquaculture, restrained and editorial. */

.story-photo {
  position: relative;
  overflow: hidden;
  margin: 0;
  border-radius: 32px;
  background: #e9eef2;
  box-shadow: inset 0 0 0 1px rgba(13, 27, 61, .035);
  isolation: isolate;
}

.story-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 19, 40, .01), rgba(5, 19, 40, .12)),
    linear-gradient(135deg, rgba(0, 119, 255, .025), rgba(0, 182, 122, .02));
}

.story-photo img {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.92) contrast(.99);
  transform: scale(1.002);
  transition: transform .8s cubic-bezier(.2, .7, .2, 1), filter .5s ease;
}

.story-photo figcaption {
  position: absolute;
  z-index: 2;
  left: 16px;
  bottom: 14px;
  max-width: calc(100% - 32px);
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  background: rgba(4, 16, 32, .48);
  color: rgba(255,255,255,.88);
  font-size: 9px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: .045em;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.story-photo:hover img {
  transform: scale(1.018);
  filter: saturate(.98) contrast(1);
}

.problem-photo {
  min-height: 540px;
  aspect-ratio: 16 / 10;
}

.problem-photo img {
  object-position: 52% 50%;
}

.now-layout {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 410px);
  gap: 58px;
  align-items: stretch;
}

.now-side {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.now-photo {
  flex: 1 1 auto;
  min-height: 300px;
  aspect-ratio: 4 / 3;
  border-radius: 26px;
}

.now-photo img {
  object-position: 50% 46%;
}

.now-mark {
  min-height: 0;
  padding: 18px 0 0;
  border-left: 0;
  border-top: 1px solid rgba(13, 27, 61, .1);
  flex-direction: row;
  align-items: flex-end;
  gap: 24px;
}

.now-mark div {
  margin-left: auto;
  text-align: right;
}

@media (max-width: 980px) {
  .problem-photo {
    min-height: 0;
    aspect-ratio: 16 / 10;
    border-radius: 28px;
  }

  .now-layout {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .now-side {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 24px;
    align-items: stretch;
  }

  .now-photo {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .now-mark {
    height: 100%;
    padding: 18px 0 0 22px;
    border-top: 0;
    border-left: 1px solid rgba(13, 27, 61, .1);
    flex-direction: column;
    align-items: flex-start;
  }

  .now-mark div {
    margin-left: 0;
    margin-top: auto;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .story-photo {
    border-radius: 20px;
  }

  .story-photo figcaption {
    left: 12px;
    bottom: 11px;
    max-width: calc(100% - 24px);
    padding: 6px 8px;
    font-size: 8px;
  }

  .problem-photo {
    aspect-ratio: 4 / 3;
  }

  .problem-photo img {
    object-position: 56% 50%;
  }

  .now-side {
    display: block;
  }

  .now-photo {
    min-height: 0;
    aspect-ratio: 4 / 3;
    margin-top: 2px;
    border-radius: 20px;
  }

  .now-photo img {
    object-position: 52% 50%;
  }

  .now-mark {
    height: auto;
    margin-top: 18px;
    padding: 18px 0 0;
    border-left: 0;
    border-top: 1px solid rgba(13, 27, 61, .1);
    flex-direction: row;
    align-items: flex-end;
  }

  .now-mark div {
    margin-left: auto;
    margin-top: 0;
    text-align: right;
  }

  .story-photo:hover img {
    transform: scale(1.002);
  }
}

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