/* The home page. One shape runs it: the copper pad, a round pad with its hole (the ring behind the hero
   board, the buttons, the picture masks, the bullets, the band across the middle). Dark solder-mask ground,
   silkscreen ink, copper for actions, amber only where current flows. Pictures of benches sit on --stage. */
:root {
  --ground: #0B211B; --ground2: #0F2B23; --stage: #263A3C; --ink: #EEF3EE; --muted: #A9C0B5;
  --copper: #D08A4E; --amber: #FFC857; --mat: #2E6E55; --board: #0E5B43; --sand: #C2AE74; --dark: #10140F;
  --display: "Space Grotesk", "Segoe UI", system-ui, sans-serif; --text: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --m: clamp(16px, 4vw, 56px); --r: 28px;
  --xl: clamp(44px, 8.4vw, 136px); --l: clamp(34px, 4.8vw, 72px); --md: clamp(22px, 2.5vw, 36px); --s: 17px; --xs: 15px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --pat: #D08A4E; --pato: .16;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --ground: #EEF0EA; --ground2: #E2E7DF; --ink: #0F241C; --muted: #45594F; --copper: #B8692E; --board: #0E5B43; --pat: #0E5B43; --pato: .13; color-scheme: light; } }
:root[data-theme="light"] { --ground: #EEF0EA; --ground2: #E2E7DF; --ink: #0F241C; --muted: #45594F; --copper: #B8692E; --board: #0E5B43; --pat: #0E5B43; --pato: .13; color-scheme: light; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: clip; background: var(--ground); color: var(--ink); font: 400 var(--s)/1.55 var(--text); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2 { font-family: var(--display); font-weight: 700; margin: 0; text-wrap: balance; }
/* the background: copper traces, vias and schematic symbols, faint, behind everything */
body::before { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; background: var(--pat); opacity: var(--pato);
  -webkit-mask: url(pcb.svg) 0 0 / 480px 480px repeat; mask: url(pcb.svg) 0 0 / 480px 480px repeat; }
.top, main, .foot { position: relative; z-index: 1; }
::selection { background: var(--copper); color: var(--dark); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
section { padding: 0 var(--m); }

/* the pad button: a pill with the pad's hole at its left */
.btn { display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 24px 0 16px; border-radius: 999px; font: 600 var(--s) var(--display); text-decoration: none; background: var(--ground2); color: var(--ink); transition: transform .18s var(--ease), background .18s; }
.btn i { width: 14px; height: 14px; border-radius: 50%; border: 4px solid var(--copper); background: var(--ground); flex: none; transition: border-color .18s, transform .3s var(--ease); }
.btn:hover { transform: translateY(-2px); } .btn:active { transform: translateY(1px) scale(.98); }
.btn:hover i { transform: scale(1.15); }
.btn.go { background: var(--copper); color: var(--dark); } .btn.go i { border-color: var(--dark); background: var(--amber); }
.btn.go:hover { background: #E19A5C; }
.btn.ink { background: var(--dark); color: #EEF3EE; } .btn.ink i { border-color: var(--copper); background: var(--dark); }
.btn.small { min-height: 44px; font-size: var(--xs); }

/* top bar */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px var(--m); position: relative; z-index: 2; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { width: 32px; height: 32px; color: var(--copper); }
.brand b { font: 700 18px/1 var(--display); }
.top nav { display: flex; align-items: center; gap: 2px; }
.top nav a, .top nav button { white-space: nowrap; font: 500 var(--xs) var(--display); color: var(--ink); text-decoration: none; padding: 0 12px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 999px; background: none; border: 0; cursor: pointer; transition: background .18s; }
.top nav a:hover, .top nav button:hover { background: var(--ground2); }
.top nav svg { width: 20px; height: 20px; }
@media (max-width: 760px) { .top nav a[href="#tracks"], .top nav a[href="#projects"], .top nav a[href="#basics"] { display: none; } .brand b { font-size: 16px; white-space: nowrap; } }

/* hero: the headline and the cutaway dock at the left, the board inside its copper pad at the right */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-areas: "h board" "lede board" "ctas board" "dock board"; grid-template-rows: auto auto auto 1fr; column-gap: clamp(24px, 4vw, 72px); align-items: start;
  padding-top: clamp(24px, 6vh, 72px); padding-bottom: clamp(64px, 10vh, 120px); max-width: 1680px; margin: 0 auto; }
.hero h1 { grid-area: h; font-size: clamp(40px, 3.9vw, 76px); line-height: 1; letter-spacing: -.04em; }
.lede { grid-area: lede; font-size: clamp(17px, 1.25vw, 20px); max-width: 44ch; margin: 24px 0 28px; color: var(--ink); }
.ctas { grid-area: ctas; display: flex; flex-wrap: wrap; gap: 10px; }
.dock { grid-area: dock; margin-top: clamp(28px, 5vh, 56px); max-width: 520px; padding: 22px 22px 18px; border-radius: var(--r); background: var(--ground2); display: grid; gap: 12px; }
.dtop { display: flex; align-items: center; gap: 12px; }
.dtop label { font: 700 22px/1 var(--display); letter-spacing: -.02em; }
.pct { font-size: var(--xs); color: var(--muted); margin-right: auto; }
.board { grid-area: board; position: relative; align-self: center; width: min(100%, 76vh); aspect-ratio: 1; justify-self: center; --sep: 0; --on: 0; --gap: 90px; }
.ring { position: absolute; inset: 0; border-radius: 50%; border: clamp(18px, 3.2vw, 52px) solid var(--copper); transform: scale(calc(1 + var(--sep) * .04)); opacity: .95; }
.ring::after { content: ""; position: absolute; inset: 10%; border-radius: 50%; background: var(--ground2); opacity: .55; }
.stack { position: absolute; inset: 0; transform-style: preserve-3d; transform: perspective(2400px) rotateX(56deg) rotateZ(-34deg) scale(calc(var(--bs, .7) - var(--sep) * .14)) translateY(calc(var(--sep) * 8%)); }
.ly { position: absolute; inset: 8% 4%; transform: translateZ(calc(var(--i) * (3px + var(--sep) * var(--gap)))); transition: opacity .3s var(--ease); }
.ly svg { width: 100%; height: 100%; overflow: visible; display: block; }
.board[data-only] .ly { opacity: .14; } .board[data-only="0"] .ly[data-ly="0"], .board[data-only="1"] .ly[data-ly="1"], .board[data-only="2"] .ly[data-ly="2"], .board[data-only="3"] .ly[data-ly="3"] { opacity: 1; }
.pt { cursor: pointer; outline: none; }
.pt > * { transition: stroke-width .15s; }
.pt:hover > *, .pt:focus-visible > *, .pt.sel > * { stroke: #FFC857; stroke-width: 3; }
.lit { fill: #FFC857; opacity: calc(.12 + var(--on) * .88); }
.board.run .blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: .12; } }
.flow { stroke: #FFC857; stroke-width: 3.4; stroke-linecap: round; stroke-dasharray: 2 24; fill: none; opacity: var(--on); animation: flow 1.1s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -26; } }
/* the cutaway controls */
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 36px; background: none; cursor: pointer; margin: 0; }
input[type=range]::-webkit-slider-runnable-track { height: 8px; border-radius: 99px; background: var(--ground); }
input[type=range]::-moz-range-track { height: 8px; border-radius: 99px; background: var(--ground); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -10px; border-radius: 50%; background: var(--ground); border: 8px solid var(--copper); transition: transform .15s; }
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--ground); border: 8px solid var(--copper); }
input[type=range]:active::-webkit-slider-thumb { transform: scale(1.15); }
.lys { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 999px; background: var(--ground); }
.lys button { font: 500 14px var(--display); min-height: 40px; padding: 0 6px; border-radius: 999px; border: 0; background: none; color: var(--ink); cursor: pointer; transition: background .18s, color .18s; white-space: nowrap; }
.lys button:hover { background: var(--ground2); }
.lys button[aria-pressed="true"] { background: var(--copper); color: var(--dark); }
.power { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 14px 0 6px; border-radius: 999px; border: 0; background: var(--ground); color: var(--ink); font: 500 14px var(--display); cursor: pointer; white-space: nowrap; }
.power::before { content: ""; width: 38px; height: 22px; border-radius: 99px; background: #3A3320 radial-gradient(circle at 11px 50%, #8A7A50 7px, transparent 7.5px); transition: background .2s; }
.power[aria-pressed="true"]::before { background: var(--amber) radial-gradient(circle at 27px 50%, var(--dark) 7px, transparent 7.5px); }
.say { margin: 2px 0 0; min-height: 3em; font-size: 15px; line-height: 1.5; color: var(--muted); }
.say b { font-family: var(--display); color: var(--ink); }
@media (max-width: 899px) {
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "h" "lede" "ctas" "board" "dock"; grid-template-rows: none; text-align: center; padding-top: 20px; }
  .hero h1 { font-size: clamp(36px, 10vw, 64px); }
  .lede { margin: 16px auto 22px; max-width: 34ch; }
  .ctas { justify-content: center; }
  .board { width: min(88vw, 520px); margin-top: 32px; --gap: 44px; --bs: .76; }
  .ring { border-width: clamp(14px, 4.6vw, 28px); }
  .dock { margin: 24px auto 0; width: 100%; max-width: 520px; padding: 18px 14px 14px; text-align: left; }
  .dtop label { font-size: 20px; }
  .lys button { font-size: 13px; }
}

/* every part, named: a bench with a dot and a name on each part */
.named { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 4vw, 64px); align-items: center; padding-bottom: clamp(96px, 14vh, 160px); max-width: 1680px; margin: 0 auto; }
.named h2 { font-size: var(--l); letter-spacing: -.03em; line-height: 1; }
.named-txt > p { margin: 18px 0 24px; max-width: 40ch; }
.benches { display: flex; flex-wrap: wrap; gap: 6px; }
.benches button { font: 500 var(--xs) var(--display); min-height: 44px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--ground2); color: var(--ink); cursor: pointer; transition: background .18s, color .18s, transform .15s; }
.benches button:hover { transform: translateY(-1px); }
.benches button[aria-pressed="true"] { background: var(--ink); color: var(--ground); }
.pcard { margin-top: 24px; padding: 20px 22px; border-radius: var(--r); background: var(--ground2); min-height: 132px; border-left: 6px solid var(--copper); }
.pcard b { font: 700 20px/1.2 var(--display); display: block; margin-bottom: 6px; }
.pcard p { margin: 0; font-size: 16px; color: var(--muted); }
.scene { position: relative; aspect-ratio: 16 / 10; border-radius: var(--r); overflow: hidden; background: var(--stage); }
.sc { position: absolute; inset: 0; margin: 0; opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility .4s; }
.sc.on { opacity: 1; visibility: visible; }
.sc .full { position: absolute; aspect-ratio: 14 / 9; }
.sc .full img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 6s var(--ease); }
.sc.on .full img { transform: scale(1); }
.hot { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); display: flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; cursor: pointer; color: var(--dark); font: 600 13px/1 var(--display); opacity: 0; transition: opacity .4s var(--ease) calc(var(--k) * 80ms + 200ms); }
.sc.on .hot { opacity: 1; }
.hot i { position: relative; flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-style: normal; background: var(--amber); border: 3px solid var(--dark); }
.hot i::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--amber); opacity: 0; animation: ping 2.4s var(--ease) infinite; animation-delay: calc(var(--k) * 300ms); }
@keyframes ping { 0% { transform: scale(.6); opacity: .9; } 80%, 100% { transform: scale(1.5); opacity: 0; } }
.hot span { padding: 7px 11px; border-radius: 999px; background: #EEF3EE; white-space: nowrap; transition: background .18s; }
.hot.lf { flex-direction: row-reverse; transform: translate(calc(-100% + 14px), -50%); }
.hot:not(.lf) { transform: translate(-14px, -50%); }
.hot.flip:not(.lf) { flex-direction: row-reverse; transform: translate(calc(-100% + 14px), -50%); }
.hot.lf.flip { flex-direction: row; transform: translate(-14px, -50%); }
.hot.bare span { display: none; } .hot.bare, .hot.bare.lf { transform: translate(-50%, -50%); }
.hot:hover span, .hot.sel span { background: var(--amber); }
.hot.sel i { background: var(--copper); }
.sc figcaption { position: absolute; left: 16px; bottom: 16px; padding: 10px 14px; border-radius: 14px; background: rgba(11, 33, 27, .86); color: #EEF3EE; font: 600 15px/1.3 var(--display); }
.sc figcaption span { display: block; font: 400 13px var(--text); color: #A9C0B5; }
@media (max-width: 899px) {
  .named { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .named-txt > p { margin: 14px auto 20px; }
  .benches { justify-content: center; }
  .scene { order: 2; margin: 0 calc(var(--m) * -1); border-radius: 0; }
  .named-txt { display: contents; }
  .named h2 { order: 0; } .named-txt > p { order: 0; } .benches { order: 1; } .pcard { order: 3; text-align: left; margin-top: 0; }
  .hot span { display: none; } .hot, .hot.lf, .hot:not(.lf), .hot.flip:not(.lf), .hot.lf.flip { transform: translate(-50%, -50%); }
  .hot i { width: 24px; height: 24px; font-size: 12px; border-width: 2px; } .hot i::after { inset: -6px; }
  .sc figcaption { display: none; }
}

/* section heads: the heading, and its one line beside it */
.cat { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 40px; flex-wrap: wrap; margin-bottom: 40px; }
.cat h2 { font-size: var(--l); letter-spacing: -.03em; line-height: 1; }
.cat p { margin: 0; max-width: 40ch; color: var(--muted); }
@media (max-width: 899px) { .cat { flex-direction: column; align-items: center; text-align: center; margin-bottom: 28px; } .cat h2 { font-size: clamp(32px, 9vw, 48px); } }

/* the Basics: cards, a round picture for each bullet */
.basics, .tracks, .films, .work { max-width: 1680px; margin: 0 auto; }
.basics { padding-bottom: clamp(96px, 14vh, 160px); }
.items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.item { display: grid; grid-template-columns: 76px 1fr; gap: 18px; align-items: start; padding: 20px; border-radius: var(--r); background: var(--ground2); text-decoration: none; transition: transform .25s var(--ease), background .2s; }
.item:hover { transform: translateY(-3px); }
.pad { width: 76px; height: 76px; border-radius: 50%; border: 5px solid var(--copper); overflow: hidden; background: var(--stage); transition: transform .3s var(--ease), border-color .2s; }
.pad img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.9); transition: transform .5s var(--ease); }
.item:hover .pad { transform: rotate(-8deg) scale(1.06); } .item:hover .pad img { transform: scale(2.3); }
.item.done .pad { border-color: var(--amber); }
.it { display: grid; gap: 4px; }
.meta { font: 600 13px var(--display); color: var(--copper); letter-spacing: .01em; }
.it b { font: 700 19px/1.25 var(--display); letter-spacing: -.01em; }
.item:hover .it b { color: var(--copper); }
.ds { font-size: 15px; color: var(--muted); line-height: 1.5; }
.done { display: none; font-size: var(--xs); font-weight: 600; color: var(--amber); }
.item.done .done { display: block; }
@media (max-width: 1179px) { .items { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 699px) { .items { grid-template-columns: minmax(0, 1fr); gap: 10px; } .item { grid-template-columns: 60px 1fr; gap: 14px; padding: 16px; } .pad { width: 60px; height: 60px; border-width: 4px; } .it b { font-size: 17px; } }

/* the band: one copper trace across the page, pads at both ends, current running along it */
.trace { display: flex; align-items: center; padding: 0; margin: 0 0 clamp(96px, 14vh, 160px); }
.trace .w { position: relative; flex: 1; height: 10px; background: var(--copper); overflow: hidden; }
.trace .w i { position: absolute; top: 2px; left: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); animation: run 3.6s linear infinite; }
@keyframes run { from { transform: translateX(-10px); } to { transform: translateX(100vw); } }
.trace .p { width: 44px; height: 44px; border-radius: 50%; border: 12px solid var(--copper); background: var(--ground); flex: none; }
.trace .l { margin-left: var(--m); } .trace .r { margin-right: var(--m); }

/* prev / next and a counter, for rows that scroll sideways (phones) */
.nav { display: none; align-items: center; justify-content: center; gap: 18px; margin-top: 18px; }
.nav button { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--ground2); color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: transform .15s, background .18s; }
.nav button:active { transform: scale(.94); }
.nav button:disabled { opacity: .35; cursor: default; }
.nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.nav .count { font: 600 15px var(--display); color: var(--muted); min-width: 4.5em; text-align: center; } .nav .count b { color: var(--ink); }

/* tracks: a numbered list, and the chosen track's bench with what is in it */
.tracks { padding-bottom: clamp(96px, 14vh, 160px); }
.show { display: grid; grid-template-columns: minmax(260px, 4fr) minmax(0, 8fr); gap: clamp(20px, 3vw, 48px); align-items: stretch; }
.names { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; align-content: start; }
.names button { width: 100%; display: grid; grid-template-columns: 2.2em 1fr auto; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px; border-radius: 16px; border: 0; background: none; color: var(--muted); cursor: pointer; text-align: left; font: 600 clamp(17px, 1.3vw, 21px)/1.2 var(--display); transition: background .2s, color .2s; }
.names .no { font-size: 14px; color: var(--copper); } .names .ct { font: 500 13px var(--text); color: var(--muted); }
.names .ct::after { content: " projects"; }
.names button:hover { color: var(--ink); background: var(--ground2); }
.names button[aria-selected="true"] { background: var(--ground2); color: var(--ink); }
.names button[aria-selected="true"] .no::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--amber); vertical-align: .15em; }
.deck { display: grid; }
.tcard { grid-area: 1 / 1; display: grid; grid-template-rows: 1fr auto; border-radius: var(--r); overflow: hidden; background: var(--ground2); opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s; }
.tcard.on { opacity: 1; visibility: visible; }
.tpic { position: relative; display: block; min-height: 340px; overflow: hidden; background: var(--stage); }
.tpic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; transform: scale(1.2); }
.tcard.on .tpic img { animation: drift 14s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1.2) translate(0, 0); } to { transform: scale(1.36) translate(-3%, 2%); } }
.badge { position: absolute; top: 16px; left: 16px; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--ground); color: var(--ink); border: 6px solid var(--copper); font: 700 16px var(--display); }
.tinfo { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "h b" "p b" "c s"; gap: 6px 24px; align-items: center; padding: 24px 28px 26px; }
.tinfo h3 { grid-area: h; margin: 0; font: 700 var(--md)/1.1 var(--display); letter-spacing: -.02em; }
.tinfo p { grid-area: p; margin: 0; max-width: 56ch; }
.chips { grid-area: c; list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font-size: 13px; padding: 6px 12px; border-radius: 999px; background: var(--ground); }
.chips .more { color: var(--copper); font-weight: 600; }
.tinfo .btn { grid-area: b; background: var(--copper); color: var(--dark); } .tinfo .btn i { border-color: var(--dark); background: var(--amber); }
.tinfo .sm { grid-area: s; justify-self: end; font-size: 13px; color: var(--muted); }
@media (max-width: 899px) {
  .show { display: block; }
  .names { display: none; }
  .deck { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(var(--m) * -1); padding: 0 var(--m); scroll-padding: 0 var(--m); scrollbar-width: none; }
  .deck::-webkit-scrollbar { display: none; }
  .tcard { flex: 0 0 86%; opacity: 1; visibility: visible; scroll-snap-align: start; grid-template-rows: auto 1fr; }
  .tpic { min-height: 0; aspect-ratio: 4 / 3; }
  .badge { width: 46px; height: 46px; font-size: 14px; border-width: 5px; }
  .tinfo { grid-template-columns: minmax(0, 1fr); grid-template-areas: "h" "p" "c" "b" "s"; padding: 18px 18px 20px; text-align: center; justify-items: center; }
  .tinfo h3 { font-size: 24px; } .tinfo p { font-size: 16px; } .chips { justify-content: center; } .tinfo .btn { margin-top: 10px; } .tinfo .sm { justify-self: center; }
  .show .nav { display: flex; }
}

