/* base.css: the shared skeleton of both riso directions. Left = context, right = evidence.
   Each page sets the tokens (--paper, --ink, --accent, fonts) and its own details. */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--paper); color: var(--ink); overflow-x: clip; }
body { font-family: var(--body); font-size: 15.5px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; }

.layout { display: grid; grid-template-columns: minmax(0, 40fr) minmax(0, 60fr); }

/* ── left: a sticky panel, the print on top, the context under it ── */
.stage { position: sticky; top: 0; height: 100svh; overflow: hidden; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.top { display: flex; justify-content: space-between; align-items: baseline; padding: 22px var(--gut) 16px; position: relative; z-index: 2; }
.top nav { display: flex; gap: 22px; }
#art { position: relative; min-height: 0; }
#art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#art .art-work { visibility: hidden; }
.ctx { padding: 22px var(--gut) 0; }
.ctx > * { transition: opacity .2s ease, transform .4s cubic-bezier(.2,.7,.2,1); }
.ctx.out > * { opacity: 0; transform: translateY(8px); }
.ctx .kick { display: flex; justify-content: space-between; margin-bottom: 10px; }
.ctx dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 18px; margin-top: 16px; }
.ctx p { margin-top: 14px; max-width: 42ch; }
.ctx p:empty { display: none; }
.ctx .c2 { transition-delay: .04s; } .ctx .c3 { transition-delay: .08s; } .ctx .c4 { transition-delay: .12s; }
.foot { display: flex; justify-content: space-between; margin: 20px var(--gut) 0; padding: 12px 0 20px; }

/* ── right ── */
.evidence { padding: 0 var(--gutR); }
.block { padding: clamp(56px, 10vh, 120px) 0; }
.intro { padding-top: clamp(80px, 14vh, 150px); }
.intro .lead { display: grid; grid-template-columns: 1fr auto; gap: clamp(20px, 3vw, 44px); align-items: start; }
.intro .lead img { width: clamp(130px, 13vw, 190px); aspect-ratio: 4 / 5; object-fit: cover; }
.about { display: grid; grid-template-columns: 110px 1fr; gap: 24px; margin-top: clamp(56px, 9vh, 100px); padding-top: 22px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; margin-top: 32px; }
.facts div { padding-top: 10px; }
.facts b { display: block; font-weight: inherit; margin-bottom: 4px; }

/* the deck: pinned, each card slides up over the last; images clean, never cropped or stretched */
#work { position: relative; margin: 0 calc(-1 * var(--gutR)); }
.deck { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.card { position: absolute; inset: 0; overflow: hidden; background: var(--paper); will-change: transform; transform-origin: 50% 0; }
.card .img { position: absolute; inset: clamp(28px, 5vh, 64px) clamp(24px, 4vw, 64px) clamp(56px, 9vh, 96px); display: flex; align-items: center; justify-content: center; will-change: transform; }
.card .img > img { max-width: 100%; max-height: 100%; width: auto; height: auto; }
.card .img > iframe { height: 100%; max-width: 100%; width: auto; border: 0; background: transparent; }
.card .row { display: flex; gap: clamp(10px, 1.4vw, 20px); height: 100%; align-items: center; justify-content: center; }
.card .row img { height: 100%; width: auto; max-width: 32%; object-fit: contain; }
.card .shade { position: absolute; inset: 0; background: var(--paper); opacity: 0; pointer-events: none; }
.card .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 clamp(24px, 4vw, 64px) clamp(20px, 3.4vh, 34px); display: flex; justify-content: space-between; }

.contact { min-height: 86svh; display: flex; flex-direction: column; justify-content: center; }
.contact .big { align-self: flex-start; white-space: nowrap; }
.contact nav { display: flex; gap: 26px; margin-top: 30px; }

.sketch { position: fixed; right: 12px; bottom: 12px; z-index: 60; font: 500 11px/1 ui-monospace, monospace; background: var(--ink); color: var(--paper); padding: 7px 9px; display: flex; gap: 10px; }
.sketch a { text-decoration: underline; }
/* colour variations (palettes.js): one swatch per ramp, its four inks side by side */
.sketch .sw { display: flex; gap: 5px; align-items: center; margin-left: 4px; }
.sketch .sw button { width: 22px; height: 12px; border: 1px solid color-mix(in srgb, var(--paper) 60%, transparent); padding: 0; cursor: pointer; }
.sketch .sw button.on { outline: 2px solid var(--paper); outline-offset: 1px; }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .stage { position: sticky; z-index: 5; height: 52svh; }
  .ctx p, .ctx dl, .foot, .top nav { display: none; }
  .intro .lead, .about, .facts { grid-template-columns: 1fr; }
}
