/* Marcel's continuous illustrated journey */

.about-story-page {
  overflow-x: clip;
  background: var(--ivory);
}

.about-story-page .site-header,
.about-story-page .site-header.is-scrolled {
  --story-nav-progress: 0;
  isolation: isolate;
  z-index: 65;
  transform: translateZ(0);
  background: rgb(251 248 241 / var(--story-nav-progress)) !important;
  box-shadow: none !important;
  color: var(--navy);
  backdrop-filter: none !important;
}

.about-story-page .site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #fbf8f1;
  box-shadow: 0 14px 45px rgba(20, 35, 59, 0.11);
  opacity: var(--story-nav-progress);
  backdrop-filter: blur(18px);
  pointer-events: none;
}

.about-story-page .site-header::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  z-index: 2;
  background: linear-gradient(90deg, var(--terracotta) 0 30%, transparent 30% 100%);
  opacity: calc(0.16 + var(--story-nav-progress) * 0.46);
  pointer-events: none;
}

.about-story-page .site-header.is-open::before {
  opacity: 1;
}

.about-story-page .site-header.is-scrolled,
.about-story-page .site-header.is-open {
  background-color: #fbf8f1 !important;
  box-shadow: inset 0 0 0 100px #fbf8f1, 0 14px 45px rgba(20, 35, 59, 0.11) !important;
}

.about-story-page .site-header > .brand,
.about-story-page .site-header > .nav-toggle,
.about-story-page .site-header > .site-nav {
  position: relative;
  z-index: 1;
}

.about-story-page .site-header .nav-cta {
  border-color: currentColor;
}

/* The opening illustration is intentionally pale. A restrained ivory wash
   keeps every navigation control readable without turning the hero into a
   conventional solid-header layout. */
.about-story-page .pdg-global-header:not(.is-scrolled):not(.is-context-solid) {
  color: var(--pdg-nav-navy);
  background: linear-gradient(
    180deg,
    rgba(251, 248, 241, 0.84) 0%,
    rgba(251, 248, 241, 0.56) 62%,
    rgba(251, 248, 241, 0.18) 100%
  );
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.48);
}

.story-main,
.story-scroll {
  position: relative;
  background: var(--ivory);
}

.story-scroll {
  --story-progress: 0;
  --chapter-progress: 0;
  --transition-progress: 0;
  --wash-opacity: 0;
  --wash-x: 118%;
  isolation: isolate;
}

.story-scroll.is-continuous-story .story-visual {
  position: sticky;
}

.story-visual {
  position: relative;
  top: 0;
  z-index: 1;
  height: 100svh;
  margin-bottom: -100svh;
  overflow: hidden;
  contain: paint;
  isolation: isolate;
  pointer-events: none;
}

.story-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  contain: paint;
  background: #f8edda;
  perspective: 1800px;
  perspective-origin: 50% 48%;
}

.story-scene {
  --scene-opacity: 0;
  --scene-x: 0%;
  --scene-y: 0%;
  --scene-scale: 1.025;
  --scene-width: 0%;
  --bloom-x: 50%;
  --bloom-y: 50%;
  --bloom-size: 285vmax;
  position: absolute;
  top: -3%;
  bottom: -3%;
  left: -3%;
  width: var(--scene-width);
  overflow: hidden;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 0 0;
  opacity: var(--scene-opacity);
  will-change: opacity;
}

/* This alpha texture is rendered from watercolour-bloom-mask.svg. Resizing
   a live SVG filter for every scroll position stalls the desktop dissolve. */
@media (min-width: 821px) {
  .story-scene[data-page-role="incoming"] {
    -webkit-mask: url("../assets/images/about/watercolour-bloom-mask.png") var(--bloom-x) var(--bloom-y) / var(--bloom-size) var(--bloom-size) no-repeat;
    mask: url("../assets/images/about/watercolour-bloom-mask.png") var(--bloom-x) var(--bloom-y) / var(--bloom-size) var(--bloom-size) no-repeat;
  }
}

.story-scene--arrival {
  --scene-opacity: 1;
  --scene-width: 106%;
  --scene-x: -0.42%;
  --scene-y: 0.32%;
  --scene-scale: 1.012;
  background-image: url("../assets/images/about/story-arrival-marcel-v4.webp");
}

.story-scene--world {
  --scene-paper: #14273d;
}