/* real places: a bento grid of benches, each named over its picture */
.work { padding-bottom: clamp(96px, 14vh, 160px); }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: clamp(200px, 17vw, 300px); gap: 12px; }
.t0 { grid-column: span 2; grid-row: span 2; } .t5 { grid-column: span 2; }
.tile { position: relative; display: block; border-radius: var(--r); overflow: hidden; background: var(--stage); text-decoration: none; isolation: isolate; }
.tile .ph { position: absolute; inset: 0; }
.tile img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; transform: scale(1.3); transition: transform .8s var(--ease); }
.tile.in img { animation: drift2 18s ease-in-out infinite alternate; animation-delay: calc(var(--n, 0) * -3s); }
@keyframes drift2 { from { transform: scale(1.3) translate(0, 0); } to { transform: scale(1.44) translate(2%, -2%); } }
.tile:hover img { animation-play-state: paused; }
.cap { position: absolute; left: 12px; bottom: 12px; max-width: calc(100% - 76px); display: grid; gap: 2px; padding: 12px 14px; border-radius: 16px; background: #EEF3EE; color: #0F241C; transform: translateY(0); transition: transform .3s var(--ease), background .2s; }
.cap b { font: 700 16px/1.25 var(--display); } .cap span { font-size: 13px; color: #45594F; }
.t0 .cap b { font-size: 22px; } .t0 .cap { max-width: 70%; padding: 16px 18px; }
.tile .go { position: absolute; right: 12px; bottom: 12px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--copper); color: var(--dark); transform: scale(.8); opacity: 0; transition: transform .3s var(--ease), opacity .3s; }
.tile .go svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.tile:hover .go, .tile:focus-visible .go { transform: none; opacity: 1; }
.tile:hover .cap { background: #FFC857; }
.tile .ph::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 2px rgba(208, 138, 78, .35); pointer-events: none; }
.tile .ph { background: var(--stage); }
@media (hover: none) { .tile .go { opacity: 1; transform: none; width: 36px; height: 36px; } }
@media (max-width: 899px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 52vw; gap: 10px; }
  .tile:not(.t0):not(.t5) .cap span { display: none; }
  .t0 { grid-column: span 2; grid-row: span 1; } .t5 { grid-column: span 2; }
  .cap { left: 8px; bottom: 8px; right: 8px; max-width: none; padding: 9px 10px; border-radius: 12px; } .cap b { font-size: 14px; } .cap span { font-size: 12px; }
  .t0 .cap, .t5 .cap { right: 54px; max-width: none; } .t0 .cap b { font-size: 18px; }
  .tile .go { right: 8px; bottom: 8px; } .tile:not(.t0):not(.t5) .go { top: 8px; bottom: auto; }
}

