/* Three service links become a photographic coverflow when enhanced. */
.story-gallery {
  --story-ease: cubic-bezier(.23,.72,.2,1);
  color: #fff;
  width: min(100%, 1700px);
  margin: clamp(36px, 5vw, 80px) auto 0;
}

.story-stage {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 94%;
  margin: 0 auto;
}

.story-card {
  display: block;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 2.3;
  border-radius: 13px;
  color: #fff;
  background: #172942;
  text-decoration: none;
}

.story-card > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(5,16,35,.84), transparent 49%);
}

.story-caption {
  position: absolute;
  z-index: 1;
  inset: auto clamp(16px, 2.5vw, 40px) clamp(14px, 2vw, 28px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.story-title {
  color: #fff;
  font-size: clamp(18px, 2vw, 34px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.035em;
}

.story-action {
  flex: none;
  font-size: 14px;
  line-height: 1.55;
  color: #fff;
  border-bottom: 1px solid currentColor;
}

.story-gallery.is-ready .story-stage {
  --story-center: 49%;
  position: relative;
  display: block;
  width: 100%;
  height: clamp(215px, 20vw, 340px);
  touch-action: pan-y pinch-zoom;
}

.story-gallery.is-ready .story-card {
  position: absolute;
  inset: 0;
  margin: auto;
  width: var(--story-center);
  height: 100%;
  box-shadow: 0 10px 24px rgba(6, 16, 32, .22);
  transition: transform .65s var(--story-ease), filter .5s ease;
}

.story-card[data-position="active"] { z-index: 3; }
.story-card[data-position="prev"],
.story-card[data-position="next"] {
  z-index: 1;
  filter: brightness(.79);
}
.story-card[data-position="prev"] { transform: translateX(-67%) scale(.72); }
.story-card[data-position="next"] { transform: translateX(67%) scale(.72); }

.story-card[data-position="prev"] .story-caption,
.story-card[data-position="next"] .story-caption {
  opacity: 0;
  pointer-events: none;
}
.story-caption { transition: opacity .3s ease; }

.story-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 13px;
  margin: clamp(14px, 2vw, 25px) auto 0;
}

.story-switch {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,.62);
  border-radius: 50%;
  background: rgba(8,19,37,.52);
  color: #fff;
  cursor: pointer;
  transition: background .2s ease;
}

.story-switch span {
  width: 9px;
  height: 9px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: translateX(-1.5px) rotate(45deg);
}
.story-prev span { transform: translateX(1.5px) rotate(-135deg); }

.story-position {
  font-weight: 550;
  line-height: 1.4;
  font-family: inherit;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .06em;
  color: #fff;
}

.story-card:focus-visible, .story-switch:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
.story-card:focus-visible { outline-offset: -5px; }
@media (hover: hover) {
  .story-switch:hover { background: rgba(125,145,169,.75); }
  .story-card:is([data-position="next"], [data-position="prev"]):hover { filter: brightness(1); }
  .story-card[data-position="active"]:hover .story-action { color: #d6e9ff; }
}
@media (max-width: 760px) {
  .story-stage { grid-template-columns: 1fr; }
  .story-gallery.is-ready .story-stage {
    --story-center: 76%;
    height: clamp(176px, 47vw, 275px);
  }
  .story-gallery.is-ready .story-card { border-radius: 10px; }
  .story-card[data-position="prev"] { transform: translateX(-47%) scale(.76); }
  .story-card[data-position="next"] { transform: translateX(47%) scale(.76); }
  .story-caption { align-items: end; }
}
@media (prefers-reduced-motion: reduce) {
  .story-gallery *, .story-gallery *::after { transition: none !important; }
}
