/* about: a pinned story of three scenes (one at a time on large screens; a swipe row elsewhere) */
.story { position: relative; background: var(--sand); }
.story__pin { display: grid; gap: 1.25rem; padding-block: clamp(2.5rem, 7vw, 4.5rem) 1.5rem; }
.story__head, .story__scenes, .story__dots { inline-size: min(100% - 2.5rem, 76rem); margin-inline: auto; }
.story__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 0.75rem 1.5rem; }
.story__title { font-size: clamp(1.75rem, 4.5vw, 2.75rem); }
.story__lead { margin: 0.6rem 0 0; max-inline-size: 52ch; color: var(--muted); font-size: 1rem; line-height: 1.8; }
.story__cta { display: flex; justify-content: center; inline-size: min(100% - 2.5rem, 76rem); margin-inline: auto; }
.story__book { min-block-size: 3rem; padding-inline: 2rem; min-inline-size: min(100%, 15rem); }

/* phones and reduced motion: the image at the section's width and its own ratio, the words right under it; swipe sideways */
.story__scenes { display: flex; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; touch-action: pan-x pan-y; inline-size: 100%; }
.story__scenes::-webkit-scrollbar { display: none; }
.story__scene { flex: 0 0 100%; display: flex; flex-direction: column; scroll-snap-align: start; scroll-snap-stop: always; }
.story__figure { margin: 0; inline-size: 100%; aspect-ratio: 1672 / 941; background: var(--sand-deep); overflow: hidden; }
.story__figure img { display: block; inline-size: 100%; block-size: 100%; object-fit: contain; object-position: center; }
/* phones: the scene that arrives eases in (the photo settles from a slight zoom, the words rise and fade in) */
@media (max-width: 61.99rem), (prefers-reduced-motion: reduce) {
  .story__scene .story__figure img { transform: scale(1.06); opacity: 0.55; transition: transform 900ms var(--ease-out), opacity 600ms var(--ease-out); }
  .story__scene .story__text { opacity: 0; transform: translateY(0.75rem); transition: opacity 500ms var(--ease-out) 120ms, transform 600ms var(--ease-out) 120ms; }
  .story__scene.is-active .story__figure img { transform: none; opacity: 1; }
  .story__scene.is-active .story__text { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .story__scene .story__figure img, .story__scene .story__text { transition-duration: 0.01ms; transition-delay: 0s; transform: none; } .story__scene .story__figure img { opacity: 1; } .story__scene .story__text { opacity: 1; } }
.story__text { padding: 1.25rem 1.25rem 0.25rem; min-block-size: 8.25rem; }
.story__cta { padding-block-start: 0.25rem; }
.story__text h3 { font-size: clamp(1.625rem, 6vw, 2.25rem); }
.story__text p { margin: 0.6rem 0 0; max-inline-size: 36ch; font-size: 1.125rem; line-height: 1.85; }
.story__dots { display: flex; justify-content: center; gap: 0.25rem; }
.story__dot { position: relative; inline-size: 2.75rem; block-size: 2.75rem; padding: 0; border: 0; background: none; cursor: pointer; }
.story__dot::after { content: ""; position: absolute; inset-block-start: 50%; inset-inline-start: 50%; inline-size: 0.625rem; block-size: 0.625rem; translate: -50% -50%; border-radius: 999px; background: transparent; box-shadow: inset 0 0 0 1.5px var(--maroon); transition: background-color 150ms ease, inline-size 200ms var(--ease-out); }
[dir="rtl"] .story__dot::after { translate: 50% -50%; }
.story__dot.is-active::after { background: var(--maroon); inline-size: 1.5rem; }

/* large screens: the section stays pinned while each scroll step changes the photo and its words together */
@media (min-width: 62rem) and (min-height: 34rem) and (prefers-reduced-motion: no-preference) {
  .story { block-size: calc(100svh + var(--n) * 55svh); }
  .story__pin { position: sticky; inset-block-start: var(--hv-h); block-size: calc(100svh - var(--hv-h)); grid-template-rows: auto minmax(0, 1fr) auto; gap: 0.75rem; padding-block: 1.5rem 0.75rem; align-content: stretch; }
  .story__lead { display: none; }
  .story__scenes { display: grid; overflow: visible; min-block-size: 0; scroll-snap-type: none; inline-size: min(100% - 2.5rem, 76rem); }
  .story__scene { grid-area: 1 / 1; flex: none; display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 4fr); align-items: center; gap: clamp(2rem, 5vw, 5rem); min-block-size: 0; opacity: 0; visibility: hidden; transition: opacity 500ms var(--ease-out), visibility 0s 500ms; }
  .story__scene.is-active { opacity: 1; visibility: visible; transition-delay: 0s; }
  /* one fixed box for every photo: same width, same height, whole picture */
  .story__figure { inline-size: min(100%, calc((100svh - var(--hv-h) - 10.5rem) * 1672 / 941)); align-self: center; box-shadow: 0 1.25rem 2.5rem -1rem rgb(60 20 10 / 0.3); }
  .story__text { padding: 0; min-block-size: 0; translate: calc(var(--dir) * 1.5rem) 0; transition: translate 600ms var(--ease-out); }
  .story__scene.is-active .story__text { translate: 0 0; }
  .story__text h3 { font-size: clamp(2rem, 3.6vw, 3.25rem); }
  .story__text p { font-size: 1.3125rem; line-height: 1.9; }
}
@media (prefers-reduced-motion: reduce) { .story__scenes { scroll-behavior: auto; } .story__dot::after { transition: none; } }