/* from the screen to the table: the stages as one bar */
.how { padding-bottom: clamp(96px, 14vh, 160px); max-width: 1680px; margin: 0 auto; }
.how h2 { font-size: var(--l); letter-spacing: -.03em; line-height: 1; margin-bottom: 64px; max-width: 14ch; }
.bar, .clauses { display: flex; gap: 6px; }
.bar { height: 22vh; min-height: 150px; }
.seg { min-width: 12%; flex-basis: 0; border-radius: 6px; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; color: #EEF3EE; transform-origin: left; }
.s0 { background: var(--mat); } .s1 { background: var(--board); } .s2 { background: var(--amber); color: var(--dark); } .s3 { background: var(--copper); color: var(--dark); }
.dur { font: 700 var(--md)/1.05 var(--display); letter-spacing: -.02em; }
.seg .nm { font: 600 var(--s) var(--display); display: block; }
.seg .cl { display: none; }
.clauses { list-style: none; margin: 16px 0 0; padding: 0; }
.clauses li { min-width: 12%; flex-basis: 0; font-size: var(--s); max-width: 26ch; padding-right: 12px; }
.clauses li:last-child { max-width: none; } .clauses li:last-child { max-width: 34ch; }
@media (max-width: 760px) {
  .how h2 { font-size: clamp(32px, 9vw, 48px); margin: 0 auto 28px; text-align: center; }
  .bar { flex-direction: column; height: auto; }
  .seg { min-height: 72px; flex-basis: auto; gap: 8px; } .s3 { min-height: 220px; }
  .dur { font-size: 22px; } .seg .cl { display: block; font: 400 16px/1.45 var(--text); }
  .clauses { display: none; }
}

/* the close: one copper card, the first lesson's bench inside it */
.act { margin-bottom: clamp(96px, 14vh, 160px); max-width: 1680px; margin-left: auto; margin-right: auto; }
.act .card { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 12px; padding: 12px; border-radius: calc(var(--r) + 8px); background: var(--copper); color: var(--dark); }
.mid { padding: clamp(28px, 4vw, 56px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 16px; }
.mid h2 { font-size: var(--l); letter-spacing: -.03em; line-height: 1; }
.mid p { margin: 0; font-size: 18px; max-width: 46ch; }
.apic { display: block; border-radius: var(--r); overflow: hidden; background: var(--stage); min-height: 320px; }
.apic img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.25); transition: transform .8s var(--ease); }
.act .card:hover .apic img { transform: scale(1.35); }
@media (max-width: 899px) {
  .act .card { grid-template-columns: minmax(0, 1fr); padding: 10px; }
  .mid { align-items: center; text-align: center; padding: 28px 16px 20px; } .mid h2 { font-size: clamp(30px, 8.4vw, 44px); }
  .apic { min-height: 0; aspect-ratio: 4 / 3; }
}

