/* The showcase page. Colours, motion, reset, links, buttons and focus come from site.css. */
html, body { height: 100%; overflow: hidden; }
body { font-size: calc(15px * var(--s)); font-weight: 500; line-height: 1.5; letter-spacing: -.015em; }
h2 { font: inherit; color: var(--name); }
button { letter-spacing: inherit; }
:focus-visible { outline-offset: 2px; }

/* chrome: everything here leaves once the reader is past the name */
.bar { position: fixed; inset: 0 0 auto 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(env(safe-area-inset-top, 0px) + 14px) 18px 14px; pointer-events: none;
  transition: opacity .35s var(--enter), transform .35s var(--enter), visibility .35s; }
.riding .bar { opacity: 0; visibility: hidden; transform: translateY(-14px); }
.bar > * { pointer-events: auto; }
a.who { display: block; flex: none; width: 36px; height: 36px; border-radius: 4px; color: var(--mark); }
a.who .logo { display: block; width: 100%; height: 100%; fill: currentColor; }
.exit { flex: none; color: var(--name); background: var(--surface); box-shadow: inset 0 0 0 1px var(--ring-h); border-radius: 999px; padding: calc(7px * var(--s)) calc(14px * var(--s)); font-size: calc(13px * var(--s)); font-weight: 450; letter-spacing: 0; }
.exit:hover { box-shadow: inset 0 0 0 1px var(--name); }

/* stage: the page's <main>, filling the screen instead of the site's reading column */
#view { position: fixed; inset: 0; max-width: none; min-height: 0; margin: 0; padding: 0; display: block; cursor: grab; touch-action: none; overflow: hidden; }
#view.drag { cursor: grabbing; }
#view.over { cursor: pointer; }
#view canvas { display: block; width: 100%; height: 100%; }

/* The name sits in the opening of the band until the reader flies in. showcase.js measures that
   opening and sets --u (the type unit), --name-size and the padding that centres the group in it. Every
   size and gap below follows from those, so the group scales as one. */
#hero { position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none;
  font-size: calc(var(--u, 15px) * var(--s)); text-shadow: 0 0 14px var(--bg), 0 0 14px var(--bg), 0 0 5px var(--bg); }
#hero h1 { font-size: var(--name-size, 4em); line-height: 1; letter-spacing: -.045em; font-weight: 550; }
#hero p { margin-top: .75em; max-width: min(30em, var(--measure, 30em)); line-height: 1.55; text-wrap: balance; }
#hero p strong { display: block; margin-bottom: .15em; font-size: min(1.25em, var(--measure, 30em) / 12.4); line-height: 1.3; letter-spacing: -.02em; font-weight: 600; color: var(--name); }
/* the one orange button: the step this page asks for. Its text takes the page colour, as the logo's letters do */
#enter { pointer-events: auto; margin-top: 1em; background: var(--mark); color: var(--bg); border-radius: 999px; padding: .6em 1.3em; font-size: .93em; font-weight: 500; letter-spacing: 0; text-shadow: none; }
#enter:hover { filter: brightness(1.08); }
#back:hover, .switch:hover { box-shadow: inset 0 0 0 1px var(--name); }
.riding #enter { pointer-events: none; visibility: hidden; }

/* the controls while riding */
#dock { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 18px); z-index: 20; display: flex; gap: 6px; white-space: nowrap;
  transform: translate(-50%, 14px); opacity: 0; visibility: hidden; transition: opacity .35s var(--enter), transform .35s var(--enter), visibility .35s; }
.riding #dock { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
#dock > * { background: var(--surface); color: var(--name); border-radius: 999px; padding: 8px 16px; font-size: calc(13px * var(--s)); font-weight: 450; letter-spacing: 0; box-shadow: inset 0 0 0 1px var(--ring-h); }
/* the filter: red dot, native menu, chevron */
#dock .switch { position: relative; display: flex; padding: 0; }
.switch::before, .switch::after { content: ""; position: absolute; top: 50%; pointer-events: none; }
.switch::before { left: 15px; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--mark); }
.switch::after { right: 15px; width: 6px; height: 6px; margin-top: -5px; border: solid var(--faint); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.switch select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; border-radius: 999px; padding: 8px 34px 8px 28px; font: inherit; letter-spacing: inherit; color: inherit; cursor: pointer; }
.switch option { background: var(--surface); color: var(--name); }

/* for screen readers only: the list of work and the square in front */
#list, #here { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nogl #hero p::after { content: " This page needs WebGL, which isn\2019t available in this browser."; }

/* side panel */
.scrim { position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .4); opacity: 0; pointer-events: none; transition: opacity .3s var(--enter); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 31; display: flex; flex-direction: column; width: min(540px, 100%); overflow: auto; padding: calc(env(safe-area-inset-top, 0px) + 18px) 24px 0;
  background: var(--bg); box-shadow: inset 1px 0 0 var(--ring); transform: translateX(102%); transition: transform .4s var(--exit); }
.drawer > * { flex: none; }
.open .scrim { opacity: 1; pointer-events: auto; }
.open .drawer { transform: none; transition-timing-function: var(--enter); }
.drawer .x { position: sticky; top: 0; z-index: 2; align-self: flex-end; background: var(--surface); box-shadow: inset 0 0 0 1px var(--ring); border-radius: 999px; padding: 5px 14px; font-size: calc(13px * var(--s)); font-weight: 450; letter-spacing: 0; color: var(--name); }
.drawer #dbody { flex: 1 0 auto; }
.drawer h2 { margin: 14px 0 6px; }
.drawer .lead { max-width: 420px; margin-bottom: 20px; }
.drawer .hero-art { position: relative; width: 100%; aspect-ratio: 16 / 10; margin-bottom: 24px; border-radius: 10px; overflow: hidden; }
.drawer .hero-art canvas, .drawer .hero-art img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.drawer .hero-art::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--line); }
/* the site's facts list, without its rule, with values in the stronger colour */
.drawer .facts { margin: 0 0 24px; padding: 0; border: 0; grid-template-columns: calc(96px * var(--s)) 1fr; gap: 8px 12px; align-items: baseline; font-size: calc(13px * var(--s)); font-weight: 450; letter-spacing: 0; }
.drawer .facts dt { font-size: calc(12px * var(--s)); font-weight: 400; }
.drawer .facts dd { color: var(--name); }
.drawer p.body { max-width: 420px; margin-bottom: 24px; }
.foot { position: sticky; bottom: 0; z-index: 2; margin: 0 -24px; padding: 14px 24px calc(14px + env(safe-area-inset-bottom, 0px)); background: var(--surface); box-shadow: 0 -1px 0 var(--ring), 0 -16px 32px -14px rgba(0, 0, 0, .28); }
.foot:empty { display: none; }
.go { display: block; text-align: center; background: var(--name); color: var(--bg); padding: 11px 16px; border-radius: 999px; font-size: calc(13px * var(--s)); font-weight: 500; letter-spacing: 0; }
.go:hover { opacity: .86; }

@media (prefers-reduced-motion: reduce) { .drawer, .scrim, .bar, #dock { transition: none; } }
