/* Washi Lantern Studios: the project pages (work/*.html), made by tools/build-pages.mjs.
   Builds on style.css (tokens, nav, .btn, .pills, .eyebrow, .glyph, .card) and motion.css (wave band, drawn cards);
   no new fonts or colours. The shelf's colour comes in as --tone from <main class="wk" data-tone>. */

.wk{--tone:var(--verm);--tape:var(--tape-a)}
.wk[data-tone="indigo"]{--tone:var(--indigo);--tape:var(--tape-b)}
.wk[data-tone="gold"]{--tone:var(--gold);--tape:var(--tape-c)}
.wk[data-tone="moss"]{--tone:var(--moss);--tape:var(--tape-d)}

/* fade-up on scroll is site.js's .rv; work-boot.js marks <html class="js">, so without JavaScript nothing waits */
html:not(.js) .wk .rv{opacity:1;transform:none}
/* anchors land below the sticky nav */
.wk [id]{scroll-margin-top:96px}

/* ---------- back link ---------- */
.wk-top{padding-top:22px}
.wk-back{display:inline-flex;align-items:center;gap:9px;padding:6px 0;font-size:15px;font-weight:700;color:var(--mute);transition:color .3s}
.wk-back svg{width:16px;height:16px;transition:transform .35s var(--ease)}
.wk-back:hover{color:var(--ink)}
.wk-back:hover svg{transform:translateX(-4px)}

/* ---------- header block ---------- */
.wk-head{display:flex;align-items:flex-start;gap:clamp(18px,3vw,30px);padding:22px 0 clamp(30px,4vw,44px)}
.wk-head .glyph{background:var(--tone);margin-top:6px}
.wk-titles{flex:1;min-width:0}
.wk-head h1{position:relative;font-size:clamp(34px,5.4vw,68px);line-height:1.08;margin:12px 0 34px;max-width:15em;overflow-wrap:break-word}
.wk-h1{position:relative;z-index:1}
/* the host of the title rule (a kit slash drawn by work.js, which also sets its width): the crest of the stroke
   sits 26 px above the host's bottom, just under the title */
.wk-rule{position:absolute;left:-6px;width:440px;max-width:100%;bottom:-34px;height:60px;pointer-events:none;z-index:0}
.wk-sum{max-width:640px;font-size:clamp(17px,1.6vw,20px);color:var(--mute)}
.wk-head .pills{margin-top:18px}
@media (max-width:560px){.wk-head{flex-direction:column;gap:12px}.wk-head .glyph{margin:0 0 0 6px}}

/* ---------- paper frame for the lead picture or clip (a card with its tape strip) ---------- */
.wk-frame{position:relative;background:var(--card);border-radius:6px;box-shadow:var(--shadow);padding:clamp(8px,1.2vw,14px);transition:background .9s var(--ease)}
.wk-frame::before{content:"";position:absolute;top:-11px;left:50%;width:110px;height:24px;margin-left:-55px;background:var(--tape);transform:rotate(-2deg);z-index:1;
  clip-path:polygon(0 14%,3% 0,6% 14%,9% 0,12% 14%,100% 0,100% 86%,97% 100%,94% 86%,91% 100%,88% 86%,0 100%)}
.wk-frame>img,.wk-frame>video{display:block;width:100%;height:auto;border-radius:3px;background:var(--paper-2)}
/* a lead picture keeps its own shape: the frame hugs it, never wider than the page or taller than most of the screen,
   and never blown up past its own size */
.wk-lead .wk-frame,.wk-still .wk-frame{width:fit-content;max-width:100%;margin:0 auto}
.wk-lead .wk-frame>img,.wk-still .wk-frame>img{width:auto;max-width:100%;max-height:78vh}
.wk-lead .wk-clip{width:auto}
.wk-lead{margin-bottom:clamp(44px,6vw,76px)}
.wk-lead.is-art .wk-frame{width:100%;max-width:760px;margin:0 auto}

