/* Canvas comp-6: the free board (loaded after sketch-v2.css). Array's restraint stays: one weight, a navy selection ring, the tag 15px below. */

/* statement left, the board runs off the right edge and below the fold */
.comp-5 .stage{--bleed:120px;display:grid;grid-template-columns:minmax(0,25rem) minmax(0,1fr);gap:48px;padding-top:24px}
.comp-5 .hero{display:flex;flex-direction:column;justify-content:space-between;padding:40px 0 calc(56px + var(--bleed))}
.comp-5 h1{max-width:10em}
@media (min-width:901px){.comp-5 h1{font-size:clamp(44px,4.2vw,64px);line-height:1.04}}
.comp-5 .bwrap{margin-right:-32px}
.comp-5 .board{height:calc(100svh - 128px + var(--bleed));border-radius:24px 0 0 24px}

/* the controls sit above the board, never on it: the hint chip, one chip per project, the drift pause */
.bwrap{min-width:0}
.bctl{display:flex;align-items:center;gap:8px;height:32px;margin-bottom:8px}
.ctl{display:flex;flex:none;align-items:center;height:32px;padding:2px;overflow:hidden;border-radius:999px;background:var(--surface-raised)} /* the hint and the pause are one control */
.ctl .hint{margin:0;padding:0 14px;color:var(--muted);font:12px/28px var(--mono)}
.ctl .pause{height:28px;border-left:1px solid var(--line);border-radius:0 999px 999px 0}
.chips{display:flex;flex:1;min-width:0;gap:8px;overflow-x:auto;scrollbar-width:none;padding:2px;mask-image:linear-gradient(90deg,#000 calc(100% - 24px),transparent)} /* one row: when the board is narrow the chips scroll sideways, so the row never grows and eats the first view */
.chips::-webkit-scrollbar{display:none}
.chip{flex:none;height:32px;padding:0 14px;border:0;border-radius:999px;background:var(--chip);color:var(--ink);font:14px/1 var(--mono);white-space:nowrap;transition:background .14s,color .14s}
.chip:hover{background:var(--canvas)}
.chip[aria-current=true]{background:var(--navy);color:var(--cta-ink)}

/* the board: a clipped viewport; board-v2.js lays the frames out on a grid and moves the world inside with one transform */
.board{position:relative;overflow:clip;border-radius:24px;background:var(--canvas);cursor:grab;touch-action:pan-y;user-select:none;-webkit-user-select:none}
.board.is-drag,.board.is-drag .af{cursor:grabbing}
.board:focus-visible{outline-offset:-4px;border-radius:24px 0 0 24px}
@media (min-width:901px) and (max-width:1100px){.comp-5 .stage{grid-template-columns:minmax(0,21rem) minmax(0,1fr);gap:32px}}
.board[data-mode=still]{cursor:default}
.world{position:absolute;left:0;top:0;width:0;height:0;transform-origin:0 0;will-change:transform;--z:1}

/* an artboard: name above, the shot, and the navy tag under the selection. Names and tags are divided by the zoom (--z), so they
   stay 11px on screen at any size; the selection grows up from its bottom edge, so the tag never moves into the row below */
.af{position:absolute;left:calc(var(--x) * 1px);top:calc(var(--y) * 1px);width:calc(var(--w) * 1px);height:calc(var(--h) * 1px);padding:0;border:0;background:none;cursor:pointer;--ly:0px;--s:1;--r:12px}
.af.p{--r:14.9% / 7.1%}
.af-lift{display:block;width:100%;height:100%;border-radius:var(--r);transform-origin:50% 100%;transform:translateY(var(--ly)) scale(var(--s));transition:transform .55s var(--spring),box-shadow .35s ease}
.af.d .af-lift{box-shadow:0 0 0 1px var(--hair)}
.af img{width:100%;height:100%;border-radius:var(--r);pointer-events:none;-webkit-user-drag:none}
.af:hover{--ly:-6px}
.af.d:hover .af-lift{box-shadow:0 0 0 1px var(--hair),0 22px 44px -16px color-mix(in srgb,var(--navy) 32%,transparent)}
.af.p:hover .af-lift{box-shadow:0 18px 30px -12px color-mix(in srgb,var(--navy) 30%,transparent)} /* a box-shadow, not a drop-shadow filter: no per-frame filter pass */
.is-drag .af:hover{--ly:0px}
.af.is-sel{z-index:2;--s:1.05}
.af.is-sel .af-lift{box-shadow:0 0 0 1.5px var(--navy),0 26px 52px -18px color-mix(in srgb,var(--navy) 34%,transparent)}
.af:focus-visible{outline:none}
.af:focus-visible .af-lift{outline:2px solid var(--focus-ring);outline-offset:5px}
.af-name{position:absolute;left:0;bottom:calc(100% + 8px / var(--z));max-width:calc(100% + 16px / var(--z));display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font:calc(11px / var(--z))/1.15 var(--mono);color:var(--muted);transition:opacity .25s ease}
.af.is-sel .af-name{opacity:0}
.af.is-under .af-name{display:none} /* under the selected frame's tag */
.af-tag{position:absolute;left:0;top:calc(100% + 15px / var(--z));height:calc(20px / var(--z));padding:0 calc(8px / var(--z));overflow:hidden;border-radius:calc(4px / var(--z));background:var(--navy);color:var(--cta-ink);font:calc(11px / var(--z))/calc(20px / var(--z)) var(--mono);white-space:nowrap;opacity:0;transform:translateY(calc(8px / var(--z)));transition:opacity .25s var(--spring),transform .25s var(--spring)}
.af-tag .tx{display:block}
.af-tag .ro{position:absolute;left:calc(8px / var(--z));top:0} /* the old name, rolling up and out while the new one rolls in (board-v2.js) */
.af.is-sel .af-tag{opacity:1;transform:none}
.af.tag-r .af-tag{left:auto;right:0}

/* the brief frame: the board's last frame, a draft of the form. Type is in board px, so it scales with the zoom like the screens do */
.br-art{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.9fr);gap:56px;align-items:center;width:100%;height:100%;padding:0 64px;border-radius:12px;background:var(--tile);text-align:left;overflow:hidden}
.br-h{display:block;font-size:46px;line-height:1.08;letter-spacing:-.4px;color:var(--ink)}
.br-s{display:block;margin-top:18px;font-size:22px;line-height:1.3;color:var(--muted)}
.br-f{display:grid;gap:12px}
.br-fl{display:block;padding:14px 16px;border:1.5px solid var(--line-strong);border-radius:10px;font-size:19px;line-height:1.2;color:var(--muted)}
.br-fl.tall{padding-bottom:30px}
.br-go{display:inline-flex;justify-self:start;height:50px;padding:0 28px;font-size:19px}

/* a cluster label: the project's short name above its row, left-aligned to the row's own margin (C2: monospace caps allowed here) */
.cl{position:absolute;left:calc(var(--x) * 1px);top:calc(var(--y) * 1px);margin:0;font:calc(12px / var(--z))/1 var(--mono);color:var(--ink);white-space:nowrap;pointer-events:none}

/* the open view: the clicked screen, the project's details and the rest of its screens, in that DOM order (so a visitor below
   900px meets the clicked screen first, then the details, then the rest). At 900px and up a grid puts the details in their own sticky
   column beside the clicked screen and the rest. The view grows out of its frame (board-v2.js) and shrinks back into it. */
.peek{width:min(960px,calc(100vw - 32px));max-height:calc(100svh - 32px);padding:16px;border:0;border-radius:24px;background:var(--surface-raised);color:var(--ink);box-shadow:var(--shadow-raise);overflow:auto;scrollbar-color:var(--navy-400) transparent}
.peek::backdrop{background:color-mix(in srgb,var(--navy) 55%,transparent)}
.peek[open]::backdrop{animation:bdIn .3s ease-out}
.peek.closing::backdrop{animation:bdOut .25s ease-in forwards}
@keyframes bdIn{from{opacity:0}}
@keyframes bdOut{to{opacity:0}}
.peek.brief{width:min(640px,calc(100vw - 32px))}
.peek form[method=dialog]{display:flex;justify-content:flex-end;margin-bottom:8px}
.peek-x:active{transform:translateY(1px)}
body:has(dialog[open]){overflow:hidden}
.peek-first{margin:0 0 16px;padding:0 8px}
.peek-img{display:block;width:100%;max-height:min(46svh,480px);object-fit:contain;border-radius:12px;background:var(--canvas)}
.peek-tag{display:inline-block;margin-top:10px;height:20px;padding:0 8px;border-radius:4px;background:var(--navy);color:var(--cta-ink);font:11px/20px var(--mono)}
.peek-details{padding:0 8px}
.peek h2{margin:0;font-size:24px}
.peek-summary{margin-top:10px;max-width:64ch;color:var(--muted)}
.peek-sub{margin:20px 0 8px;font-size:12px;color:var(--muted)}
.peek-platforms,.peek-features{margin:0;padding:0;list-style:none;display:grid;gap:6px}
.peek-platforms li,.peek-features li{padding-left:14px;position:relative}
.peek-platforms li::before,.peek-features li::before{content:'';position:absolute;left:0;top:.6em;width:4px;height:4px;border-radius:50%;background:var(--navy)}
.peek-rest{margin-top:24px;padding:0 8px}
.peek-shots{margin:0;padding:0;list-style:none;display:flex;flex-wrap:wrap;gap:12px}
.peek-shots li{display:flex;flex-direction:column;gap:6px;width:112px;color:var(--muted);font-size:12px;line-height:1.3}
.peek-shots img{width:100%;height:92px;object-fit:contain;border-radius:8px;background:var(--canvas)}
.brief-head{padding:0 8px 20px}
.brief-head h2{max-width:20ch}
.brief-sub{margin-top:8px;color:var(--muted)}
.brief-slot{padding:0 8px 8px}
.brief-foot{padding:0 8px 8px}
.fly{position:fixed;inset:auto;margin:0;padding:0;border:0;overflow:visible;background:none;border-radius:12px;transform-origin:0 0;pointer-events:none;object-fit:fill}
@media (min-width:900px){
  .peek-body{display:grid;grid-template-columns:260px 1fr;grid-template-areas:"details first" "details rest";grid-template-rows:auto 1fr;column-gap:32px}
  .peek-first{grid-area:first;margin-bottom:24px}
  .peek-details{grid-area:details;position:sticky;top:0;align-self:start}
  .peek-rest{grid-area:rest;margin-top:0}
  .peek-img{max-height:min(50svh,440px)}
}

/* reduced motion, 901px and up: a still grid of every frame, as tall as its content (board-v2.js sets the height). The statement
   stacks above it so no column stands empty beside a tall board. */
@media (prefers-reduced-motion:reduce){
  .bctl{display:none}
  .peek::backdrop{animation:none!important}
}
@media (prefers-reduced-motion:reduce) and (min-width:901px){
  .comp-5 .stage{display:block}
  .comp-5 .hero{flex-direction:row;align-items:flex-end;gap:48px;padding:0 0 32px}
  .comp-5 h1{max-width:13em}
  .comp-5 .bwrap{margin-right:0}
  .comp-5 .board{border-radius:24px}
}

/* up to 900px: a loose two-up list, tap to open; the brief frame closes the list */
@media (max-width:900px){
  .bctl{display:none}
  .comp-5 .stage{display:block}
  .comp-5 .hero{padding:0 0 32px}
  .comp-5 .bwrap{margin-right:0}
  .board,.comp-5 .board{height:auto!important;padding:40px 16px 24px;border-radius:24px;overflow:visible;cursor:auto;touch-action:auto}
  .world{position:static;width:auto;height:auto;display:flex;flex-wrap:wrap;align-items:flex-start;gap:32px 16px;transform:none!important;--z:1!important}
  .cl{position:static;flex:1 0 100%;width:auto;margin:16px 0 -8px;padding-top:12px;border-top:1px solid var(--line-strong);white-space:normal;pointer-events:auto} /* a hairline and 48px open each project, 32px between its own screens */
  .cl:first-child{margin-top:0;padding-top:0;border-top:0}
  .af{position:relative;left:auto;top:auto;width:100%;height:auto}
  .af.p{width:calc(50% - 8px)}
  .af-lift,.af img{height:auto}
  .af-name{max-width:100%;overflow:hidden;text-overflow:ellipsis}
  .af-tag{display:none}
  .br-art{display:block;padding:24px 20px}
  .br-h{font-size:24px}.br-s{margin-top:12px;font-size:16px}
  .br-f{display:block}.br-fl{display:none}
  .br-go{display:inline-flex;margin-top:20px;height:44px;font-size:14px}
}

/* a brief frame as wide as a narrow board stacks its content, so the whole frame fits the view */
.af.br.stack .br-art{display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:28px;padding:0 48px}
.af.br.stack .br-h{font-size:40px}
.af.br.stack .br-s{margin-top:12px;font-size:20px}
.af.br.stack .br-f{display:grid;grid-template-columns:1fr 1fr}
.af.br.stack .br-fl.tall,.af.br.stack .br-go{grid-column:1/-1}
.af.br.stack .br-fl{padding:12px 14px;font-size:18px}
.af.br.stack .br-fl.tall{padding-bottom:22px}

/* the phone list: a lone phone has its project and platform line beside it, vertically centred, so the row is never half empty */
.af-side{display:none}
@media (max-width:900px){
  .af-side{display:flex;flex-direction:column;gap:4px;align-self:center;width:calc(50% - 8px);margin:0;padding:0 8px}
  .as-n{font-size:16px;line-height:1.25;color:var(--ink)}
  .as-p{font:12px/1.3 var(--mono);color:var(--muted)}
}
