/* Film polish for the desk and Explore, 17 November 2026. Loaded after desk.css; removing this file and
   desk-polish.js restores the previous behaviour. Motion follows the launch film: long, soft eases, one thing
   changing at a time, and a pool of warm light that leads the eye. Nothing here changes manuscript images,
   reader geometry, the paper pick-up, or the paper-to-reader flight. */
:root{--calm:cubic-bezier(.37,0,.63,1);--settle:cubic-bezier(.3,.05,.2,1)}

/* First visit in a session: the sheets are laid on the desk one after another, and the name turns from
   mirror writing to face the reader. Both run once; returning from a page never replays them. */
.desk-arriving .paper{animation:sheet-laid .95s var(--calm) both;animation-delay:calc(var(--order,0)*85ms + 420ms)}
@keyframes sheet-laid{from{opacity:0;transform:rotate(var(--angle)) translateY(-10px) scale(1.045)}to{opacity:1;transform:rotate(var(--angle))}}
.paper-figure{--order:0}.paper-screw{--order:1}.paper-hand{--order:2}.paper-vehicle{--order:3}.paper-water{--order:4}.paper-crossbow{--order:5}.paper-flight{--order:6}.paper-heart{--order:7}
/* The whole name is in the project hand. Under the pointer or keyboard focus it turns to mirror writing, as he
   wrote; the unmoving heading takes the hover so the turning name cannot slip out from under the pointer. */
.name-leonardo{font:clamp(56px,5.7vw,80px)/.82 Vinci,var(--serif);font-style:normal;letter-spacing:0}
.name-davinci{font-size:clamp(48px,4.9vw,68px);line-height:.86;margin-left:30%;margin-top:4px}
.desk-name{perspective:1400px}
.desk-name a{transform-origin:50% 55%;transition:transform 1.05s var(--calm)}
.desk-name:hover a,.desk-name:focus-within a{transform:rotateY(180deg)}
.desk-arriving .desk-name a{animation:name-turns 1.15s var(--calm) .75s both}
@keyframes name-turns{from{transform:rotateY(180deg)}to{transform:rotateY(0)}}
.desk-arriving #explore-open,.desk-arriving .desk-footer{animation:quiet-in .9s var(--calm) 1.5s both}
@keyframes quiet-in{from{opacity:0}to{opacity:1}}

/* The reading light. Two fixed sheets of light move with the pointer on the compositor only (transform):
   a warm lift where the eye is, and a slight dimming of the desk away from it. Decorative, never interactive. */
.reading-light{position:fixed;left:0;top:0;z-index:3;pointer-events:none;border-radius:50%;opacity:0;transition:opacity .9s var(--calm);will-change:transform}
.reading-light.is-warm{width:1300px;height:1300px;margin:-650px 0 0 -650px;background:radial-gradient(closest-side,#fff3d2cc 0,#fff3d266 34%,#fff3d200 100%);mix-blend-mode:soft-light}
/* The shade is a modest texture enlarged by its transform (desk-polish.js), so it stays light on large screens. */
.reading-light.is-shade{width:100vmax;height:100vmax;margin:-50vmax 0 0 -50vmax;background:radial-gradient(closest-side,#8f754c00 0,#8f754c00 11%,#8f754c40 30%,#8f754c5c 100%);mix-blend-mode:multiply}
.light-on .reading-light{opacity:1}
.exploring .reading-light{opacity:0;transition-duration:.35s}

/* Explore & search: a cream paper tag laid on the desk, dark ink, so it reads at a glance against the wood.
   Set in the atlas serif, like every other label on the desk and in the reader. */
#explore-open{position:relative;gap:12px;padding:11px 20px 12px 23px;border-radius:999px;background:#f7eedb;color:#2b1d12;font:400 18px/1.2 var(--serif);letter-spacing:.005em;text-shadow:none;box-shadow:0 1px 0 #fffaf0 inset,0 0 0 1px #5a3c2133,0 3px 10px #3a241030,0 10px 24px #3a24101f;transition:background-color .3s var(--calm),box-shadow .3s var(--calm),transform .3s var(--settle),color .3s var(--calm)}
#explore-open svg{stroke-width:1.7}
#explore-open:hover,#explore-open:focus-visible{background:#fffaf0;color:#66351f;transform:translateY(-1px);box-shadow:0 1px 0 #fff inset,0 0 0 1px #5a3c2140,0 5px 14px #3a241038,0 14px 30px #3a241026}
.desk-footer a{transition:color .3s var(--calm)}







@media(max-width:600px){#explore-open{font-size:15.5px;gap:8px;padding:9px 14px 10px 16px;margin-top:6px}.name-leonardo{font-size:47px}.name-davinci{font-size:41px}}
@media(max-width:380px){#explore-open{font-size:14.5px;padding:8px 12px 9px 14px}.name-leonardo{font-size:42px}.name-davinci{font-size:37px}}
@media(prefers-reduced-motion:reduce){.desk-name a{transition:none}.desk-arriving .paper,.desk-arriving .desk-name a,.desk-arriving #explore-open,.desk-arriving .desk-footer{animation:none!important}.reading-light{display:none}#explore-open{transition:none}}

.desk-plain .name-leonardo,.desk-plain .name-davinci{font-style:italic}
.desk-plain .desk-name a{animation:none;transform:none}
