/* Marcel's story, told as a sequence of full-screen illustrated compositions */

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

.about-story-page .site-header {
  background: linear-gradient(180deg, rgba(251, 248, 241, 0.72) 0%, rgba(251, 248, 241, 0.22) 72%, transparent 100%);
  box-shadow: none;
  color: var(--navy);
  backdrop-filter: none;
  transition:
    background 360ms ease,
    box-shadow 360ms ease,
    color 240ms ease,
    backdrop-filter 360ms ease,
    opacity 700ms var(--ease-luxury),
    transform 700ms var(--ease-luxury);
}

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

.about-story-page .site-header.is-scrolled,
.about-story-page .site-header.is-open {
  background: rgba(251, 248, 241, 0.94);
  box-shadow: 0 16px 50px rgba(20, 35, 59, 0.12);
  color: var(--navy);
  backdrop-filter: blur(18px);
}

.about-story-page .site-header.is-scrolled .nav-cta,
.about-story-page .site-header.is-open .nav-cta {
  border-color: var(--cta-terracotta);
}

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

.story-scroll {
  isolation: isolate;
}

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

.story-stage {
  --stage-x: 0px;
  --stage-y: 0px;
  --stage-scale: 1.018;
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #f7f1e7;
  transition: background 800ms ease;
}

.story-stage[data-theme="dark"] {
  background: var(--navy);
}

.story-stage[data-scene="arrival"] {
  background: #fcebcc;
}

.story-stage[data-scene="beginning"] {
  background: #faead0;
}

.story-stage[data-scene="world"] {
  background: #102643;
}

.story-stage[data-scene="address"] {
  background: #faedda;
}

.story-stage[data-scene="welcome"] {
  background: #f4e4c7;
}

.story-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  transition: background 620ms var(--ease-luxury);
}

.story-stage[data-scene="arrival"]::after {
  background: linear-gradient(90deg, transparent 42%, rgba(252, 235, 204, 0.48) 56%, rgba(252, 235, 204, 0.94) 100%);
}

.story-stage[data-scene="beginning"]::after {
  background: linear-gradient(90deg, rgba(250, 234, 208, 0.95) 0%, rgba(250, 234, 208, 0.5) 44%, transparent 59%);
}

.story-stage[data-scene="world"]::after {
  background: linear-gradient(90deg, transparent 42%, rgba(16, 38, 67, 0.68) 57%, rgba(16, 38, 67, 0.97) 100%);
}

.story-stage[data-scene="address"]::after {
  background: linear-gradient(90deg, rgba(250, 237, 218, 0.96) 0%, rgba(250, 237, 218, 0.54) 44%, transparent 59%);
}

.story-stage[data-scene="welcome"]::after {
  background: linear-gradient(90deg, transparent 42%, rgba(244, 228, 199, 0.54) 57%, rgba(244, 228, 199, 0.97) 100%);
}

.story-scene {
  --offstage: 7%;
  position: absolute;
  inset: -2%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0;
  transform: translate3d(var(--offstage), 0, 0) scale(1.045);
  transition:
    opacity 760ms var(--ease-luxury),
    transform 1050ms var(--ease-luxury),
    filter 760ms ease;
  will-change: opacity, transform;
}

.story-scene.is-active {
  z-index: 2;
  opacity: 1;
  transform: translate3d(var(--stage-x), var(--stage-y), 0) scale(var(--stage-scale));
}

.story-scene--arrival {
  --offstage: -7%;
  background-image: url("../assets/images/about/story-arrival-marcel-v4.jpg");
}

.story-scene--beginning {
  --offstage: 7%;
  background-image: url("../assets/images/about/story-beginning-marcel-v4.jpg");
}

.story-scene--world {
  --offstage: -7%;
  background-image: url("../assets/images/about/story-world-marcel-v4.jpg");
}

.story-scene--address {
  --offstage: 7%;
  background-image: url("../assets/images/about/story-address-marcel-v4.jpg");
}

.story-scene--welcome {
  --offstage: -7%;
  background-image: url("../assets/images/about/story-welcome-marcel-v4.jpg");
}

.story-light {
  position: absolute;
  inset: 0;
  z-index: 4;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 247, 218, 0.13), transparent 34%),
    linear-gradient(112deg, transparent 30%, rgba(255, 255, 255, 0.08) 48%, transparent 66%);
  mix-blend-mode: screen;
  opacity: 0.8;
  transform: translate3d(calc(var(--stage-x) * -0.4), 0, 0);
  transition: opacity 800ms ease;
}

