/* Portfolio — spiral hero, story chooser, intro, gallery, lightbox */
.ds-neg{mix-blend-mode:difference;color:#fff}
/* six stories: 3 × 2 covers at 3:4, sized so both rows fit the screen height */
.ds-covers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px 24px;flex:0 0 auto;width:min(840px,60vw,calc((100vh - 170px) * 1.1))}
.ds-cover{position:relative;z-index:1}
.ds-cover button{position:relative;display:block;width:100%;padding:0;border:0;background:#111;aspect-ratio:3 / 4;overflow:hidden;transition:opacity .5s ease,transform .5s ease,box-shadow .5s ease;box-shadow:0 18px 40px rgba(0,0,0,.25)}
.ds-cover img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.ds-mcap{display:none;margin:8px 0 0;font-size:13px;line-height:1.4}
.ds-side{container-type:inline-size;flex:1 1 0;min-width:0;display:flex;flex-direction:column;justify-content:flex-start;position:relative;z-index:10;padding:18px 0;pointer-events:none}
.ds-side-l{align-items:flex-end;text-align:right;margin-right:-72px}
.ds-side-r{align-items:flex-start;text-align:left;margin-left:-72px}
.ds-side>div{animation:dsRise .5s ease both}
.ds-side .w{margin:0;font-size:min(92px,calc(100cqi / var(--fk)));font-weight:500;line-height:.88;letter-spacing:.01em;white-space:nowrap}
.ds-side .to{font-family:'Mrs Saint Delafield',cursive;font-weight:400;font-size:.5em;margin-right:.12em}
.ds-side .ds-mono{margin:20px 0 0;font-size:15px;font-weight:500;letter-spacing:.1em;line-height:1.6}
.ds-side-l .ds-mono{padding-right:96px}
.ds-side-r .ds-mono{padding-left:96px}
.ds-side .ds-mono span{display:block}
.ds-panel{container-type:inline-size}
/* gallery board: the story's Milanote board columns side by side; the gaps leave room for the [01] frame numbers */
.ds-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));column-gap:48px;align-items:start}
.ds-col{display:flex;flex-direction:column;gap:28px;min-width:0}
.ds-gi{margin:0;position:relative}
.ds-gi img{transition:transform .5s ease,filter .5s ease}
.ds-gi:hover img{transform:scale(1.015);filter:brightness(1.04)}
.ds-strip::-webkit-scrollbar{width:0;height:0}
.ds-round{width:44px;height:44px;border-radius:50%;border:1px solid #bbb;background:rgba(255,255,255,.9);color:#111;display:flex;align-items:center;justify-content:center}
.ds-lb-arrow{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:44px;border:0;background:rgba(255,255,255,.75);color:#111;display:flex;align-items:center;justify-content:center}
.ds-strip button{flex:0 0 auto;padding:0;border:0;background:none;outline-offset:2px}
.ds-strip img{display:block;width:68px;height:68px;object-fit:cover}
.ds-page{position:absolute;left:50%;top:50%;width:200px;aspect-ratio:3 / 4;background:#f3efe8;box-shadow:0 30px 60px rgba(0,0,0,.55);transform-origin:0% 50%;backface-visibility:visible;overflow:hidden;will-change:transform,opacity;opacity:0}
.ds-page img{position:absolute;inset:6px 6px 22px 6px;width:calc(100% - 12px);height:calc(100% - 28px);object-fit:cover}
.ds-page .cap{position:absolute;left:8px;right:8px;bottom:5px;display:flex;justify-content:space-between;font-size:7px;color:#5c554c}
.ds-page .shade{position:absolute;inset:0}
@media (max-width:760px){
.ds-covers{gap:12px 10px;width:min(100%,420px,calc((100vh - 260px) * 1.0))}
.ds-mcap{font-size:10px;letter-spacing:.04em}
/* the [01] frame numbers sit outside the frame and were cut off at the screen edge; FR 01 stays in the caption */
.ds-num{display:none}
.ds-side{display:none !important}
.ds-mcap{display:block}
.ds-hide-m{display:none !important}
.ds-mast{font-size:12vw !important;letter-spacing:.02em !important}
/* phones: the story's Mobile board, two columns that each stack on their own; slim margins keep both columns large */
#ds-wrap{padding-left:10px !important;padding-right:10px !important}
.ds-grid{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:10px}
.ds-col{gap:18px}
.ds-gi figcaption{font-size:10px !important;margin-top:5px !important}
.ds-grid.ds-one{grid-template-columns:minmax(0,1fr);row-gap:18px}
.ds-round:disabled{opacity:.35}
/* phone lightbox: the photo fills most of the screen, the thumbnails sit right under it, the words below; it all scrolls together */
.ds-lb{flex-direction:column !important;overflow-y:auto}
.ds-lb-stage{order:1;flex:0 0 auto !important;height:76vh;height:76svh;padding:10px 6px !important}
.ds-strip{flex-direction:row !important;width:auto !important;height:76px !important;order:2;overflow-x:auto !important;overflow-y:hidden !important}
.ds-panel{width:auto !important;order:3;flex:0 0 auto !important;padding:22px 18px 48px !important}
#ds-lb-close{position:fixed !important;top:10px !important;right:10px !important;z-index:2;color:#111 !important;background:rgba(255,255,255,.85) !important;border-radius:50%}
.ds-page{width:118px !important}
}
.ds-services .ds-mono{margin:0 0 10px;font-size:13px;color:#C8A46B}
.ds-services h3{margin:0 0 8px;font-size:28px;font-weight:400}
.ds-services h3+p{margin:0;font-size:18px;line-height:1.45;color:#B9B2A7}

/* ---------- cinematic intro: title fades in like a film opening, story types itself */
.ds-cine-k{animation:dsFade 1.2s .15s ease both}
.ds-cine{animation:dsCine 1.9s .35s cubic-bezier(.2,.7,.2,1) both}
@keyframes dsCine{0%{opacity:0;letter-spacing:.32em;filter:blur(12px);transform:translateY(12px)}100%{opacity:1;letter-spacing:normal;filter:blur(0);transform:none}}
@keyframes dsFade{from{opacity:0}to{opacity:1}}
.ds-type{margin:0 0 22px;font-size:22px;line-height:1.55;min-height:1.55em}
.ds-caret::after{content:"";display:inline-block;width:.45em;height:1em;margin-left:3px;background:currentColor;vertical-align:-.14em;animation:dsBlink .9s steps(1) infinite}
@keyframes dsBlink{50%{opacity:0}}
#ds-sig{transition:opacity .9s ease,transform .9s ease;transform:translateY(12px)}
#ds-sig.on{opacity:1 !important;transform:none}

/* ---------- gallery entrance: masthead brightens from dark, a two-page spread rises, the board fades up */
.ds-mast-in{animation:dsMast 1.8s cubic-bezier(.2,.7,.2,1) both}
@keyframes dsMast{0%{opacity:0;filter:brightness(.25) blur(6px);transform:scale(.96)}100%{opacity:1;filter:none;transform:none}}
.ds-spread{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;max-width:1500px;margin:0 auto;padding:28px 28px 0;transform-origin:50% 0;will-change:transform,opacity}
.ds-spread button{display:block;width:100%;padding:0;border:0;background:#f2f2f2;animation:dsRise 1.1s cubic-bezier(.2,.7,.2,1) both}
.ds-spread button:nth-child(1){animation-delay:.55s}
.ds-spread button:nth-child(2){animation-delay:.8s}
.ds-spread img{display:block;width:100%;height:min(86vh,62vw);object-fit:cover}
.ds-gi.rv{opacity:0;transform:translateY(26px)}
.ds-gi.rv.on{opacity:1;transform:none;transition:opacity .9s ease,transform .9s cubic-bezier(.2,.7,.2,1)}

/* ---------- lightbox: a magazine page curls up off the board and lands flat */
.ds-panel.in{animation:dsPanel .7s cubic-bezier(.2,.7,.2,1) both}
.ds-lb:not([hidden]) .ds-panel:not(.in){opacity:0}
@keyframes dsPanel{from{opacity:0;transform:translateX(48px)}to{opacity:1;transform:none}}
/* phones skip the opening two-page spread: those two frames already lead the board just below */
@media (max-width:760px){.ds-spread{display:none}}