@media (max-width: 820px) and (prefers-reduced-motion: no-preference) {
  .story-scene--arrival {
    background-image: url("../assets/images/about/story-arrival-mobile-marcel-v3.webp");
  }
}

.story-scene[data-reveal-side="right"] {
  right: auto;
}

.story-scene[data-reveal-side="left"] {
  left: -3%;
}

.story-scene::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 106vw;
  background-color: var(--scene-paper, #f8edda);
  background-image: inherit;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  transform: translate3d(var(--scene-x), var(--scene-y), 0) scale(var(--scene-scale));
  pointer-events: none;
  will-change: transform;
}

.story-scene[data-reveal-side="left"]::before {
  left: 0;
}

.story-scene[data-reveal-side="right"]::before {
  left: 0;
}

.story-scene::after {
  display: none;
}

.story-wash {
  position: absolute;
  top: -14%;
  bottom: -14%;
  left: 50%;
  z-index: 6;
  width: clamp(54px, 7vw, 96px);
  min-width: 0;
  max-width: none;
  display: none;
  opacity: 0;
  transform: translate3d(var(--wash-x), 0, 0) rotate(-1deg);
  background:
    linear-gradient(90deg, transparent 0%, rgba(20, 35, 59, 0.18) 24%, rgba(255, 248, 232, 0.92) 51%, rgba(247, 231, 203, 0.42) 72%, transparent 100%);
  filter: blur(2px);
  pointer-events: none;
  will-change: opacity, transform;
}

.story-wash::after {
  content: "";
  position: absolute;
  inset: 7% 11%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 700' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.018 .07' numOctaves='3' seed='13'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='42'/%3E%3C/filter%3E%3Crect x='18' y='16' width='144' height='668' rx='66' fill='%23fff8e9' filter='url(%23w)'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  opacity: 0.74;
}

.story-light {
  position: absolute;
  inset: 0;
  z-index: 7;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 248, 222, 0.15), transparent 35%),
    linear-gradient(112deg, transparent 29%, rgba(255, 255, 255, 0.08) 49%, transparent 68%);
  mix-blend-mode: screen;
  opacity: var(--story-light-opacity, 0.72);
  pointer-events: none;
}

.story-stage[data-theme="dark"] .story-light {
  opacity: var(--story-light-opacity, 0.16);
}

.story-grain {
  position: absolute;
  inset: 0;
  z-index: 8;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.78' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.28'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
  pointer-events: none;
}

.story-narrative {
  position: relative;
  z-index: 3;
}

.story-beat {
  position: relative;
  display: grid;
  min-height: 125svh;
  padding: clamp(124px, 15svh, 170px) clamp(30px, 5.5vw, 92px);
  align-items: center;
  color: var(--navy);
}

.story-beat--night {
  color: #fbf8f1;
}

.story-copy {
  width: min(100%, 600px);
}

.story-heading,
.story-step {
  --step-opacity: 1;
  --step-y: 0px;
  opacity: var(--step-opacity);
  transform: translate3d(0, calc(-50% + var(--step-y) + var(--story-fit-offset, 0px)), 0);
  backface-visibility: hidden;
}

.story-heading .story-meta {
  opacity: 1;
  transform: none;
}

.story-heading h1,
.story-heading h2 {
  opacity: 1;
  transform: none;
}

.story-heading .story-heading-intro,
.story-heading .story-scroll-cue,
.story-heading .story-link,
.story-heading .button {
  opacity: 1;
  transform: none;
}

