@font-face {
  font-family: Inter;
  src: url("./assets/inter-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0e0e0e;
  --surface: #171717;
  --surface-hover: #252525;
  --ink: #f5f5f5;
  --muted: #b0b0b0;
  --rule: #373737;
  --accent: #fff;
  --button: #fff;
  --button-hover: #ddd;
  --button-ink: #101010;
  --scroll-thumb: #707070;
  --scroll-hover: #969696;
  --gutter: clamp(1rem, 3.5vw, 3.5rem);
  --section-gap: clamp(1.4rem, 3vw, 2.5rem);
  --ease: cubic-bezier(.22, .68, .34, 1);
  font: 16px/1.55 Inter, system-ui, sans-serif;
  font-optical-sizing: auto;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #fafafa;
  --surface: #fff;
  --surface-hover: #eaeaea;
  --ink: #141414;
  --muted: #575757;
  --rule: #d2d2d2;
  --accent: #111;
  --button: #111;
  --button-hover: #383838;
  --button-ink: #fff;
  --scroll-thumb: #757575;
  --scroll-hover: #555;
}

* { box-sizing: border-box; }
html { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) var(--bg); }
@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-track { background: var(--bg); }
  ::-webkit-scrollbar-thumb { border: 2px solid var(--bg); border-radius: 8px; background: var(--scroll-thumb); }
  ::-webkit-scrollbar-thumb:hover { background: var(--scroll-hover); }
}
body { margin: 0; background: var(--bg); color: var(--ink); font-size: clamp(.95rem, .91rem + .24vw, 1.1rem); }
a { color: var(--accent); text-underline-offset: .21em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
button { font: inherit; }
p, figure, dl { margin: 0; }
p + p { margin-top: .65em; }
img, video { display: block; max-width: 100%; height: auto; filter: grayscale(1); }
code, .eyebrow, .version, .quick-facts b { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
[id] { scroll-margin-top: 1.25rem; }
.skip { position: fixed; top: .5rem; left: .5rem; padding: .5rem; background: var(--surface); transform: translateY(-160%); }
.skip:focus { transform: none; z-index: 2; }

.page { width: min(100% - 2 * var(--gutter), 75rem); margin: 0 auto; }
.topbar, .project, .toolbar { display: flex; align-items: center; }
.topbar { min-height: clamp(3.5rem, 7vw, 4.25rem); justify-content: space-between; flex-wrap: wrap; gap: .35rem .75rem; padding-block: .3rem; border-bottom: 1px solid var(--rule); }
.project, .toolbar { gap: .75rem; }
.brand { display: flex; align-items: center; gap: .55rem; color: var(--ink); text-decoration: none; font-size: 1.05rem; font-weight: 670; letter-spacing: -.035em; }
.brand img { width: 30px; height: auto; }
.version { padding: .1rem .37rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 4px; color: var(--muted); font-size: .72rem; }
.toolbar a { color: var(--muted); font-size: .8rem; }
.mode { display: grid; place-items: center; width: 44px; height: 44px; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: 50%; padding: 0; cursor: pointer; }
.mode[hidden] { display: none; }
.mode:hover { background: var(--surface-hover); }
.mode svg { grid-area: 1 / 1; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; }
.mode-moon { opacity: 0; transform: rotate(-45deg) scale(.55); }
:root[data-theme="light"] .mode-moon { opacity: 1; transform: rotate(0) scale(1); }
:root[data-theme="light"] .mode-sun { opacity: 0; transform: rotate(55deg) scale(.55); }

main { min-width: 0; }
.intro { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); align-items: center; gap: clamp(1.25rem, 4.4vw, 4.25rem); padding: clamp(1.7rem, 5vw, 4.4rem) 0 var(--section-gap); }
.eyebrow { font-size: .72rem; letter-spacing: .075em; text-transform: uppercase; color: var(--accent); }
h1 { margin: .46rem 0 .75rem; font-size: clamp(2.4rem, 1.4rem + 3.65vw, 4.8rem); font-weight: 710; letter-spacing: -.065em; line-height: 1.01; text-wrap: balance; }
h1 span { display: block; color: var(--muted); }
.lead { max-width: 41ch; border-left: 2px solid var(--rule); padding-left: .8rem; color: var(--muted); }
.download { margin-top: 1.35rem; }
.download p { max-width: 49ch; margin-top: .47rem; font-size: .78rem; color: var(--muted); }
.download .primary { display: inline-flex; align-items: center; gap: .5rem; min-height: 50px; border-radius: 8px; padding: .65rem 1rem; color: var(--button-ink); background: var(--button); text-decoration: none; font-size: 1rem; font-weight: 720; }
.download .primary:hover { background: var(--button-hover); }
.app-preview .window { display: block; overflow: hidden; border: 1px solid #3a3a3a; border-radius: 10px; background: #171717; box-shadow: 0 12px 34px #0004; text-decoration: none; }
.app-preview .window:hover { box-shadow: 0 16px 39px #0006; }
.app-preview img { width: 100%; }
.window-bar { display: flex; align-items: center; gap: 5px; padding: 7px 10px; border-bottom: 1px solid #383838; background: #262626; color: #bbb; font: .66rem/1.35 ui-monospace, monospace; }
.window-bar i { width: 6px; height: 6px; border-radius: 50%; background: #707070; }
.window-bar i:first-child { background: #b8b8b8; }
.window-bar span { margin-left: auto; }
.app-preview figcaption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .2rem .8rem; padding-top: .55rem; color: var(--muted); font-size: .76rem; }

.quick-facts { display: flex; flex-wrap: wrap; gap: .3rem 1.35rem; padding: .55rem .75rem; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); font-size: .82rem; }
.quick-facts b { margin-right: .28rem; color: var(--accent); font-size: .71rem; text-transform: uppercase; }
.section-nav { display: flex; flex-wrap: wrap; gap: .25rem .5rem; margin-top: .7rem; padding-bottom: .55rem; border-bottom: 1px solid var(--rule); font-size: .81rem; }
.section-nav a { display: block; padding: .25rem .42rem; border-radius: 4px; color: var(--muted); text-decoration: none; }
.section-nav a:hover { color: var(--accent); background: var(--surface-hover); }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(22px, 4vw, 44px); }
.section { margin-top: var(--section-gap); min-width: 0; font-size: clamp(.88rem, .84rem + .22vw, 1rem); }
.section h2 { margin: 0 0 .8rem; padding-bottom: .42rem; border-bottom: 1px solid var(--rule); font-size: .92rem; font-weight: 680; letter-spacing: .035em; text-transform: uppercase; }
.section h3 { margin: 0 0 .3rem; font-size: .98rem; }
.section ol, .section ul { margin: .25rem 0 .7rem; padding-left: 1.45rem; }
.section li + li { margin-top: .35rem; }
.steps li::marker { color: var(--accent); font-family: ui-monospace, monospace; }
.note { color: var(--muted); font-size: .8rem; }
.checksum code { overflow-wrap: anywhere; }
.features div { display: grid; grid-template-columns: minmax(96px, .45fr) 1fr; gap: .6rem; padding: .35rem 0; }
.features div + div { border-top: 1px solid var(--rule); }
.features dt { font-weight: 650; }
.features dd, .specs dd { margin: 0; color: var(--muted); }
.specs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.specs div { padding: .6rem .7rem; border: 1px solid var(--rule); border-radius: 5px; background: var(--surface); }
.specs dt { color: var(--accent); font-size: .73rem; font-weight: 650; }
.specs dd { margin-top: .15rem; }
table { width: 100%; border-collapse: collapse; margin-bottom: .65rem; font-size: .84rem; }
caption { text-align: left; color: var(--muted); margin: 0 0 .35rem; font-size: .8rem; }
th, td { border-bottom: 1px solid var(--rule); padding: .36rem .5rem; text-align: left; vertical-align: top; }
thead { background: var(--surface); }
details { padding: .35rem 0; }
details > p { padding: .35rem .2rem .25rem 1rem; color: var(--muted); }
summary { cursor: pointer; color: var(--accent); }
summary:hover { text-decoration: underline; }
.faq details { border-bottom: 1px solid var(--rule); }
.demo { display: grid; grid-template-columns: minmax(0, .85fr) 1fr; gap: 18px; align-items: center; }
.demo video { width: 100%; background: #171717; border: 1px solid var(--rule); border-radius: 7px; }
.footer { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: space-between; margin-top: 27px; padding: .8rem 0 1.35rem; color: var(--muted); border-top: 1px solid var(--rule); font-size: .77rem; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .intro-copy { animation: arrive .5s var(--ease) both; }
  .app-preview { animation: arrive .56s .08s var(--ease) both; }
  .mode, .section-nav a { transition: background-color .16s, color .16s; }
  .mode svg { transition: opacity .2s ease, transform .36s var(--ease); }
  .app-preview .window, .download .primary { transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s ease; }
  .app-preview .window:hover { transform: translateY(-3px); }
  .download .primary:hover { transform: translateY(-2px); }
  .download .primary:active { transform: translateY(0); }
  details[open] > p { animation: arrive .2s var(--ease) both; }
}
@keyframes arrive {
  from { opacity: .35; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 780px) {
  .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .project, .toolbar { gap: .46rem; }
  .intro, .split, .demo { grid-template-columns: minmax(0, 1fr); }
  .split { gap: 0; }
  h1 { font-size: clamp(2.4rem, 1.25rem + 5.8vw, 3.7rem); }
  .lead { max-width: none; }
  .demo { gap: .65rem; }
}