.story-stage[data-theme="dark"] .story-light {
  opacity: 0.12;
}

.story-grain {
  position: absolute;
  inset: 0;
  z-index: 5;
  opacity: 0.08;
  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;
}

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

.story-beat {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  min-height: 122svh;
  padding: clamp(128px, 16svh, 176px) clamp(32px, 5.2vw, 86px) clamp(100px, 14svh, 150px);
  align-items: center;
  color: var(--navy);
}

.story-beat--opening {
  min-height: 100svh;
}

.story-beat--night {
  min-height: 128svh;
  color: #fbf8f1;
}

.story-beat--address {
  min-height: 158svh;
}

.story-beat--collection {
  min-height: 174svh;
}

.story-beat--finale {
  min-height: 112svh;
}

.story-copy {
  position: relative;
  width: min(100%, 610px);
  opacity: 0.08;
  transform: translate3d(0, 58px, 0);
  transition:
    opacity 820ms var(--ease-luxury),
    transform 1050ms var(--ease-luxury);
}

.story-beat.is-visible .story-copy,
.story-beat.is-active .story-copy {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.story-beat--opening .story-copy,
.story-beat--night .story-copy,
.story-beat--collection .story-copy,
.story-beat--finale .story-copy {
  grid-column: 8 / 13;
  justify-self: end;
}

.story-beat:not(.story-beat--opening):not(.story-beat--night):not(.story-beat--collection):not(.story-beat--finale) .story-copy {
  grid-column: 1 / 6;
}

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

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

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

.story-copy h1 {
  font-size: clamp(70px, 6.15vw, 112px);
}

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

.story-copy h2 {
  font-size: clamp(56px, 4.9vw, 84px);
}

.story-heading-intro {
  max-width: 560px;
  margin: clamp(26px, 3.6vh, 40px) 0 0;
  color: rgba(20, 35, 59, 0.88);
  font-size: clamp(17px, 1.15vw, 20px);
  line-height: 1.62;
}

.story-beat--night .story-heading-intro {
  color: rgba(251, 248, 241, 0.92);
}

.story-lede,
.story-step > p {
  max-width: 590px;
  margin: clamp(28px, 4vh, 44px) 0 0;
  color: rgba(20, 35, 59, 0.81);
  font-size: clamp(15px, 1vw, 17px);
  line-height: 1.76;
}

.story-step + .story-step {
  margin-top: 1.14em;
}

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

.story-copy--opening .story-lede {
  max-width: 520px;
  font-size: clamp(16px, 1.08vw, 19px);
  line-height: 1.68;
}

.story-scroll-cue,
.story-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: clamp(34px, 5vh, 58px);
  color: currentColor;
  font-size: 9px;
  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);
  transition: width 360ms var(--ease-luxury);
}

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

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

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

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

@media (min-width: 821px) {
  .story-beat,
  .story-beat--opening,
  .story-beat--night,
  .story-beat--address,
  .story-beat--collection,
  .story-beat--finale {
    display: block;
    min-height: var(--story-scroll-height, 156svh);
    padding: 0;
  }

  .story-copy,
  .story-beat--opening .story-copy,
  .story-beat--night .story-copy,
  .story-beat--collection .story-copy,
  .story-beat--finale .story-copy,
  .story-beat:not(.story-beat--opening):not(.story-beat--night):not(.story-beat--collection):not(.story-beat--finale) .story-copy {
    position: fixed;
    top: 76px;
    right: 0;
    left: 0;
    width: 100%;
    max-width: none;
    height: calc(100svh - 76px);
    margin: 0;
    opacity: 0;
    transform: none;
  }

  .story-beat.is-visible .story-copy,
  .story-beat.is-active .story-copy {
    opacity: 1 !important;
    transform: none;
  }

  .story-heading,
  .story-step {
    position: absolute;
    top: 50%;
    width: min(38vw, 560px);
    margin: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(0, calc(-50% + 44px), 0);
    transition:
      opacity 280ms ease,
      transform 540ms var(--ease-luxury),
      visibility 0s linear 540ms;
  }

  .story-heading.is-step-active,
  .story-step.is-step-active {
    z-index: 2;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, -50%, 0);
    transition-delay: 0ms;
  }

  .story-body {
    position: static;
  }

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

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

  .story-step > p,
  .story-copy--opening .story-lede {
    margin-top: 0;
    max-width: 560px;
    color: var(--navy);
    font-size: clamp(18px, 1.42vw, 22px);
    font-weight: 500;
    line-height: 1.62;
  }

  .story-body .story-step {
    margin: 0;
  }

  .story-step::before {
    content: attr(data-chapter-label);
    display: block;
    margin-bottom: clamp(20px, 3vh, 32px);
    color: var(--terracotta);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.17em;
    line-height: 1.45;
    text-transform: uppercase;
  }

  .story-step::after {
    content: "";
    display: block;
    width: 44px;
    height: 1px;
    margin-top: clamp(22px, 3.2vh, 34px);
    background: var(--terracotta);
    opacity: 0.72;
  }

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

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

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

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

  .story-beat.is-active:not(:has(.is-step-active)) .story-heading {
    opacity: 1;
    visibility: visible;
    transform: translate3d(0, -50%, 0);
  }
}