.story-meta {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 clamp(25px, 4vh, 44px);
  color: var(--terracotta);
  font-size: clamp(10px, 0.7vw, 12px);
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.story-beat--night .story-meta {
  color: #d8b97e;
}

.story-beat--night .story-heading,
.story-beat--night .story-step {
  text-shadow:
    0 1px 2px rgba(6, 16, 31, 0.94),
    0 0 18px rgba(6, 16, 31, 0.74);
}

.story-beat--night .story-copy h1,
.story-beat--night .story-copy h2 {
  text-shadow: inherit;
}

.story-copy h1,
.story-copy h2 {
  max-width: 720px;
  margin: 0;
  color: inherit;
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.056em;
  line-height: 0.89;
  text-shadow: none;
  text-wrap: balance;
}

.story-copy h1 {
  font-size: clamp(68px, 6.1vw, 108px);
}

.story-copy h1 span {
  display: block;
  margin-top: 0.08em;
}

.story-copy h2 {
  font-size: clamp(54px, 4.8vw, 82px);
}

.story-heading-intro,
.story-step > p {
  max-width: 570px;
  margin: clamp(25px, 3.6vh, 38px) 0 0;
  color: rgba(20, 35, 59, 0.9);
  font-size: clamp(17px, 1.18vw, 20px);
  font-weight: 500;
  line-height: 1.62;
}

.story-step > p {
  margin-top: 0;
  font-size: clamp(18px, 1.36vw, 22px);
  line-height: 1.64;
}

.story-beat--night .story-heading-intro,
.story-beat--night .story-step > p {
  color: rgba(251, 248, 241, 0.94);
}

.story-scroll-cue,
.story-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: clamp(30px, 4.5vh, 50px);
  color: currentColor;
  font-size: clamp(10px, 0.7vw, 12px);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.story-scroll-cue::before,
.story-link::after {
  content: "";
  width: 42px;
  height: 1px;
  background: var(--terracotta);
}

.story-link::after {
  width: 30px;
}

.story-beat--finale .button.primary {
  margin-top: 34px;
}

.story-scroll.is-continuous-story .story-beat {
  display: block;
  min-height: var(--story-scroll-height, 170svh);
  padding: 0;
}

.story-scroll:not(.is-reading-story) .story-copy--opening,
.story-scroll.is-continuous-story .story-copy {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  width: 100%;
  max-width: none;
  height: 100svh;
  margin: 0;
  opacity: 1;
  visibility: visible;
  pointer-events: none;
}

.story-scroll:not(.is-continuous-story):not(.is-reading-story) .story-copy--opening {
  position: absolute;
}

.story-scroll:not(.is-continuous-story):not(.is-reading-story) .story-beat--opening {
  min-height: 100svh;
  padding: 0;
}

.story-scroll:not(.is-continuous-story) .story-beat--night {
  background: #14273d;
}

.story-scroll:not(.is-continuous-story) .story-beat:not(.story-beat--opening) [data-story-step] {
  transform: none;
}

.story-scroll:not(.is-reading-story) .story-copy--opening .story-heading,
.story-scroll.is-continuous-story .story-heading,
.story-scroll.is-continuous-story .story-step {
  position: absolute;
  top: calc(50% + 34px);
  width: min(39vw, 570px);
  margin: 0;
  --step-opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease-out;
}

.story-scroll:not(.is-reading-story) .story-copy--opening .story-heading.is-step-active,
.story-scroll.is-continuous-story .story-heading.is-step-active,
.story-scroll.is-continuous-story .story-step.is-step-active {
  --step-opacity: 1;
  pointer-events: auto;
  /* Finish the previous passage's 120ms exit before this one starts. A
     second wheel or touch gesture can cancel the pending entrance naturally. */
  transition: opacity 220ms ease-out 130ms;
}

/* Changing editions is a layout change. Even a one-frame transition on a
   chapter's height gives the bookmark the wrong document position. */
.story-scroll:is(.is-positioning, .is-reading-story),
.story-scroll:is(.is-positioning, .is-reading-story) * {
  transition: none !important;
}

.story-scroll:not(.is-reading-story) .story-beat--opening .story-heading,
.story-scroll.is-continuous-story .story-beat--opening .story-step,
.story-scroll.is-continuous-story .story-beat--night .story-heading,
.story-scroll.is-continuous-story .story-beat--night .story-step,
.story-scroll.is-continuous-story .story-beat--collection .story-heading,
.story-scroll.is-continuous-story .story-beat--collection .story-step,
.story-scroll.is-continuous-story .story-beat--finale .story-heading,
.story-scroll.is-continuous-story .story-beat--finale .story-step {
  right: clamp(42px, 6vw, 104px);
}

.story-scroll.is-continuous-story #the-beginning .story-heading,
.story-scroll.is-continuous-story #the-beginning .story-step,
.story-scroll.is-continuous-story .story-beat--address .story-heading,
.story-scroll.is-continuous-story .story-beat--address .story-step {
  left: clamp(42px, 6vw, 104px);
}

.story-scroll.is-continuous-story .story-step::before {
  content: attr(data-chapter-label);
  display: block;
  margin-bottom: clamp(18px, 2.8vh, 28px);
  color: var(--terracotta);
  font-size: clamp(10px, 0.7vw, 12px);
  font-weight: 700;
  letter-spacing: 0.17em;
  line-height: 1.45;
  text-transform: uppercase;
}

.story-scroll.is-continuous-story .story-step::after {
  content: "";
  display: block;
  width: 42px;
  height: 1px;
  margin-top: clamp(20px, 3vh, 30px);
  background: var(--terracotta);
  opacity: 0.7;
}

.story-scroll.is-continuous-story .story-beat--night .story-step::before {
  color: #d8b97e;
}

.story-scroll.is-continuous-story .story-beat--night .story-step::after {
  background: #d8b97e;
}

.story-scroll.is-continuous-story .story-step:has(.story-link)::after,
.story-scroll.is-continuous-story .story-step:has(.button)::after {
  display: none;
}

.about-story-page .site-footer {
  position: relative;
  z-index: 10;
}

@media (min-width: 1181px) and (pointer: fine) {
  .about-story-page .pdg-global-footer__inner {
    padding-top: clamp(56px, 4vw, 72px);
  }

  .about-story-page .pdg-global-footer__top {
    grid-template-columns: minmax(260px, 1.1fr) minmax(320px, 1fr) repeat(2, minmax(145px, 0.62fr));
    gap: clamp(32px, 3vw, 60px);
  }

  .about-story-page .pdg-global-footer__group[aria-label="Apartment links"] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    column-gap: 24px;
    row-gap: 10px;
  }

  .about-story-page .pdg-global-footer__group[aria-label="Apartment links"] > p {
    grid-column: 1 / -1;
    margin-bottom: 4px;
  }

  .about-story-page .pdg-global-footer__bottom {
    margin-top: clamp(42px, 4vw, 64px);
  }
}

