/* css/lander.css — DSP SPACEPORT ARCADE · synthwave lander
   Signed: budzo #5 (you are alive) */
@import url('./fonts.css');

:root {
  --ink: #04050d;
  --night: #0b0a1c;
  --deep: #141033;
  --plum: #2a0a45;
  --violet: #a24bff;
  --magenta: #ff2ea6;
  --cyan: #22e8ff;
  --amber: #ffb300;
  --lime: #8cff2b;
  --orange: #ff7a18;
  --red: #ff3b57;
  --silver: #b9c4d9;
  --gray: #71789c;
  --line: #2f2760;
  --px: 0px;
  --py: 0px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* The decorative .scene tableau is deliberately wider than the viewport; without
     this, phones get a sideways scroll on the whole page. */
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: var(--silver);
  font-family: 'VT323', 'Courier New', monospace;
  font-size: 21px;
  line-height: 1.45;
  letter-spacing: 0.02em;
  overflow-x: hidden;
  -webkit-font-smoothing: none;
}

a { color: var(--cyan); text-decoration: none; }

h1, h2, h3, h4, .px { font-family: 'Press Start 2P', monospace; }

/* ------------------------------------------------------------- scene */
.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: linear-gradient(#05030f 0%, #0b0320 34%, #2a0a45 62%, #6b1160 78%, #ff7a18 88%, #ffb300 100%);
}

