/* Vivarium: the landing page. One file, no frameworks, no web fonts (the site sends nothing from other origins). */
:root {
  --bg: #05080a; --bg2: #080d10; --ink: #e9f3ef; --soft: #b4c6bf; --mute: #7f958d; --line: rgba(233, 243, 239, .09); --line2: rgba(233, 243, 239, .16);
  --acc: #4fffd0; --acc2: #ffc46b; --acc-dim: rgba(79, 255, 208, .14);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "Hoefler Text", Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
  --w: 1180px; --pad: clamp(20px, 4vw, 48px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}
* { box-sizing: border-box }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.62 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden }
::selection { background: var(--acc); color: #02110c }
a { color: inherit; text-decoration: none }
p a, li a { color: var(--acc); border-bottom: 1px solid var(--acc-dim); transition: border-color .2s }
p a:hover, li a:hover { border-color: var(--acc) }
i, em { font-style: italic }
sub { font-size: .7em }
.wrap { width: min(var(--w), 100% - 2 * var(--pad)); margin-inline: auto }
.wrap.narrow { width: min(860px, 100% - 2 * var(--pad)) }
.mono { font-family: var(--mono) }

/* a fine grain over everything, and the reading line at the top */
.grain { position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: .055; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") }
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60; background: transparent }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--acc), var(--acc2)); box-shadow: 0 0 12px var(--acc) }

/* ---------- navigation ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 40; display: flex; align-items: center; gap: 28px; padding: 16px var(--pad); transition: background .35s, border-color .35s, padding .35s var(--ease); border-bottom: 1px solid transparent }
.nav.solid { background: rgba(5, 8, 10, .72); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-color: var(--line); padding-block: 11px }
.brand { display: inline-flex; align-items: center; gap: 11px; font: 600 13px/1 var(--mono); letter-spacing: .34em; color: var(--acc) }
.nav nav { display: flex; gap: 26px; margin-left: auto; font-size: 13.5px; color: var(--soft) }
.nav nav a { position: relative; padding: 6px 0; transition: color .2s }
.nav nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--acc); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease) }
.nav nav a:hover, .nav nav a.on { color: var(--ink) }
.nav nav a:hover::after, .nav nav a.on::after { transform: scaleX(1) }

/* ---------- buttons ---------- */
.btn { --bx: 0px; --by: 0px; position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border-radius: 999px; font: 600 15px/1 var(--sans); letter-spacing: .01em; color: #02110c; background: var(--acc); transform: translate(var(--bx), var(--by)); transition: transform .25s var(--ease), box-shadow .3s, background .3s; white-space: nowrap; isolation: isolate }
.btn span { transition: transform .3s var(--ease) }
.btn:hover span { transform: translateX(4px) }
.btn.small { padding: 10px 17px; font-size: 13.5px }
.btn.big { padding: 19px 34px; font-size: 17px }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line2) }
.btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--acc); color: var(--acc) }
.btn.glow { box-shadow: 0 0 0 1px rgba(79, 255, 208, .5), 0 10px 40px -8px rgba(79, 255, 208, .55) }
.btn.glow::before { content: ""; position: absolute; inset: -2px; border-radius: inherit; z-index: -1; background: conic-gradient(from var(--spin, 0deg), transparent 0 55%, #fff 70%, var(--acc2) 80%, transparent 92%); animation: spin 3.2s linear infinite; opacity: .9; filter: blur(.4px);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); padding: 2px }
.btn.glow:hover { box-shadow: 0 0 0 1px rgba(79, 255, 208, .8), 0 14px 56px -6px rgba(79, 255, 208, .8) }
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg }
@keyframes spin { to { --spin: 360deg } }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding: 150px 0 34px; overflow: hidden; isolation: isolate }
#brain { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2 }
.hero-veil { position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(80% 75% at 71% 42%, transparent 0 48%, rgba(5, 8, 10, .5) 78%, var(--bg) 100%),
  linear-gradient(90deg, rgba(5, 8, 10, .82) 0, rgba(5, 8, 10, .35) 42%, transparent 60%),
  linear-gradient(180deg, rgba(5, 8, 10, .2) 0, transparent 24%, transparent 68%, var(--bg) 100%) }