/* the footer: the name built from blocks */
.foot { background: var(--ground2); padding: 56px var(--m) 32px; }
.mark { display: flex; gap: 4px; align-items: flex-end; height: 34svh; min-height: 200px; text-decoration: none; }
.mark span { flex: 1; height: var(--h); display: flex; align-items: flex-end; justify-content: center; border-radius: 6px 6px 0 0; font: 700 min(12vw, 30svh)/.78 var(--display); color: var(--ground2); overflow: hidden; transition: height .5s var(--ease); }
.mark span:nth-child(4n+1) { background: var(--copper); } .mark span:nth-child(4n+2) { background: var(--mat); } .mark span:nth-child(4n+3) { background: var(--sand); } .mark span:nth-child(4n) { background: var(--amber); }
.mark:hover span { height: calc(var(--h) * .92 + 8%); }
.links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 56px; }
.links nav { display: grid; gap: 4px; align-content: start; }
.links a { font-size: var(--xs); text-decoration: none; min-height: 32px; display: flex; align-items: center; }
.links a:hover { color: var(--copper); }
.last { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 48px; flex-wrap: wrap; }
.last p { margin: 0; font-size: var(--xs); color: var(--muted); max-width: 52ch; }
@media (max-width: 760px) { .mark { height: 22svh; min-height: 140px; } .mark span { font-size: 13vw; } .links { grid-template-columns: 1fr 1fr; } }

