/* Pinned scenes and transitions originally authored for the portfolio. */
.scn { position: relative; --sbg: #0f1015; --sfg: #fff; --smuted: rgba(255, 255, 255, .62); background: var(--sbg); color: var(--sfg); }
.tone-dark { --sbg: #101116; }
.tone-black { --sbg: #070708; }
.tone-light { --sbg: #eef0f5; --sfg: var(--ink); --smuted: var(--muted); }
.tone-navy { --sbg: #0d1326; }
.tone-warm { --sbg: #ece6dd; --sfg: #1c1712; --smuted: #6f655a; }
.scn__pin { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.scn__stage, .scn__inner { position: absolute; inset: 0; }
.scn__inner { transform-style: preserve-3d; transform-origin: var(--cx) var(--cy); }
.it { position: absolute; left: var(--cx); top: var(--cy); margin: 0; border-radius: 18px; overflow: hidden; background: rgba(127, 127, 127, .12); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .55); will-change: transform; backface-visibility: hidden; }
.it img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tone-light .it, .tone-warm .it { box-shadow: 0 40px 80px -45px rgba(20, 20, 40, .45); }

/* info panel */
.scn__info { position: absolute; left: var(--pad); bottom: 12vh; width: min(30vw, 400px); z-index: 300; pointer-events: none; }
.scn__info > * { opacity: 0; transform: translateY(26px); transition: opacity .7s, transform 1s var(--ease); }
.scn__info.in > * { opacity: 1; transform: none; }
.scn__info.in > :nth-child(2) { transition-delay: .06s; } .scn__info.in > :nth-child(3) { transition-delay: .12s; } .scn__info.in > :nth-child(4) { transition-delay: .18s; } .scn__info.in > :nth-child(5) { transition-delay: .24s; }
.scn__no { font-size: 12px; font-weight: 600; letter-spacing: .12em; color: var(--smuted); }
.scn__title { font-size: clamp(30px, 3.2vw, 54px); font-weight: 700; letter-spacing: -.04em; line-height: 1.05; margin: 12px 0 10px; text-wrap: balance; }
.scn__en { font-size: 13px; color: var(--smuted); letter-spacing: .04em; }
.scn__desc { font-size: 15px; line-height: 1.75; color: var(--smuted); margin-top: 16px; }
.scn__count { margin-top: 22px; font-size: 13px; color: var(--smuted); font-variant-numeric: tabular-nums; }
.scn__count b { font-size: 44px; font-weight: 700; color: var(--sfg); letter-spacing: -.04em; margin-right: 4px; }
.scn__cap { font-size: 13px; }
.scn__bar { position: absolute; left: var(--pad); right: var(--pad); bottom: 28px; height: 2px; background: color-mix(in srgb, var(--sfg) 15%, transparent); z-index: 300; }
.scn__bar i { display: block; height: 100%; width: 0; background: var(--sfg); }
/* full-bleed scenes: info sits over a soft gradient */
.scn--zoom .scn__pin::after, .scn--hscroll .scn__pin::after, .scn--ring .scn__pin::after, .scn--assemble .scn__pin::after, .scn--accordion .scn__pin::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 46vw; height: 60vh; background: radial-gradient(80% 80% at 0% 100%, var(--sbg) 30%, transparent 75%); z-index: 250; pointer-events: none; }

/* type-specific placement */
.scn--hscroll .it, .scn--accordion .it { left: 0; top: 50%; }
.scn--columns .it { left: 0; top: 0; }
.scn--assemble .it { left: 0; top: 0; }
.scn--accordion .it img { object-fit: cover; object-position: center; }
.scn--accordion .it.on { box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .5); }
.scn--zoom .it { transition: border-radius .2s; }
.scn--flip .it { transform-origin: 50% 0; }

/* blinds: 7 vertical strips of the same image drop in one after another */
.blinds { position: absolute; inset: 0; display: flex; z-index: 1; }
.blinds i { flex: 1; height: 100%; background-size: var(--w) var(--h); background-position: calc(var(--j) * var(--w) / -7) 0; background-repeat: no-repeat;
  transform: translateY(calc((1 - clamp(0, var(--t, 0) - var(--j) * 0.08, 1)) * -102%)); }
.scn--blinds .it img { opacity: 0; }
.scn--blinds .it.done img { opacity: 1; }
.scn--blinds .it.done .blinds { visibility: hidden; }
.scn--blinds .it { overflow: hidden; }

/* chapter interlude */
.scn--interlude .scn__pin { display: grid; place-items: center; }
.intr { text-align: center; padding: 0 var(--pad); }
.intr__no, .intr__en, .intr__meta { font-size: 13px; font-weight: 600; letter-spacing: .14em; color: var(--smuted); }
.intr__en { margin-top: 18px; font-size: clamp(14px, 1.4vw, 20px); letter-spacing: .3em; }
.intr__meta { margin-top: 10px; }
.intr__word { font-size: clamp(80px, 17vw, 300px); font-weight: 900; letter-spacing: -.06em; line-height: 1; margin-top: 14px; white-space: nowrap; will-change: transform; }
.intr__word span { display: inline-block; --k: clamp(0, calc(var(--in, 0) * 1.7 - var(--i) * 0.16), 1);
  transform: translateY(calc((1 - var(--k)) * 110%)) rotate(calc((1 - var(--k)) * 14deg)); opacity: var(--k); }

@media (max-width: 760px) {
  .scn__info { top: 76px; bottom: auto; width: auto; right: var(--pad); }
  .scn__title { font-size: 26px; margin: 6px 0 4px; }
  .scn__desc { display: none; }
  .scn__count { margin-top: 8px; }
  .scn__count b { font-size: 26px; }
  .scn--zoom .scn__pin::after, .scn--hscroll .scn__pin::after, .scn--ring .scn__pin::after, .scn--assemble .scn__pin::after, .scn--accordion .scn__pin::after { display: none; }
  .it { border-radius: 12px; }
}
@media (prefers-reduced-motion: reduce) { .intr__word span { transform: none; opacity: 1; } }
.scn__stage { z-index: 1; }
.scn__pin::after { z-index: 2 !important; }
.scn__info, .scn__bar { z-index: 3; }
.scn--blinds .it { background: none; }
#story { --pad:clamp(18px,4.5vw,80px); --muted:#5a606b; --ease:cubic-bezier(.22,.61,.36,1); }
#story .tone-light { --sfg:#181b20; }
#story .tone-warm { --sfg:#231b15; }
#story .story-work, #story .story-offset { scroll-margin-top:0; }
#story .scn { isolation:isolate; }
#story .scn__stage .it { cursor:auto; pointer-events:none; }
#story .it picture, #story .it picture img { display:block; width:100%; height:100%; }
#story .it picture img { object-fit:contain; }
#story .scn--accordion .it picture img { object-fit:cover; }
#story .blinds i { background-image:var(--blind-image); }
#story .scn--hscroll .it,#story .scn--accordion .it { top:var(--cy,50%); }
#story .story-offset { position:absolute; left:0; height:1px; width:1px; pointer-events:none; }
#story .story-film { height:215vh; height:215svh; background:#141615; color:#f6f3eb; }
#story .story-film__pin { display:grid; height:100vh; height:100svh; }
#story .story-film__figure { display:grid; grid-template-rows:minmax(0,1fr) auto; min-width:0; min-height:0; margin:0; padding:0; }
#story .story-film__video { display:block; position:static; width:100%; height:100%; min-height:0; object-fit:contain; }
#story .story-film__caption { display:flex; align-items:baseline; justify-content:space-between; column-gap:1em; padding:12px var(--pad) 17px; }
#story .story-film__caption h3 { font-size:clamp(19px,2.5vw,40px); margin:0; font-weight:500; line-height:1.13; }
#story .story-film__caption p { font-size:clamp(12px,1.2vw,18px); margin:0; opacity:.72; }
#story .scn__info { max-width:400px; }
@media(max-width:760px) {
  #story .scn__info { max-width:none; width:auto; }
  #story .scn--columns .scn__stage { clip-path:inset(30% 0 4%); }
  #story .story-film__caption { display:block; padding:10px var(--pad) max(15px,env(safe-area-inset-bottom)); }
  #story .story-film__caption p { margin-top:4px; }
}
@media(max-width:760px) and (orientation:portrait) {
  #story .story-film__figure { grid-template-rows:auto auto; align-content:center; }
  #story .story-film__video { height:auto; max-height:calc(100svh - 120px); aspect-ratio:4/5; }
}
@media (prefers-reduced-motion:reduce) {
  #story .scn, #story .scn__pin { height:auto!important; min-height:0; }
  #story .scn__pin { position:relative; overflow:visible; padding:clamp(28px,5vw,70px) var(--pad); }
  #story .scn__stage, #story .scn__inner { position:static; }
  #story .scn__inner { display:grid; gap:16px; grid-template-columns:repeat(auto-fit,minmax(min(390px,100%),1fr)); transform:none!important; }
  #story .scn__stage { clip-path:none; }
  #story .scn__stage .it { position:static; width:100%!important; height:auto!important; display:grid; align-content:center; opacity:1!important; transform:none!important; filter:none!important; }
  #story .it picture, #story .it picture img { height:auto; opacity:1!important; object-fit:contain; }
  #story .blinds,#story .scn__bar,#story .scn__pin::after { display:none; }
  #story .scn__info { position:static; width:auto; margin-bottom:1rem; }
  #story .scn__info>* { opacity:1; transform:none; transition:none; }
  #story .scn__count { display:none; }
  #story .scn--interlude .scn__pin { min-height:42svh; overflow:hidden; }
  #story .story-film__pin { padding:0; }
  #story .story-film__video { height:72svh; }
}

#story .scn__cap {
  display: block;
  margin-top: 3px;
  color: var(--smuted);
  line-height: 1.4;
}

#story .scn__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 16px;
  margin-top: 12px;
}

#story .scn__actions a:not([hidden]) {
  pointer-events: auto;
  color: var(--sfg);
  border-bottom: 1px solid var(--smuted);
  padding: 3px 0;
  font-size: 13px;
}

#story .scn__actions a:hover {
  border-bottom-color: currentColor;
}

