:root {
  --bg: #08090a;
  --panel: #0f1011;
  --panel2: #161718;
  --line: rgba(255, 255, 255, .08);
  --line2: rgba(255, 255, 255, .14);
  --text: #f7f8f8;
  --muted: #9a9ea6;
  --brand: #ffa500;
  --ok: #4ade80;
  --ease: cubic-bezier(.2, .75, .2, 1);
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p a, .note a { color: var(--text); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 30; background: var(--text); color: var(--bg); padding: .4rem .8rem; border-radius: 8px; }
.skip:focus { left: 8px; }
.wrap { width: min(1152px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(768px, 100% - 40px); }
.center { text-align: center; }
.line { border-top: 1px solid var(--line); }

h1, h2, h3, h4 { font-weight: 500; margin: 0; }
h1 { font-size: clamp(2.4rem, 6.2vw, 4.5rem); line-height: 1.06; letter-spacing: -.035em; max-width: 18ch; margin: 0 auto; text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.12; letter-spacing: -.028em; text-wrap: balance; }
h3 { font-size: 1.05rem; letter-spacing: -.01em; }
.lede { color: var(--muted); font-size: clamp(1.02rem, 1.6vw, 1.2rem); max-width: 40rem; margin: 1.25rem auto 0; text-wrap: balance; }
.sub { color: var(--muted); font-size: 1.1rem; margin: 1rem 0 0; max-width: 36rem; }
.note { color: var(--muted); font-size: .85rem; margin: 1.5rem 0 0; }
code, kbd, pre { font-family: var(--mono); }
code { font-size: .88em; background: var(--panel2); padding: .1em .35em; border-radius: 4px; }
kbd { font-size: .8rem; display: inline-block; min-width: 1.7em; text-align: center; padding: .05em .4em; border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 5px; background: var(--panel2); color: var(--text); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; height: 44px; padding: 0 1.25rem; border-radius: 8px; font-size: .94rem; font-weight: 500; text-decoration: none; border: 1px solid transparent; transition: background-color .15s, border-color .15s; }
.btn.sm { height: 32px; padding: 0 .75rem; font-size: .82rem; }
.btn.solid { background: var(--text); color: var(--bg); }
.btn.solid:hover { background: #d8dadd; }
.btn.ghost { border-color: var(--line); background: rgba(255, 255, 255, .03); }
.btn.ghost:hover { border-color: var(--line2); background: rgba(255, 255, 255, .07); }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 2rem; }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(8, 9, 10, .78); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; gap: 2rem; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 600; text-decoration: none; }
.links { display: flex; gap: 1.5rem; font-size: .86rem; }
.links a, .foot a:not(.brand) { color: var(--muted); text-decoration: none; }
.links a:hover, .foot a:not(.brand):hover { color: var(--text); }
.nav-cta { margin-left: auto; display: flex; gap: .5rem; }

/* hero */
.hero { position: relative; isolation: isolate; padding: 4.5rem 0 0; overflow: hidden; }
.pill { display: inline-flex; align-items: center; gap: .6rem; margin-bottom: 1.75rem; padding: .3rem .9rem .3rem .35rem; border: 1px solid var(--line); border-radius: 99px; background: rgba(255, 255, 255, .03); font-size: .83rem; text-decoration: none; color: #d4d6d9; }
.pill:hover { border-color: var(--line2); }
.pill b { font-weight: 600; font-size: .74rem; color: var(--brand); background: rgba(255, 165, 0, .13); padding: .1rem .55rem; border-radius: 99px; }
.fine { color: var(--muted); font-size: .82rem; margin: .9rem 0 0; }

/* tabs */
.tabs { position: relative; display: flex; gap: 2px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); width: fit-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs button { position: relative; flex: none; font: 500 .85rem var(--sans); color: var(--muted); background: none; border: 0; border-radius: 8px; padding: .5rem .9rem; cursor: pointer; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { background: rgba(255, 255, 255, .09); color: var(--text); }
.playing button[aria-selected="true"]::after { content: ""; position: absolute; left: .9rem; right: .9rem; bottom: 2px; height: 2px; border-radius: 2px; background: var(--brand); transform-origin: left; animation: progress 6s linear forwards; }
@keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
[role="tabpanel"][hidden] { display: none !important; }
.showcase { margin-top: 3.5rem; padding-bottom: 5rem; }
.showcase .tabs { margin: 0 auto 1rem; }
.window { border: 1px solid var(--line2); border-radius: 14px; overflow: hidden; background: #000; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .9), 0 0 0 6px rgba(255, 255, 255, .025); }
.window-bar { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; background: var(--panel2); border-bottom: 1px solid var(--line); }
.window-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.window-bar i:nth-child(2) { background: #febc2e; }
.window-bar i:nth-child(3) { background: #28c840; }
.window-bar span { margin: 0 auto; transform: translateX(-27px); font: .75rem var(--mono); color: var(--muted); }
.window img { width: 100%; }

/* metrics */
.metrics { border-top: 1px solid var(--line); padding: 3.5rem 0; text-align: center; }
.eyebrow { color: var(--muted); font-size: .85rem; margin: 0 0 1.75rem; }
.metrics dl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin: 0; }
.metrics dl div { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.metrics dd { margin: 0; font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 500; letter-spacing: -.03em; }
.metrics dt { color: var(--muted); font-size: .85rem; }

/* sections */
.block { padding: 6rem 0; }
.loop { margin-top: 2.5rem; }
.loop .tabs { margin: 0 auto 2.5rem; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 3rem; align-items: center; }
.split h3 { font-size: 1.75rem; letter-spacing: -.02em; margin-bottom: .75rem; }
.split p { color: var(--muted); margin: 0 0 1.25rem; }
.keys { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
figure { margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
figure img { width: 100%; border-radius: 8px; border: 1px solid var(--line); }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; list-style: none; padding: 0; margin: 2.5rem auto 0; max-width: 54rem; }
.chips li { padding: .45rem .9rem; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); font-size: .86rem; color: #d4d6d9; }
.chips .more { color: var(--brand); border-color: rgba(255, 165, 0, .35); }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 3rem; }
.grid article { position: relative; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); overflow: hidden; transition: border-color .25s, transform .35s var(--ease), box-shadow .35s var(--ease); }
.grid article:hover { border-color: var(--line2); }
.grid img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: left top; border-bottom: 1px solid var(--line); background: #000; }
.grid h3 { padding: 1.15rem 1.25rem 0; }
.grid p { margin: 0; padding: .4rem 1.25rem 1.35rem; color: var(--muted); font-size: .9rem; }

.head2 { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: end; margin-bottom: 3rem; }
.head2 p { margin: 0; color: var(--muted); font-size: 1.1rem; }
.table-scroll { overflow-x: auto; overflow-y: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 560px; }
th, td { text-align: left; padding: .85rem 1.25rem; border-top: 1px solid var(--line); font-weight: 400; }
thead th { border-top: 0; color: var(--muted); font-size: .8rem; }
tbody th { color: var(--text); }
td { color: var(--muted); }
.on, .off { display: inline-flex; align-items: center; gap: .45rem; color: var(--text); }
.on::before, .off::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.off::before { background: #6b7079; }

.install { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 3.5rem; align-items: start; }
.tabs.stack { flex-direction: column; width: 100%; margin-top: 2rem; }
.tabs.stack button { text-align: left; padding: .75rem 1rem; font-size: .92rem; }
.code > div { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); overflow: hidden; }
.code > div + div { margin-top: 12px; }
.code pre { margin: 0; padding: 1.4rem; overflow-x: auto; font-size: .82rem; line-height: 1.8; }
.code pre code { background: none; padding: 0; font-size: 1em; }
.code .c { color: #7d828b; }
.code p { margin: 0; padding: 1rem 1.4rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.code .copy { float: right; margin: .7rem .7rem 0 0; font: 500 .75rem var(--sans); color: var(--muted); background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: .25rem .65rem; cursor: pointer; }
.code .copy:hover { color: var(--text); border-color: var(--line2); }

details { border-bottom: 1px solid var(--line); }
details:first-of-type { margin-top: 2.5rem; }
summary { display: flex; justify-content: space-between; gap: 1rem; padding: 1.1rem 0; cursor: pointer; font-weight: 500; font-size: .98rem; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); font-size: 1.2rem; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { margin: 0; padding-bottom: 1.25rem; color: var(--muted); }

.final { padding: 7rem 0; }
.final h2 { font-size: clamp(2.5rem, 6vw, 4.5rem); }

footer { padding: 4rem 0 2.5rem; }
.foot { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 2rem; }
.foot h4 { font-size: .82rem; font-weight: 600; margin-bottom: .9rem; }
.foot div:not(.about) a { display: block; font-size: .86rem; padding: .25rem 0; }
.about p { color: var(--muted); font-size: .86rem; max-width: 17rem; }
.legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes word { from { opacity: 0; transform: translateY(.35em); filter: blur(10px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes drift { from { transform: translate3d(-9%, -2%, 0) scale(1); } to { transform: translate3d(9%, 3%, 0) scale(1.15); } }
@keyframes breathe { from { opacity: .45; transform: scale(.92); } to { opacity: 1; transform: scale(1.08); } }
@keyframes panel-in { from { opacity: .25; transform: scale(1.018); filter: blur(5px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes press { 40% { transform: translateY(3px); border-bottom-width: 1px; border-color: var(--brand); color: var(--brand); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes sheen { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

/* hero: drifting glow, faint grid, staggered entrance */
.hero::before, .hero::after { content: ""; position: absolute; z-index: -1; pointer-events: none; }
.hero::before { inset: 0; background: linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 56px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 50% 0 / 56px 100%; opacity: .55; -webkit-mask-image: radial-gradient(46rem 30rem at 50% 0, #000, transparent 75%); mask-image: radial-gradient(46rem 30rem at 50% 0, #000, transparent 75%); }
.hero::after { left: 0; right: 0; top: 30%; height: 44rem; background: radial-gradient(34rem 17rem at 42% 50%, rgba(255, 165, 0, .17), transparent 70%), radial-gradient(28rem 15rem at 62% 56%, rgba(255, 106, 0, .11), transparent 70%); animation: drift 11s ease-in-out infinite alternate; }
.hero .pill, .hero .lede, .hero .cta, .hero .fine, .showcase { animation: rise .8s var(--ease) var(--d, 0s) both; }
.hero .lede { --d: .5s; }
.hero .cta { --d: .62s; }
.hero .fine { --d: .72s; }
.showcase { --d: .82s; }
h1 .w { display: inline-block; animation: word .85s var(--ease) calc(var(--i) * 75ms + .08s) both; }
h1 .last { position: relative; }
.caret { position: absolute; left: calc(100% + .1em); top: .16em; width: .09em; height: .86em; border-radius: 2px; background: var(--brand); animation: blink 1.1s step-end infinite; }
.pill { position: relative; overflow: hidden; }
.pill::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .12) 50%, transparent 65%); animation: sheen 4.5s ease-in-out 1.5s infinite both; }
.pill span { transition: transform .25s var(--ease); }
.pill:hover span { transform: translateX(4px); }
.btn { transition: background-color .15s, border-color .15s, transform .25s var(--ease), box-shadow .25s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn.solid:hover { box-shadow: 0 10px 28px -10px rgba(255, 255, 255, .45); }

/* tabs: sliding highlight and panel transitions */
.glider { position: absolute; left: 0; top: 0; border-radius: 8px; background: rgba(255, 255, 255, .09); pointer-events: none; }
.tabs button { transition: color .2s; }
.tabs.glide button[aria-selected="true"] { background: transparent; }
.tabs.moving .glider { transition: transform .4s var(--ease), width .4s var(--ease), height .4s var(--ease); }
.window { transform-origin: 50% 0; }
.showcase [role="tabpanel"]:not([hidden]) img { animation: panel-in .55s var(--ease) both; }
.split:not([hidden]) > div { animation: rise .55s var(--ease) both; }
.split:not([hidden]) > figure { animation: rise .65s var(--ease) .1s both; }
.split:not([hidden]) .keys kbd { animation: press .5s ease .55s; }
.split:not([hidden]) .keys kbd:nth-of-type(2) { animation-delay: .8s; }
.split:not([hidden]) .keys kbd:nth-of-type(3) { animation-delay: 1.05s; }
.split:not([hidden]) .keys kbd:nth-of-type(4) { animation-delay: 1.3s; }
.code > div:not([hidden]) { animation: rise .5s var(--ease) both; }
.typed.live { display: inline-block; min-width: 16ch; }
.typed.live::after { content: ""; display: inline-block; width: .55ch; height: 1.05em; margin-left: 1px; vertical-align: text-bottom; background: var(--brand); animation: blink 1.1s step-end infinite; }

/* scroll reveal (classes are added by main.js, so nothing is hidden without it) */
.reveal { opacity: 0; }
.reveal.in { animation: rise .75s var(--ease) var(--d, 0s) both; }
.metrics dd { font-variant-numeric: tabular-nums; }

/* resource marquee */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.marquee { margin-top: 2.5rem; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); }
.marquee .chips { flex-wrap: nowrap; justify-content: flex-start; gap: 0; width: max-content; max-width: none; margin: 0; padding: .35rem 0; animation: marquee 48s linear infinite; }
.marquee .chips:nth-child(2) { animation-direction: reverse; animation-duration: 56s; }
.marquee li { margin-right: .6rem; white-space: nowrap; transition: border-color .2s, color .2s; }
.marquee li:hover { border-color: var(--brand); color: var(--text); }
.marquee:hover .chips { animation-play-state: paused; }

/* cards: lift and a light that follows the pointer */
.grid article::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 165, 0, .14), transparent 70%); opacity: 0; transition: opacity .3s; }
.grid article:hover { transform: translateY(-5px); border-color: rgba(255, 165, 0, .35); box-shadow: 0 22px 44px -26px rgba(0, 0, 0, .9); }
.grid article:hover::after { opacity: 1; }
.grid img { transform-origin: 50% 0; transition: transform .5s var(--ease); }
.grid article:hover img { transform: scale(1.035); }
tbody tr { transition: background-color .2s; }
tbody tr:hover { background: rgba(255, 255, 255, .025); }
details[open] p { animation: rise .35s var(--ease) both; }
summary::after { transition: transform .25s var(--ease); }
details[open] summary::after { transform: rotate(180deg); }
.final { position: relative; isolation: isolate; overflow: hidden; }
.final::before { content: ""; position: absolute; z-index: -1; left: 0; right: 0; bottom: -12rem; height: 24rem; pointer-events: none; background: radial-gradient(32rem 12rem at 50% 50%, rgba(255, 165, 0, .2), transparent 70%); animation: breathe 5s ease-in-out infinite alternate; }

/* nav: reading progress and current section */
.nav { transition: background-color .25s, box-shadow .25s; }
.nav.scrolled { background: rgba(8, 9, 10, .9); box-shadow: 0 10px 30px -20px #000; }
.nav::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--brand); transform-origin: left; transform: scaleX(var(--read, 0)); }
.links a { position: relative; transition: color .2s; }
.links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--brand); transform: scaleX(0); transition: transform .3s var(--ease); }
.links a:hover::after, .links a.active::after { transform: scaleX(1); }
.links a.active { color: var(--text); }

@media (max-width: 900px) {
  .links { display: none; }
  .metrics dl { grid-template-columns: repeat(2, 1fr); }
  .split, .install, .head2 { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot { grid-template-columns: repeat(3, 1fr); }
  .about { grid-column: 1 / -1; }
  .block { padding: 4.5rem 0; }
}
@media (max-width: 600px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .foot { grid-template-columns: repeat(2, 1fr); }
  .nav-cta .ghost { display: none; }
  .showcase { padding-bottom: 3.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .btn:hover, .grid article:hover, .grid article:hover img { transform: none; }
}