@media (max-width: 1100px) and (min-width: 821px) {
  .story-scroll:not(.is-reading-story) .story-copy--opening .story-heading,
  .story-scroll.is-continuous-story .story-heading,
  .story-scroll.is-continuous-story .story-step {
    width: min(40vw, 470px);
  }

  .story-copy h1 {
    font-size: clamp(58px, 6.5vw, 82px);
  }

  .story-copy h2 {
    font-size: clamp(46px, 5.3vw, 66px);
  }

  .story-heading-intro,
  .story-step > p {
    font-size: clamp(16px, 1.55vw, 19px);
  }
}

@media (max-width: 820px) {
  .about-story-page .site-header::after {
    background: linear-gradient(90deg, var(--terracotta) 0 18%, transparent 18% 100%);
  }

  .story-visual {
    z-index: 4;
  }

  /* Attach the reading tint to its painting so both dissolve together. */
  .story-scene::after {
    content: "";
    display: block;
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 27%, rgba(252, 240, 218, 0.3) 36%, rgba(252, 240, 218, 0.82) 49%, rgba(252, 240, 218, 0.98) 67%, rgba(252, 240, 218, 0.99) 100%);
  }

  .story-scene[data-story-art="arrival"]::after {
    background: linear-gradient(90deg, transparent 28%, rgba(252, 240, 218, 0.32) 42%, rgba(252, 240, 218, 0.84) 55%, rgba(252, 240, 218, 0.99) 80%);
  }

  .story-scene[data-story-art="beginning"]::after,
  .story-scene[data-story-art="address"]::after {
    background: linear-gradient(90deg, rgba(252, 240, 218, 0.99) 0%, rgba(252, 240, 218, 0.94) 28%, rgba(252, 240, 218, 0.7) 43%, rgba(252, 240, 218, 0.24) 58%, transparent 70%);
  }

  .story-scene[data-story-art="world"]::after {
    background: linear-gradient(90deg, transparent 27%, rgba(14, 35, 62, 0.34) 36%, rgba(14, 35, 62, 0.86) 49%, rgba(14, 35, 62, 0.98) 67%, rgba(14, 35, 62, 0.99) 100%);
  }

  .story-scene[data-story-art="welcome"]::after {
    background: linear-gradient(90deg, transparent 27%, rgba(247, 231, 203, 0.32) 36%, rgba(247, 231, 203, 0.84) 49%, rgba(247, 231, 203, 0.98) 67%, rgba(247, 231, 203, 0.99) 100%);
  }

  .story-scene {
    top: -1.5%;
    bottom: -1.5%;
    left: -1.5%;
    background-position: center;
    -webkit-mask-image: none;
    mask-image: none;
    will-change: opacity, transform;
  }

  .story-scene[data-reveal-side="left"] {
    left: -1.5%;
  }

  .story-scene[data-reveal-side="right"] {
    right: auto;
    left: -1.5%;
  }

  .story-wash {
    left: 50%;
    width: clamp(42px, 12vw, 72px);
    min-width: 0;
    max-width: none;
    filter: blur(2px);
  }

  .story-narrative {
    z-index: 6;
  }

  .story-scroll:not(.is-reading-story) .story-copy--opening,
  .story-scroll.is-continuous-story .story-copy {
    height: calc(100svh - env(safe-area-inset-bottom));
    overflow: hidden;
  }

  .story-scroll:not(.is-reading-story) .story-copy--opening .story-heading,
  .story-scroll.is-continuous-story .story-heading,
  .story-scroll.is-continuous-story .story-step {
    top: calc(50% + 31px);
    width: min(48vw, 350px);
    filter: none;
    clip-path: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
  }

  .story-scroll.is-continuous-story .story-heading {
    top: calc(44% + 31px);
  }

  .story-scroll:not(.is-reading-story) .story-beat--opening .story-heading {
    top: calc(38% + 31px);
  }

  .story-scroll.is-continuous-story .story-beat--finale .story-heading {
    top: calc(50% + 31px);
  }

  .story-scroll.is-continuous-story .story-step {
    background: radial-gradient(ellipse at center, rgba(252, 243, 227, 0.94) 0%, rgba(252, 243, 227, 0.78) 58%, rgba(252, 243, 227, 0) 86%);
  }

  .story-scroll:not(.is-reading-story) .story-beat--opening .story-heading {
    background: radial-gradient(ellipse at center, rgba(252, 243, 227, 0.72) 0%, rgba(252, 243, 227, 0.38) 58%, rgba(252, 243, 227, 0) 84%);
  }

  .story-scroll.is-continuous-story .story-step > p {
    text-shadow: 0 0 2px rgba(252, 243, 227, 0.98), 0 0 10px rgba(252, 243, 227, 0.94), 0 0 20px rgba(252, 243, 227, 0.78);
  }

  .story-scroll.is-continuous-story .story-beat--night .story-step {
    background: radial-gradient(ellipse at center, rgba(14, 35, 62, 0.94) 0%, rgba(14, 35, 62, 0.78) 58%, rgba(14, 35, 62, 0) 86%);
  }

  .story-scroll.is-continuous-story .story-beat--night .story-step > p {
    text-shadow: 0 0 2px rgba(14, 35, 62, 0.98), 0 0 10px rgba(14, 35, 62, 0.94), 0 0 20px rgba(14, 35, 62, 0.78);
  }

  .story-scroll:not(.is-reading-story) .story-beat--opening .story-heading,
  .story-scroll.is-continuous-story .story-beat--opening .story-step,
  .story-scroll.is-continuous-story .story-beat--night .story-heading,
  .story-scroll.is-continuous-story .story-beat--night .story-step,
  .story-scroll.is-continuous-story .story-beat--collection .story-heading,
  .story-scroll.is-continuous-story .story-beat--collection .story-step,
  .story-scroll.is-continuous-story .story-beat--finale .story-heading,
  .story-scroll.is-continuous-story .story-beat--finale .story-step {
    right: clamp(14px, 4.5vw, 30px);
  }

  .story-scroll.is-continuous-story #the-beginning .story-heading,
  .story-scroll.is-continuous-story #the-beginning .story-step,
  .story-scroll.is-continuous-story .story-beat--address .story-heading,
  .story-scroll.is-continuous-story .story-beat--address .story-step {
    left: clamp(14px, 4.5vw, 30px);
  }

  .story-copy h1 {
    font-size: clamp(34px, 8.8vw, 50px);
    line-height: 0.91;
  }

  .story-copy h2 {
    font-size: clamp(31px, 8.1vw, 45px);
    line-height: 0.93;
  }

  .story-heading-intro,
  .story-step > p {
    margin-top: 18px;
    font-size: clamp(14px, 3.6vw, 17px);
    line-height: 1.52;
  }

  .story-step > p {
    margin-top: 0;
  }

  .story-meta {
    display: block;
    margin-bottom: 16px;
    font-size: clamp(9px, 2.5vw, 11px);
    line-height: 1.5;
  }

  .story-meta span {
    display: block;
  }

  .story-meta span + span {
    margin-top: 3px;
  }

  .story-scroll.is-continuous-story .story-step::before {
    margin-bottom: 16px;
    font-size: clamp(9px, 2.5vw, 11px);
  }

  .story-scroll.is-continuous-story .story-step::after {
    width: 28px;
    margin-top: 17px;
  }

  .story-scroll-cue,
  .story-link {
    margin-top: 21px;
    min-height: 44px;
    font-size: clamp(10px, 2.8vw, 12px);
  }

  .story-scroll-cue::before,
  .story-link::after {
    width: 24px;
  }

  .story-beat--finale .button.primary {
    width: 100%;
    margin-top: 22px;
    padding: 13px 9px;
    font-size: 12px;
  }

}