/* the clip's play / pause button (shown by work.js; without it the video keeps its own controls) */
.wk-play{position:absolute;right:clamp(18px,2.2vw,28px);bottom:clamp(18px,2.2vw,28px);display:inline-flex;align-items:center;gap:8px;padding:8px 15px 8px 12px;border-radius:999px;
  font-size:13px;font-weight:700;letter-spacing:.04em;background:rgba(20,16,12,.72);color:#fff3dc;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);transition:transform .3s var(--ease)}
.wk-play:hover{transform:translateY(-1px)}
.wk-play::before{content:"";width:0;height:0;border-left:9px solid currentColor;border-top:6px solid transparent;border-bottom:6px solid transparent}
.wk-clip.playing .wk-play::before{width:9px;height:11px;border:0;border-left:3px solid currentColor;border-right:3px solid currentColor}
.wk-play[hidden]{display:none}
/* touch screens: the back link and the clip button offer a 44 px tap area (invisible, around them) */
@media (pointer:coarse){
  .wk-back{position:relative;z-index:2}   /* above the header block below it, which sits on its own layer */
  .wk-back::after{content:"";position:absolute;inset:-4px -6px}
  .wk-play::after{content:"";position:absolute;inset:-4px}
}

/* ---------- stills: big pictures one after another, each with its own anchor ---------- */
.wk-stills{display:grid;gap:clamp(44px,6vw,76px);margin-bottom:clamp(44px,6vw,76px)}
.wk-still figcaption{margin:18px 4px 0;max-width:680px}
.wk-still h2{font-family:var(--serif);font-weight:800;font-size:clamp(24px,2.6vw,32px);line-height:1.2}
.wk-still p{color:var(--mute);margin-top:4px}

/* ---------- body: prose on the left, the facts slip on the right ---------- */
.wk-body{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(260px,.9fr);gap:clamp(30px,5vw,84px);align-items:start;padding-bottom:clamp(30px,4vw,50px)}
.wk-body.no-slip{grid-template-columns:minmax(0,1fr)}
.wk-prose section+section{margin-top:clamp(30px,3.6vw,44px)}
.wk-prose h2,.wk-gallery h2,.wk-more h2{font-family:var(--serif);font-weight:800;font-size:clamp(24px,2.6vw,32px);line-height:1.2;margin-bottom:12px}
.wk-prose p{max-width:66ch}
.wk-prose p+p{margin-top:14px}
.wk-credit{margin-top:30px;padding-left:14px;border-left:2px solid var(--tone);font-size:14.5px;color:var(--mute);max-width:66ch}
@media (max-width:860px){.wk-body{grid-template-columns:minmax(0,1fr)}.wk-slip{max-width:520px}}

/* the facts slip: a paper strip hanging from a thread */
.wk-slip{position:relative;margin-top:30px;padding:40px 24px 20px;background:var(--card);border-radius:3px;box-shadow:var(--shadow);rotate:.6deg;transition:background .9s var(--ease)}
.wk-slip::before{content:"";position:absolute;top:-28px;left:50%;width:1.5px;height:30px;background:var(--ink);opacity:.6}
.wk-slip::after{content:"";position:absolute;top:16px;left:50%;width:8px;height:8px;margin-left:-4px;border-radius:50%;background:var(--paper);box-shadow:inset 0 0 0 1px var(--line)}
.wk-slip>i{position:absolute;inset:0 0 auto 0;height:7px;border-radius:3px 3px 0 0;background:var(--tone)}
.wk-slip h2{font-family:var(--serif);font-size:14px;font-weight:700;letter-spacing:.22em;text-transform:uppercase;color:var(--mute);text-align:center;margin-bottom:10px}
.wk-slip dl>div{padding:11px 0;border-top:1px dashed var(--line)}
.wk-slip dt{font-size:12.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--mute)}
.wk-slip dd{margin-top:2px;font-size:15.5px;line-height:1.5}
.wk-slip dd a{border-bottom:1.5px solid var(--tone)}
.wk-slip dd a:hover{color:var(--tone)}

/* ---------- gallery: a sideways strip that snaps like a shelf ---------- */
.wk-gallery{padding:clamp(24px,4vw,44px) 0 0}
.wk-gallery .wrap>p{color:var(--mute);max-width:640px;margin-top:-4px}
.wk-strip{display:flex;align-items:center;gap:22px;overflow-x:auto;scroll-snap-type:x mandatory;scroll-padding-left:var(--gutter);padding:26px var(--gutter) 26px;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:var(--line) transparent}
.wk-strip figure{flex:none;scroll-snap-align:start;padding:10px;background:var(--card);border-radius:6px;box-shadow:var(--shadow);transition:background .9s var(--ease)}
/* every picture in the strip is the same height unless it is so wide that it would pass 78% of the screen (or 1000 px);
   then it keeps its shape and is shorter. --ar (width / height) is written on each <img> by tools/build-pages.mjs */
