/* Murmur — charcoal ground, pearl points, one electric blue. Manrope (statements) + Fragment Mono (readouts).
   The colour and font tokens below are defaults; murmur.js overwrites them from content.js at load. */
@font-face { font-family: 'Manrope'; src: url('fonts/Manrope-Variable-Latin.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Fragment Mono'; src: url('fonts/FragmentMono-Regular-Latin.woff2') format('woff2'); font-weight: 400; font-display: swap; }

:root {
  --ground: #101114; --pearl: #f2f0ea; --pearl-2: rgba(242,240,234,.62); --pearl-3: rgba(242,240,234,.34); --blue: #3370ff; --rule: rgba(242,240,234,.16);
  --blue-soft: rgba(51,112,255,.14); --blue-glow: rgba(51,112,255,.5);
  --sans: 'Manrope', 'Helvetica Neue', Arial, sans-serif; --mono: 'Fragment Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --pad: clamp(18px, 3vw, 44px);
}
* { box-sizing: border-box; }
html { background: var(--ground); color: var(--pearl); scroll-behavior: auto; }
body { margin: 0; font-family: var(--sans); font-weight: 300; line-height: 1.4; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--blue); color: #fff; }
:focus-visible { outline: 1px dotted var(--blue); outline-offset: 3px; }

/* the flock, and the poster it paints over */
#poster { position: fixed; inset: 0; z-index: 0; background: var(--ground) center / cover no-repeat; }
#poster.painted { background-image: none !important; }
#flock { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .5s ease; }
#poster.painted #flock { opacity: 1; }

/* the hand in the flock: a soft ring showing the field's radius */
#hand { position: fixed; left: 0; top: 0; z-index: 5; width: calc(var(--r, 120px) * 2); height: calc(var(--r, 120px) * 2); margin: calc(var(--r, 120px) * -1) 0 0 calc(var(--r, 120px) * -1); border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(circle, transparent 62%, var(--blue-soft) 78%, var(--blue-soft) 88%, transparent 100%); }
#hand::before { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 1px dotted var(--pearl-2); }
#hand::after { content: ''; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%; background: var(--blue); }
#hand.on { opacity: 1; }
#hand.pulse::before { animation: pulse .42s ease-out; }
@keyframes pulse { from { transform: scale(.55); border-color: var(--blue); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
@media (pointer: coarse) { #hand { display: none; } }

/* header: brand mark, chapter nav, one ring button */
.top { position: fixed; z-index: 6; inset: 0 0 auto 0; display: flex; align-items: center; gap: 28px; padding: 18px var(--pad); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 15px; letter-spacing: .01em; }
.brand .mark { width: 22px; height: 22px; color: var(--pearl); }
.chapters { display: flex; gap: 22px; margin-left: 12px; font-family: var(--mono); font-size: 11.5px; color: var(--pearl-2); }
.chapters a { display: inline-flex; gap: 7px; align-items: baseline; padding-bottom: 2px; border-bottom: 1px dotted transparent; transition: color .25s, border-color .25s; }
.chapters a small { font-size: 10px; color: var(--pearl-3); }
.chapters a:hover, .chapters a:focus-visible { color: var(--pearl); border-bottom-color: var(--pearl-3); outline: none; }
.top-cta { margin-left: auto; }

/* ring buttons: a ring of particles that tightens on hover */
.ring { position: relative; display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 26px; font-family: var(--mono); font-size: 12px; letter-spacing: .02em; color: var(--pearl); white-space: nowrap; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ring ellipse { fill: none; stroke: var(--pearl-2); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 0.01 6.2; vector-effect: non-scaling-stroke; transition: rx .35s cubic-bezier(.2,.8,.2,1), ry .35s cubic-bezier(.2,.8,.2,1), stroke-dasharray .35s, stroke .25s; }
.ring:hover ellipse, .ring:focus-visible ellipse { rx: 92; ry: 18; stroke-dasharray: 0.01 3.4; stroke: var(--blue); }
.ring:active ellipse { rx: 88; ry: 16; }
.ring span { position: relative; }
.ring:focus-visible { outline: none; }

/* readouts: thin-rule text blocks with a dotted leader */
.ro { display: flex; align-items: baseline; gap: 10px; font-family: var(--mono); font-size: 11.5px; line-height: 1.5; padding: 5px 0; border-top: 1px solid var(--rule); color: var(--pearl-2); }
.ro:first-child { border-top: 0; }
.ro span { flex: none; color: var(--pearl-3); }
.ro i { flex: 1; min-width: 14px; height: 1px; align-self: center; margin-top: 1px; background-image: radial-gradient(circle, var(--pearl-3) .7px, transparent .9px); background-size: 4px 1px; background-repeat: repeat-x; }
.ro b { flex: 0 1 auto; min-width: 0; font-weight: 400; color: var(--pearl); text-align: right; max-width: 68%; }
a.ro { transition: color .25s; }
a.ro:hover b, a.ro:focus-visible b { color: var(--blue); }
a.ro:focus-visible { outline: none; }
a.ro:hover span { color: var(--pearl-2); }
.readouts { position: fixed; z-index: 6; left: var(--pad); top: 76px; width: 236px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 2px 0; }
.readouts .ro { padding: 3px 0; border-top: 0; }
.readouts .ro b { min-width: 0; }

/* scroll meter: a dotted rule down the right edge with a marker */
#meter { position: fixed; z-index: 6; right: calc(var(--pad) - 2px); top: 18vh; bottom: 18vh; width: 1px; background-image: radial-gradient(circle, var(--pearl-3) .7px, transparent .9px); background-size: 1px 6px; background-repeat: repeat-y; }
#meter i { position: absolute; left: -3px; top: calc(var(--p, 0) * 100%); width: 7px; height: 7px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 12px var(--blue-glow); transform: translateY(-50%); }

/* chapters: tall sections with a sticky stage; copy docks beside the formed shape and is readable only at the hold */
main { position: relative; z-index: 2; }
.ch { position: relative; }
#c1 { height: 210vh; }
#c2 { height: 420vh; }
#c3 { height: 300vh; }
#c4 { height: 330vh; }
.release { height: 70vh; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.dock { position: absolute; width: min(420px, 38vw); --hold: 0; opacity: var(--hold); transform: translateY(calc((1 - var(--hold)) * 14px)); pointer-events: none; }
.dock.held { pointer-events: auto; }
.dock-bl { left: var(--pad); bottom: calc(var(--pad) + 8px); }
.dock-bc { left: 50%; bottom: 26px; width: auto; transform: translateX(-50%); }
/* centred docks: the top never rises above the readouts panel (220px), and a dock taller than the stage scrolls inside itself */
.dock-r, .dock-l, .dock-roost { top: 50%; --lift: max(-50%, 220px - 50vh); transform: translateY(calc(var(--lift) + (1 - var(--hold)) * 14px)); max-height: calc(100vh - 240px); max-height: calc(100svh - 240px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-right: 2px; }
.dock-r { right: var(--pad); width: min(400px, 34vw); }
.dock-l { left: var(--pad); width: min(420px, 36vw); }
.kicker { margin: 0 0 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); }
.statement { margin: 0 0 22px; font-size: clamp(22px, 2.1vw, 30px); font-weight: 200; line-height: 1.22; letter-spacing: -.012em; text-wrap: balance; }
.statement em { font-style: normal; font-weight: 500; }
.statement.small { font-size: clamp(17px, 1.35vw, 20px); font-weight: 300; margin-bottom: 18px; }
.rule-block { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.rule-block .ro:first-child { border-top: 0; }
.hint { margin: 0; font-family: var(--mono); font-size: 11px; color: var(--pearl-3); display: flex; align-items: center; gap: 12px; }
.hint .arrow { width: 1px; height: 26px; background-image: radial-gradient(circle, var(--pearl-2) .7px, transparent .9px); background-size: 1px 5px; background-repeat: repeat-y; animation: drip 1.6s linear infinite; }
@keyframes drip { to { background-position: 0 10px; } }
.fine { margin: 10px 0 0; font-family: var(--mono); font-size: 11px; line-height: 1.5; color: var(--pearl-3); }

/* the one interaction: a frequency control drawn as a dotted leader with a ring thumb */
.interact label.ro { cursor: ew-resize; }
#freq { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; margin: 4px 0 6px; background: transparent; cursor: ew-resize; }
#freq::-webkit-slider-runnable-track { height: 1px; background-image: radial-gradient(circle, var(--pearl-2) .7px, transparent .9px); background-size: 4px 1px; background-repeat: repeat-x; }
#freq::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -6.5px; border-radius: 50%; border: 1.5px solid var(--blue); background: var(--ground); box-shadow: 0 0 0 4px var(--blue-soft), 0 0 14px var(--blue-glow); }
#freq::-moz-range-track { height: 1px; background: var(--pearl-3); }
#freq::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--blue); background: var(--ground); }
#freq:focus-visible { outline: none; }
#freq:focus-visible::-webkit-slider-thumb { background: var(--blue); }
#freq:focus-visible::-moz-range-thumb { background: var(--blue); }

/* the roost: the ending — dense publish list, the real actions, the colophon as a spectrogram legend */
.dock-roost { left: auto; right: var(--pad); width: min(820px, 58vw); }
.roost-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: start; }
.rule-block.dense .ro { padding: 4px 0; font-size: 11px; }
.rule-block.dense .ro b { max-width: 72%; }
.rule-block.dense .ro.more b { color: var(--blue); }
.actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 6px 0 2px; }
.colophon { margin-top: 34px; padding-bottom: 22px; }
.axis { position: relative; height: 84px; border-bottom: 1px solid var(--rule); }
.axis .ticks { position: absolute; left: 0; right: 0; bottom: -1px; height: 6px; background-image: repeating-linear-gradient(90deg, var(--pearl-3) 0 1px, transparent 1px 7.5%); }
.band { position: absolute; left: var(--x); bottom: 0; width: 1px; height: 100%; }
.band::before { content: ''; position: absolute; left: 0; bottom: 0; width: 1px; height: calc(100% - 28px); background-image: radial-gradient(circle, var(--pearl-3) .7px, transparent .9px); background-size: 1px 4px; background-repeat: repeat-y; }
.band b { position: absolute; left: 0; top: 0; font-family: var(--mono); font-size: 10px; font-weight: 400; color: var(--blue); white-space: nowrap; transform: translateX(-50%); }
.band em { position: absolute; left: 0; top: 14px; font-family: var(--mono); font-size: 10px; font-style: normal; color: var(--pearl-2); white-space: nowrap; transform: translateX(-50%); }
.band.alt b { top: 30px; } .band.alt em { top: 44px; }
.band.alt::before { height: calc(100% - 58px); }
.band.last em, .band.last b { transform: translateX(-100%); }
.band.first em, .band.first b { transform: translateX(-6%); }
.axis-lbl { position: absolute; bottom: -20px; font-family: var(--mono); font-size: 10px; color: var(--pearl-3); }
.axis-lbl.l { left: 0; } .axis-lbl.r { right: 0; }

.nojs { position: relative; z-index: 3; margin: 40vh var(--pad); font-family: var(--mono); font-size: 13px; }

/* the secondary page (publications.html): the same header, thin rules, no flock */
.page main.pub { max-width: 760px; margin: 0 auto; padding: 130px var(--pad) 120px; }
.page main.pub h1 { font-size: clamp(30px, 3.4vw, 46px); margin: 0 0 14px; }
.page main.pub > .statement.small { margin-bottom: 44px; color: var(--pearl-2); }
.pub-item { border-top: 1px solid var(--rule); padding: 18px 0 30px; scroll-margin-top: 90px; }
.pub-item .ro.head { border-top: 0; padding: 0 0 12px; }
.pub-item h2 { margin: 0 0 10px; font-size: clamp(21px, 1.9vw, 26px); font-weight: 500; letter-spacing: -.01em; }
.pub-item .statement.small { margin-bottom: 14px; }
.pub-item a.ro.ask { border-top: 0; padding: 0; }
.pub-item:last-child { border-bottom: 1px solid var(--rule); }
.pub-back { margin: 40px 0 0; }

/* no WebGL2 (or the context was lost): the formed states as still images, the copy readable at once */
.no-gl #poster, .no-gl #meter, .no-gl #hand { display: none; }
.no-gl main { z-index: auto; }
.no-gl .ch { height: auto !important; }
.no-gl .release { height: 12vh; }
.no-gl .stage { position: static; height: auto; overflow: visible; padding-top: 8vh; }
.no-gl .stage:first-of-type { padding-top: 0; }
.no-gl .dock, .no-gl .dock-r, .no-gl .dock-l, .no-gl .dock-bl, .no-gl .dock-roost { position: static; opacity: 1; transform: none; pointer-events: auto; width: min(760px, 100% - 2 * var(--pad)); margin: 0 auto 10vh; max-height: none; overflow: visible; }
.no-gl .dock-bc { display: none; }
.no-gl .still { display: block; margin: 0 auto 26px; width: 100%; max-width: 760px; }
.no-gl .still img { display: block; width: 100%; height: auto; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.no-gl .still figcaption { padding: 6px 0 0; font-family: var(--mono); font-size: 10px; color: var(--pearl-3); }
.no-gl #c1 .stage { padding-top: 140px; }
.no-gl .readouts { position: absolute; }
.no-gl .roost-grid { grid-template-columns: 1fr; gap: 26px; }

/* reduced motion: shapes render still per chapter; copy is readable at once; no arrival animation */
@media (prefers-reduced-motion: reduce) {
  .hint .arrow { animation: none; }
  .dock, .dock-r, .dock-l, .dock-roost { transition: none; }
  #flock { transition: none; }
  .ring ellipse { transition: none; }
  #hand { display: none; }
}

/* phone: the flock sits in the upper half, copy docks below it; fewer points, portrait targets */
@media (max-width: 720px) {
  :root { --pad: 18px; }
  .top { gap: 14px; padding: 14px var(--pad); }
  .chapters { gap: 12px; margin-left: 4px; }
  .chapters a span { display: none; }
  .chapters a small { font-size: 11px; color: var(--pearl-2); }
  .top-cta { height: 36px; padding: 0 18px; font-size: 11px; }
  .readouts { top: 64px; width: 200px; font-size: 10px; }
  .readouts .ro { font-size: 10px; padding: 2px 0; }
  .readouts .ro:nth-child(3), .readouts .ro:nth-child(5) { display: none; }
  #meter { top: 22vh; bottom: 22vh; right: 8px; }
  #c1 { height: 180vh; } #c2 { height: 360vh; } #c3 { height: 260vh; } #c4 { height: 300vh; } .release { height: 50vh; }
  .dock, .dock-r, .dock-l { left: var(--pad); right: var(--pad); top: auto; bottom: 22px; width: auto; transform: translateY(calc((1 - var(--hold)) * 12px)); max-height: calc(100vh - 110px); max-height: calc(100svh - 110px); overflow-y: auto; }
  .dock-bl { bottom: 22px; }
  .dock-bc { display: none; }
  .statement { font-size: 21px; margin-bottom: 14px; }
  .statement.small { font-size: 15px; }
  .rule-block .ro { padding: 3px 0; font-size: 10.5px; }
  .ro b { max-width: 60%; }
  .dock-roost { left: var(--pad); right: var(--pad); top: auto; bottom: 36px; width: auto; transform: translateY(calc((1 - var(--hold)) * 12px)); }
  .roost-grid { grid-template-columns: 1fr; gap: 10px; }
  .rule-block.dense .ro { padding: 2px 0; font-size: 10px; }
  .rule-block.dense .ro:nth-child(n+5):not(.more) { display: none; }
  .dock-roost .statement.small { display: none; }
  .dock-roost .kicker { margin-bottom: 6px; }
  .actions .ring { height: 38px; padding: 0 18px; font-size: 11px; }
  .colophon { margin-top: 16px; padding-bottom: 22px; }
  .axis { height: 64px; }
  .band em { display: none; }
  .band:nth-child(2) em, .band:nth-child(5) em { display: block; font-size: 9px; }
  .fine { display: none; }
  .page main.pub { padding-top: 96px; }
  .no-gl .dock, .no-gl .dock-r, .no-gl .dock-l, .no-gl .dock-bl, .no-gl .dock-roost { position: static; width: auto; margin: 0 var(--pad) 8vh; }
  .no-gl .readouts { display: none; }
  .no-gl .rule-block.dense .ro:nth-child(n+5) { display: flex; }
  .no-gl .fine { display: block; }
}