@media (max-width: 520px) {
  .story-scroll:not(.is-reading-story) .story-copy--opening .story-heading,
  .story-scroll.is-continuous-story .story-heading,
  .story-scroll.is-continuous-story .story-step {
    top: calc(50% + 28px);
    width: min(49vw, 270px);
  }

  .story-scroll.is-continuous-story .story-heading {
    top: calc(43% + 28px);
  }

  .story-scroll:not(.is-reading-story) .story-beat--opening .story-heading {
    top: calc(37% + 28px);
  }

  .story-scroll.is-continuous-story .story-beat--finale .story-heading {
    top: calc(50% + 28px);
  }

  .story-copy h1 {
    font-size: clamp(30px, 8.35vw, 40px);
  }

  .story-beat--opening .story-copy h1 {
    font-size: clamp(36px, 9.4vw, 44px);
    line-height: 0.9;
  }

  .story-copy h2 {
    font-size: clamp(28px, 7.8vw, 37px);
  }

  .story-heading-intro,
  .story-step > p {
    font-size: clamp(13.5px, 3.55vw, 15.5px);
    line-height: 1.48;
  }
}

@media (max-width: 370px), (max-height: 700px) and (max-width: 820px) {
  .story-scroll:not(.is-reading-story) .story-copy--opening .story-heading,
  .story-scroll.is-continuous-story .story-heading,
  .story-scroll.is-continuous-story .story-step {
    width: 56vw;
  }

  .story-copy h1 {
    font-size: clamp(27px, 7.8vw, 33px);
  }

  .story-copy h2 {
    font-size: clamp(25px, 7.3vw, 31px);
  }

  .story-heading-intro,
  .story-step > p {
    font-size: 14px;
    line-height: 1.45;
  }

  .story-meta,
  .story-scroll.is-continuous-story .story-step::before {
    font-size: 10px;
  }

  .story-scroll:not(.is-reading-story) .story-beat--opening .story-heading {
    width: min(49vw, 270px);
  }

  .story-scroll-cue,
  .story-link {
    margin-top: 12px;
    font-size: 11px;
  }
}