.hero-inner { margin-bottom: clamp(40px, 9vh, 110px) }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; margin: 0 0 26px; font: 500 12px/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--soft) }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 0 rgba(79, 255, 208, .7); animation: beat 2.2s infinite }
@keyframes beat { 0% { box-shadow: 0 0 0 0 rgba(79, 255, 208, .65) } 70% { box-shadow: 0 0 0 12px rgba(79, 255, 208, 0) } 100% { box-shadow: 0 0 0 0 rgba(79, 255, 208, 0) } }
h1 { margin: 0; max-width: 15ch; font: 400 clamp(44px, 7.6vw, 104px)/.98 var(--serif); letter-spacing: -.022em; text-wrap: balance }
h1 em { color: var(--acc); font-style: italic; text-shadow: 0 0 46px rgba(79, 255, 208, .35) }
.lead { max-width: 60ch; margin: 30px 0 0; font-size: clamp(17px, 1.45vw, 20px); line-height: 1.6; color: var(--soft) }
.cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px }
.live { display: grid; grid-template-columns: repeat(6, 1fr); margin: 0; border-top: 1px solid var(--line2) }
.live div { padding: 20px 18px 6px 0; border-right: 1px solid var(--line) }
.live div:last-child { border-right: 0 }
.live div + div { padding-left: 18px }
.live dt { font: 500 11px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mute) }
.live dd { margin: 9px 0 0; font: 400 clamp(22px, 2.3vw, 31px)/1 var(--serif); font-variant-numeric: tabular-nums; color: var(--ink) }
.scroll-cue { position: absolute; right: var(--pad); bottom: 150px; width: 1px; height: 74px; background: var(--line2); overflow: hidden }
.scroll-cue span { position: absolute; inset: 0; background: var(--acc); transform: translateY(-100%); animation: drip 2.4s var(--ease) infinite }
@keyframes drip { to { transform: translateY(100%) } }

/* ---------- sections ---------- */
.band { position: relative; padding: clamp(84px, 12vw, 160px) 0; border-top: 1px solid var(--line) }
.band::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 50% at 12% 0, rgba(79, 255, 208, .045), transparent 70%) }
.band:nth-of-type(even)::before { background: radial-gradient(60% 50% at 88% 0, rgba(255, 196, 107, .04), transparent 70%) }
.sec-head { max-width: 900px; margin-bottom: clamp(38px, 5vw, 70px) }
.idx { display: inline-block; margin-bottom: 20px; font: 500 12px/1 var(--mono); letter-spacing: .2em; color: var(--acc) }
.idx::after { content: ""; display: inline-block; width: 46px; height: 1px; margin-left: 14px; vertical-align: middle; background: var(--acc); opacity: .5 }
h2 { margin: 0; font: 400 clamp(32px, 4.4vw, 58px)/1.06 var(--serif); letter-spacing: -.016em; text-wrap: balance }
.sub { margin: 22px 0 0; max-width: 64ch; color: var(--soft); font-size: 18px }
h3 { margin: 0 0 12px; font: 500 21px/1.25 var(--serif); letter-spacing: -.005em }

