@font-face {
  font-family: "CoPet LCD";
  src: url("assets/fonts/LCDSolid1.13-Regular.otf") format("opentype");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #07090e;
  --text: #e4e9ee;
  --muted: #8994a2;
  --accent: #8abbdf;
  --line: #ffffff13;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--background);
  line-height: 1.6;
}

/* The existing star field is atmosphere, not another interface surface. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("assets/ui/star_background_x8.png") center / cover;
  opacity: .035;
  pointer-events: none;
  z-index: -1;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 78% 43%, #4872ab10, transparent 52%);
  pointer-events: none;
  z-index: -1;
}

a { color: inherit; text-decoration: none; }
a, button, summary { -webkit-tap-highlight-color: transparent; }
a:hover, button:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 6px;
}
::selection { color: var(--background); background: var(--accent); }
.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  z-index: 10;
  padding: 12px;
  background: var(--background);
}
.page-shell {
  width: min(1200px, calc(100% - 96px));
  margin: auto;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 108px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wordmark {
  font-family: "CoPet LCD", monospace;
  font-size: 20px;
  line-height: 1;
}
.wordmark span { color: var(--accent); margin-left: 4px; }
nav { display: flex; align-items: center; gap: 32px; }
nav a { min-height: 44px; display: inline-flex; align-items: center; font-size: .875rem; }
.topbar nav { color: var(--muted); }
main { flex: 1; display: flex; flex-direction: column; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 512px;
  align-items: center;
  gap: 52px;
  flex: 1;
  padding: 52px 0 64px;
}
.hero-copy { padding-bottom: 36px; }
.eyebrow {
  font-family: Consolas, monospace;
  font-size: .75rem;
  color: var(--accent);
  letter-spacing: .16em;
  margin: 0 0 28px;
}
h1 {
  margin: 0;
  font-size: clamp(3.4rem, 5vw, 4.7rem);
  font-weight: 350;
  letter-spacing: -.065em;
  line-height: 1.08;
}
h1 span { color: #8797aa; }
.description {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--muted);
  margin: 28px 0 36px;
  max-width: 410px;
}
.download { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.download-link {
  display: inline-flex;
  gap: 28px;
  align-items: center;
  min-height: 50px;
  padding: 10px 20px;
  background: #dce5ed;
  color: #101923;
  font-size: .875rem;
  font-weight: 600;
  transition: background 150ms;
}
.download-link:hover { color: #101923; background: #fff; }
.download-link span { font-size: 22px; line-height: 1; font-weight: 400; }
.release-link { color: var(--muted); font: .75rem Consolas, monospace; min-height: 44px; display: inline-flex; align-items: center; gap: 10px; }
.download-note { margin: 12px 0 0; font: .75rem Consolas, monospace; color: var(--muted); }
.download-note span { margin: 0 8px; color: #465260; }
.product-preview { margin: 0; width: 512px; }
#frame-player { display: block; width: 512px; height: 568px; image-rendering: pixelated; }
figcaption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  font: 12px Consolas, monospace;
  letter-spacing: .08em;
  color: var(--muted);
}
.caption-divider { margin: 0 10px; color: #465260; }
#play-toggle {
  appearance: none;
  border: 0;
  padding: 0 0 0 16px;
  background: none;
  color: inherit;
  font: inherit;
  min-height: 44px;
  cursor: pointer;
}
#play-toggle:hover { color: var(--text); }
#play-toggle:disabled { cursor: wait; }
.setup { border-top: 1px solid var(--line); }
.setup summary {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 32px;
  cursor: pointer;
  list-style: none;
  font-size: .875rem;
}
.setup summary::-webkit-details-marker { display: none; }
.setup-hint { color: var(--muted); font-size: .875rem; }
.expand { margin-left: auto; font-size: 22px; color: var(--muted); font-weight: 300; }
.setup[open] .expand { transform: rotate(45deg); }
.setup ol { list-style: none; margin: 8px 0 20px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.setup li { display: flex; gap: 16px; }
.step { font: 12px Consolas, monospace; color: var(--accent); padding-top: 6px; }
.setup h2 { margin: 0 0 8px; font-size: 1rem; font-weight: 500; }
.setup p { margin: 0; font-size: 1rem; color: var(--muted); }
code { font: .9em Consolas, monospace; color: var(--text); }
strong { font-weight: 600; }
.help-link { display: inline-block; font-size: .875rem; color: var(--accent); padding: 8px 0 24px; }
footer { display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 84px; color: var(--muted); font-size: .75rem; }
footer p { margin: 0; }
footer a { color: #c0c9d3; }
footer nav { gap: 24px; }
footer nav a { font-size: .75rem; }
.footer-principle { color: #697685; }

@media (max-width: 1100px) {
  .hero { grid-template-columns: minmax(0, 1fr) 256px; gap: 64px; padding-block: 72px; }
  .product-preview, #frame-player { width: 256px; }
  #frame-player { height: 284px; }
  .page-shell { width: calc(100% - 80px); }
  .desktop-break { display: none; }
  .footer-principle { display: none; }
  h1 { font-size: 4rem; }
}
@media (max-width: 700px) {
  .page-shell { width: calc(100% - 48px); }
  .topbar { height: 84px; }
  nav { gap: 24px; }
  .hero { grid-template-columns: 1fr; gap: 42px; padding: 44px 0 40px; }
  .hero-copy { padding: 0; }
  .eyebrow { font-size: 11px; letter-spacing: .11em; margin-bottom: 24px; }
  h1 { font-size: clamp(2.9rem, 10vw, 4rem); }
  .description { margin: 22px 0 28px; max-width: 370px; }
  .download { gap: 18px; }
  .download-link { padding-inline: 16px; gap: 20px; }
  .product-preview { justify-self: center; }
  .setup summary { gap: 14px; }
  .setup-hint { font-size: 12px; }
  .setup ol { grid-template-columns: 1fr; gap: 24px; }
  footer { flex-wrap: wrap; gap: 0 16px; padding: 16px 0 24px; }
  footer nav { gap: 20px; }
}
@media (max-width: 360px) {
  .page-shell { width: calc(100% - 32px); }
  .eyebrow { font-size: 10px; }
  .download { gap: 8px; }
  .download-link { gap: 12px; font-size: 13px; }
  .setup-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
