/* ============================================================
   PAPERCRAFT — CRT terminal museum
   ============================================================ */

:root {
  --bg: #070b07;
  --panel: #0d130d;
  --ink: #2eff7e;
  --ink-dim: rgba(46, 255, 126, 0.5);
  --ink-faint: rgba(46, 255, 126, 0.14);
  --amber: #ffb000;
  --text: #c9ffd9;
  --dim: #6fae85;
  --line: rgba(46, 255, 126, 0.28);
  --shadow: 0 0 6px rgba(46, 255, 126, 0.35);
}

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

html { color-scheme: dark; }

body {
  background:
    radial-gradient(1200px 700px at 50% -10%, rgba(46, 255, 126, 0.08), transparent 60%),
    radial-gradient(900px 600px at 85% 110%, rgba(255, 176, 0, 0.05), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: "VT323", "Courier New", monospace;
  font-size: 21px;
  line-height: 1.35;
  min-height: 100vh;
  padding: clamp(16px, 4vw, 56px);
}

/* ---------- CRT overlay: scanlines + vignette ---------- */

.crt {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 0px,
      rgba(0, 0, 0, 0) 2px,
      rgba(0, 0, 0, 0.22) 3px,
      rgba(0, 0, 0, 0) 4px
    ),
    radial-gradient(120% 120% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
  opacity: 0.7;
}

/* ---------- Masthead ---------- */

.masthead {
  max-width: 1080px;
  margin: 0 auto clamp(40px, 7vw, 84px);
  text-align: center;
}

.prompt {
  color: var(--dim);
  font-size: clamp(15px, 2.2vw, 19px);
  letter-spacing: 0.06em;
  margin-bottom: 26px;
  min-height: 1.4em;
}

.prompt .cursor {
  color: var(--ink);
  animation: blink 1.1s steps(1) infinite;
  text-shadow: var(--shadow);
}

.title {
  font-family: "Sixtyfour", "Courier New", monospace;
  font-size: clamp(38px, 9vw, 96px);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-shadow:
    0 0 12px rgba(46, 255, 126, 0.65),
    0 0 42px rgba(46, 255, 126, 0.35),
    0 0 90px rgba(46, 255, 126, 0.2);
  animation: flicker 4s infinite;
  margin-bottom: 18px;
}

.tagline {
  color: var(--dim);
  letter-spacing: 0.35em;
  font-size: clamp(13px, 2.2vw, 17px);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.status {
  color: var(--amber);
  letter-spacing: 0.14em;
  font-size: clamp(14px, 2.2vw, 18px);
  text-shadow: 0 0 8px rgba(255, 176, 0, 0.45);
}

.status::before { content: "■ "; }
.status::after { content: " ■"; }

/* ---------- Catalog grid ---------- */

.catalog {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: clamp(18px, 3vw, 28px);
}

.card {
  --led: var(--ink);
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.6);
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.card.reveal {
  opacity: 1;
  transform: none;
}

.card::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid var(--line);
  border-left: none;
  border-right: none;
  pointer-events: none;
}

.card:hover {
  border-color: color-mix(in srgb, var(--led) 55%, transparent);
  box-shadow:
    inset 0 0 24px rgba(0, 0, 0, 0.6),
    0 0 18px color-mix(in srgb, var(--led) 18%, transparent),
    0 0 42px color-mix(in srgb, var(--led) 12%, transparent);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.art {
  font-size: 17px;
  line-height: 1.12;
  letter-spacing: 0.02em;
  color: var(--led);
  text-shadow: 0 0 8px color-mix(in srgb, var(--led) 60%, transparent);
  user-select: none;
}

.led {
  flex: none;
  width: 12px;
  height: 12px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--led);
  box-shadow:
    0 0 8px var(--led),
    0 0 20px color-mix(in srgb, var(--led) 70%, transparent);
  animation: blink 2.4s steps(1) infinite;
}

.card h2 {
  font-family: "Sixtyfour", "Courier New", monospace;
  font-size: clamp(15px, 2.4vw, 19px);
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.03em;
}

.card .subtitle {
  color: var(--dim);
  font-size: 17px;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.badges {
  display: flex;
  gap: 8px;
  align-items: center;
}

.badge {
  font-size: 16px;
  letter-spacing: 0.1em;
  padding: 1px 9px;
  border: 1px solid var(--line);
  color: var(--ink);
  text-transform: uppercase;
}

.badge.year {
  border-color: var(--line);
  color: var(--amber);
}

.card .desc {
  color: var(--text);
  font-size: 20px;
  letter-spacing: 0.02em;
  flex: 1;
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px dashed var(--line);
  padding-top: 14px;
  margin-top: 4px;
}

.size {
  color: var(--dim);
  font-size: 16px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.btn {
  font-family: inherit;
  font-size: 20px;
  letter-spacing: 0.12em;
  text-decoration: none;
  color: var(--led);
  border: 1px solid var(--led);
  padding: 5px 16px 3px;
  background: transparent;
  cursor: pointer;
  text-transform: uppercase;
  text-shadow: 0 0 8px color-mix(in srgb, var(--led) 55%, transparent);
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover,
.btn:focus-visible {
  background: var(--led);
  color: #06120a;
  box-shadow: 0 0 18px color-mix(in srgb, var(--led) 45%, transparent);
  outline: none;
}

/* ---------- Footer ---------- */

footer {
  max-width: 1080px;
  margin: clamp(48px, 8vw, 90px) auto 0;
  text-align: center;
  color: var(--dim);
  letter-spacing: 0.18em;
  font-size: 15px;
}

footer p::before { content: "▚ "; }
footer p::after { content: " ▞"; }

/* ---------- Animations ---------- */

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  3% { opacity: 0.86; }
  4% { opacity: 1; }
  54% { opacity: 1; }
  55% { opacity: 0.92; }
  56% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .card { opacity: 1; transform: none; }
}