.live-idx { display: inline-flex; align-items: center; gap: 10px; text-transform: uppercase }
.now-grid { display: grid; grid-template-columns: .8fr 1.5fr 1fr; gap: clamp(22px, 3vw, 44px); align-items: stretch }
.clock { display: flex; flex-direction: column; padding: 26px 26px 22px; border: 1px solid var(--line2); border-radius: 18px; background: var(--bg2) }
.clock .time { font: 400 clamp(56px, 6.4vw, 88px)/.95 var(--serif); letter-spacing: -.02em; font-variant-numeric: tabular-nums }
.clock .when { margin-top: 14px; font: 500 12px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--acc) }
.clock .sky { margin-top: 8px; color: var(--soft); font-size: 15.5px }
.arc { position: relative; height: 54px; margin-top: auto; border-bottom: 1px solid var(--line2); overflow: hidden }
.arc::before { content: ""; position: absolute; left: 6%; right: 6%; top: 8px; height: 200%; border: 1px dashed var(--line2); border-radius: 50% }
.arc i { position: absolute; width: 12px; height: 12px; margin: -6px; border-radius: 50%; background: var(--acc2); box-shadow: 0 0 18px 4px rgba(255, 196, 107, .6); transition: left 2s linear, top 2s linear, background 2s, box-shadow 2s }
.arc i.moon { background: #cfd9ff; box-shadow: 0 0 14px 3px rgba(190, 205, 255, .45) }
.chart { margin: 0; padding: 20px 20px 14px; border: 1px solid var(--line2); border-radius: 18px; background: var(--bg2) }
.chart figcaption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 10px; font: 500 11.5px/1.4 var(--mono); letter-spacing: .06em; color: var(--mute) }
.chart canvas { display: block; width: 100%; height: auto }
.key i { display: inline-block; width: 14px; height: 2px; margin: 0 6px 3px 12px; vertical-align: middle }
.key i.a { background: var(--acc) } .key i.p { background: var(--acc2) }
.log { padding: 22px 24px; border: 1px solid var(--line2); border-radius: 18px; background: var(--bg2); display: flex; flex-direction: column }
.log h3 { font: 500 11.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--mute); margin-bottom: 14px }
.log ol { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; font-size: 14.5px; line-height: 1.45; color: var(--soft) }
.log ol li b { display: block; font: 500 11px/1.4 var(--mono); letter-spacing: .1em; color: var(--acc2) }
.tally { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: auto 0 0; padding-top: 16px; border-top: 1px solid var(--line) }
.tally dt { font: 500 10.5px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute) }
.tally dd { margin: 4px 0 0; font: 400 22px/1 var(--serif); font-variant-numeric: tabular-nums }
.rules { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line2) }
.rule { padding: 34px 34px 8px 0; border-right: 1px solid var(--line) }
.rule + .rule { padding-left: 34px }
.rule:last-child { border-right: 0 }
.rule h3 { font-size: 27px }
.rule p { margin: 0; color: var(--soft) }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden }
.card { --mx: 50%; --my: 0%; position: relative; display: flex; flex-direction: column; padding: 30px 26px 24px; background: var(--bg2); transition: background .35s }
.card::before { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .35s; pointer-events: none; background: radial-gradient(340px circle at var(--mx) var(--my), rgba(79, 255, 208, .13), transparent 62%) }
.card:hover::before { opacity: 1 }
.card svg { width: 38px; height: 38px; margin-bottom: 26px; fill: none; stroke: var(--acc); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s var(--ease) }
.card svg circle { fill: var(--bg2) }
.card:hover svg { transform: translateY(-3px) scale(1.06) }
.card p { margin: 0 0 22px; font-size: 15px; line-height: 1.58; color: var(--soft) }
.card footer { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); font: 500 11px/1.4 var(--mono); letter-spacing: .04em; color: var(--mute) }

.split { display: grid; grid-template-columns: 1.02fr 1fr; gap: clamp(34px, 6vw, 90px); align-items: start }
.split p { color: var(--soft) }
.checks { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 13px }
.checks li { position: relative; padding-left: 30px; color: var(--ink) }
.checks li::before { content: ""; position: absolute; left: 2px; top: .52em; width: 13px; height: 7px; border-left: 2px solid var(--acc); border-bottom: 2px solid var(--acc); transform: rotate(-45deg) }
.figures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 40px 0 0; border-top: 1px solid var(--line2) }
.figures div { padding: 18px 16px 0 0 }
.figures dt { font: 500 11px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mute) }
.figures dd { margin: 8px 0 0; font: 400 clamp(22px, 2.3vw, 32px)/1 var(--serif); font-variant-numeric: tabular-nums; white-space: nowrap }
.figures.tight dd { font-size: clamp(20px, 2vw, 27px) }

