:root {
  --bg-chassis: #1c1f26;
  --bg-panel: #11131b;
  --bg-semi: rgba(43, 48, 59, 0.5);
  --brand: #ef991f;
  --brand-hover: #d97706;
  --brand-light: #f9c574;
  --brand-glow: rgba(239, 153, 31, 0.5);
  --steel: #607a97;
  --steel-hover: #4c627d;
  --steel-border: #8098b0;
  --text: #f5ebe8;
  --text-muted: #acbbcc;
  --led-green: #67e79e;
  --border-scanner: #1e2024;
  /* System font stack — no network fonts, matching the app (PR #302). */
  --font-display:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  --font-body:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  --font-mono:
    ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
}

html {
  font-size: 17px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg-chassis);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand-light);
}

a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

/* ---- skip link ---- */

/* Off-screen until focused, then it drops into the top-left corner so a
   keyboard user can jump straight past the header/nav to the main content. */
.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  z-index: 100;
  background: var(--brand);
  color: #1c1f27;
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0.5rem;
}

@media (prefers-reduced-motion: reduce) {
  .skip-link {
    transition: none;
  }
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg-panel);
  border: 1px solid var(--border-scanner);
  border-radius: 2px;
  padding: 0.1em 0.4em;
}

/* ---- header ---- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 68rem;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.brand-icon {
  width: 1.75rem;
  height: 1.75rem;
  display: block;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

.site-nav {
  display: flex;
  gap: 1.5rem;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-nav a:hover {
  color: var(--brand-light);
}

/* ---- hero ---- */

.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: center;
  max-width: 68rem;
  margin: 0 auto;
  padding: 6rem 1.5rem 5rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.lede {
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1.55;
  max-width: 34rem;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  border: 1px solid transparent;
  box-shadow: 1px 1px 0 0 rgba(0, 0, 0, 0.25);
}

.btn-primary {
  background: var(--brand);
  color: #1c1f27;
}

.btn-primary:hover {
  background: var(--brand-hover);
  box-shadow: 0 0 12px var(--brand-glow);
}

.btn-secondary {
  background: var(--steel);
  border-color: var(--steel-border);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--steel-hover);
}

/* ---- hero screenshot bezel ---- */

.hero-shot {
  min-width: 0;
}

/* The real screenshot floats on transparency with its own window chrome and
   shadow, so it renders bare; the panel treatment applies only to the
   placeholder state. */
.bezel img {
  display: block;
  width: 100%;
  filter: drop-shadow(0 0 40px var(--brand-glow));
}

.bezel .bezel-placeholder {
  display: none;
}

.bezel-empty {
  background: var(--bg-panel);
  border: 1px solid var(--border-scanner);
  border-radius: 7px;
  padding: 0.625rem;
  box-shadow:
    0 0 40px var(--brand-glow),
    0 20px 50px rgba(0, 0, 0, 0.5);
}

.bezel-empty .bezel-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  aspect-ratio: 16 / 10;
  border-radius: 4px;
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0 2px,
      rgba(255, 255, 255, 0.02) 2px 4px
    ),
    var(--bg-panel);
}

.ph-freq {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 3.5rem);
  color: var(--brand-light);
  text-shadow: 0 0 5px currentColor;
}

.ph-tag {
  font-size: 0.8125rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

/* ---- channels showcase (cross-platform programming) ---- */

.showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  max-width: 68rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.showcase-shot {
  min-width: 0;
}

.showcase-copy h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.showcase-copy p {
  color: var(--text-muted);
  font-size: 1.125rem;
  max-width: 32rem;
}

.showcase-copy p + p {
  margin-top: 1rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ---- features ---- */

.features {
  max-width: 68rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 6rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.card {
  background: var(--bg-semi);
  border: 1px solid var(--border-scanner);
  border-radius: 7px;
  padding: 1.25rem;
}

.card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.375rem;
  margin-bottom: 0.5rem;
}

.card p:last-child {
  color: var(--text-muted);
  font-size: 1.0625rem;
}

/* ---- download ---- */

.download {
  max-width: 68rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.download-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-scanner);
  border-radius: 7px;
  padding: 2rem;
}

.download-version {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.download-primary {
  margin-bottom: 1.5rem;
}

.asset-list {
  list-style: none;
  padding: 0;
  margin-bottom: 1.75rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.asset-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--text);
  background: var(--bg-semi);
  border: 1px solid var(--border-scanner);
  border-radius: 4px;
  padding: 0.625rem 0.875rem;
}

.asset-list a:hover {
  border-color: var(--steel-border);
}

.asset-name {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

.asset-name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-icon {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  fill: currentColor;
}

.btn .asset-icon {
  width: 1.5rem;
  height: 1.5rem;
  vertical-align: -0.3em;
  margin-right: 0.625rem;
  fill: currentColor;
}

.asset-platform {
  color: var(--text-muted);
  white-space: nowrap;
}

.install-notes {
  color: var(--text-muted);
  font-size: 0.9375rem;
  border-top: 1px solid var(--border-scanner);
  padding-top: 1.5rem;
}

.install-notes p {
  margin-bottom: 0.75rem;
}

.install-notes ul {
  padding-left: 1.25rem;
  display: grid;
  gap: 0.5rem;
}

.install-notes strong,
.install-notes em {
  color: var(--text);
}

.install-beta {
  color: var(--text);
}

/* ---- footer ---- */

.site-footer {
  border-top: 1px solid var(--border-scanner);
  padding: 2.5rem 1.5rem 3rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.6;
  margin-bottom: 0.75rem;
}

.footer-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.footer-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}

.footer-credit {
  margin-top: 0.25rem;
}

.footer-support {
  margin-top: 0.5rem;
}

/* ---- responsive ---- */

@media (max-width: 47rem) {
  .site-header {
    flex-direction: column;
    gap: 0.875rem;
    padding-bottom: 0.5rem;
  }

  /* Let the nav wrap and center so no link clips at narrow widths. */
  .site-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.875rem 1.25rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn,
  .download-primary .btn {
    display: block;
    text-align: center;
  }

  /* Icon centered against the full two-line block: row becomes a grid with an
     icon column and a text column; the platform label lifts into the text
     column via negative order and sits under the filename. */
  .asset-list a {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 0.75rem;
    row-gap: 0.125rem;
  }

  .asset-name {
    display: contents;
  }

  .asset-icon {
    grid-row: 1 / span 2;
  }

  .asset-name span {
    grid-column: 2;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    word-break: break-word;
  }

  .asset-platform {
    grid-column: 2;
    text-align: left;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 3rem 1.5rem 3.5rem;
    gap: 2.5rem;
  }

  .showcase {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 1.5rem 3.5rem;
  }

  .showcase-shot {
    order: 2;
  }

  .features {
    padding: 1.5rem 1.5rem 4rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .download {
    padding: 1.5rem 1.5rem 4rem;
  }

  .download-panel {
    padding: 1.25rem;
  }
}
