/* HSK v5 motion layer — only active with html.mo (set by js/motion.js; reduced motion = plain page) */
html.mo body { overflow-x: clip; }
html.mo { scroll-behavior: auto; }

/* 1. Hero: wall of prints → camera zooms into the middle print (the film) */
.hero-grid, .hero-dim { display: none; }
html.mo .hero-hold { height: 250svh; position: relative; }
html.mo .hero { position: sticky; top: 0; height: 100vh; height: 100svh; place-items: center; text-align: center; }
html.mo .hero-grid { display: block; position: absolute; inset: 0; z-index: 1; pointer-events: none; }
html.mo .hero-grid figure { position: absolute; overflow: hidden; transform-origin: 0 0; will-change: transform; background: #1a1714;
  opacity: 0; translate: var(--tx) var(--ty); rotate: var(--rx); scale: .9;
  transition: opacity .9s ease, translate 1.4s cubic-bezier(.16, 1, .3, 1), rotate 1.4s cubic-bezier(.16, 1, .3, 1), scale 1.4s cubic-bezier(.16, 1, .3, 1);
  transition-delay: calc(.25s + var(--i) * .055s); }
html.mo .hero.landed .hero-grid figure { opacity: 1; translate: 0 0; rotate: 0deg; scale: 1; }
html.mo .hero-grid img { width: 100%; height: 100%; object-fit: cover; animation: kb 16s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -1.7s); }
html.mo .hero-grid.still img { animation-play-state: paused; }
@keyframes kb { from { scale: 1.02; } to { scale: 1.14; } }
html.mo .hero-media { position: absolute; inset: 0; z-index: 0; clip-path: inset(50%); transition: none; }
html.mo .hero-media::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px #c9a27a66; pointer-events: none; opacity: var(--dim, 1); }
html.mo .hero-dim { display: block; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: var(--dim, 1);
  background: radial-gradient(ellipse 70% 60% at 50% 52%, #0b0a09d9 0, #0b0a0999 55%, #0b0a0966 100%); }
html.mo .hero-shade { z-index: 2; opacity: calc(1 - var(--dim, 1)); background: linear-gradient(transparent 45%, #0b0a09e6 100%); }
html.mo .hero-content { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; justify-items: center; padding: 0 var(--pad); max-width: none; text-align: center;
  opacity: var(--txt, 1); translate: 0 calc((1 - var(--txt, 1)) * -60px); }
html.mo .hero-content .hero-title { font-size: clamp(46px, 7.4vw, 118px); text-shadow: 0 4px 40px #000a; }
html.mo .hero-content .hero-actions { justify-content: center; }
html.mo .hero-content > * { opacity: 0; translate: 0 30px; transition: opacity 1.1s ease, translate 1.2s cubic-bezier(.16, 1, .3, 1); }
html.mo .hero.landed .hero-content > * { opacity: 1; translate: 0 0; }
html.mo .hero.landed .hero-content > :nth-child(1) { transition-delay: .9s; }
html.mo .hero.landed .hero-content > :nth-child(2) { transition-delay: 1.05s; }
html.mo .hero.landed .hero-content > :nth-child(3) { transition-delay: 1.25s; }
html.mo .hero.text-off .hero-content { pointer-events: none; }
html.mo .hero-caption { z-index: 3; opacity: var(--show, 0); translate: 0 calc((1 - var(--show, 0)) * 30px); }
html.mo .hero:not(.open) .hero-caption { pointer-events: none; }
html.mo .hero-bars { display: none; }
html.mo .curtain { display: none; }
@media (max-width: 700px) {
  html.mo .hero-hold { height: 220svh; }
  html.mo .hero-content { padding-bottom: 0; }
  html.mo .hero-content .hero-title { font-size: clamp(40px, 11.5vw, 56px); }
  html.mo .hero-content .hero-actions { flex-direction: column; align-items: stretch; width: min(100%, 290px); margin-inline: auto; }
  html.mo .hero-dim { background: radial-gradient(ellipse 95% 50% at 50% 50%, #0b0a09e0 0, #0b0a09a6 60%, #0b0a0973 100%); }
}

/* 2. Headings rise word by word from under a mask */
html.mo .ln { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
html.mo .ln > span { display: inline-block; translate: 0 110%; transition: translate 1.1s cubic-bezier(.16, 1, .3, 1) calc(var(--i, 0) * .07s); }
html.mo .in .ln > span, html.mo .ln.in > span, html.mo .h2.in .ln > span, html.mo .display.in .ln > span { translate: 0 0; }
html.mo .head.reveal, html.mo .chapter-head.reveal { transform: none; }

/* Statements light up word by word */
html.mo .w { color: #ece6dc2b; transition: color .5s ease; }
html.mo .w.lit { color: inherit; }
html.mo em .w.lit { color: var(--gold); }
html.mo .intro-copy.reveal { transform: none; opacity: 1; }

/* Facts rule draws */
html.mo .facts { border-top: 0; position: relative; }
html.mo .facts::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--gold); opacity: .5; transform: scaleX(0); transform-origin: left; transition: transform 1.6s cubic-bezier(.16, 1, .3, 1) .3s; }
html.mo .intro-copy.in .facts::before { transform: scaleX(1); }

/* 3. Story photos open from a window and settle from a zoom */
html.mo .feature-img.unveil { clip-path: inset(16% 20%); transition: clip-path 1.6s cubic-bezier(.16, 1, .3, 1); }
html.mo .feature-img.unveil.in { clip-path: inset(0); }
html.mo .feature-img.unveil img { scale: 1.18; transition: scale 2.2s cubic-bezier(.16, 1, .3, 1), transform 1.6s ease; }
html.mo .feature-img.unveil.in img { scale: 1; }
html.mo .feature-text .num { transition: -webkit-text-stroke-color 1s; }
html.mo .feature.in .feature-text .num { -webkit-text-stroke-color: var(--gold); }

/* 4. More stories: sideways track */
.hz-bar { display: none; }
html.mo .hz-hold.on { position: relative; margin: 0 calc(-1 * var(--pad)); }
html.mo .hz-hold.on .hz-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
html.mo .hz-hold.on .more-head { margin: 0 0 34px; padding: 0 var(--pad); max-width: none; width: 100%; }
html.mo .hz-hold.on .story-grid { display: flex; gap: 28px; width: max-content; max-width: none; margin: 0; padding: 0 var(--pad); will-change: transform; }
html.mo .hz-hold.on .card { width: clamp(280px, 26vw, 400px); flex: none; }
html.mo .hz-hold.on .card .frame img { scale: 1.16; translate: var(--pan, 0) 0; }
html.mo .hz-hold.on .hz-bar { display: block; position: absolute; left: var(--pad); right: var(--pad); bottom: 40px; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: left; }
html.mo .hz-hold.on .card.reveal { opacity: 1; transform: none; }
html.mo .story-grid > .card.reveal { transition-delay: calc(var(--i, 0) * .08s); }

/* Behind the scenes: the photo opens like a lens */
html.mo .bts-img { clip-path: inset(calc(var(--a, 1) * 9%) calc(var(--a, 1) * 14%) round calc(var(--a, 1) * 28px)); }
html.mo .bts blockquote.reveal { opacity: 1; transform: none; }

/* Films + Instagram + steps come in one after another */
html.mo .film-row > .reveal, html.mo .steps > li.reveal { transition-delay: calc(var(--i, 0) * .12s); }
html.mo .insta-grid > a { opacity: 0; translate: 0 40px; transition: opacity 1s ease, translate 1.1s cubic-bezier(.16, 1, .3, 1); transition-delay: calc(var(--i, 0) * .07s); }
html.mo .insta-grid.in > a { opacity: 1; translate: 0 0; }

/* 5. How it works: a gold line fills; steps light when reached */
html.mo .steps { position: relative; }
html.mo .steps-fill { position: absolute; top: -1px; left: 0; right: 0; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: left; }
html.mo .steps li .num { color: #ece6dc33; transition: color .8s ease; }
html.mo .steps li h3, html.mo .steps li p { transition: opacity .8s ease; opacity: .45; }
html.mo .steps li.lit .num { color: var(--gold); }
html.mo .steps li.lit h3, html.mo .steps li.lit p { opacity: 1; }

/* Date photo settles from a zoom */
html.mo #check .check-img { overflow: hidden; }
html.mo #check .check-img img { scale: calc(1 + var(--z, 1) * .16); }

/* Footer wordmark opens from a slit */
html.mo .footer-mark { clip-path: inset(50% 0); transition: clip-path 1.6s cubic-bezier(.16, 1, .3, 1); }
html.mo .footer-mark.in { clip-path: inset(0); }

/* Story page: hero settles, photos rise in */
html.mo .story-hero img { animation: settle 2.6s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes settle { from { scale: 1.14; } }
html.mo .masonry figure { opacity: 0; translate: 0 50px; transition: opacity 1s ease, translate 1.1s cubic-bezier(.16, 1, .3, 1); }
html.mo .masonry figure.in { opacity: 1; translate: 0 0; }

/* Header on phones: safe area + a Book button so the bar isn't empty */
.head-book { display: none; }
@media (max-width: 900px) {
  .header, .header.scrolled, .header:not(.scrolled) { padding-top: calc(14px + env(safe-area-inset-top)); padding-bottom: 14px; background: #0b0a09; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 1px solid var(--line); }
  .light .header, .light .header.scrolled, .light .header:not(.scrolled) { background: #fbfaf7; color: var(--text); }
  .light .header:not(.scrolled) .logo span { color: var(--muted); }
  .light .header:not(.scrolled) .nav .btn { border-color: var(--ink); color: var(--ink); }
  .light .header .menu-btn span, .light .header .menu-btn::before, .light .header .menu-btn::after { background: var(--text); }
  .header .head-book { display: inline-flex; margin-left: auto; margin-right: 10px; padding: 10px 16px; font-size: 10px; letter-spacing: .22em; border-color: var(--gold); color: var(--gold); }
  .header .head-book:hover { background: var(--gold); color: #120f0c; }
  .menu-open .header .head-book { visibility: hidden; }
}