@media (max-width: 1100px) {
  .story-beat--opening .story-copy,
  .story-beat--night .story-copy,
  .story-beat--collection .story-copy,
  .story-beat--finale .story-copy {
    grid-column: 7 / 13;
  }

  .story-beat:not(.story-beat--opening):not(.story-beat--night):not(.story-beat--collection):not(.story-beat--finale) .story-copy {
    grid-column: 1 / 7;
  }

  .story-copy h1 {
    font-size: clamp(64px, 7vw, 92px);
  }

  .story-copy h2 {
    font-size: clamp(50px, 5.8vw, 72px);
  }

  .story-lede,
  .story-step > p {
    font-size: 15px;
    line-height: 1.68;
  }
}

@media (max-width: 820px) {
  .story-visual {
    top: 0;
    z-index: 5;
    height: 100svh;
    margin-bottom: -100svh;
    box-shadow: none;
  }

  .story-stage {
    inset: 0;
  }

  .story-scene {
    inset: 0;
    background-position: center;
    background-size: cover;
    --offstage: 14%;
  }

  .story-scene--arrival {
    background-image: url("../assets/images/about/story-arrival-mobile-marcel-v3.jpg");
  }

  .story-scene--beginning {
    background-image: url("../assets/images/about/story-beginning-mobile-marcel-v3.jpg");
  }

  .story-scene--world {
    background-image: url("../assets/images/about/story-world-mobile-marcel-v3.jpg");
  }

  .story-scene--address {
    background-image: url("../assets/images/about/story-address-mobile-marcel-v3.jpg");
  }

  .story-scene--welcome {
    background-image: url("../assets/images/about/story-welcome-mobile-marcel-v3.jpg");
  }

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

  .story-beat,
  .story-beat--opening,
  .story-beat--night,
  .story-beat--address,
  .story-beat--collection,
  .story-beat--finale {
    display: block;
    min-height: var(--story-scroll-height, 156svh);
    padding: 0;
    background: transparent;
    color: var(--navy);
  }

  .story-beat + .story-beat {
    border-top: 0;
  }

  .story-beat--opening {
    min-height: var(--story-scroll-height, 156svh);
  }

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

  .story-beat:not(.is-active) .story-copy {
    opacity: 0;
  }

  .story-beat.is-active .story-copy {
    opacity: 1 !important;
  }

  .story-copy,
  .story-beat--opening .story-copy,
  .story-beat--night .story-copy,
  .story-beat--collection .story-copy,
  .story-beat--finale .story-copy,
  .story-beat:not(.story-beat--opening):not(.story-beat--night):not(.story-beat--collection):not(.story-beat--finale) .story-copy {
    position: fixed;
    top: 64px;
    right: 0;
    left: 0;
    width: 100%;
    max-width: none;
    height: calc(100svh - 64px - 92px - env(safe-area-inset-bottom));
    margin: 0;
    overflow: hidden;
  }

  .story-heading,
  .story-step {
    position: absolute;
    top: 50%;
    width: 42vw;
    max-width: 330px;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(0, calc(-50% + 26px), 0);
    transition:
      opacity 260ms ease,
      transform 500ms var(--ease-luxury),
      visibility 0s linear 500ms;
  }

  .story-heading.is-step-active,
  .story-step.is-step-active {
    z-index: 2;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, -50%, 0);
    transition-delay: 0ms;
  }

  .story-body {
    position: static;
  }

  .story-body .story-step {
    margin: 0;
  }

  .story-beat--opening .story-heading,
  .story-beat--opening .story-step,
  .story-beat--night .story-heading,
  .story-beat--night .story-step,
  .story-beat--collection .story-heading,
  .story-beat--collection .story-step,
  .story-beat--finale .story-heading {
    right: clamp(18px, 5vw, 34px);
  }

  .story-beat--address .story-heading,
  .story-beat--address .story-step,
  #the-beginning .story-step,
  #the-beginning .story-heading {
    left: clamp(18px, 5vw, 34px);
  }

  .story-beat--finale .story-step {
    right: clamp(18px, 5vw, 34px);
  }

  .story-beat:not(.story-beat--night) .story-heading,
  .story-beat:not(.story-beat--night) .story-step {
    color: var(--navy);
  }

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

  .story-copy h1 {
    font-size: clamp(31px, 8.5vw, 44px);
    line-height: 0.9;
  }

  .story-copy h2 {
    font-size: clamp(29px, 8vw, 42px);
    line-height: 0.92;
  }

  .story-heading-intro {
    margin-top: 18px;
    color: rgba(20, 35, 59, 0.92);
    font-size: clamp(12.5px, 3.35vw, 14.5px);
    line-height: 1.48;
  }

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

  .story-meta {
    display: block;
    margin-bottom: 16px;
    font-size: 7px;
    line-height: 1.55;
  }

  .story-meta span {
    display: block;
  }

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

  .story-lede,
  .story-step > p,
  .story-copy--opening .story-lede {
    margin: 0;
    color: inherit;
    font-size: clamp(14.5px, 3.75vw, 16.5px);
    line-height: 1.54;
  }

  .story-step > p,
  .story-lede {
    width: 100%;
  }

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

  .story-step::before {
    content: attr(data-chapter-label);
    display: block;
    margin-bottom: 18px;
    color: var(--terracotta);
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.15em;
    line-height: 1.45;
    text-transform: uppercase;
  }

  .story-step::after {
    content: "";
    display: block;
    width: 28px;
    height: 1px;
    margin-top: 18px;
    background: var(--terracotta);
    opacity: 0.7;
  }

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

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

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

  .story-beat.is-active:not(:has(.is-step-active)) .story-heading {
    opacity: 1;
    visibility: visible;
    transform: translate3d(0, -50%, 0);
  }

  .story-scroll-cue {
    display: inline-flex;
    margin-top: 24px;
    font-size: 7px;
  }

  .story-link {
    margin-top: 22px;
    font-size: 7px;
  }

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

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

