@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans.woff2") format("woff2");
}

@font-face {
  font-family: "Press Start 2P";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/press-start-2p.woff2") format("woff2");
}

@font-face {
  font-family: "VT323";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/vt323.woff2") format("woff2");
}

:root {
  --plastic: #d2c2a6;
  --plastic-hi: #eadcc6;
  --plastic-lo: #a8906e;
  --plastic-deep: #7d6548;
  --screen: #120e0c;
  --screen-2: #1b1511;
  --ink: #f4efe6;
  --muted: #b7aa9a;
  --line: #3a3028;
  --amber: #ff8a1a;
  --amber-2: #ffc36b;
  --amber-deep: #9a4a00;
  --phosphor: #7dff9a;
  --phosphor-dim: #2f7a45;
  --danger: #ff5a4a;
  --max: 1080px;
  --radius: 18px;
  --font-ui: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-term: "VT323", "Courier New", monospace;
  --font-pix: "Press Start 2P", "VT323", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html:focus-within {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.55;
  background:
    radial-gradient(ellipse at 50% -10%, #e7d8bf, transparent 46%),
    linear-gradient(180deg, #cbb89a 0%, #b89f7b 100%);
  color-scheme: dark;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--amber-2);
}

a:hover {
  color: var(--amber);
}

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  z-index: 20;
  background: var(--amber);
  color: #1a0e00;
  padding: 8px 12px;
  font-weight: 700;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: min(var(--max), calc(100% - 24px));
  margin: 20px auto 40px;
}

.case {
  background: linear-gradient(180deg, var(--plastic-hi) 0%, var(--plastic) 55%, #c3b08e 100%);
  border-radius: var(--radius) var(--radius) 28px 28px;
  box-shadow:
    inset 0 1px 0 #f7eedc,
    inset 0 -10px 0 var(--plastic-lo),
    0 24px 50px rgba(40, 24, 8, 0.35);
  overflow: hidden;
}

.case-top,
.case-bottom {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  color: #3b2d1c;
}

.case-top {
  justify-content: space-between;
  flex-wrap: wrap;
  border-bottom: 3px solid var(--plastic-lo);
}

.case-bottom {
  justify-content: space-between;
  flex-wrap: wrap;
  border-top: 3px solid var(--plastic-lo);
  font-family: var(--font-term);
  font-size: 20px;
  color: #4a3a28;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand svg,
.brand-mark {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
  flex: none;
  background: #241810;
  border-radius: 8px;
}

.brand-name {
  font-family: var(--font-pix);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: #2a1e12;
  line-height: 1.4;
}

.nav {
  display: flex;
  align-items: stretch;
  gap: 6px;
  flex-wrap: wrap;
}

.nav a {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 92px;
  padding: 8px 12px 6px;
  text-decoration: none;
  color: #2a1e12;
  background: linear-gradient(#efe3cd, #cbb89a);
  border: 1px solid #8e7a5c;
  border-radius: 6px;
  box-shadow: inset 0 1px 0 #fff6e4, 0 2px 0 #8a7458;
  font-weight: 600;
  font-size: 14px;
}

.nav a::before {
  content: attr(data-fkey);
  font-family: var(--font-pix);
  font-size: 8px;
  color: var(--amber-deep);
  margin-bottom: 4px;
  font-weight: 400;
}

.nav a:hover,
.nav a.is-active {
  background: linear-gradient(#fff3da, #ddc9a6);
  color: #111;
}

.ebay-nav {
  font-family: var(--font-pix);
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  color: #1a0e00 !important;
  background: linear-gradient(#ffc36b, var(--amber));
  border: 2px solid #fff1d0;
  border-radius: 8px;
  padding: 10px 14px;
  box-shadow: 0 3px 0 var(--amber-deep);
  font-weight: 400;
}

.ebay-nav:hover {
  filter: brightness(1.08);
}

.menu-toggle {
  display: none;
}

.crt {
  position: relative;
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(255, 138, 26, 0.07), transparent 40%),
    var(--screen);
  color: var(--ink);
  padding: 28px 22px 48px;
  min-height: 70vh;
}

.crt::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 2px,
    rgba(0, 0, 0, 0.16) 2px 3px
  );
  opacity: 0.18;
}

.section {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  margin: 0 auto 56px;
}

.section:last-of-type {
  margin-bottom: 12px;
}

.kicker {
  font-family: var(--font-pix);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--phosphor);
  text-shadow: 0 0 8px var(--phosphor-dim);
  margin: 0 0 10px;
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  grid-template-areas: "copy art";
  gap: 18px 28px;
  align-items: center;
  margin-bottom: 8px;
}

.hero-copy { grid-area: copy; }
.hero-art { grid-area: art; }

.boot {
  font-family: var(--font-term);
  font-size: 22px;
  color: var(--phosphor);
  text-shadow: 0 0 6px var(--phosphor-dim);
  min-height: 5.5em;
  margin: 0;
  white-space: pre-wrap;
  flex: 1;
}

.boot .cursor {
  display: inline-block;
  width: 10px;
  height: 1em;
  background: var(--phosphor);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

h1 {
  font-family: var(--font-pix);
  font-size: clamp(22px, 4vw, 34px);
  line-height: 1.35;
  margin: 0 0 12px;
  color: var(--cream, var(--ink));
}

.hero h1 {
  text-align: center;
}

.lede {
  font-size: 19px;
  color: var(--muted);
  max-width: 38ch;
  margin: 0 0 22px;
}

.hero .lede {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.hero-art {
  margin: 0;
}

.boot-screen {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 260px;
  padding: 16px 16px 12px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(125, 255, 154, 0.08), transparent 55%),
    #070605;
  border: 3px solid #2a2118;
  border-radius: 10px;
  box-shadow:
    0 0 0 1px #000,
    inset 0 0 40px rgba(0, 0, 0, 0.55),
    0 12px 30px rgba(0, 0, 0, 0.45);
}

.boot-screen .kicker {
  margin: 0;
}

.boot-status {
  font-family: var(--font-term);
  font-size: 18px;
  color: var(--muted);
  margin: auto 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.ebay-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: none;
  margin-top: 28px;
  padding: 18px 18px 16px;
  text-decoration: none !important;
  color: #1a0e00 !important;
  background: linear-gradient(180deg, #ffd089 0%, #ff8a1a 58%, #f07000 100%);
  border: 4px solid #fff3d6;
  border-radius: 12px;
  box-shadow:
    0 0 0 4px #c45c00,
    0 8px 0 #7a3600,
    0 16px 32px rgba(0, 0, 0, 0.45),
    0 0 32px rgba(255, 138, 26, 0.35);
  transform: translateY(0);
  transition: transform 0.12s ease, filter 0.12s ease;
}

.ebay-cta:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.ebay-cta:active {
  transform: translateY(6px);
  box-shadow:
    0 0 0 4px #c45c00,
    0 2px 0 #7a3600,
    0 8px 16px rgba(0, 0, 0, 0.4);
}

.ebay-cta__vu {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
}

.ebay-cta__vu i {
  display: block;
  width: 6px;
  height: 12px;
  background: #1a0e00;
  border-radius: 1px;
  transform-origin: bottom;
  animation: vu 1.2s ease-in-out infinite;
}

.ebay-cta__vu i:nth-child(odd) { animation-delay: -0.3s; }
.ebay-cta__vu i:nth-child(3n) { animation-delay: -0.7s; height: 70%; }
.ebay-cta__vu i:nth-child(1) { height: 40%; }
.ebay-cta__vu i:nth-child(2) { height: 70%; }
.ebay-cta__vu i:nth-child(4) { height: 100%; }
.ebay-cta__vu i:nth-child(5) { height: 60%; }
.ebay-cta__vu i:nth-child(6) { height: 90%; }
.ebay-cta__vu i:nth-child(7) { height: 50%; }
.ebay-cta__vu i:nth-child(8) { height: 80%; }
.ebay-cta__vu i:nth-child(9) { height: 45%; }
.ebay-cta__vu i:nth-child(10) { height: 65%; }

@keyframes vu {
  0%, 100% { transform: scaleY(0.55); }
  50% { transform: scaleY(1); }
}

.ebay-cta__label {
  font-family: var(--font-pix);
  font-size: clamp(13px, 2.6vw, 20px);
  text-align: center;
  line-height: 1.45;
}

.ebay-cta__sub {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  opacity: 0.85;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 18px 0 0;
  font-family: var(--font-term);
  font-size: 20px;
  color: var(--muted);
}

.meta-row strong {
  color: var(--phosphor);
  font-weight: 400;
}

h2 {
  font-family: var(--font-pix);
  font-size: clamp(14px, 2vw, 18px);
  line-height: 1.5;
  margin: 0 0 8px;
}

.section-lead {
  color: var(--muted);
  margin: 0 0 22px;
  max-width: 62ch;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
}

.filter {
  font-family: var(--font-term);
  font-size: 20px;
  background: var(--screen-2);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
}

.filter:hover,
.filter.is-on {
  color: #1a0e00;
  background: var(--amber);
  border-color: var(--amber-2);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--screen-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  min-height: 100%;
}

.card:hover {
  border-color: var(--amber);
}

.card-media {
  position: relative;
  display: block;
  background: #0a0807;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  flex: none;
}

.card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 14px 16px;
  flex: 1;
}

.chip {
  align-self: flex-start;
  font-family: var(--font-pix);
  font-size: 8px;
  letter-spacing: 0.08em;
  color: var(--amber-2);
  border: 1px solid var(--amber-deep);
  padding: 4px 6px;
}

.card h3 {
  font-size: 18px;
  margin: 0;
  line-height: 1.3;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  flex: 1;
}

.price {
  font-family: var(--font-term);
  font-size: 22px;
  color: var(--phosphor);
}

.card-ebay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
  padding: 10px 12px;
  background: #2a2118;
  border: 1px solid var(--amber);
  border-radius: 6px;
  color: var(--amber-2);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
}

.card-ebay:hover {
  background: var(--amber);
  color: #1a0e00;
}

.firmware-list {
  display: grid;
  gap: 16px;
}

.fw {
  border: 1px solid var(--line);
  background: #0c0a09;
  border-radius: 10px;
  padding: 16px 16px 14px;
}

.fw-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  flex-wrap: wrap;
}

.fw h3 {
  margin: 0;
  font-size: 20px;
}

.status {
  font-family: var(--font-pix);
  font-size: 8px;
  letter-spacing: 0.08em;
  padding: 5px 7px;
  border: 1px solid currentColor;
}

.status-coming-soon { color: var(--amber-2); }
.status-upstream { color: var(--phosphor); }
.status-current { color: var(--phosphor); }

.fw p {
  color: var(--muted);
  margin: 10px 0 0;
}

.howto {
  font-family: var(--font-term);
  font-size: 22px;
  background: #000;
  color: var(--phosphor);
  padding: 10px 12px;
  border-radius: 6px;
  margin: 12px 0 0;
  overflow-x: auto;
}

.fw-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.releases {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 15px;
}

.releases th,
.releases td {
  text-align: left;
  padding: 8px 8px 8px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.releases th {
  font-family: var(--font-pix);
  font-size: 8px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.empty {
  font-family: var(--font-term);
  font-size: 22px;
  color: var(--muted);
  margin: 12px 0 0;
}

.about {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 22px;
  align-items: start;
}

.about img {
  width: 160px;
  border: 3px solid #2a2118;
  background: #2a1a12;
}

.about p {
  margin: 0 0 12px;
  color: var(--muted);
}

.about p:last-child {
  margin-bottom: 0;
}

.note {
  font-size: 14px;
  color: var(--muted);
  margin: 14px 0 0;
}

.ebay-dock {
  display: none;
}

.hidden {
  display: none !important;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "art";
  }

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

}

@media (max-width: 720px) {
  body {
    padding-bottom: 96px;
  }

  .wrap {
    width: 100%;
    margin: 0;
  }

  .case {
    border-radius: 0;
    box-shadow: none;
    min-height: 100vh;
  }

  .nav {
    display: none;
    width: 100%;
  }

  .menu-toggle {
    display: inline-flex;
    font-family: var(--font-pix);
    font-size: 9px;
    padding: 10px 12px;
    background: #efe3cd;
    border: 1px solid #8e7a5c;
    border-radius: 6px;
    color: #2a1e12;
    cursor: pointer;
  }

  .case-top.is-open .nav {
    display: flex;
  }

  .crt {
    padding: 22px 16px 110px;
  }

  .menu-toggle {
    flex: none;
  }

  .ebay-nav {
    display: none;
  }

  .brand {
    margin-right: auto;
  }

  .case-top.is-open .nav {
    flex: 1 1 100%;
  }

  .ebay-dock {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: linear-gradient(transparent, rgba(18, 14, 12, 0.92) 30%);
  }

  .ebay-dock .ebay-cta {
    max-width: none;
    padding: 14px 12px 12px;
    box-shadow:
      0 0 0 3px #c45c00,
      0 4px 0 #7a3600,
      0 8px 20px rgba(0, 0, 0, 0.5);
  }

  .ebay-cta__label {
    font-size: 13px;
  }

  #products > .ebay-cta {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .boot .cursor { display: none; }
}
