/* 党岭 · the story inside the book. The gourd lake drawn in ink and filled by the photograph, a lake that ripples
   where it is touched, and larch gold falling over the last page. Phone first, on the book's own paper. */
.dl { --paper: #F4F2ED; --ink: #1C1A17; --ink2: #3B3731; --mid: #8d8b86; --hair: rgba(28,26,23,.18);
  --dl-serif: "Newsreader", "Noto Serif SC", "Songti SC", serif; --dl-sans: "Inter Tight", "Noto Sans SC", system-ui, sans-serif;
  --e: cubic-bezier(.22,.61,.36,1); color: var(--ink); }
.dl section { position: relative; }
.dl .stg { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.dl-hero { position: absolute; inset: 0; z-index: 5; transform-origin: 50% 40%; }
.dl-eb { font: 600 11px/1 var(--dl-sans); letter-spacing: .22em; color: var(--acc); }

.dl-gin, .dl-mr .dl-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.2vh; padding: 64px 20px 24px; transform-origin: 50% 40%; }
.dl-gin { opacity: 0; }
.dl-hd { text-align: center; }
.dl-hd h2 { margin-top: 12px; font: 500 clamp(34px, 5vw, 64px)/1 var(--dl-serif); letter-spacing: .22em; margin-right: -.22em; }
.dl-card { position: relative; flex: none; width: min(90vw, 66vh * .75, 600px); aspect-ratio: 1079 / 1440; overflow: hidden; background: #E8E3D8;
  box-shadow: 0 1px 2px rgba(40,30,15,.1), 0 26px 46px -30px rgba(40,30,15,.55); }
.dl-ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.dl-cap { max-width: 22em; text-align: center; font: 400 15px/1.9 var(--dl-serif); letter-spacing: .06em; color: var(--ink2); }

/* the gourd lake: the shore in ink on the bare board, then the photograph opening out from the water */
.dl-gd .dl-card { background: #EFEBE2 url("/lab/shelf/grain.png") 0 0 / 200px 200px; }
.dl-gd .dl-ph { clip-path: circle(0% at 46% 57%); }
.dl-card svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.dl .shore { fill: none; stroke: var(--acc); stroke-width: 2.4; stroke-linejoin: round; vector-effect: non-scaling-stroke; opacity: calc(1 - var(--fill, 0) * .55); }
.dl .pin { opacity: 0; }
.dl .pin path { fill: none; stroke: #fff; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.dl .pin circle { fill: #fff; }
.dl .pin text { font: 500 40px var(--dl-sans); letter-spacing: .08em; fill: #fff; paint-order: stroke; stroke: rgba(20,24,30,.38); stroke-width: 6px; stroke-linejoin: round; }

/* the mirror */
.dl-water { touch-action: pan-y; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.dl-water canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
.dl-water.gl canvas { display: block; }

/* the gold */
.dl-fall { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; opacity: 0; }
.dl-gold .dl-in { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: 70px 24px 28px; }
.dl-gp { margin: 0; width: min(46vw, 34vh * .75); aspect-ratio: 1079 / 1440; overflow: hidden; background: #E8E3D8; align-self: flex-start;
  clip-path: inset(100% 0 0 0); transition: clip-path 1.2s cubic-bezier(.7,0,.2,1) .2s; box-shadow: 0 24px 40px -28px rgba(40,30,15,.5); }
.dl-gp img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.18); transition: transform 1.8s var(--e) .2s; }
.on .dl-gp { clip-path: inset(0); }
.on .dl-gp img { transform: none; }
.dl-gt h2 { margin-top: 14px; font: 500 34px/1.15 var(--dl-serif); letter-spacing: .16em; }
.dl-gt h2 + p { margin-top: 12px; font: 400 14px/1.9 var(--dl-serif); letter-spacing: .05em; color: var(--ink2); }
.dl-gt dl { margin-top: 14px; border-bottom: 1px solid var(--hair); }
.dl-gt dl div { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-top: 1px solid var(--hair); }
.dl-gt dt { font: 500 11.5px/1.6 var(--dl-sans); letter-spacing: .14em; color: var(--mid); white-space: nowrap; }
.dl-gt dd { font: 400 14px/1.6 var(--dl-serif); letter-spacing: .04em; color: var(--acc); text-align: right; }
.dl-colo { margin-top: 18px; display: flex; align-items: center; gap: 14px; font: 500 11px/1.6 var(--dl-sans); letter-spacing: .2em; color: var(--mid); }
.dl-seal { display: inline-block; writing-mode: vertical-rl; background: var(--acc); color: var(--paper); font: 600 15px/1.15 var(--dl-serif); font-style: normal; letter-spacing: .06em; padding: 8px 6px; border-radius: 2px; }
.dl-gt > * { opacity: 0; transform: translateY(16px); transition: opacity 1s var(--e), transform 1s var(--e); }
.dl-gt > :nth-child(2) { transition-delay: .12s; } .dl-gt > :nth-child(3) { transition-delay: .24s; } .dl-gt > :nth-child(4) { transition-delay: .36s; } .dl-gt > :nth-child(5) { transition-delay: .48s; }
.on .dl-gt > * { opacity: 1; transform: none; }

@media (min-width: 768px) {
  .dl-cap { font-size: 16px; }
  .dl-gold .dl-in { flex-direction: row; align-items: center; justify-content: center; gap: 7vw; padding: 0 8vw; }
  .dl-gp { width: min(34vw, 70vh * .75); align-self: center; }
  .dl-gt { width: min(26em, 40vw); }
  .dl-gt h2 { font-size: clamp(40px, 4.4vw, 72px); }
  .dl-gt h2 + p { font-size: 15px; margin-top: 20px; }
  .dl-gt dl { margin-top: 26px; }
  .dl-colo { margin-top: 30px; }
}
@media (prefers-reduced-motion: reduce) { .dl-gt > *, .dl-gp, .dl-gp img { transition: none; } }