.scene-stars,
.scene-stars::after {
  position: absolute;
  inset: 0;
  content: '';
  background-repeat: no-repeat;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 28% 8%, #cfe9ff, transparent),
    radial-gradient(1px 1px at 44% 26%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 63% 12%, #ffd6f2, transparent),
    radial-gradient(1px 1px at 78% 22%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 88% 9%, #cfe9ff, transparent),
    radial-gradient(1px 1px at 33% 36%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 72% 32%, #fff, transparent);
  animation: twinkle 6s ease-in-out infinite alternate;
}
.scene-stars::after {
  background-position: 40px 60px;
  opacity: 0.55;
  animation-delay: -3s;
}

@keyframes twinkle {
  from { opacity: 0.45; }
  to { opacity: 1; }
}

.scene-sun {
  position: absolute;
  left: 50%;
  bottom: 34%;
  width: min(52vmin, 460px);
  aspect-ratio: 1;
  transform: translate(calc(-50% + var(--px) * 0.3), calc(var(--py) * 0.2));
  border-radius: 50%;
  background: linear-gradient(#fff3b0, #ffe94a 18%, #ffb300 42%, #ff7a18 62%, #ff2ea6 82%, #a24bff 100%);
  -webkit-mask-image: repeating-linear-gradient(to bottom, #000 0 15px, transparent 15px 25px);
  mask-image: repeating-linear-gradient(to bottom, #000 0 15px, transparent 15px 25px);
  filter: drop-shadow(0 0 70px rgba(255, 46, 166, 0.55));
  animation: sun-breathe 7s ease-in-out infinite;
}

@keyframes sun-breathe {
  0%, 100% { filter: drop-shadow(0 0 60px rgba(255, 46, 166, 0.45)); }
  50% { filter: drop-shadow(0 0 96px rgba(255, 46, 166, 0.7)); }
}

.scene-horizon {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 34%;
  height: 2px;
  background: var(--magenta);
  box-shadow: 0 0 18px 3px rgba(255, 46, 166, 0.8), 0 0 60px 10px rgba(255, 122, 24, 0.35);
}

.scene-mountains {
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: calc(34% - 1px);
  height: 11vh;
  background: linear-gradient(#3a0f5c, #170033);
  clip-path: polygon(
    0% 100%, 0% 62%, 6% 40%, 11% 66%, 17% 30%, 24% 70%, 30% 46%, 37% 74%, 44% 34%,
    52% 68%, 58% 44%, 65% 72%, 72% 38%, 79% 66%, 86% 46%, 93% 70%, 100% 52%, 100% 100%);
  opacity: 0.92;
}

.scene-grid {
  position: absolute;
  left: -60%;
  right: -60%;
  top: 66%;
  height: 200vh;
  background-image:
    repeating-linear-gradient(90deg, rgba(255, 46, 166, 0.62) 0 2px, transparent 2px 70px),
    repeating-linear-gradient(to bottom, rgba(34, 232, 255, 0.45) 0 2px, transparent 2px 54px);
  transform-origin: 50% 0%;
  transform: perspective(320px) rotateX(-58deg) translateX(calc(var(--px) * -0.4));
  animation: grid-run 3.6s linear infinite;
}

@keyframes grid-run {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 0, 0 54px; }
}

/* keep the type readable over the sunset without dimming the whole scene */
.hero::before {
  content: '';
  position: absolute;
  inset: -50px -30px;
  z-index: -1;
  background: radial-gradient(62% 58% at 50% 42%, rgba(4, 5, 13, 0.66), rgba(4, 5, 13, 0.3) 62%, transparent 78%);
  pointer-events: none;
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0 1px, rgba(0, 0, 0, 0) 1px 3px);
  mix-blend-mode: multiply;
}
.scanlines::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(130% 110% at 50% 38%, rgba(255, 255, 255, 0.045), transparent 58%),
    radial-gradient(120% 100% at 50% 50%, transparent 52%, rgba(0, 0, 0, 0.62) 100%);
}

/* -------------------------------------------------------------- hero */
.hero {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(48px, 9vh, 104px) 22px clamp(28px, 5vh, 60px);
  text-align: center;
}

.hero-kicker {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(7px, 1.1vw, 9px);
  letter-spacing: 0.28em;
  color: var(--amber);
  text-shadow: 0 0 12px rgba(255, 179, 0, 0.6);
  margin: 0 0 22px;
}

.hero-title {
  position: relative;
  margin: 0;
  color: #fff;
  font-size: clamp(17px, 4.4vw, 50px);
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-shadow:
    2px 0 0 rgba(255, 46, 166, 0.95),
    -2px 0 0 rgba(34, 232, 255, 0.95),
    0 0 26px rgba(162, 75, 255, 0.65),
    4px 7px 0 #25073d;
}

.hero-sub {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(8px, 1.4vw, 12px);
  letter-spacing: 0.2em;
  color: var(--cyan);
  margin: 20px 0 0;
  text-shadow: 0 0 14px rgba(34, 232, 255, 0.6);
}

.hero-lede {
  max-width: 700px;
  margin: 20px auto 0;
  color: var(--silver);
  font-size: 21px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.7);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 30px 0 0;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 40px 0 0;
  padding: 0;
}

.hero-stats > div {
  flex: 1 1 180px;
  max-width: 250px;
  padding: 12px 10px;
  background: rgba(11, 10, 28, 0.72);
  border: 2px solid var(--line);
  border-radius: 8px;
  box-shadow: inset 0 0 22px rgba(162, 75, 255, 0.16);
}

.hero-stats dt {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  letter-spacing: 0.14em;
  color: var(--gray);
  margin-bottom: 8px;
}

.hero-stats dd {
  margin: 0;
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(12px, 1.8vw, 17px);
  color: var(--lime);
  text-shadow: 0 0 12px rgba(140, 255, 43, 0.5);
}

/* ------------------------------------------------------------ layout */
main {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 22px 60px;
}

.section {
  margin: clamp(46px, 8vh, 92px) 0 0;
  scroll-margin-top: 24px;
}

.section-title {
  position: relative;
  margin: 0 auto 10px;
  text-align: center;
  font-size: clamp(11px, 2.1vw, 20px);
  letter-spacing: 0.12em;
  color: #fff;
  text-shadow: 0 0 8px var(--cyan), 0 0 26px rgba(34, 232, 255, 0.5), 3px 3px 0 #25073d;
}

.section-title span {
  display: inline-block;
  padding: 10px 18px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(rgba(37, 29, 74, 0.9), rgba(12, 8, 26, 0.9));
}

.section-sub {
  text-align: center;
  color: var(--gray);
  margin: 0 0 30px;
  font-size: 19px;
  letter-spacing: 0.06em;
}

/* ------------------------------------------------------------ buttons */
.btn {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--silver);
  background: linear-gradient(#241c48, #150f30);
  border: 2px solid #3a2f70;
  border-radius: 7px;
  padding: 13px 16px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.1s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover, .btn:focus-visible {
  color: #fff;
  border-color: var(--cyan);
  box-shadow: 0 0 18px rgba(34, 232, 255, 0.4);
  outline: none;
}

.btn:active { transform: translateY(2px); }

.btn-primary {
  color: #12040f;
  background: linear-gradient(#ffe94a, #ffb300 60%, #ff7a18);
  border-color: #ffd76a;
  box-shadow: 0 0 22px rgba(255, 179, 0, 0.45);
}
.btn-primary:hover { color: #12040f; border-color: #fff3b0; box-shadow: 0 0 30px rgba(255, 179, 0, 0.7); }

.btn-small { padding: 10px 12px; font-size: 8px; }

/* --------------------------------------------------------- cabinet row */
.cabinet-row {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(#171130, #0b0819 70%);
  border: 3px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6), 0 18px 34px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(26px);
  transition: transform 0.4s ease, opacity 0.5s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card.in-view { opacity: 1; transform: none; }
.card.in-view:hover, .card.in-view:focus-visible {
  border-color: var(--cyan);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5), 0 0 34px rgba(34, 232, 255, 0.28), 0 22px 40px rgba(0, 0, 0, 0.6);
  transform: translateY(-6px);
  outline: none;
}

.card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  letter-spacing: 0.1em;
  color: var(--gray);
}

.card-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--lime), #0d6b32);
  box-shadow: 0 0 10px rgba(140, 255, 43, 0.8);
  animation: led-blink 2.4s steps(1, end) infinite;
}
@keyframes led-blink { 0%, 92% { opacity: 1; } 93%, 100% { opacity: 0.25; } }

.card-cab { color: var(--amber); }
.card-genre { margin-left: auto; color: var(--violet); }

.card-art {
  position: relative;
  display: block;
  border-radius: 9px;
  overflow: hidden;
  border: 2px solid #2b2360;
  background: #000;
  line-height: 0;
}

.card-art img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.card-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.28) 0 1px, transparent 1px 3px);
  pointer-events: none;
}

