/* My Health History — cinematic horizontal story on Services */

/* Prevent horizontal page bleed (navbar “crop” + gray side gutters) */
html {
  overflow-x: clip;
  max-width: 100%;
}

body {
  overflow-x: clip;
  max-width: 100%;
}

.page.services-page,
.page {
  overflow-x: clip;
  max-width: 100%;
  width: 100%;
}

.site-header {
  width: 100%;
  max-width: 100%;
  left: 0;
  right: 0;
}

.story-intro {
  padding: 96px max(24px, calc((100% - 1180px) / 2)) 48px;
  background: var(--cream);
}

.story-intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(180px, 0.55fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: end;
}

.story-intro-copy {
  max-width: 34rem;
}

.story-intro h2 {
  margin: 8px 0 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(42px, 5vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.story-intro h2::first-line {
  font-style: normal;
  font-weight: 600;
}

.story-intro-copy > p:not(.eyebrow) {
  max-width: 28rem;
  margin: 22px 0 0;
  font-family: Outfit, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--body);
}

.story-intro-cue {
  margin: 0 0 10px;
  font-family: Outfit, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.story-intro-arrow {
  display: block;
  width: 1px;
  height: 42px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  position: relative;
}

.story-intro-arrow::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 7px;
  height: 7px;
  border-right: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  transform: translateX(-50%) rotate(45deg);
}

.story-scroll {
  --story-progress: 0;
  --story-x: 0px;
  position: relative;
  background: var(--cream);
}

.story-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  background: var(--cream);
}

.story-progress {
  position: absolute;
  top: calc(var(--header-offset, 97px) + 14px);
  left: max(24px, calc((100% - 1180px) / 2));
  right: max(24px, calc((100% - 1180px) / 2));
  z-index: 4;
  pointer-events: none;
}

.story-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  font-family: Outfit, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(27, 3, 53, 0.55);
}

.story-progress-rule {
  position: relative;
  height: 1px;
  background: rgba(27, 3, 53, 0.12);
  overflow: hidden;
}

.story-progress-fill {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--gold);
  transform-origin: left center;
  transform: scaleX(var(--story-progress));
  will-change: transform;
}

.story-track {
  position: absolute;
  inset: 0 auto 0 0;
  display: flex;
  align-items: center;
  gap: 0;
  height: 100%;
  width: max-content;
  padding: calc(var(--header-offset, 97px) + 36px) 5vw 48px;
  transform: translate3d(var(--story-x), 0, 0);
  will-change: transform;
}

