/* Minimal directions, shared base. Each direction sets its own tokens:
   --bg --ink --mute --line --well --accent --accent-ink --display --sans --r
   Light is white; dark takes its own values in each direction's file. */
:root{
  --spring:linear(0,.009,.035 2.1%,.141 4.4%,.723 12.9%,.938 16.7%,1.017 19.4%,1.043 21.9%,1.042 24.7%,1.012 31.2%,.998 37.9%,1);
  --ease:cubic-bezier(.2,.8,.2,1);
  --sans:'Instrument Sans',system-ui,-apple-system,'Segoe UI',sans-serif;
  --serif:'Fraunces',Georgia,serif;
  --gut:16px;
}
@media (min-width:760px){:root{--gut:40px}}
@media (min-width:1200px){:root{--gut:56px}}
*{box-sizing:border-box;margin:0;padding:0}
html{scrollbar-gutter:stable}
html,body{overflow-x:clip;max-width:100%}
html.locked{overflow:hidden}
body{font-family:var(--sans);background:var(--bg);color:var(--ink);font-size:16px;line-height:1.5;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}
img{display:block;max-width:100%}
ul{list-style:none}
::selection{background:var(--ink);color:var(--bg)}
:focus-visible{outline:2px solid var(--ink);outline-offset:3px;border-radius:6px}
.ic{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.skip{position:absolute;left:-9999px;top:0;z-index:200;background:var(--ink);color:var(--bg);padding:12px 18px}
.skip:focus{left:0}
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* Controls: 44px targets, icon plus words, no tinted chrome. */
.btn{display:inline-flex;align-items:center;gap:10px;min-height:44px;padding:0 4px;font-weight:500;color:var(--ink)}
.btn .ic{transition:transform .22s var(--spring)}
.btn:hover .ic{transform:translateX(3px)}
.icon-btn{display:inline-grid;place-items:center;width:44px;height:44px;border-radius:50%;color:var(--ink)}
.icon-btn:hover{background:var(--well)}
.t-sun{display:none}
html[data-theme="dark"] .t-sun{display:block}html[data-theme="dark"] .t-moon{display:none}
@media (prefers-color-scheme:dark){html:not([data-theme="light"]) .t-sun{display:block}html:not([data-theme="light"]) .t-moon{display:none}}

/* Reveals, once. Waiting states exist only under .armed (JS, motion allowed). */
html.armed [data-rv]{transition:opacity .7s var(--ease),transform .9s var(--spring)}
html.armed [data-rv]:not(.in){opacity:0;transform:translateY(28px)}

/* ---------- a piece */
.piece{position:relative;display:grid;gap:14px;min-width:0}
.pm{position:relative;overflow:hidden;border-radius:var(--r);background:var(--well);isolation:isolate}
.pm-in{position:absolute;inset:0;will-change:transform}
.pm-in img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.pm-b{opacity:0;transform:scale(1.04);transition:opacity .45s var(--ease),transform .6s var(--spring)}
.pm-line{position:absolute;left:0;right:0;bottom:0;padding:48px 18px 16px;color:#fff;font-size:15px;line-height:1.4;max-width:46ch;
  background:linear-gradient(to top,rgba(0,0,0,.62),rgba(0,0,0,0));opacity:0;transform:translateY(8px);transition:opacity .35s var(--ease),transform .4s var(--spring);pointer-events:none}
.veil{position:absolute;inset:-1px;background:var(--bg);transform-origin:50% 0;will-change:transform}
.pc{display:flex;align-items:baseline;gap:12px;min-width:0;font-size:15px}
.pc-n{font-variant-numeric:tabular-nums;color:var(--mute);font-size:13px;min-width:2ch}
.pc-name{font-weight:500;white-space:nowrap}
.pc-meta{display:inline-flex;align-items:center;gap:6px;color:var(--mute);min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-inline-start:auto}
.pc-meta .ic{width:15px;height:15px}
.pc-go{align-self:center;width:18px;height:18px;transition:transform .22s var(--spring)}
.piece-open{position:absolute;inset:0;z-index:2;border-radius:var(--r)}
.piece-peek{position:absolute;z-index:3;top:10px;right:10px;width:44px;height:44px;border-radius:50%;display:grid;place-items:center;
  background:var(--bg);color:var(--ink);box-shadow:0 1px 2px rgba(0,0,0,.08)}
.piece-peek .pk-minus{display:none}
.piece.peek .pk-plus{display:none}.piece.peek .pk-minus{display:block}
@media (hover:hover) and (pointer:fine){
  .piece-peek{display:none}
  .piece:hover .pm-b,.piece:focus-within .pm-b{opacity:1;transform:none}
  .piece:hover .pm-line,.piece:focus-within .pm-line{opacity:1;transform:none}
  .piece:hover .pc-go{transform:translateX(4px)}
}
.piece.peek .pm-b{opacity:1;transform:none}
.piece.peek .pm-line{opacity:1;transform:none}
.piece.lifted .pm{visibility:hidden}
html.rm .pm-b,html.rm .pm-line,html.rm .pc-go,html.rm .btn .ic{transition:none}

/* ---------- the project view */
.layer{position:fixed;inset:0;z-index:100}
.layer::before{content:"";position:absolute;inset:0;background:var(--bg);opacity:calc(var(--scrim,0) * .6)}
.lp{position:absolute;inset:0;overflow:auto;overscroll-behavior:contain;background:var(--bg);will-change:clip-path}
.lp-in{max-width:1240px;margin-inline:auto;padding:84px var(--gut) 72px;display:grid;gap:56px;will-change:transform}
.lp-head{display:grid;gap:28px;align-items:start}
@media (min-width:900px){.lp-head{grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:56px}}
.lp-media{position:relative;overflow:hidden;border-radius:var(--r);background:var(--well)}
.lp-media img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.lp-text{display:grid;gap:20px;align-content:start}
.lp-kick{display:flex;align-items:center;gap:8px;color:var(--mute);font-size:14px}
.lp-kick .ic{width:18px;height:18px}
.lp-name{font-family:var(--display);font-weight:500;font-size:clamp(34px,4.4vw,56px);line-height:1.04;letter-spacing:-.03em}
.lp-line{font-size:18px;line-height:1.5;max-width:42ch}
.lp-points{display:grid;gap:10px;color:var(--ink)}
.lp-points li,.lp-state,.lp-note{display:grid;grid-template-columns:20px 1fr;gap:12px;align-items:start;font-size:15px;line-height:1.5}
.lp-points .ic,.lp-state .ic,.lp-note .ic{margin-top:1px}
.lp-state{color:var(--mute);padding-top:18px;border-top:1px solid var(--line)}
.lp-links{display:flex;flex-wrap:wrap;gap:8px 24px}
.lp-link{display:inline-flex;align-items:center;gap:10px;min-height:44px;font-weight:500;border-bottom:1px solid var(--line)}
.lp-link:hover{border-color:var(--ink)}
.lp-gal{display:flex;gap:16px;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:6px;scrollbar-width:thin}
.lp-gal img{height:min(560px,62vh);width:auto;border-radius:calc(var(--r) * .8);scroll-snap-align:start;flex:none;background:var(--well)}
.lp-gal img.wide{height:min(560px,62vh)}
@media (max-width:759px){.lp-gal img{height:440px}.lp-gal img.wide{height:220px}}
.lp-note{color:var(--mute);font-size:14px}
.lp-back{position:fixed;z-index:3;top:16px;left:var(--gut);display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 18px 0 14px;border-radius:999px;
  background:var(--ink);color:var(--bg);font-weight:500}
.lp-back .ic{transition:transform .22s var(--spring)}
.lp-back:hover .ic{transform:translateX(-3px)}
.lp-media.art{background:none;overflow:visible}
