@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/JetBrainsMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #000;
  --fg: #fff;
  --muted: #8d8d8d;
  --faint: #151515;
  --panel: #070707;
  --panel-2: #0d0d0d;
  --line: #242424;
  --accent: #b8ff36;
  --bad: #ff5c5c;
  color-scheme: dark;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--fg);
  font-size: 14px;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(184, 255, 54, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(184, 255, 54, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000, transparent 68%);
}

a {
  color: inherit;
}

.site-header,
main,
footer {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
  position: relative;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.brand,
nav a {
  text-decoration: none;
}

.brand {
  font-weight: 700;
  color: var(--accent);
}

nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 12px;
}

nav a:hover,
nav a[aria-current="page"] {
  color: var(--accent);
}

.hero {
  min-height: calc(100vh - 220px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 74px 0 88px;
  border-bottom: 1px solid var(--line);
}

.eyebrow,
h1,
h2,
h3,
p {
  margin: 0;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0;
  margin-bottom: 14px;
}

h1 {
  max-width: 900px;
  font-size: clamp(42px, 8vw, 96px);
  line-height: 0.98;
  letter-spacing: 0;
}

.intro {
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
  margin-top: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--fg);
  padding: 7px 14px;
  font: inherit;
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 120ms, color 120ms, background 120ms;
}

.button:hover,
button:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.button.primary,
button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}

.button.primary:hover {
  color: #000;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.band {
  padding: 62px 0;
  border-bottom: 1px solid var(--line);
}

.section-head {
  max-width: 700px;
  margin-bottom: 28px;
}

h2 {
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

article {
  background: var(--bg);
  min-height: 220px;
  padding: 22px;
}

h3 {
  color: var(--accent);
  font-size: 13px;
  margin-bottom: 14px;
}

article p,
.split p {
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 32px;
}

.inline-link {
  display: inline-block;
  margin-top: 18px;
  color: var(--accent);
  text-decoration: none;
}

.text-link,
.inline-link:hover,
.text-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 0 38px;
  color: var(--muted);
  font-size: 12px;
}

.page-title {
  padding: 52px 0 30px;
}

.page-title h1 {
  font-size: clamp(34px, 6vw, 66px);
}

.hint {
  max-width: 820px;
  color: var(--muted);
  font-size: 12px;
  margin-top: 16px;
}

strong {
  color: var(--accent);
}

.product-hero {
  min-height: calc(100vh - 140px);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  align-items: center;
  gap: 34px;
  padding: 58px 0 72px;
  border-bottom: 1px solid var(--line);
}

.product-copy h1 {
  font-size: clamp(36px, 5.4vw, 68px);
  max-width: 760px;
}

.product-media {
  height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-media img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center bottom;
  display: block;
}

.spec-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
}

.spec-list div {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 16px;
  min-height: 78px;
  align-items: center;
  padding: 18px 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.spec-list div:nth-child(2n) {
  border-right: 0;
}

.spec-list div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.spec-list span {
  color: var(--muted);
  font-size: 12px;
}

.spec-list strong {
  color: var(--fg);
  font-size: 13px;
  font-weight: 400;
}

.product-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.product-gallery img {
  width: 100%;
  aspect-ratio: 1 / 1.18;
  object-fit: cover;
  object-position: center bottom;
  display: block;
  background: #000;
}

.use-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tags {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 16px;
  margin-bottom: 12px;
}

.panel h2 {
  color: var(--accent);
  font-size: 12px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.row:last-child {
  margin-bottom: 0;
}

.info-line {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 11px;
}

code {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 6px;
  color: var(--fg);
  font-family: inherit;
  font-size: 12px;
}

.status-pill.connected,
.status-pill.dfu {
  border-color: var(--accent);
  color: var(--accent);
}

.status-pill.error {
  border-color: var(--bad);
  color: var(--bad);
}

.stats {
  color: var(--muted);
  font-size: 12px;
}

input[type="number"] {
  width: 100px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--fg);
  font: inherit;
  padding: 5px 8px;
}

input[type="number"]:focus {
  border-color: var(--accent);
  outline: none;
}

input[type="radio"] {
  accent-color: var(--accent);
}

label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.tag-log {
  height: 150px;
  overflow-y: auto;
  white-space: pre-wrap;
  background: #030303;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--fg);
  font: inherit;
  font-size: 11px;
  margin: 10px 0 0;
  padding: 9px 10px;
}

.flash-progress {
  display: none;
  color: var(--muted);
  font-size: 11px;
  margin-top: 10px;
}

.flash-progress.active {
  display: block;
}

.flash-progress .bar {
  height: 4px;
  position: relative;
  overflow: hidden;
  background: var(--line);
  border-radius: 2px;
  margin-bottom: 5px;
}

.flash-progress .bar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--p, 0%);
  background: var(--accent);
}

#chart {
  display: block;
  width: 100%;
  height: 320px;
  background: #030303;
  border: 1px solid var(--line);
  border-radius: 3px;
}

.cal-status {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.cal-status.running,
.cal-status.done {
  color: var(--accent);
}

.cal-status.error {
  color: var(--bad);
}

::selection {
  background: var(--accent);
  color: #000;
}

@media (max-width: 980px) {
  .product-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 38px 0 58px;
  }

  .product-copy h1 {
    font-size: clamp(34px, 8vw, 58px);
  }

  .product-media {
    height: 330px;
  }

  .product-media img {
    object-position: center bottom;
  }
}

@media (max-width: 820px) {
  .hero {
    min-height: auto;
    padding: 58px 0 68px;
  }

  .grid,
  .split,
  .tags,
  .spec-list,
  .product-gallery,
  .use-grid {
    grid-template-columns: 1fr;
  }

  article {
    min-height: 0;
  }

  .spec-list div,
  .spec-list div:nth-child(2n),
  .spec-list div:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .spec-list div:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 560px) {
  .site-header,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: 40px;
  }

  .intro {
    font-size: 15px;
  }

  .button,
  button {
    width: 100%;
  }

  .spec-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
