/* The walk-through (home page) and the doorway between pages. Scroll moves a camera forward through five rooms; each room is one of his
   real photographs or a dark hall with his real covers hanging in it. CSS only does layout and the maths of depth (--t is set by script). */
.film{position:relative;height:var(--len,620vh)}
.filmstage{position:sticky;top:0;height:100svh;overflow:hidden;background:#0a1c17}
.scene{position:absolute;inset:0;opacity:var(--o,0);visibility:var(--v,hidden);display:grid;align-items:center;color:#f3f1ea;will-change:opacity}
.scene .ph{position:absolute;inset:-4%;z-index:0;transform:scale(calc(1 + var(--t,0) * var(--pk,.45)));will-change:transform}
.scene .ph img{width:100%;height:100%;object-fit:cover}
.scene .shade{position:absolute;inset:0;z-index:1}
.scene .copy{position:relative;z-index:3;padding:calc(var(--hdr) + 20px) var(--gut) 60px;max-width:var(--max);margin:0 auto;width:100%;transform:scale(calc(1 + var(--t,0) * .55));transform-origin:30% 55%}

/* 1 entrance */
.s-entrance .shade{background:linear-gradient(90deg,rgba(10,28,23,.94) 0%,rgba(10,28,23,.62) 38%,rgba(10,28,23,.08) 76%),linear-gradient(0deg,rgba(10,28,23,.9),rgba(10,28,23,0) 42%)}
.s-entrance h1{font-size:clamp(2.7rem,8.4vw,8rem);max-width:9em}
.s-entrance .lead{color:rgba(243,241,234,.84);margin:26px 0 0}
.s-entrance .eyebrow{display:block;color:var(--mint);margin-bottom:20px}
.walk{position:absolute;left:var(--gut);bottom:30px;z-index:4;display:flex;align-items:center;gap:14px;font-size:.72rem;letter-spacing:.24em;text-transform:uppercase;color:rgba(243,241,234,.72)}
.walk i{display:block;width:1px;height:44px;background:rgba(243,241,234,.6);transform-origin:top;animation:cue 2.2s var(--inout) infinite}

/* 2 the stacks: his covers hang in a dark hall; walking past them pushes each one outward and toward you */
.s-stacks{background:radial-gradient(120% 90% at 50% 40%,#16372c 0%,#0d2520 55%,#08150f 100%)}
.s-stacks .copy{text-align:center;display:grid;justify-items:center;gap:14px;pointer-events:none}
.s-stacks h2{font-size:clamp(2.2rem,4vw,4.6rem);max-width:9em}
.s-stacks .copy .lead{margin:0 auto;color:rgba(243,241,234,.78)}

/* 3 reading room */
.s-room .shade{background:linear-gradient(90deg,rgba(10,28,23,.2) 0%,rgba(10,28,23,.35) 40%,rgba(10,28,23,.9) 100%)}
.s-room .grid2{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:clamp(24px,6vw,90px);align-items:center}
.s-room .bookwrap{max-width:360px;width:100%;margin:0 auto}
.s-room h2{font-size:clamp(2.2rem,5.6vw,5.2rem)}
.s-room .sub{font-size:clamp(1.05rem,1.6vw,1.4rem);color:rgba(243,241,234,.82);margin:14px 0 28px}
.s-room .facts{border-color:rgba(243,241,234,.25)}
.s-room .facts span{color:rgba(243,241,234,.7)}

/* 4 quiet table */
.s-quiet .shade{background:linear-gradient(90deg,rgba(10,28,23,.82) 0%,rgba(10,28,23,.2) 60%)}
.s-quiet h2{font-size:clamp(2.6rem,8.4vw,7.6rem);max-width:8em}
.s-quiet p{font-family:var(--serif);font-size:clamp(1.05rem,1.6vw,1.35rem);max-width:26em;color:rgba(243,241,234,.86);margin:24px 0 0}

/* 5 the desk */
.s-desk{background:#fbfaf7;color:#0d2520}
.s-desk .copy{text-align:center;display:grid;justify-items:center;gap:22px}
.s-desk h2{font-size:clamp(2.4rem,8vw,7.4rem);max-width:9em}
.s-desk .lead{color:rgba(13,37,32,.72)}
.s-desk .cta{display:flex;gap:14px;flex-wrap:wrap;justify-content:center}
.s-desk .eyebrow{color:rgba(13,37,32,.7)}
.s-desk .ghost{color:#0d2520}
.s-desk .ghost::before{background:#0d2520}
.s-desk .ghost:hover{color:#fbfaf7}

/* floor indicator */
.floors{position:fixed;right:clamp(10px,2vw,26px);top:50%;transform:translateY(-50%);z-index:45;display:grid;gap:14px;mix-blend-mode:normal}
.floors button{position:relative;display:flex;align-items:center;justify-content:flex-end;gap:12px;background:none;border:0;cursor:pointer;padding:4px 0;color:#f3f1ea}
.floors .lab{font-weight:800;font-size:.66rem;letter-spacing:.2em;text-transform:uppercase;opacity:0;transform:translateX(8px);transition:opacity .4s,transform .5s var(--ease);white-space:nowrap;text-shadow:0 1px 8px rgba(0,0,0,.6)}
.floors button:hover .lab,.floors button[aria-current="true"] .lab{opacity:1;transform:none}
.floors i{display:block;width:10px;height:10px;border-radius:50%;border:1.5px solid #f3f1ea;background:transparent;transition:transform .5s var(--spring),background .3s,border-color .3s}
.floors button[aria-current="true"] i{background:var(--emerald-hi);border-color:var(--emerald-hi);transform:scale(1.5)}
.floors.dark button{color:#0d2520}.floors.dark i{border-color:#0d2520}.floors.dark .lab{text-shadow:none}
.hallcap{position:absolute;left:var(--gut);bottom:30px;z-index:4;font-weight:800;font-size:.72rem;letter-spacing:.22em;text-transform:uppercase;color:rgba(243,241,234,.7)}

/* doorway between pages: a circle of forest green opens from the click and closes on the next page */
.iris{position:fixed;inset:0;z-index:200;background:#0d2520;pointer-events:none;clip-path:circle(0 at var(--ix,50%) var(--iy,50%));transition:clip-path .7s var(--inout)}
.iris.close{clip-path:circle(150vmax at var(--ix,50%) var(--iy,50%));pointer-events:auto}
.iris.start{clip-path:circle(150vmax at var(--ix,50%) var(--iy,50%));transition:none}
.iris.open{clip-path:circle(0 at var(--ix,50%) var(--iy,50%))}
.iris em{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-style:normal;font-weight:800;font-size:.8rem;letter-spacing:.3em;text-transform:uppercase;color:rgba(243,241,234,.8);opacity:0;transition:opacity .4s .25s}
.iris.close em{opacity:1}

/* page photo heroes (inner pages): a real photograph that drifts as you scroll */
.roomhead{position:relative;min-height:62vh;display:grid;align-items:end;overflow:hidden;color:#f3f1ea;padding:calc(var(--hdr) + 60px) 0 clamp(34px,6vw,70px)}
.roomhead .ph{position:absolute;inset:-14% 0;z-index:-2}
.roomhead .ph img{width:100%;height:100%;object-fit:cover}
.roomhead::after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(0deg,rgba(13,37,32,.92) 0%,rgba(13,37,32,.4) 55%,rgba(13,37,32,.25) 100%)}
.roomhead h1{font-size:clamp(3rem,11vw,10rem)}
.roomhead .eyebrow{color:var(--mint);display:block;margin-bottom:14px}

/* catalog record (book page) */
.record{border:1.5px solid var(--rule);border-radius:3px;margin:0 0 34px}
.record dl{margin:0;display:grid;grid-template-columns:150px 1fr}
.record dt,.record dd{padding:14px 18px;border-bottom:1px solid var(--rule);margin:0}
.record dt{font-weight:800;font-size:.72rem;letter-spacing:.18em;text-transform:uppercase;color:var(--mut);display:flex;align-items:center}
.record dd{font-weight:700;font-variant-numeric:tabular-nums}
.record dl>:nth-last-child(-n+2){border-bottom:0}
.call-no{display:inline-block;font-weight:800;font-size:.78rem;letter-spacing:.18em;text-transform:uppercase;color:var(--mut)}

@media (max-width:980px){
  .s-room .grid2{grid-template-columns:minmax(0,1fr)}
  .s-room .bookwrap{max-width:200px;margin:0}
  .s-room .copy{padding-top:calc(var(--hdr) + 8px)}
  .floors{display:none}
  .s-stacks h2{font-size:clamp(2.2rem,11vw,4.4rem)}
  .record dl{grid-template-columns:120px 1fr}
}
@media (max-width:560px){
  .s-room .facts{margin-bottom:22px;padding:16px 0}
  .s-room .facts b{font-size:1.9rem}
  .s-room .sub{margin-bottom:16px}
  .s-room .copy .btn{min-height:48px}
}
@media (prefers-reduced-motion:reduce){
  .film{height:auto}.filmstage{position:static;height:auto;overflow:visible}
  .scene{position:relative;min-height:100svh;opacity:1;visibility:visible}
  .scene .ph,.scene .copy{transform:none}
  .floors{display:none}.iris{display:none}
}


/* The Stacks on the home page: a real photographed-quality shelf wall (rendered in Blender from the same covers he made). The five covers sit in the
   middle row; each is a link laid over its place on the shelf using percentages measured from the render, so it stays exactly on the book at any size. */
.shelfwall{position:absolute;inset:0;z-index:0;overflow:hidden;transform-origin:70% 54%;
  transform:scale(calc(1 + max(0, var(--t,0)) * .5 + min(0, var(--t,0)) * .12));will-change:transform}
.wallframe{--W:130vw;position:absolute;width:var(--W);height:calc(var(--W) * .5625);left:calc(70vw - var(--W) * var(--cx,.37));top:calc(54svh - var(--W) * .5625 * var(--cy,.42));
  animation:wallbreath 24s ease-in-out infinite alternate;transform-origin:calc(var(--cx,.37) * 100%) calc(var(--cy,.42) * 100%)}
.wallframe>img.bg{position:absolute;inset:0;width:100%;height:100%;display:block;transition:filter .7s var(--ease)}
.shelfwall:has(.slot:hover) .wallframe>img.bg,.shelfwall:has(.slot:focus-visible) .wallframe>img.bg{filter:brightness(.62) saturate(.9)}
@keyframes wallbreath{from{transform:scale(1) translate3d(0,0,0)}to{transform:scale(1.035) translate3d(-.6%,.4%,0)}}
.s-stacks .shade{background:linear-gradient(90deg,rgba(8,21,15,.92) 0%,rgba(8,21,15,.7) 26%,rgba(8,21,15,0) 46%),linear-gradient(0deg,rgba(8,21,15,.7),rgba(8,21,15,0) 30%),linear-gradient(180deg,rgba(8,21,15,.55),rgba(8,21,15,0) 24%)}
.s-stacks .shade{pointer-events:none}
.s-stacks .copy{text-align:left;justify-items:start;max-width:none;padding-right:52vw}
.s-stacks .copy .lead{max-width:18em}
.s-stacks .copy .lead{margin:0}
.slot{position:absolute;left:var(--l);top:var(--t0);width:var(--w);height:var(--h);z-index:2;display:block;text-decoration:none;color:#f3f1ea;outline:none;transform-origin:50% 100%}
.slot .pull{position:absolute;inset:0;width:100%;height:100%;display:block;opacity:0;object-fit:fill;border-radius:1px;transform-origin:50% 100%;
  transform:translate3d(0,0,0) scale(1);transition:opacity .3s var(--ease),transform .6s var(--ease),box-shadow .6s var(--ease);box-shadow:0 0 0 rgba(0,0,0,0);pointer-events:none}
.slot:hover .pull,.slot:focus-visible .pull{opacity:1;transform:translate3d(0,-1.6%,0) scale(1.16,1.035);box-shadow:0 18px 26px -8px rgba(3,10,7,.75),0 2px 2px rgba(3,10,7,.5)}
.slot .call{position:absolute;left:50%;top:calc(100% + 18px);white-space:nowrap;transform:translate(-50%,6px);opacity:0;pointer-events:none;
  font-weight:800;font-size:clamp(.54rem,.85vw,.72rem);letter-spacing:.2em;text-transform:uppercase;padding:7px 12px;border-radius:2px;background:rgba(10,24,18,.9);color:#e6efe6;
  box-shadow:0 10px 24px -8px rgba(0,0,0,.8);transition:opacity .4s var(--ease) .1s,transform .5s var(--ease) .1s}
.slot:hover .call,.slot:focus-visible .call{opacity:1;transform:translate(-50%,0)}
.slot:focus-visible{box-shadow:0 0 0 2px #cfe3d3}
.hallcap{z-index:4}

/* dust drifting through the lamplight */
.motes{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:2}
.motes i{position:absolute;display:block;border-radius:50%;background:#fff3d6;opacity:0;animation:mote var(--dur,20s) linear var(--del,0s) infinite;will-change:transform,opacity}
@keyframes mote{0%{opacity:0;transform:translate3d(0,0,0)}12%{opacity:var(--peak,.5)}70%{opacity:calc(var(--peak,.5) * .8)}100%{opacity:0;transform:translate3d(var(--sway,30px),var(--rise,-160px),0)}}
.roomhead .motes{z-index:-1}

@media (max-width:980px){
  .wallframe{--W:430vw;left:calc(50vw - var(--W) * var(--cx,.37));top:calc(67svh - var(--W) * .5625 * var(--cy,.42));
    -webkit-mask-image:linear-gradient(180deg,transparent 0,#000 16%);mask-image:linear-gradient(180deg,transparent 0,#000 16%)}
  .shelfwall{transform-origin:50% 67%}
  .hallcap{display:none}
  .s-stacks .copy{padding-right:var(--gut);align-self:start;padding-top:calc(var(--hdr) + 6px)}
  .s-stacks .shade{background:linear-gradient(180deg,rgba(8,21,15,.92) 0%,rgba(8,21,15,.5) 26%,rgba(8,21,15,0) 44%),linear-gradient(0deg,rgba(8,21,15,.7),rgba(8,21,15,0) 24%)}
  .s-stacks h2{font-size:clamp(2.1rem,10vw,3.6rem)}
  .slot .call{display:none}
}
@media (prefers-reduced-motion:reduce){
  .shelfwall{transform:none;position:absolute}.wallframe{animation:none}.motes{display:none}
}

/* Library header: the row of spines below his five covers, so the headline never sits on top of another title */
.roomhead .ph img{object-position:50% 78%}
.roomhead::after{background:linear-gradient(0deg,rgba(13,37,32,.9) 0%,rgba(13,37,32,.55) 50%,rgba(13,37,32,.7) 100%)}


/* ---------- 2026-11-16: the whole library, full screen (his request: people should see the full view of the library) ----------
   Home: the Stacks room shows the entire bookcase edge to edge instead of a zoomed crop behind a dark text panel. The picture is 16:9; it is
   sized to cover the screen and centred, so on a 16:9 window nothing is cut. The five books still sit on their measured spots (percentages of
   the picture), so hover, pull-out and aisle labels keep working. Phones keep the close crop on the five books: a whole bookcase is unreadable there.
   Stacks page: the header becomes a full-screen view of the same library with a smaller headline; the guides follow below. */
@media (min-width:981px){
  .shelfwall{transform-origin:61% 45%}
  .wallframe{--W:max(100vw,177.78svh);left:calc(50vw - var(--W) * .5);top:calc(50svh - var(--W) * .5625 * .5)}
  .s-stacks .shade{background:linear-gradient(90deg,rgba(8,21,15,.62) 0%,rgba(8,21,15,.28) 24%,rgba(8,21,15,0) 42%),linear-gradient(0deg,rgba(8,21,15,.55),rgba(8,21,15,0) 22%),linear-gradient(180deg,rgba(8,21,15,.5),rgba(8,21,15,0) 18%)}
  .s-stacks .copy{padding-right:62vw}
  .s-stacks .copy .eyebrow,.s-stacks .copy h2,.s-stacks .copy .lead{text-shadow:0 2px 18px rgba(3,10,7,.8)}
}
.roomhead.full{min-height:100svh;padding-bottom:clamp(34px,5vw,64px)}
.roomhead.full .ph{inset:-5% 0}
.roomhead.full .ph img{object-position:50% 50%}
.roomhead.full::after{background:linear-gradient(0deg,rgba(13,37,32,.84) 0%,rgba(13,37,32,.2) 34%,rgba(13,37,32,0) 60%),linear-gradient(180deg,rgba(13,37,32,.55) 0%,rgba(13,37,32,0) 22%)}
.roomhead.full h1{font-size:clamp(2.6rem,7vw,6.6rem);text-shadow:0 3px 26px rgba(3,10,7,.7)}
.roomhead.full .eyebrow{text-shadow:0 2px 14px rgba(3,10,7,.8)}
.roomhead .cue{display:inline-block;margin-top:22px;font-weight:800;font-size:.72rem;letter-spacing:.2em;text-transform:uppercase;color:#e6efe6;text-decoration:none;text-shadow:0 2px 14px rgba(3,10,7,.8)}
.roomhead .cue:hover{color:#fff}


/* ---------- 2026-11-16: the close wall of books, edge to edge (his pick, option A "close wall") ----------
   The home Stacks room and the Stacks page header now use the 'hall' picture: five bays of books with his five in the middle, filling the whole screen. The
   text sits over the left side behind a softer dark wash so the books still show through. */
@media (min-width:981px){
  .shelfwall{transform-origin:50.7% 39.6%}
  .s-stacks .shade{background:linear-gradient(90deg,rgba(8,21,15,.8) 0%,rgba(8,21,15,.5) 24%,rgba(8,21,15,0) 46%),linear-gradient(0deg,rgba(8,21,15,.6),rgba(8,21,15,0) 24%),linear-gradient(180deg,rgba(8,21,15,.55),rgba(8,21,15,0) 20%)}
  .s-stacks .copy{padding-right:60vw}
}

.roomhead.full .eyebrow{color:#e6efe6}