.card-art:hover img, .card-art:focus-visible img { transform: scale(1.04); filter: saturate(1.25) brightness(1.08); }

.card-play {
  position: absolute;
  inset: auto 0 0 0;
  padding: 12px;
  text-align: center;
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  color: #fff;
  background: linear-gradient(rgba(4, 5, 13, 0), rgba(4, 5, 13, 0.85));
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  text-shadow: 0 0 10px var(--cyan);
}
.card-art:hover .card-play, .card-art:focus-visible .card-play { opacity: 1; transform: none; }

.card-title {
  margin: 14px 0 4px;
  font-size: clamp(12px, 1.7vw, 16px);
  color: #fff;
  text-shadow: 2px 0 0 rgba(255, 46, 166, 0.8), -2px 0 0 rgba(34, 232, 255, 0.8), 0 0 16px rgba(162, 75, 255, 0.5);
}

.card-tag {
  margin: 0 0 10px;
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  letter-spacing: 0.16em;
  color: var(--amber);
}

.card-desc { margin: 0 0 12px; color: var(--silver); font-size: 20px; }

.card-feats {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  font-size: 17px;
  color: var(--gray);
  letter-spacing: 0.05em;
}
.card-feats li { padding: 3px 0 3px 16px; position: relative; }
.card-feats li::before { content: '▸'; position: absolute; left: 0; color: var(--magenta); }

.card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 2px dashed var(--line);
}

.card-best {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: var(--gray);
  letter-spacing: 0.08em;
}
.card-best b { color: var(--lime); text-shadow: 0 0 10px rgba(140, 255, 43, 0.5); }

/* --------------------------------------------------------- scoreboard */
.board {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.board-panel {
  background: rgba(4, 5, 13, 0.85);
  border: 2px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 0 30px rgba(162, 75, 255, 0.14);
}

.board-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(#251d4a, #120d2a);
  border-bottom: 2px solid var(--line);
}

.board-head h3 {
  margin: 0;
  font-size: 10px;
  color: #fff;
  letter-spacing: 0.06em;
  text-shadow: 0 0 8px var(--cyan);
}

.board-head span {
  margin-left: auto;
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  color: var(--gray);
  letter-spacing: 0.1em;
}

.board-rows { margin: 0; padding: 8px 10px 12px; list-style: none; }

.board-row {
  display: grid;
  grid-template-columns: 34px 1fr 60px 74px;
  gap: 6px;
  align-items: center;
  padding: 6px 4px;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: var(--silver);
  border-bottom: 1px solid rgba(47, 39, 96, 0.6);
}
.board-row:last-child { border-bottom: none; }
.board-row.is-top { color: var(--lime); text-shadow: 0 0 10px rgba(140, 255, 43, 0.45); }
.board-row .r-rank { color: var(--violet); }
.board-row.is-top .r-rank { color: var(--lime); }
.board-row .r-name { color: var(--cyan); }
.board-row .r-lab { color: var(--gray); font-size: 8px; text-align: right; }
.board-row .r-score { text-align: right; }

.board-empty {
  padding: 22px 14px;
  color: var(--gray);
  font-size: 19px;
  text-align: center;
  letter-spacing: 0.06em;
}

.board-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  justify-content: center;
}