#story .scn--spreads {
  display: grid;
  justify-items: center;
  row-gap: clamp(24px, 6vw, 104px);
  padding: clamp(48px, 8vw, 136px) var(--pad);
}

#story .spread__head {
  width: min(100%, 1920px);
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px 64px;
  padding-bottom: 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--sfg) 22%, transparent);
  margin-bottom: clamp(-64px, -4vw, -12px);
}

#story .spread__heading h3 {
  margin: 8px 0 6px;
  font-size: clamp(28px, 4.2vw, 72px);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -.038em;
  text-wrap: balance;
}

#story .spread__kind, #story .spread__meta, #story .spread__desc, #story .spread__caption {
  color: var(--smuted);
  font-size: 13px;
  line-height: 1.55;
}

#story .spread__desc { max-width: 34ch; }

#story .spread__plate {
  width: min(100%, var(--native-width));
  min-width: 0;
  margin: 0;
}

#story .spread__plate img {
  display: block;
  width: 100%;
  height: auto;
}

#story .spread__caption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px 20px;
  margin-top: 10px;
}

#story .spread__original {
  white-space: nowrap;
  color: var(--sfg);
  border-bottom: 1px solid var(--smuted);
  text-decoration: none;
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    #story .spread__plate {
      animation: spread-enter both linear;
      animation-timeline: view();
      animation-range: entry 0% entry 80%;
    }
    @keyframes spread-enter { from { transform: translateY(22px); } }
  }
}

@media (max-width: 760px) {
  #story .scn__cap { display: inline; margin-inline-start: 7px; font-size: 12px; }
  #story .scn__actions { margin-top: 4px; }
  #story .spread__head { display: block; }
  #story .spread__desc { margin-top: 8px; }
}