@media (max-width: 520px) {
  .about-story-page .site-header {
    background: linear-gradient(180deg, rgba(251, 248, 241, 0.8) 0%, rgba(251, 248, 241, 0.2) 78%, transparent 100%);
  }

  .about-story-page .site-header.is-scrolled,
  .about-story-page .site-header.is-open {
    background: rgba(251, 248, 241, 0.97);
  }

  .story-copy h1 {
    font-size: clamp(29px, 8.3vw, 38px);
  }

  .story-copy h2 {
    font-size: clamp(27px, 7.7vw, 36px);
  }

  .story-meta {
    align-items: flex-start;
  }

  .story-meta span:last-child {
    max-width: none;
    text-align: left;
  }
}

@media (max-width: 370px), (max-height: 700px) and (max-width: 820px) {
  .story-heading,
  .story-step {
    width: 44vw;
  }

  .story-copy h1 {
    font-size: clamp(26px, 7.7vw, 32px);
  }

  .story-copy h2 {
    font-size: clamp(24px, 7.2vw, 30px);
  }

  .story-lede,
  .story-step > p,
  .story-copy--opening .story-lede {
    font-size: 13px;
    line-height: 1.48;
  }
}

@media (prefers-reduced-motion: reduce) {
  .story-scene,
  .story-copy,
  .story-light {
    transition-duration: 1ms !important;
  }

  .story-scene.is-active {
    transform: none;
  }

  .story-heading,
  .story-step {
    transition-duration: 1ms !important;
  }
}