.story-path {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

.story-path-line {
  stroke: rgba(27, 3, 53, 0.18);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
  transition: none;
}

.story-beat {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: grid;
  align-items: center;
  column-gap: clamp(48px, 5.5vw, 88px);
  row-gap: clamp(20px, 2vw, 32px);
  min-height: min(72vh, 700px);
  padding-right: clamp(64px, 7vw, 120px);
  margin-right: 0;
  isolation: isolate;
}

.story-beat-copy {
  position: relative;
  z-index: 3;
  max-width: min(30rem, 34vw);
  width: auto;
  min-width: 0;
  background: transparent;
  padding: 0;
}

.story-beat-copy--band-top {
  align-self: start;
  margin-top: 4vh;
}

.story-beat-copy--band-mid {
  align-self: center;
}

.story-beat-copy--band-low {
  align-self: end;
  margin-bottom: 4vh;
}

.story-beat h3 {
  margin: 8px 0 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(34px, 3.8vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.story-beat h3::first-line {
  font-style: normal;
  font-weight: 600;
}

.story-beat-copy > p:not(.eyebrow):not(.story-year):not(.story-note):not(.story-arrive-line) {
  margin: 18px 0 0;
  font-family: Outfit, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--body);
}

.story-year {
  margin: 0;
  font-family: Outfit, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.story-note {
  margin-top: 18px;
  font-family: "Cormorant Garamond", Georgia, serif !important;
  font-style: italic;
  font-size: 22px !important;
  line-height: 1.35 !important;
  color: var(--ink) !important;
}

.story-year-ghost {
  position: absolute;
  left: 4%;
  top: 12%;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(120px, 16vw, 200px);
  line-height: 0.8;
  color: rgba(27, 3, 53, 0.07);
  pointer-events: none;
  z-index: 0;
}

.story-figure {
  margin: 0;
  position: relative;
  z-index: 1;
  overflow: hidden;
  flex: 0 0 auto;
  background: transparent;
  /* Keep frames inside the sticky pin — never spill past the viewport */
  max-height: calc(100svh - var(--header-offset, 97px) - 88px);
}

.story-figure .story-ph {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  background: #efe8dc;
  transform: scale(1.01);
  transition: transform 420ms var(--ease-brand, cubic-bezier(0.22, 1, 0.36, 1));
  will-change: transform;
}

.story-figure:hover .story-ph {
  transform: scale(1.025);
}

.story-figure--contain {
  background: var(--cream);
}

.story-figure--contain .story-ph {
  object-fit: contain;
  object-position: center center;
  transform: none;
}

.story-figure--contain:hover .story-ph,
.story-figure--contain[data-parallax] .story-ph,
.story-figure--contain[data-parallax]:hover .story-ph {
  transform: none;
}

.story-figure figcaption {
  display: none;
}

/* Image scale system — heights stay under the sticky pin */
.story-figure--hero {
  width: clamp(360px, 36vw, 640px);
  height: clamp(420px, 58vh, 680px);
}

.story-figure--large {
  width: clamp(340px, 32vw, 560px);
  height: clamp(380px, 52vh, 600px);
}

.story-figure--medium {
  width: clamp(260px, 24vw, 420px);
  height: clamp(320px, 46vh, 520px);
}

.story-figure--small {
  width: clamp(200px, 16vw, 300px);
  height: clamp(260px, 36vh, 400px);
}

.story-figure--portrait-nat {
  width: clamp(300px, 28vw, 480px);
  height: clamp(400px, 56vh, 660px);
}

.story-figure--landscape {
  width: clamp(420px, 40vw, 760px);
  height: clamp(320px, 46vh, 520px);
}

.story-figure--hero.story-figure--landscape {
  width: clamp(520px, 48vw, 880px);
  height: clamp(360px, 52vh, 600px);
}

/* Wider family shots when source is landscape */
.story-figure--family-wide {
  width: clamp(400px, 36vw, 620px);
  height: clamp(420px, 56vh, 660px);
}

.story-figure--hero.story-figure--portrait-nat,
.story-figure--finale {
  width: clamp(340px, 30vw, 520px);
  height: clamp(440px, 60vh, 720px);
}

.story-figure--large.story-figure--portrait-nat {
  width: clamp(300px, 28vw, 480px);
  height: clamp(400px, 56vh, 660px);
}

/* Costa Rica family — match native 4:5, keep people in frame */
.story-figure--large.story-figure--portrait-nat:has([data-ph="walking-outdoors"]) {
  width: clamp(320px, 30vw, 500px);
  height: clamp(420px, 58vh, 700px);
}

.story-figure--arrival {
  width: clamp(440px, 40vw, 760px);
  height: clamp(300px, 44vh, 520px);
}

.story-figure--band-top {
  align-self: start;
  margin-top: 3vh;
}

.story-figure--band-mid {
  align-self: center;
}

.story-figure--band-low {
  align-self: end;
  margin-bottom: 3vh;
}

.story-figure--peek {
  opacity: 0.94;
  margin-right: -1.5vw;
}

.story-ph[data-ph="portrait-young-adult"] { object-position: center 12%; }
.story-ph[data-ph="sparse-2022"] { object-position: center 12%; }
.story-ph[data-ph="health-journal"],
.story-ph[data-ph="research"] { object-position: center 18%; }
.story-ph[data-ph="family"] { object-position: center 18%; }
.story-ph[data-ph="motherhood"],
.story-ph[data-ph="flashback-2011"] { object-position: center 22%; }
.story-ph[data-ph="pregnancy"] { object-position: center 12%; }
.story-ph[data-ph="family-wide"] { object-position: center 12%; }
.story-ph[data-ph="hospital-memory"],
.story-ph[data-ph="diagnosis-2008"] { object-position: center 8%; }
.story-ph[data-ph="recovery"] { object-position: center 18%; }
.story-ph[data-ph="recovery-peek"] { object-position: center top; }
/* Portrait family photo (1440×1800) — keep subjects fully in frame */
.story-ph[data-ph="walking-outdoors"] {
  object-fit: cover;
  object-position: center 42%;
}
.story-ph[data-ph="present-day-warm"] { object-position: center 18%; }
.story-ph[data-ph="present-day-portrait"] { object-position: center 8%; }
.story-ph[data-ph="arrival-stage"] { object-position: center 18%; }
.story-ph[data-ph="crisis-peek"] { object-position: center 10%; }

/* Composition variants — content-driven widths */
.story-beat--open {
  width: 72vw;
  grid-template-columns: max-content auto;
}

.story-beat--image-left {
  width: 82vw;
  grid-template-columns: auto max-content;
}

.story-beat--statement {
  width: 86vw;
  grid-template-columns: auto max-content;
  align-items: center;
  padding-left: 1vw;
}

.story-beat--statement .story-year-ghost {
  left: 36%;
  top: 8%;
}

.story-beat--warm {
  width: 84vw;
  grid-template-columns: max-content auto;
}

.story-beat--portrait-lead {
  width: 86vw;
  grid-template-columns: auto max-content;
}

.story-beat--quiet {
  width: 82vw;
  grid-template-columns: minmax(280px, 420px) auto;
  align-items: stretch;
  gap: clamp(40px, 6vw, 96px);
}

.story-beat--quiet .story-beat-copy {
  max-width: 26rem;
  width: auto;
}

.story-beat--expansive {
  width: 88vw;
  grid-template-columns: auto max-content;
}

.story-beat--interlude {
  width: 48vw;
  justify-items: center;
  text-align: center;
}

.story-beat--interlude .story-beat-copy {
  max-width: 16em;
}

.story-beat--interlude h3 {
  font-size: clamp(36px, 4.2vw, 64px);
}

.story-beat--image-right {
  width: 82vw;
  grid-template-columns: max-content auto;
  gap: clamp(40px, 5vw, 80px);
}

.story-beat--flashback {
  width: 84vw;
  grid-template-columns: max-content auto;
  padding: 24px 1.5vw 24px 2vw;
  background: linear-gradient(90deg, rgba(243, 239, 230, 0.95), transparent 78%);
}

.story-beat--doc {
  width: 84vw;
  grid-template-columns: max-content auto;
}

.story-beat--space {
  width: 12vw;
  min-height: 20vh;
  pointer-events: none;
}

.story-beat--crisis {
  width: 72vw;
  grid-template-columns: max-content auto;
}

.story-beat--crisis h3 {
  font-size: clamp(40px, 5vw, 72px);
  max-width: 11em;
}

.story-beat--crisis-reveal {
  width: 92vw;
  grid-template-columns: auto max-content;
}

.story-beat--crisis-words {
  width: 84vw;
  grid-template-columns: max-content auto;
}

.story-beat--crisis-words .story-beat-copy {
  max-width: 32rem;
  width: auto;
}

.story-beat--sparse {
  width: 80vw;
  grid-template-columns: auto max-content;
}

.story-beat--sparse .story-beat-copy {
  max-width: 26rem;
  width: auto;
}

.story-beat--isolate {
  width: 58vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 40px;
  padding-left: 4vw;
}

.story-isolate {
  margin: 0;
  max-width: 14em;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(36px, 4.4vw, 64px);
  line-height: 1.05;
  color: var(--ink);
}

.story-isolate--soft {
  color: var(--body);
  font-size: clamp(28px, 3.2vw, 44px);
}

.story-beat--aside {
  width: 42vw;
  align-self: end;
  margin-bottom: 10vh;
  padding: 18px 20px;
  border-left: 1px solid rgba(27, 3, 53, 0.16);
  background: transparent;
}

.story-beat--aside h3 {
  font-size: clamp(28px, 2.8vw, 40px);
}

.story-beat--aside p:not(.story-year) {
  margin: 12px 0 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 20px;
  line-height: 1.4;
  color: var(--body);
}

.story-beat--return {
  width: 86vw;
  grid-template-columns: auto max-content;
}

.story-beat--terms {
  width: min(58vw, 640px);
  align-content: center;
  /* Extra gutters so neighboring portraits never crowd the conditions list */
  padding-left: clamp(24px, 4vw, 56px);
  padding-right: clamp(72px, 10vw, 140px);
}

.story-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 52rem;
}

.story-terms li {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: clamp(20px, 2vw, 28px);
  color: rgba(27, 3, 53, 0.72);
}

.story-beat--arrive {
  width: 94vw;
  grid-template-columns: auto max-content;
  align-items: center;
}

.story-arrive-line {
  margin: 28px 0 0 !important;
  font-family: "Cormorant Garamond", Georgia, serif !important;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(34px, 3.6vw, 54px) !important;
  line-height: 1.05 !important;
  color: var(--ink) !important;
}

.story-beat--lesson {
  width: 90vw;
  padding-right: 8vw;
  grid-template-columns: max-content auto;
  align-items: center;
}

.story-beat--lesson .story-beat-copy {
  max-width: 32rem;
}

.story-path-continue {
  position: absolute;
  right: 4vw;
  top: 52%;
  width: min(28vw, 360px);
  height: 1px;
  background: linear-gradient(to right, rgba(27, 3, 53, 0.28), transparent);
}

.story-path-continue::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  transform: translateY(-50%);
}

/* Parallax helper: JS sets --parallax-shift — light overscale only */
.story-figure[data-parallax] .story-ph {
  transform: translate3d(var(--parallax-shift, 0px), 0, 0) scale(1.02);
}

.story-figure[data-parallax]:hover .story-ph {
  transform: translate3d(var(--parallax-shift, 0px), 0, 0) scale(1.035);
}

/* Contain frames: never overscale / crop via parallax */
.story-figure--contain[data-parallax] .story-ph,
.story-figure--contain[data-parallax]:hover .story-ph {
  object-fit: contain;
  object-position: center center;
  transform: none;
}

/* When horizontal mode is off (mobile / reduced motion) */
.story-scroll.is-vertical {
  height: auto !important;
}

.story-scroll.is-vertical .story-sticky {
  position: relative;
  height: auto;
  overflow: visible;
}

.story-scroll.is-vertical .story-progress {
  position: sticky;
  top: calc(var(--header-offset, 97px) + 8px);
  margin-bottom: 24px;
  background: linear-gradient(to bottom, var(--cream) 70%, transparent);
  padding-bottom: 12px;
}

.story-scroll.is-vertical .story-track {
  position: relative;
  inset: auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: auto;
  padding: 24px max(20px, calc((100% - 720px) / 2)) 72px;
  padding-left: max(36px, calc((100% - 720px) / 2 + 16px));
  gap: 56px;
  transform: none !important;
}

.story-scroll.is-vertical .story-path {
  display: none;
}

.story-scroll.is-vertical .story-track::before {
  content: "";
  position: absolute;
  left: max(20px, calc((100% - 720px) / 2));
  top: 8px;
  bottom: 48px;
  width: 1px;
  background: linear-gradient(
    to bottom,
    rgba(27, 3, 53, 0.08),
    rgba(27, 3, 53, 0.22) 12%,
    rgba(27, 3, 53, 0.18) 88%,
    transparent
  );
  pointer-events: none;
}

.story-scroll.is-vertical .story-beat,
.story-scroll.is-vertical .story-beat--space,
.story-scroll.is-vertical .story-beat--open,
.story-scroll.is-vertical .story-beat--image-left,
.story-scroll.is-vertical .story-beat--statement,
.story-scroll.is-vertical .story-beat--warm,
.story-scroll.is-vertical .story-beat--portrait-lead,
.story-scroll.is-vertical .story-beat--quiet,
.story-scroll.is-vertical .story-beat--expansive,
.story-scroll.is-vertical .story-beat--interlude,
.story-scroll.is-vertical .story-beat--image-right,
.story-scroll.is-vertical .story-beat--flashback,
.story-scroll.is-vertical .story-beat--doc,
.story-scroll.is-vertical .story-beat--crisis,
.story-scroll.is-vertical .story-beat--crisis-reveal,
.story-scroll.is-vertical .story-beat--crisis-words,
.story-scroll.is-vertical .story-beat--sparse,
.story-scroll.is-vertical .story-beat--isolate,
.story-scroll.is-vertical .story-beat--aside,
.story-scroll.is-vertical .story-beat--return,
.story-scroll.is-vertical .story-beat--terms,
.story-scroll.is-vertical .story-beat--arrive,
.story-scroll.is-vertical .story-beat--lesson {
  width: 100%;
  min-height: 0;
  padding: 0 0 8px;
  grid-template-columns: 1fr;
  justify-items: start;
  text-align: left;
}

.story-scroll.is-vertical .story-beat--space {
  display: none;
}

.story-scroll.is-vertical .story-beat {
  margin-right: 0;
}

.story-scroll.is-vertical .story-figure,
.story-scroll.is-vertical .story-figure--hero,
.story-scroll.is-vertical .story-figure--large,
.story-scroll.is-vertical .story-figure--medium,
.story-scroll.is-vertical .story-figure--small,
.story-scroll.is-vertical .story-figure--portrait-nat,
.story-scroll.is-vertical .story-figure--landscape,
.story-scroll.is-vertical .story-figure--arrival,
.story-scroll.is-vertical .story-figure--finale {
  width: min(100%, 520px);
  height: auto;
  aspect-ratio: 4 / 5;
  max-height: none;
  margin: 0;
}

.story-scroll.is-vertical .story-figure--landscape,
.story-scroll.is-vertical .story-figure--arrival {
  aspect-ratio: 16 / 10;
}

.story-scroll.is-vertical .story-figure--peek {
  display: none;
}

.story-scroll.is-vertical .story-year-ghost {
  display: none;
}

.story-scroll.is-vertical .story-path-continue {
  position: relative;
  right: auto;
  top: auto;
  width: 100%;
  margin-top: 28px;
}

.story-scroll.is-vertical .story-beat--aside {
  margin: 0;
  width: 100%;
}

.story-scroll.is-vertical .story-isolate {
  max-width: none;
}

/* Laptop / tablet: keep horizontal scrub, but stack copy + photo so nothing overlaps */
@media (max-width: 1279px) {
  .story-intro-grid {
    grid-template-columns: 1fr;
  }

  .story-intro-cue {
    margin-top: 28px;
  }

  .story-intro {
    padding: 72px 20px 40px;
  }

  .story-progress {
    left: 20px;
    right: 20px;
  }

  .story-track {
    padding: calc(var(--header-offset, 97px) + 20px) 4vw 28px;
    align-items: center;
  }

  .story-beat {
    column-gap: 0;
    row-gap: 14px;
    min-height: 0;
    max-height: calc(100svh - var(--header-offset, 97px) - 48px);
    padding-right: clamp(56px, 12vw, 96px);
    align-content: center;
    align-items: start;
  }

  .story-beat-copy {
    max-width: min(28rem, 72vw);
    width: auto;
  }

  .story-beat h3 {
    font-size: clamp(28px, 3.2vw, 42px);
  }

  .story-beat-copy > p:not(.eyebrow):not(.story-year):not(.story-note):not(.story-arrive-line) {
    font-size: 14px;
    line-height: 1.55;
    margin-top: 12px;
  }

  /* One column inside each beat — copy never sits on the photo */
  .story-beat--open,
  .story-beat--image-left,
  .story-beat--statement,
  .story-beat--warm,
  .story-beat--portrait-lead,
  .story-beat--quiet,
  .story-beat--expansive,
  .story-beat--image-right,
  .story-beat--flashback,
  .story-beat--doc,
  .story-beat--crisis,
  .story-beat--crisis-reveal,
  .story-beat--crisis-words,
  .story-beat--sparse,
  .story-beat--return,
  .story-beat--arrive,
  .story-beat--lesson {
    width: min(70vw, 440px);
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .story-beat--quiet {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .story-beat--interlude {
    width: min(58vw, 360px);
  }

  .story-beat--isolate {
    width: min(62vw, 380px);
    padding-left: 0;
    gap: 20px;
  }

  .story-beat--aside {
    width: min(48vw, 300px);
    margin-bottom: 0;
  }

  .story-beat--terms {
    width: min(64vw, 400px);
    padding-left: clamp(16px, 3vw, 32px);
    padding-right: clamp(56px, 12vw, 96px);
  }

  .story-beat--space {
    width: 8vw;
  }

  .story-beat--flashback {
    padding: 8px 0;
    background: transparent;
  }

  /* Shorter frames so stacked text + image fit the pin */
  .story-figure {
    max-height: min(42vh, calc(100svh - var(--header-offset, 97px) - 220px));
  }

  .story-figure--hero,
  .story-figure--large,
  .story-figure--medium,
  .story-figure--portrait-nat,
  .story-figure--family-wide,
  .story-figure--hero.story-figure--portrait-nat,
  .story-figure--finale,
  .story-figure--large.story-figure--portrait-nat,
  .story-figure--large.story-figure--portrait-nat:has([data-ph="walking-outdoors"]) {
    width: min(58vw, 360px);
    height: min(42vh, 420px);
  }

  .story-figure--small {
    width: min(42vw, 240px);
    height: min(32vh, 300px);
  }

  .story-figure--landscape,
  .story-figure--hero.story-figure--landscape,
  .story-figure--arrival {
    width: min(62vw, 400px);
    height: min(34vh, 320px);
  }

  .story-figure--peek {
    display: none;
  }

  .story-figure--band-top,
  .story-figure--band-low,
  .story-beat-copy--band-top,
  .story-beat-copy--band-low,
  .story-beat-copy--band-mid {
    margin-top: 0;
    margin-bottom: 0;
    align-self: start;
  }

  .story-ph[data-ph="walking-outdoors"] {
    object-position: center 42%;
  }

  .story-year-ghost {
    display: none;
  }
}

/* Phone: still pinned horizontal; even shorter frames */
@media (max-width: 767px) {
  .story-intro {
    padding: 56px 16px 28px;
  }

  .story-intro h2 {
    font-size: clamp(34px, 9vw, 46px);
  }

  .story-progress {
    left: 16px;
    right: 16px;
    top: calc(var(--header-offset, 72px) + 10px);
  }

  .story-progress-meta {
    font-size: 10px;
    letter-spacing: 0.12em;
  }

  .story-track {
    padding: calc(var(--header-offset, 72px) + 18px) 5vw 24px;
  }

  .story-beat {
    row-gap: 12px;
    max-height: calc(100svh - var(--header-offset, 72px) - 40px);
    padding-right: clamp(48px, 16vw, 72px);
  }

  .story-beat-copy {
    max-width: min(18rem, 78vw);
  }

  .story-beat h3 {
    font-size: clamp(24px, 6.5vw, 34px);
  }

  .story-beat--open,
  .story-beat--image-left,
  .story-beat--statement,
  .story-beat--warm,
  .story-beat--portrait-lead,
  .story-beat--quiet,
  .story-beat--expansive,
  .story-beat--image-right,
  .story-beat--flashback,
  .story-beat--doc,
  .story-beat--crisis,
  .story-beat--crisis-reveal,
  .story-beat--crisis-words,
  .story-beat--sparse,
  .story-beat--return,
  .story-beat--arrive,
  .story-beat--lesson {
    width: min(82vw, 340px);
  }

  .story-beat--interlude {
    width: min(78vw, 300px);
  }

  .story-beat--isolate {
    width: min(82vw, 320px);
  }

  .story-beat--aside {
    width: min(72vw, 280px);
  }

  .story-beat--terms {
    width: min(84vw, 340px);
  }

  .story-figure {
    max-height: min(36vh, calc(100svh - var(--header-offset, 72px) - 260px));
  }

  .story-figure--hero,
  .story-figure--large,
  .story-figure--medium,
  .story-figure--portrait-nat,
  .story-figure--family-wide,
  .story-figure--hero.story-figure--portrait-nat,
  .story-figure--finale,
  .story-figure--large.story-figure--portrait-nat,
  .story-figure--large.story-figure--portrait-nat:has([data-ph="walking-outdoors"]) {
    width: min(78vw, 300px);
    height: min(36vh, 300px);
  }

  .story-figure--small {
    width: min(56vw, 200px);
    height: min(28vh, 240px);
  }

  .story-figure--landscape,
  .story-figure--hero.story-figure--landscape,
  .story-figure--arrival {
    width: min(82vw, 320px);
    height: min(28vh, 220px);
  }

  .story-isolate {
    font-size: clamp(26px, 6.5vw, 36px);
  }

  .story-arrive-line {
    font-size: clamp(24px, 6vw, 34px) !important;
  }
}

/* Short laptop screens — keep frames inside the pin even at wide widths */
@media (max-height: 800px) {
  .story-track {
    padding-top: calc(var(--header-offset, 97px) + 16px);
    padding-bottom: 20px;
  }

  .story-beat {
    min-height: 0;
    column-gap: clamp(28px, 3vw, 48px);
  }

  .story-beat-copy--band-top,
  .story-beat-copy--band-low,
  .story-figure--band-top,
  .story-figure--band-low {
    margin-top: 0;
    margin-bottom: 0;
    align-self: center;
  }

  .story-figure {
    max-height: calc(100svh - var(--header-offset, 97px) - 72px);
  }

  .story-figure--hero,
  .story-figure--large,
  .story-figure--portrait-nat,
  .story-figure--family-wide,
  .story-figure--hero.story-figure--portrait-nat,
  .story-figure--finale,
  .story-figure--large.story-figure--portrait-nat,
  .story-figure--large.story-figure--portrait-nat:has([data-ph="walking-outdoors"]) {
    height: min(52vh, 460px);
  }

  .story-figure--medium,
  .story-figure--small {
    height: min(44vh, 360px);
  }

  .story-figure--landscape,
  .story-figure--hero.story-figure--landscape,
  .story-figure--arrival {
    height: min(42vh, 340px);
  }

  .story-figure--peek {
    display: none;
  }

  .story-year-ghost {
    display: none;
  }
}

/* Very short viewports — stack copy/photo so nothing crosses */
@media (max-height: 700px) {
  .story-beat--open,
  .story-beat--image-left,
  .story-beat--statement,
  .story-beat--warm,
  .story-beat--portrait-lead,
  .story-beat--quiet,
  .story-beat--expansive,
  .story-beat--image-right,
  .story-beat--flashback,
  .story-beat--doc,
  .story-beat--crisis,
  .story-beat--crisis-reveal,
  .story-beat--crisis-words,
  .story-beat--sparse,
  .story-beat--return,
  .story-beat--arrive,
  .story-beat--lesson {
    width: min(52vw, 420px);
    grid-template-columns: 1fr;
    justify-items: start;
    row-gap: 10px;
    padding-right: clamp(48px, 8vw, 88px);
  }

  .story-beat-copy {
    max-width: min(28rem, 48vw);
  }

  .story-beat h3 {
    font-size: clamp(26px, 2.8vw, 36px);
  }

  .story-figure--hero,
  .story-figure--large,
  .story-figure--medium,
  .story-figure--portrait-nat,
  .story-figure--family-wide,
  .story-figure--hero.story-figure--portrait-nat,
  .story-figure--finale,
  .story-figure--large.story-figure--portrait-nat,
  .story-figure--large.story-figure--portrait-nat:has([data-ph="walking-outdoors"]),
  .story-figure--landscape,
  .story-figure--hero.story-figure--landscape,
  .story-figure--arrival {
    width: min(42vw, 340px);
    height: min(34vh, 260px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .story-figure .story-ph,
  .story-figure:hover .story-ph,
  .story-figure[data-parallax] .story-ph,
  .story-figure[data-parallax]:hover .story-ph {
    transform: none;
    transition: none;
  }

  .story-track {
    will-change: auto;
  }

  .story-progress-fill {
    will-change: auto;
  }

  /* Force vertical editorial timeline — no pin */
  .story-scroll {
    height: auto !important;
  }

  .story-scroll .story-sticky {
    position: relative;
    height: auto;
    overflow: visible;
  }

  .story-scroll .story-track {
    position: relative;
    inset: auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
    padding: 24px max(20px, calc((100% - 720px) / 2)) 72px;
    gap: 56px;
    transform: none !important;
  }

  .story-scroll .story-path {
    display: none;
  }

  .story-scroll .story-beat,
  .story-scroll .story-beat--open,
  .story-scroll .story-beat--image-left,
  .story-scroll .story-beat--statement,
  .story-scroll .story-beat--warm,
  .story-scroll .story-beat--portrait-lead,
  .story-scroll .story-beat--quiet,
  .story-scroll .story-beat--expansive,
  .story-scroll .story-beat--interlude,
  .story-scroll .story-beat--image-right,
  .story-scroll .story-beat--flashback,
  .story-scroll .story-beat--doc,
  .story-scroll .story-beat--crisis,
  .story-scroll .story-beat--crisis-reveal,
  .story-scroll .story-beat--crisis-words,
  .story-scroll .story-beat--sparse,
  .story-scroll .story-beat--isolate,
  .story-scroll .story-beat--aside,
  .story-scroll .story-beat--return,
  .story-scroll .story-beat--terms,
  .story-scroll .story-beat--arrive,
  .story-scroll .story-beat--lesson,
  .story-scroll .story-beat--space {
    width: 100%;
    min-height: 0;
    padding: 0 0 8px;
    grid-template-columns: 1fr;
  }

  .story-scroll .story-beat--space {
    display: none;
  }

  .story-scroll .story-beat {
    margin-right: 0;
  }

  .story-scroll .story-figure,
  .story-scroll .story-figure--hero,
  .story-scroll .story-figure--large,
  .story-scroll .story-figure--medium,
  .story-scroll .story-figure--portrait-nat,
  .story-scroll .story-figure--landscape,
  .story-scroll .story-figure--arrival,
  .story-scroll .story-figure--finale {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    max-height: none;
  }

  .story-scroll .story-figure--peek {
    display: none;
  }

  .story-scroll .story-year-ghost {
    display: none;
  }
}