/* entrances: the parts of each section rise in turn (only once the script is running) */
.js .rise, .js .item, .js .tile, .js .seg, .js .clauses li, .js .act .card { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease) var(--d, 0ms), transform .7s var(--ease) var(--d, 0ms); }
.js .seg { transform: scaleX(.2); } .js .in.seg { transform: none; }
.js .in { opacity: 1 !important; transform: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rise, .js .item, .js .tile, .js .seg, .js .clauses li, .js .act .card { opacity: 1; transform: none; transition: none; }
  .flow, .trace .w i, .board.run .blink { animation: none; }
  .ly, .ring { transition: none; }
}

/* the films: one screen, the ten films as a playlist under it */
.films { padding-bottom: clamp(96px, 14vh, 160px); }
.screen { position: relative; border-radius: var(--r); overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.screen video { width: 100%; height: 100%; display: block; background: #000; }
.now { position: absolute; top: 16px; left: 16px; padding: 10px 14px; border-radius: 14px; background: rgba(11, 33, 27, .86); color: #EEF3EE; pointer-events: none; transition: opacity .3s; }
.now span { display: block; font-size: 12px; color: #A9C0B5; } .now b { font: 600 16px var(--display); }
.screen.playing .now { opacity: 0; }
.reels { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.reels button { width: 100%; display: grid; gap: 10px; background: none; border: 0; padding: 0; color: var(--ink); cursor: pointer; text-align: left; font: 600 15px/1.25 var(--display); }
.reels .po { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; outline: 4px solid transparent; outline-offset: -4px; transition: outline-color .2s, transform .25s var(--ease); }
.reels img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.reels .no, .reels .tm { position: absolute; bottom: 8px; padding: 3px 8px; border-radius: 999px; font: 600 12px var(--display); background: rgba(11, 33, 27, .86); color: #EEF3EE; }
.reels .no { left: 8px; } .reels .tm { right: 8px; }
.reels button:hover .po { transform: translateY(-3px); } .reels button:hover img { transform: scale(1.06); }
.reels button[aria-pressed="true"] .po { outline-color: var(--copper); }
.reels button[aria-pressed="true"] b { color: var(--copper); }
@media (max-width: 899px) {
  .now { top: 10px; left: 10px; padding: 7px 10px; } .now b { font-size: 14px; }
  .reels { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 58%; overflow-x: auto; scroll-snap-type: x mandatory; margin: 14px calc(var(--m) * -1) 0; padding: 0 var(--m); scroll-padding: 0 var(--m); scrollbar-width: none; }
  .reels::-webkit-scrollbar { display: none; }
  .reels li { scroll-snap-align: start; }
  .films .nav { display: flex; }
}
.fside { display: grid; gap: 16px; justify-items: start; } .fside p { margin: 0; max-width: 40ch; color: var(--muted); }
@media (max-width: 899px) { .fside { justify-items: center; } }
.nw { white-space: nowrap; }