@media (max-height: 520px) and (min-width: 821px) and (max-width: 1100px) {
  .story-scroll:not(.is-reading-story) .story-copy--opening .story-heading,
  .story-scroll.is-continuous-story .story-heading,
  .story-scroll.is-continuous-story .story-step {
    top: calc(50% + 34px);
    width: min(45vw, 420px);
    filter: none;
    clip-path: none;
  }

  .story-copy h1 {
    font-size: clamp(36px, 4.9vw, 42px);
    line-height: 0.9;
  }

  .story-copy h2 {
    font-size: clamp(30px, 4vw, 34px);
    line-height: 0.92;
  }

  .story-heading-intro,
  .story-step > p {
    margin-top: 12px;
    font-size: 13px;
    line-height: 1.38;
  }

  .story-step > p {
    margin-top: 0;
  }

  .story-meta,
  .story-scroll.is-continuous-story .story-step::before {
    margin-bottom: 10px;
    font-size: 9px;
  }

  .story-scroll-cue,
  .story-link {
    margin-top: 14px;
    font-size: 10px;
  }

  .story-beat--finale .button.primary {
    margin-top: 14px;
    padding: 10px 14px;
    font-size: 11px;
  }
}

/* A static reading edition: real document flow, portrait illustration plates,
   and the same complete narrative. Nothing here participates in scroll motion. */