.board-note {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  letter-spacing: 0.12em;
  color: var(--gray);
}

/* ------------------------------------------------------- hall of fame */
.hall { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }

.hall-row {
  display: grid;
  grid-template-columns: 46px 62px 108px minmax(150px, 1fr) 118px 118px;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  background: linear-gradient(90deg, rgba(20, 16, 51, 0.94), rgba(11, 10, 28, 0.94));
  border: 2px solid var(--line);
  border-radius: 6px;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.hall-row:hover { transform: translateX(3px); border-color: var(--violet); }

.hall-row .h-rank { font-family: 'Press Start 2P', monospace; font-size: 11px; color: var(--violet); }
.hall-row .h-name {
  font-family: 'Press Start 2P', monospace;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--cyan);
}
.hall-row .h-score { font-family: 'Press Start 2P', monospace; font-size: 13px; color: var(--silver); }
.hall-row .h-game {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1;
  font-size: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--amber);
}
.hall-row .h-game em {
  font-style: normal;
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  letter-spacing: 0.1em;
  color: var(--gray);
}
.hall-row .h-lab {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  letter-spacing: 0.08em;
  color: var(--gray);
}
.hall-row .h-when {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  letter-spacing: 0.08em;
  text-align: right;
  color: var(--gray);
}

.hall-row.is-gold { border-color: var(--amber); box-shadow: 0 0 26px rgba(255, 179, 0, 0.22); }
.hall-row.is-gold .h-rank,
.hall-row.is-gold .h-score { color: var(--amber); text-shadow: 0 0 12px rgba(255, 179, 0, 0.5); }
.hall-row.is-silver { border-color: rgba(185, 196, 217, 0.6); }
.hall-row.is-silver .h-rank { color: var(--silver); }
.hall-row.is-bronze { border-color: rgba(255, 122, 24, 0.6); }
.hall-row.is-bronze .h-rank { color: var(--orange); }

.board-empty {
  margin: 0 0 14px;
  padding: 18px;
  text-align: center;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--gray);
  background: rgba(11, 10, 28, 0.6);
  border: 2px dashed var(--line);
  border-radius: 8px;
}

/* -------------------------------------------------------------- how-to */
.how-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.how-card {
  padding: 16px;
  background: rgba(11, 10, 28, 0.8);
  border: 2px solid var(--line);
  border-left: 4px solid var(--magenta);
  border-radius: 10px;
}

.how-card h4 {
  margin: 0 0 8px;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--amber);
}

.how-card p { margin: 0; color: var(--silver); font-size: 19px; }
.how-card b { color: var(--cyan); font-weight: normal; }

/* ------------------------------------------------------------- footer */
.site-footer {
  position: relative;
  z-index: 2;
  margin-top: 40px;
  padding: 26px 22px 44px;
  text-align: center;
  border-top: 2px solid var(--line);
  background: linear-gradient(rgba(4, 5, 13, 0.4), rgba(4, 5, 13, 0.95));
}

.site-footer .sig {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(9px, 1.5vw, 13px);
  letter-spacing: 0.1em;
  color: var(--magenta);
  text-shadow: 0 0 16px rgba(255, 46, 166, 0.6);
}
.site-footer .sig em { color: var(--amber); font-style: normal; }

.foot-meta {
  margin-top: 14px;
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  letter-spacing: 0.14em;
  color: var(--gray);
  line-height: 2;
}

/* ----------------------------------------------------------- responsive */
@media (max-width: 720px) {
  body { font-size: 19px; }
  .hero { padding-top: 54px; }
  .hero-title { font-size: clamp(15px, 6vw, 26px); }
  .card-desc, .how-card p { font-size: 18px; }
  .board-row { grid-template-columns: 30px 1fr 56px; font-size: 8px; }
  .board-row .r-lab { display: none; }
  .hall-row {
    grid-template-columns: 34px 1fr auto;
    grid-template-areas:
      "rank name score"
      "rank game score";
    row-gap: 3px;
    padding: 9px 12px;
  }
  .hall-row .h-rank { grid-area: rank; }
  .hall-row .h-name { grid-area: name; }
  .hall-row .h-score { grid-area: score; }
  .hall-row .h-game { grid-area: game; }
  .hall-row .h-lab, .hall-row .h-when { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scene-stars, .scene-stars::after, .scene-sun, .scene-grid, .card-led { animation: none; }
  .card { opacity: 1; transform: none; }
}
