/* BTDOS - btdos.org */

/* Geist and Geist Mono (SIL Open Font License, fonts/OFL.txt), served from
   btdos.org itself so no visitor data goes to a font host */
@font-face { font-family: "Geist"; src: url("fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: light;
  --ground: #f5f6f8;
  --surface: #ffffff;
  --ink: #14161b;
  --muted: #5b616d;
  --rule: #dfe2e8;
  --accent: #5a5fd8;
  --sec-ground: #14161d;
  --sec-ink: #eceef3;
  --sec-muted: #9aa1b0;
  --sec-rule: #2a2e39;
  --lcd: #121722;
  --lcd-ink: #e8ecf4;
  --lcd-dim: #8c95a8;
  --lcd-blue: #6fa4ff;
  --lcd-green: #3fd07c;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #0e1015;
    --surface: #161920;
    --ink: #e9ebf0;
    --muted: #9aa1ae;
    --rule: #252932;
    --accent: #8b90ff;
    --sec-ground: #161922;
    --sec-rule: #2c3140;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #0e1015;
  --surface: #161920;
  --ink: #e9ebf0;
  --muted: #9aa1ae;
  --rule: #252932;
  --accent: #8b90ff;
  --sec-ground: #161922;
  --sec-rule: #2c3140;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
figure { margin: 0; }

.wrap { max-width: 1060px; margin: 0 auto; padding-inline: 24px; }
@media (max-width: 560px) { .wrap { padding-inline: 18px; } }

/* ---------------------------------------------------------------- header */
.site-head {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-head.scrolled { border-bottom-color: var(--rule); }
.site-head .wrap { display: flex; align-items: center; gap: 28px; padding-block: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 30px; height: 30px; }
.brand span { font-weight: 700; font-size: 19px; letter-spacing: 0.02em; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--ink); }
.status-pill {
  font: 500 12px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--rule); border-radius: 999px; padding: 8px 12px;
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
}
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: #e0a526; }
@media (max-width: 720px) {
  .nav { display: none; }
  .status-pill { margin-left: auto; }
}

/* ---------------------------------------------------------------- hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 64px; align-items: center; padding-block: 64px 80px; }
@media (max-width: 860px) { .hero { grid-template-columns: minmax(0, 1fr); gap: 44px; padding-block: 28px 60px; } }
h1 { font-size: clamp(40px, 6.2vw, 64px); line-height: 1.03; letter-spacing: -0.03em; font-weight: 700; margin: 0 0 22px; text-wrap: balance; }
.lead { font-size: 20px; color: var(--muted); max-width: 32em; margin: 0 0 30px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; font: 14px/1.4 var(--mono); color: var(--muted); margin: 0; padding: 0; list-style: none; }
.facts b { color: var(--ink); font-weight: 500; }

/* the dongle, with its 160x80 screen */
.dongle { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-left: 34px; }
.stick {
  width: 100%; max-width: 390px; aspect-ratio: 390 / 150; background: #1f232c; border-radius: 18px;
  display: flex; align-items: center; gap: 16px; padding: 16px 20px 16px 16px; position: relative;
  box-shadow: 0 1px 2px rgba(15, 18, 30, .12), 0 14px 32px rgba(15, 18, 30, .14);
}
.plug { position: absolute; left: -38px; top: 50%; width: 42px; height: 40%; transform: translateY(-50%); background: #b9c0cc; border-radius: 4px 0 0 4px; }
.plug::after { content: ""; position: absolute; inset: 30% 30% 30% 14%; background: #8e96a4; border-radius: 1px; }
.screen {
  flex: 1; aspect-ratio: 2 / 1; background: var(--lcd); border-radius: 6px; padding: 11px 13px;
  font: 12px/1.25 var(--mono); color: var(--lcd-ink); position: relative; overflow: hidden;
}
.lcd-top { display: flex; align-items: center; gap: 7px; }
.lcd-logo { width: 20px; height: 20px; }
.lcd-name { font: 700 15px/1 var(--sans); letter-spacing: 0.03em; }
.lcd-shield { margin-left: auto; width: 14px; height: 14px; }
.lcd-l1 { color: var(--lcd-blue); margin-top: 12px; transition: color .3s; }
.lcd-l2 { color: var(--lcd-dim); margin-top: 3px; }
.lcd-bar { position: absolute; left: 13px; right: 13px; bottom: 11px; height: 5px; border-radius: 3px; background: #283042; overflow: hidden; }
.lcd-bar b { display: block; height: 100%; width: 64%; background: var(--lcd-blue); border-radius: 3px; transition: width .6s linear, background .3s; }
.screen.ok .lcd-l1 { color: var(--lcd-green); }
.screen.ok .lcd-bar b { background: var(--lcd-green); }
.led { width: 9px; height: 9px; border-radius: 50%; background: #3d8bfd; flex-shrink: 0; transition: background .3s; }
.led.ok { background: #3fd07c; }
.dongle figcaption { font: 13px/1.4 var(--mono); color: var(--muted); text-align: center; }

/* ---------------------------------------------------------------- sections */
section { border-top: 1px solid var(--rule); padding-block: 64px; }
h2 { font: 500 13px/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 28px; }
h3 { font-size: 19px; font-weight: 600; margin: 0 0 6px; letter-spacing: -0.01em; }
.points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 64px; margin: 0; padding: 0; list-style: none; }
@media (max-width: 720px) { .points { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
.points p { margin: 0; color: var(--muted); max-width: 32em; }

/* ---------------------------------------------------------------- BTDOSec */
.sec { background: var(--sec-ground); color: var(--sec-ink); border-top: 0; padding-block: 80px; }
.sec-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.4fr); gap: 64px; align-items: start; }
@media (max-width: 860px) { .sec-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; } }
.sec-intro { position: sticky; top: 110px; }
@media (max-width: 860px) { .sec-intro { position: static; } }
.sec-shield { width: 64px; height: 64px; display: block; margin-bottom: 20px; }
.sec h2.sec-kicker { color: var(--sec-muted); margin: 0 0 8px; }
.sec-title { font-size: clamp(34px, 4.6vw, 46px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.05; margin: 0 0 16px; }
.sec-lead { color: var(--sec-muted); margin: 0; max-width: 28em; font-size: 18px; }
.sec-list { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
@media (max-width: 620px) { .sec-list { grid-template-columns: minmax(0, 1fr); } }
.sec-list li { border-top: 1px solid var(--sec-rule); padding-block: 22px 26px; }
.sec-list h3 { color: var(--sec-ink); }
.sec-list p { margin: 0; color: var(--sec-muted); font-size: 16px; }

/* ---------------------------------------------------------------- status */
.now { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; }
@media (max-width: 760px) { .now { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
.now p { margin: 0 0 14px; max-width: 32em; }
.now p.big { font-size: 26px; line-height: 1.3; font-weight: 600; letter-spacing: -0.015em; }
.progress { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.progress li { display: flex; gap: 12px; align-items: baseline; }
.tag { font: 12px/1 var(--mono); padding: 5px 8px; border-radius: 5px; border: 1px solid var(--rule); color: var(--muted); flex-shrink: 0; min-width: 80px; text-align: center; }
.tag.done { color: var(--accent); border-color: var(--accent); }

/* ---------------------------------------------------------------- why */
.swatches { display: flex; gap: 6px; margin-top: 16px; }
.swatches i { width: 28px; height: 28px; border-radius: 7px; }
.points p.spell { margin-top: 14px; font: 15px/1.4 var(--mono); color: var(--muted); }
.spell b { color: var(--accent); font-weight: 500; }

/* ---------------------------------------------------------------- footer */
.site-foot { border-top: 1px solid var(--rule); }
.site-foot .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; justify-content: space-between; padding-block: 28px 40px; font-size: 15px; color: var(--muted); }
.foot-brand { display: flex; align-items: center; gap: 10px; }
.foot-mark { width: 22px; height: 22px; }
.site-foot a { color: var(--ink); font-weight: 500; }
.foot-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.foot-links a { color: var(--muted); font-weight: 400; text-decoration: none; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; }