.scope { margin: 0; padding: 20px 20px 16px; border: 1px solid var(--line2); border-radius: 18px; background: linear-gradient(180deg, rgba(79, 255, 208, .05), rgba(8, 13, 16, .6) 40%), var(--bg2); box-shadow: 0 40px 90px -50px rgba(79, 255, 208, .35) }
.scope figcaption { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; font: 500 11.5px/1.4 var(--mono); letter-spacing: .06em; color: var(--mute) }
.scope figcaption .mono { color: var(--acc) }
.scope canvas { display: block; width: 100%; height: auto; border-radius: 8px; background: rgba(2, 6, 8, .7) }
.scope canvas + canvas { margin-top: 8px }
.consts { width: 100%; margin-top: 14px; border-collapse: collapse; font: 12.5px/1.3 var(--mono) }
.consts th { padding: 7px 0; text-align: left; font-weight: 400; color: var(--mute) }
.consts td { padding: 7px 14px 7px 0; color: var(--ink); text-align: right }
.consts tr + tr { border-top: 1px solid var(--line) }

.compute { display: grid; grid-template-columns: 1.2fr 1fr; gap: 26px clamp(30px, 5vw, 70px); padding: clamp(26px, 3.4vw, 44px); border: 1px solid var(--line2); border-radius: 20px; background: linear-gradient(135deg, rgba(79, 255, 208, .06), transparent 45%), var(--bg2) }
.meter-top { display: flex; justify-content: space-between; align-items: baseline; font: 500 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mute) }
.meter-top b { font: 400 clamp(30px, 3.6vw, 46px)/1 var(--serif); letter-spacing: 0; text-transform: none; color: var(--ink); font-variant-numeric: tabular-nums }
.bar { height: 6px; margin: 18px 0 10px; border-radius: 6px; background: rgba(233, 243, 239, .08); overflow: hidden }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--acc), var(--acc2)); box-shadow: 0 0 14px rgba(79, 255, 208, .7); transition: width 1.4s var(--ease) }
.meter-sub { display: flex; justify-content: space-between; font: 12.5px/1.3 var(--mono); color: var(--mute) }
.compute .figures { margin: 0; border: 0; grid-template-columns: 1fr 1fr; gap: 18px 0 }
.parts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 28px; padding-top: 22px; border-top: 1px solid var(--line) }
.part b { display: block; font: 500 13.5px/1.35 var(--sans); color: var(--ink) }
.part span { display: block; margin-top: 3px; font: 12px/1.3 var(--mono); color: var(--mute) }
.part .bar { height: 3px; margin: 9px 0 0 }
.part .bar i { transition: width 1.4s var(--ease) }
.part .bar i.once { background: rgba(233, 243, 239, .28); box-shadow: none; margin-top: -3px }
.feed { grid-column: 1 / -1; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: rgba(2, 6, 8, .55) }
.feed-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font: 500 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--mute) }
.feed ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font: 13px/1.4 var(--mono); color: var(--soft) }
.feed li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: feedin .6s var(--ease) }
.feed li:first-child { color: var(--acc) }
.feed li em { font-style: normal; color: var(--acc2) }
@keyframes feedin { from { opacity: 0; transform: translateY(-6px) } }
.compute .figures div { padding-top: 0 }
.fine { margin: 0; font-size: 14.5px; color: var(--mute) }
.compute .fine { grid-column: 1 / -1; max-width: 70ch }
.compute .cta { grid-column: 1 / -1; margin-top: 4px }