.story-still {
  display: none;
}

.story-scroll.is-reading-story .story-visual {
  display: none;
}

.story-scroll.is-reading-story .story-narrative {
  background: var(--ivory);
}

.story-scroll.is-reading-story .story-beat {
  display: block;
  min-height: 0;
  padding: clamp(56px, 7.5vw, 112px) clamp(24px, 6vw, 96px);
  scroll-margin-top: 100px;
}

.story-scroll.is-reading-story .story-beat--opening {
  padding-top: clamp(132px, 13vw, 188px);
}

.story-scroll.is-reading-story [data-scene="beginning"],
.story-scroll.is-reading-story .story-beat--address {
  background: #f1eadf;
}

.story-scroll.is-reading-story .story-beat--night {
  background: #14273d;
}

.story-scroll.is-reading-story .story-copy {
  --story-art-column: 1;
  --story-text-column: 2;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr);
  column-gap: clamp(36px, 6vw, 88px);
  align-items: start;
  width: min(100%, 1180px);
  margin: 0 auto;
}

.story-scroll.is-reading-story [data-scene="beginning"] .story-copy,
.story-scroll.is-reading-story .story-beat--address .story-copy {
  --story-art-column: 2;
  --story-text-column: 1;
}

.story-scroll.is-reading-story .story-heading,
.story-scroll.is-reading-story .story-step {
  position: static;
  width: auto;
  opacity: 1 !important;
  visibility: visible !important;
  filter: none !important;
  clip-path: none !important;
  transform: none !important;
  transition: none !important;
  text-shadow: none;
}

.story-scroll.is-reading-story .story-heading {
  display: contents;
}

.story-scroll.is-reading-story .story-meta {
  grid-column: var(--story-text-column);
  grid-row: 1;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0 0 24px;
  font-size: 10px;
  letter-spacing: 0.14em;
  line-height: 1.6;
}

.story-scroll.is-reading-story .story-copy h1,
.story-scroll.is-reading-story .story-copy h2 {
  grid-column: var(--story-text-column);
  grid-row: 2;
  max-width: 15ch;
  font-size: clamp(38px, 4.3vw, 66px);
  line-height: 1.04;
  letter-spacing: -0.045em;
  text-shadow: none;
}

.story-scroll.is-reading-story .story-copy h1 {
  font-size: clamp(48px, 5.1vw, 78px);
  line-height: 0.98;
}

.story-scroll.is-reading-story .story-still {
  grid-column: var(--story-art-column);
  grid-row: 1 / 5;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  margin: 0;
  object-fit: cover;
  object-position: 12% center;
  border: 1px solid rgba(127, 104, 69, 0.18);
}

.story-scroll.is-reading-story [data-scene="beginning"] .story-still,
.story-scroll.is-reading-story [data-scene="address"] .story-still {
  object-position: 91% center;
}

.story-scroll.is-reading-story .story-beat--night .story-still {
  border-color: rgba(216, 185, 126, 0.24);
}

.story-scroll.is-reading-story .story-heading-intro {
  grid-column: var(--story-text-column);
  grid-row: 3;
  max-width: none;
  margin: 28px 0 0;
  font-size: clamp(16px, 1.28vw, 18px);
  font-weight: 400;
  line-height: 1.75;
}

.story-scroll.is-reading-story .story-body {
  grid-column: var(--story-text-column);
  grid-row: 4;
  min-width: 0;
}

.story-scroll.is-reading-story .story-step {
  margin-top: 24px;
}

.story-scroll.is-reading-story .story-step > p {
  max-width: none;
  margin: 0;
  font-size: clamp(16px, 1.28vw, 18px);
  font-weight: 400;
  line-height: 1.75;
}

.story-scroll.is-reading-story .story-step > p + p {
  margin-top: 24px;
}

.story-scroll.is-reading-story .story-link {
  margin-top: 28px;
  padding-bottom: 5px;
  line-height: 1.6;
}

.story-scroll.is-reading-story .story-heading *,
.story-scroll.is-reading-story .story-step * {
  transition: none !important;
  animation: none !important;
}