.wk-strip img{--hh:clamp(240px,30vw,420px);height:min(var(--hh),calc(min(78vw,1000px) / var(--ar,1.5)));width:auto;border-radius:3px;background:var(--paper-2);-webkit-user-drag:none}
/* drag to scroll with the mouse (work.js): .can-drag only while the strip overflows, .drag while a drag is under way */
.wk-strip.can-drag{cursor:grab}
.wk-strip.drag{cursor:grabbing;scroll-snap-type:none;user-select:none;-webkit-user-select:none}
.wk-strip.drag a{pointer-events:none}

/* ---------- actions ---------- */
.wk-actions{display:flex;flex-wrap:wrap;gap:12px;padding:clamp(28px,4vw,44px) 0 clamp(50px,7vw,80px)}

/* ---------- more from this shelf ---------- */
.wk-more{padding:clamp(34px,5vw,54px) 0 clamp(50px,7vw,80px);border-top:1px dashed var(--line)}
.wk-more-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:40px 30px;margin-top:34px;max-width:820px}
.wk-more-grid.one{grid-template-columns:minmax(0,1fr);max-width:400px}
.wk-more .card{width:auto}
.wk-more .card .art{aspect-ratio:3/2}
.wk-dir{margin:16px 4px 0;font-size:12.5px;letter-spacing:.14em;text-transform:uppercase;color:var(--mute)}
.wk-more .card h3{margin-top:4px}
@media (max-width:640px){.wk-more-grid{grid-template-columns:minmax(0,1fr);max-width:400px}}

/* ---------- the Mascot page: the cast in a carousel ----------
   Without JavaScript: a plain row of the seven with their names. work.js adds .live and then places each one on a
   flat ring with --x and --y (px from the middle), --s (size) and --o (how solid), and turns the ring slowly. */
.wk-cast{background:#1d2130;color:#f3e9d6;border-radius:3px;padding:clamp(18px,3vw,30px) clamp(10px,2vw,22px) clamp(16px,2.4vw,24px);text-align:center;overflow:hidden}
.cast-ring{list-style:none;display:flex;flex-wrap:wrap;justify-content:center;gap:18px 22px}
.cast-pick{display:flex;flex-direction:column;align-items:center;gap:8px;padding:6px;border:0;border-radius:8px;background:none;color:inherit;font:inherit;font-size:13.5px;letter-spacing:.04em;cursor:pointer}
.cast-pick svg{display:block;width:72px;height:auto;overflow:visible;filter:drop-shadow(0 5px 0 rgba(0,0,0,.28))}
.cast-pick:focus-visible,.cast-ctl button:focus-visible{outline:2px solid #ffb85a;outline-offset:3px}
.wk-cast.live .cast-ring{display:block;position:relative;height:clamp(170px,30vw,250px)}
.wk-cast.live .cast-ring::before{content:"";position:absolute;left:50%;top:66%;width:min(86%,640px);height:24%;translate:-50% -50%;border-radius:50%;border:1.5px dashed rgba(243,233,214,.14)}
.wk-cast.live .cast-ring li{position:absolute;left:50%;top:46%;translate:calc(-50% + var(--x,0) * 1px) calc(-50% + var(--y,0) * 1px);scale:var(--s,1);opacity:var(--o,1)}
.wk-cast.live .cast-pick svg{width:clamp(84px,15vw,132px)}
.wk-cast.live .cast-pick span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.cast-info{display:flex;flex-direction:column;gap:3px;min-height:3.4em;margin-top:4px}
.cast-info b{font-family:var(--serif);font-weight:800;font-size:clamp(19px,2.4vw,23px)}
.cast-info span{font-size:15px;color:rgba(243,233,214,.74)}
.cast-ctl{display:flex;justify-content:center;align-items:center;gap:10px;margin-top:14px}
.cast-info[hidden],.cast-ctl[hidden]{display:none}
.cast-ctl button{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:38px;min-width:38px;padding:0 9px;border:0;border-radius:999px;background:rgba(243,233,214,.07);box-shadow:inset 0 0 0 1.5px rgba(243,233,214,.26);color:inherit;font:inherit;font-size:14px;font-weight:700;cursor:pointer;transition:background .3s}
.cast-ctl button:hover{background:rgba(243,233,214,.15)}
.cast-ctl svg{width:17px;height:17px}
.cast-ctl .cast-mode{padding:0 16px 0 14px;min-width:182px}
.cast-mode::before{content:"";width:8px;height:8px;border-radius:50%;background:#ffb85a;box-shadow:0 0 10px rgba(255,184,90,.8)}
.cast-mode.idle::before{background:rgba(243,233,214,.4);box-shadow:none}