.limits { list-style: none; margin: 0; padding: 0; counter-reset: l; border-top: 1px solid var(--line2) }
.limits li { counter-increment: l; position: relative; padding: 24px 0 24px 70px; border-bottom: 1px solid var(--line); color: var(--soft) }
.limits li::before { content: counter(l, decimal-leading-zero); position: absolute; left: 0; top: 27px; font: 500 12px/1 var(--mono); letter-spacing: .14em; color: var(--acc2) }
.limits b { color: var(--ink); font-weight: 600 }

.table { border-top: 1px solid var(--line2); font-size: 15px }
.row { display: grid; grid-template-columns: 1.05fr 1.5fr 2fr; gap: 26px; padding: 17px 0; border-bottom: 1px solid var(--line); color: var(--soft); transition: background .25s, padding .25s var(--ease) }
.row:not(.head):hover { background: rgba(79, 255, 208, .035); padding-inline: 14px }
.row span:first-child { color: var(--ink) }
.row.head { font: 500 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--mute) }
.row.head span:first-child { color: var(--mute) }

.closing { position: relative; padding: clamp(100px, 15vw, 200px) 0; text-align: center; border-top: 1px solid var(--line); overflow: hidden }
.closing::before { content: ""; position: absolute; left: 50%; top: 58%; width: min(1100px, 130vw); aspect-ratio: 2 / 1; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(79, 255, 208, .16), transparent 70%); pointer-events: none }
.closing h2 { font-size: clamp(44px, 7vw, 96px) }
.closing p { margin: 20px 0 42px; color: var(--soft); font-size: 19px }

.foot { padding: 34px 0 46px; border-top: 1px solid var(--line); font-size: 14px; color: var(--mute) }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 34px }
.foot nav { display: flex; gap: 24px; color: var(--soft) }
.foot nav a:hover { color: var(--acc) }
.foot .fine { margin-left: auto }

/* ---------- arriving on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0ms) }
.reveal.in { opacity: 1; transform: none }

/* ---------- smaller screens ---------- */
@media (max-width: 1080px) {
  .cards { grid-template-columns: repeat(2, 1fr) }
  .now-grid { grid-template-columns: 1fr 1fr }
  .now-grid .chart { grid-column: 1 / -1; order: -1 }
  .nav nav { display: none }
  .nav .btn { margin-left: auto }
  .live { grid-template-columns: repeat(3, 1fr) }
  .live div:nth-child(3) { border-right: 0 }
  .live div:nth-child(n + 4) { border-top: 1px solid var(--line) }
  .live div:nth-child(4) { padding-left: 0 }
}
@media (max-width: 820px) {
  body { font-size: 16px }
  .rules, .split, .compute, .now-grid { grid-template-columns: 1fr }
  .parts { grid-template-columns: 1fr 1fr }
  .rule, .rule + .rule { padding: 26px 0 22px; border-right: 0; border-bottom: 1px solid var(--line) }
  .row { grid-template-columns: 1fr; gap: 5px }
  .row.head { display: none }
  .scroll-cue { display: none }
  .foot .fine { margin-left: 0 }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr }
  .live { grid-template-columns: repeat(2, 1fr) }
  .live div { padding-left: 0 !important; border-right: 0 }
  .live div:nth-child(n + 3) { border-top: 1px solid var(--line) }
  .figures { grid-template-columns: 1fr 1fr }
  .parts { grid-template-columns: 1fr }
  .limits li { padding-left: 46px }
  .hero { padding-top: 120px }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto }
  .reveal { opacity: 1; transform: none; transition: none }
  .btn.glow::before, .pulse, .scroll-cue span { animation: none }
}
/* on a narrow screen the brain lies behind the words: it is drawn fainter there */
@media (max-width: 820px) { #brain { opacity: .38 } }

/* what the hero's neurons are, said under the buttons */
.brain-cap{margin:18px 0 0;max-width:56ch;font:500 12.5px/1.5 var(--mono, ui-monospace, monospace);letter-spacing:.01em;color:rgba(126,224,200,.78);min-height:1.5em}