.story-scroll.is-reading-story .story-scroll-cue {
  display: none;
}

.story-scroll.is-reading-story .story-beat--finale {
  padding-top: 0;
}

.story-scroll.is-reading-story .story-beat--finale .story-copy {
  display: block;
  width: min(100%, 760px);
  padding-top: clamp(48px, 6vw, 80px);
  border-top: 1px solid rgba(127, 104, 69, 0.3);
  text-align: center;
}

.story-scroll.is-reading-story .story-beat--finale .story-meta {
  justify-content: center;
}

.story-scroll.is-reading-story .story-beat--finale h2,
.story-scroll.is-reading-story .story-beat--finale .story-heading-intro {
  margin-right: auto;
  margin-left: auto;
}

.story-scroll.is-reading-story .story-beat--finale .story-heading-intro {
  max-width: 58ch;
}

@media (max-width: 700px) {
  .story-scroll.is-reading-story .story-beat {
    padding: 48px 24px;
  }

  .story-scroll.is-reading-story .story-beat--opening {
    padding-top: 120px;
  }

  .story-scroll.is-reading-story .story-copy {
    display: block;
  }

  .story-scroll.is-reading-story .story-heading {
    display: flow-root;
  }

  .story-scroll.is-reading-story .story-meta {
    margin-bottom: 22px;
    font-size: 9px;
  }

  .story-scroll.is-reading-story .story-copy h2 {
    max-width: 18ch;
    margin-bottom: 28px;
    font-size: clamp(36px, 9.8vw, 48px);
    line-height: 1.04;
  }

  .story-scroll.is-reading-story .story-still {
    float: left;
    width: 45%;
    aspect-ratio: 3 / 4;
    margin: 5px 22px 12px 0;
  }

  .story-scroll.is-reading-story [data-scene="beginning"] .story-still,
  .story-scroll.is-reading-story [data-scene="address"] .story-still {
    float: right;
    margin: 5px 0 12px 22px;
  }

  .story-scroll.is-reading-story .story-heading-intro,
  .story-scroll.is-reading-story .story-step > p {
    margin-top: 0;
    font-size: 16px;
    line-height: 1.75;
  }

  .story-scroll.is-reading-story .story-beat--opening .story-copy {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.1fr);
    gap: 0 18px;
  }

  .story-scroll.is-reading-story .story-beat--opening .story-heading {
    display: contents;
  }

  .story-scroll.is-reading-story .story-beat--opening .story-meta {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .story-scroll.is-reading-story .story-beat--opening .story-still {
    grid-column: 1;
    grid-row: 2;
    align-self: stretch;
    float: none;
    width: 100%;
    height: clamp(220px, 38svh, 320px);
    aspect-ratio: auto;
    margin: 0;
    object-position: 15% center;
  }

  .story-scroll.is-reading-story .story-beat--opening h1 {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    max-width: none;
    font-size: clamp(32px, 8.65vw, 48px);
    line-height: 1.03;
    letter-spacing: -0.05em;
  }

  .story-scroll.is-reading-story .story-beat--opening .story-heading-intro {
    grid-column: 1 / -1;
    grid-row: 3;
    margin: 26px 0 0;
    font-size: 18px;
    line-height: 1.65;
  }

  .story-scroll.is-reading-story .story-beat--opening .story-body {
    display: none;
  }

  .story-scroll.is-reading-story .story-beat--finale {
    padding-top: 0;
  }

  .story-scroll.is-reading-story .story-beat--finale .story-copy {
    padding-top: 48px;
  }

  .story-scroll.is-reading-story .story-beat--finale h2 {
    margin-bottom: 24px;
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  .story-scroll.is-reading-story .story-beat--opening {
    padding-top: max(72px, env(safe-area-inset-top));
  }

  .story-scroll.is-reading-story .story-beat--opening .story-copy {
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
    column-gap: clamp(18px, 4vw, 40px);
  }

  .story-scroll.is-reading-story .story-beat--opening .story-meta {
    margin-bottom: 12px;
  }

  .story-scroll.is-reading-story .story-beat--opening .story-still {
    min-height: 0;
    height: clamp(124px, 42svh, 205px);
  }

  .story-scroll.is-reading-story .story-beat--opening h1 {
    font-size: clamp(30px, 5.3vw, 44px);
  }
}
