:root {
  --bg: #000;
  --text: #f0f0f0;
  --head: rgba(252, 253, 255, .94);
  --muted: #a1a4a5;
  --faint: #6b6f71;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --surface: rgba(255, 255, 255, .03);
  --surface-2: rgba(255, 255, 255, .06);
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --title-fill: linear-gradient(to right bottom, #fff 30%, rgba(255, 255, 255, .5));
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg, canvas { display: block; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, pre { margin: 0; padding: 0; }
ul, ol { list-style: none; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1100px, 100%); margin-inline: auto; padding-inline: 24px; }

/* Nav */
.nav { position: fixed; inset: 0 0 auto; z-index: 20; border-bottom: 1px solid transparent; transition: background .25s, border-color .25s; }
.nav.stuck { background: rgba(0, 0, 0, .72); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-color: var(--line); }
.nav-in { display: flex; align-items: center; gap: 24px; height: 64px; width: min(1200px, 100%); margin-inline: auto; padding-inline: 24px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font: 400 25px/1 var(--serif); letter-spacing: .005em; color: #fff; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { padding: 4px 14px; font-size: 14px; font-weight: 500; color: var(--muted); transition: color .15s; }
.nav-links a:hover { color: #fff; }
.nav-cta { margin-left: 8px; }
.nav-toggle { display: none; width: 40px; height: 40px; margin-left: auto; position: relative; }
.nav-toggle span { position: absolute; left: 10px; right: 10px; height: 1.5px; background: var(--muted); transition: transform .2s; }
.nav-toggle span:first-child { top: 16px; }
.nav-toggle span:last-child { top: 23px; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 20px; border-radius: 16px; border: 2px solid rgba(255, 255, 255, .06); background: linear-gradient(104deg, rgba(253, 253, 253, .05) 5%, rgba(240, 240, 228, .1) 100%); color: #fff; font-size: 15px; font-weight: 600; white-space: nowrap; transition: background .2s, border-color .2s; }
.btn:hover { background: linear-gradient(104deg, rgba(253, 253, 253, .1) 5%, rgba(240, 240, 228, .18) 100%); border-color: rgba(255, 255, 255, .12); }
.btn-sm { height: 36px; padding: 0 14px; border-radius: 12px; font-size: 14px; }
.btn-ghost { display: inline-flex; align-items: center; height: 48px; padding: 0 20px; color: var(--muted); font-size: 15px; font-weight: 600; transition: color .15s; }
.btn-ghost:hover { color: #fff; }
.chev { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: .7; flex: none; }

/* Type */
.display { font: 400 clamp(64px, 9.4vw, 112px)/.98 var(--serif); letter-spacing: -.01em; padding-bottom: .14em; background: var(--title-fill); -webkit-background-clip: text; background-clip: text; color: transparent; }
.h2 { font: 400 clamp(38px, 5.4vw, 56px)/1.14 var(--sans); letter-spacing: -.05em; padding-bottom: .05em; background: var(--title-fill); -webkit-background-clip: text; background-clip: text; color: transparent; }
.h2 .tint { background: linear-gradient(to right, #d6c9ff, #9d8cf5); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Hero */
.hero { position: relative; min-height: min(100vh, 860px); display: flex; align-items: center; padding: 112px 0 72px; overflow: hidden; }
.hero-beam { position: absolute; inset: -20% -10% auto 25%; height: 90%; background: linear-gradient(112deg, transparent 38%, rgba(255, 255, 255, .055) 50%, transparent 62%); filter: blur(30px); pointer-events: none; }
.hero-visual { position: absolute; top: 50%; right: max(-90px, calc(50vw - 840px)); width: min(60vw, 820px); aspect-ratio: 1; transform: translateY(-50%); background: radial-gradient(circle, #000 18%, rgba(255, 255, 255, .14) 23%, rgba(255, 255, 255, .03) 42%, transparent 62%); -webkit-mask-image: radial-gradient(circle, #000 52%, transparent 72%); mask-image: radial-gradient(circle, #000 52%, transparent 72%); }
.hero-visual canvas { width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s; }
.hero-visual canvas.on { opacity: 1; }
.hero-copy { position: relative; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .05); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font-size: 13px; font-weight: 500; transition: background .2s; }
.pill:hover { background: rgba(255, 255, 255, .1); }
.hero h1 { margin-top: 22px; max-width: 8.5em; }
.lede { max-width: 28em; margin-top: 10px; font-size: 18px; line-height: 1.5; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }

/* Stack strip */
.stack { padding-block: 48px 40px; text-align: center; }
.stack p { color: var(--muted); }
.stack ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 36px; margin-top: 28px; }
.stack li { font: 500 15px/1.4 var(--mono); letter-spacing: -.02em; color: #7d8183; }

/* Sections */
.sec { padding-block: 104px 24px; }
.sec-head { max-width: 760px; margin: 0 auto 52px; text-align: center; }
.sec-head .h2, .sec-head p { text-wrap: balance; }
.sec-head p { margin-top: 12px; font-size: 18px; color: var(--muted); }

/* Tool tabs */
.tiles { display: flex; justify-content: center; gap: 12px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 104px; font-size: 14px; font-weight: 500; color: var(--muted); transition: color .15s; }
.tile-ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; border: 1px solid var(--line-2); background: var(--surface); transition: background .2s, border-color .2s, box-shadow .2s; }
.tile svg, .row svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.tile:hover { color: #fff; }
.tile[aria-selected="true"] { color: #fff; }
.tile[aria-selected="true"] .tile-ico { background: var(--surface-2); border-color: rgba(255, 255, 255, .42); box-shadow: 0 0 22px rgba(190, 175, 255, .18); }

.panel { position: relative; margin-top: 32px; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .012)); overflow: hidden; }
.tool { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px; padding: 32px; align-items: center; animation: fade .35s var(--ease); }
.tool[hidden], .sys[hidden] { display: none; }
.tool h3, .card h3, .repo h3 { font: 400 20px/1.3 var(--sans); letter-spacing: -.01em; color: var(--head); }
.tool-text > p:not(.links) { margin-top: 8px; font-size: 15px; color: var(--muted); }
.links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: 14px; font-weight: 500; }
.links a { color: #fff; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; transition: text-decoration-color .15s; }
.links a:hover { text-decoration-color: #fff; }

.code { margin-top: 20px; padding: 14px 0; border-radius: 14px; border: 1px solid var(--line); background: rgba(0, 0, 0, .55); font: 400 13px/1.7 var(--mono); color: #d4d6d8; overflow-x: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent; }
.code code { display: block; counter-reset: ln; min-width: max-content; white-space: normal; }
.code .l { display: block; padding-right: 16px; white-space: pre; counter-increment: ln; }
.code .l::before { content: counter(ln); display: inline-block; width: 40px; padding-right: 16px; text-align: right; color: #4c5052; }
.code i { font-style: normal; color: #6e7375; }
.code b { font-weight: 400; color: #c9bcff; }
.code em { font-style: normal; color: #fff; font-weight: 500; }

.shot { border-radius: 12px; overflow: hidden; border: 1px solid var(--line-2); box-shadow: 0 24px 60px rgba(0, 0, 0, .7); }
.shot img { width: 100%; }

.stat-card { padding: 28px; border-radius: 16px; border: 1px solid var(--line); background: rgba(0, 0, 0, .4); }
.stat-card strong { display: block; font: 400 clamp(52px, 7vw, 76px)/1 var(--serif); padding-bottom: .08em; background: var(--title-fill); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-card > span { display: block; margin-top: 6px; color: var(--muted); }
.stat-card hr { margin: 22px 0 14px; border: 0; border-top: 1px solid var(--line); }
.stat-card dl > div { display: flex; justify-content: space-between; gap: 18px; padding-block: 7px; font-size: 14px; }
.stat-card dt { color: var(--faint); }
.stat-card dd { color: #d4d6d8; text-align: right; }

/* Worlds */
.bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 500px; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .01)); overflow: hidden; }
.card-copy { position: relative; padding: 28px 30px 30px; }
.card-copy p { margin-top: 6px; max-width: 34em; font-size: 15px; color: var(--muted); }
.card-wide { grid-column: 1 / -1; min-height: 560px; justify-content: flex-start; }
.card-wide .card-copy { z-index: 1; max-width: 480px; }
.img-nyc { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; -webkit-mask-image: linear-gradient(115deg, transparent 6%, rgba(0, 0, 0, .45) 30%, #000 56%); mask-image: linear-gradient(115deg, transparent 6%, rgba(0, 0, 0, .45) 30%, #000 56%); transition: transform 1.4s var(--ease); }
.card-wide:hover .img-nyc { transform: scale(1.025); }
.img-earth { width: 74%; margin: 34px auto 0; filter: drop-shadow(0 28px 44px rgba(90, 170, 130, .13)); transition: transform 1.2s var(--ease); }
.card:hover .img-earth { transform: translateY(-6px); }
.img-caldera { width: 100%; aspect-ratio: 1100 / 790; object-fit: cover; -webkit-mask-image: radial-gradient(ellipse 56% 56% at 50% 50%, #000 55%, transparent 100%); mask-image: radial-gradient(ellipse 56% 56% at 50% 50%, #000 55%, transparent 100%); }

/* Systems */
.systems { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 16px; align-items: stretch; }
.rows { display: flex; flex-direction: column; gap: 12px; }
.row { flex: 1; display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 14px 22px; border: 1px solid var(--line-2); border-radius: 18px; background: var(--surface); text-align: left; font: 400 18px/1.3 var(--sans); letter-spacing: -.02em; color: var(--muted); transition: background .2s, color .2s, border-color .2s; }
.row:hover { color: #fff; background: var(--surface-2); }
.row[aria-selected="true"] { color: #fff; background: var(--surface-2); border-color: rgba(255, 255, 255, .34); }
.row[aria-selected="true"] svg { color: #c9bcff; }
.sys-panels { border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .012)); }
.sys { display: flex; flex-direction: column; justify-content: center; height: 100%; padding: 30px; min-height: 340px; animation: fade .35s var(--ease); }
.sys > p { color: var(--muted); font-size: 15px; }
.sys code { font: 400 13px var(--mono); color: #d4d6d8; overflow-wrap: anywhere; }
.flow { display: flex; align-items: stretch; gap: 26px; margin-top: 28px; flex-wrap: wrap; }
.flow li { position: relative; flex: 1 1 110px; display: grid; place-items: center; min-height: 66px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; background: rgba(0, 0, 0, .5); font: 400 12.5px/1.35 var(--mono); text-align: center; color: #d4d6d8; }
.flow li:not(:last-child)::after { content: ""; position: absolute; left: 100%; top: 50%; width: 26px; height: 1px; background: linear-gradient(90deg, var(--line-2), rgba(201, 188, 255, .75)); }
.flow-main { border-color: rgba(201, 188, 255, .55) !important; color: #fff !important; box-shadow: 0 0 26px rgba(170, 150, 255, .16); }
.flow-split { display: flex !important; flex-direction: column; gap: 5px; align-items: stretch; flex: 1 1 100%; }
.flow-split span { padding: 4px 2px; border-radius: 6px; background: var(--surface-2); }
.note { margin-top: 20px; font-size: 14px !important; }
.site-list { margin-top: 22px; border-top: 1px solid var(--line); }
.site-list a { display: block; padding: 16px 2px; border-bottom: 1px solid var(--line); transition: padding .2s var(--ease); }
.site-list a:hover { padding-left: 8px; }
.site-list strong { display: block; font-weight: 500; color: #fff; }
.site-list span { font-size: 14px; color: var(--muted); }

/* Repos */
.repos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.repo { display: flex; flex-direction: column; padding: 26px; min-height: 210px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); transition: border-color .2s, background .2s; }
.repo:hover { border-color: var(--line-2); background: var(--surface-2); }
.repo h3 { font-family: var(--mono); font-size: 16px; letter-spacing: -.03em; }
.repo p { margin-top: 10px; font-size: 15px; color: var(--muted); }
.repo span { margin-top: auto; padding-top: 18px; font: 400 12.5px var(--mono); color: var(--faint); }

/* CTA */
.cta { position: relative; margin-top: 88px; padding-block: 100px 96px; text-align: center; overflow: hidden; }
.cta-glow { position: absolute; left: 50%; top: 0; width: min(900px, 120vw); height: 260px; transform: translate(-50%, -62%); background: radial-gradient(ellipse at center, rgba(255, 255, 255, .17), transparent 68%); filter: blur(10px); pointer-events: none; }
.cta-title { font-size: clamp(72px, 12vw, 136px); }
.btn-wide { width: min(760px, 100%); margin-top: 28px; height: 56px; }

/* Footer */
.foot { position: relative; padding-block: 60px 72px; }
.foot::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); }
.foot-in { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.fine { max-width: 34em; margin-top: 16px; font-size: 13px; color: var(--faint); }
.fine a { text-decoration: underline; text-underline-offset: 3px; }
.foot h4 { margin-bottom: 12px; font-size: 14px; font-weight: 500; color: #fff; }
.foot nav a { display: block; padding-block: 5px; font-size: 14px; color: var(--muted); transition: color .15s; }
.foot nav a:hover { color: #fff; }

/* Motion */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .tool, .sys { animation: none; }
  .img-nyc, .img-earth, .hero-visual canvas { transition: none; }
}

/* Tablet */
@media (max-width: 920px) {
  .tool { grid-template-columns: minmax(0, 1fr); padding: 24px; }
  .systems { grid-template-columns: minmax(0, 1fr); }
  .row { min-height: 62px; }
  .sys { min-height: 0; }
  .repos { grid-template-columns: minmax(0, 1fr); }
  .repo { min-height: 0; }
  .repo span { padding-top: 14px; }
}

/* Phone */
@media (max-width: 720px) {
  .wrap { padding-inline: 16px; }
  .nav-in { padding-inline: 16px; gap: 12px; }
  .nav-cta { margin-left: auto; }
  .nav-toggle { display: block; margin-left: 0; }
  .nav-links { position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; margin: 0; padding: 8px 16px 16px; background: rgba(0, 0, 0, .94); border-bottom: 1px solid var(--line); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
  .js .nav-links:not(.open) { display: none; }
  .nav-links a { padding: 12px 0; font-size: 16px; }

  .hero { display: block; min-height: 0; padding: calc(64px + 62vw) 0 48px; }
  .hero-visual { top: 32px; right: 50%; width: 118vw; max-width: 620px; transform: translateX(50%); }
  .hero-beam { inset: -10% -40% auto -10%; }
  .display { font-size: clamp(60px, 18vw, 92px); }
  .lede { font-size: 17px; }
  .hero-actions .btn { flex: 1; }

  .stack { padding-block: 32px; }
  .stack ul { gap: 10px 22px; }
  .stack li { font-size: 14px; }
  .sec { padding-block: 72px 16px; }
  .sec-head { margin-bottom: 36px; }
  .sec-head p { font-size: 16px; }

  .tiles { justify-content: flex-start; gap: 4px; margin-inline: -16px; padding: 4px 16px 8px; overflow-x: auto; scrollbar-width: none; }
  .tiles::-webkit-scrollbar { display: none; }
  .tile { flex: none; width: 92px; font-size: 13px; }
  .panel { margin-top: 18px; border-radius: 18px; }
  .tool { padding: 18px; gap: 22px; }
  .code { font-size: 12px; }
  .code .l::before { width: 30px; padding-right: 10px; }

  .bento { grid-template-columns: minmax(0, 1fr); }
  .card { min-height: 0; border-radius: 18px; }
  .card-copy { padding: 22px; }
  .card-wide { min-height: 0; }
  .card-wide .card-copy { max-width: none; }
  .img-nyc { position: relative; inset: auto; order: 2; height: auto; aspect-ratio: 16 / 10; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%); mask-image: linear-gradient(180deg, transparent 0, #000 22%); }

  .sys { padding: 22px; }
  .flow { flex-direction: column; gap: 18px; }
  .flow li { flex: none; min-height: 48px; }
  .flow li:not(:last-child)::after { left: 50%; top: 100%; width: 1px; height: 18px; background: linear-gradient(180deg, var(--line-2), rgba(201, 188, 255, .75)); }

  .cta { margin-top: 56px; padding-block: 72px; }
  .foot-in { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-in > div { grid-column: 1 / -1; }
}
