/* 80SHACK pamphlet: CRT phosphor look.
 *
 * The game window IS a CRT screen, so the site rhymes with it: green
 * phosphor text, a monospace face, scanlines, a soft glow, and a blinking
 * block cursor. Kept to one file on purpose.
 */

:root {
  --phosphor: #4dff7a;          /* main green text */
  --phosphor-dim: #2fae52;      /* secondary / muted green */
  --phosphor-bright: #b6ffce;   /* highlights, headings */
  --bg: #060d07;                /* near-black green-black */
  --bg-panel: #0a160c;          /* slightly lifted panel */
  --glow: 0 0 6px rgba(77, 255, 122, 0.45);
  --mono: "Courier New", "DejaVu Sans Mono", "Consolas", monospace;

  /* Roadmap status colours: done glows green, planned glows amber (the old
   * "not lit up yet" monochrome-monitor colour). */
  --done: #4dff7a;
  --done-glow: 0 0 8px rgba(77, 255, 122, 0.55);
  --planned: #ffb84d;
  --planned-glow: 0 0 8px rgba(255, 184, 77, 0.5);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body.crt {
  min-height: 100vh;
  background: radial-gradient(ellipse at center, #0b1a0d 0%, var(--bg) 100%);
  color: var(--phosphor);
  font-family: var(--mono);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: 0.02em;
  text-shadow: var(--glow);
}

/* Scanline overlay sits above everything but ignores the mouse. */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  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.22) 3px
  );
}

/* A faint bright band drifting down the screen, like an old TV's vertical
 * hold slipping. Sits just under the scanlines. Off for reduced motion. */
.rollbar {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 140px;
  pointer-events: none;
  z-index: 9998;
  background: linear-gradient(
    to bottom,
    rgba(180, 255, 200, 0) 0%,
    rgba(180, 255, 200, 0.05) 50%,
    rgba(180, 255, 200, 0) 100%
  );
  animation: rollbar 9s linear infinite;
}

@keyframes rollbar {
  from {
    transform: translateY(-150px);
  }
  to {
    transform: translateY(100vh);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rollbar {
    display: none;
  }
}

.screen {
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid var(--phosphor-dim);
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}

.logo {
  font-size: 1.6rem;
  font-weight: bold;
  letter-spacing: 0.18em;
  color: var(--phosphor-bright);
  text-decoration: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
}

.nav a {
  color: var(--phosphor);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
}

.nav a:hover,
.nav a.current {
  color: var(--phosphor-bright);
  text-decoration: underline;
}

/* Download stands out: bold and amber. */
.nav a.nav-cta {
  color: var(--planned);
  text-shadow: var(--planned-glow);
  font-weight: bold;
}

.nav a.nav-cta:hover,
.nav a.nav-cta.current {
  color: var(--planned);
}

/* ---- Main content ---- */

.content {
  flex: 1 0 auto;
}

a {
  color: var(--phosphor-bright);
}

h1,
h2 {
  color: var(--phosphor-bright);
  letter-spacing: 0.06em;
}

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

.hero {
  text-align: center;
  padding: 1.5rem 0 2.5rem;
}

.hero-title {
  font-size: clamp(2.8rem, 12vw, 5.5rem);
  margin: 0;
  letter-spacing: 0.12em;
  text-shadow: 0 0 14px rgba(77, 255, 122, 0.6);
}

.hero-tagline {
  color: var(--phosphor-dim);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.9rem;
  margin: 0.5rem 0 2rem;
}

.hero-lines p {
  margin: 0.3rem 0;
  font-size: 1.15rem;
  min-height: 1.9rem; /* reserve space so typing doesn't shift the layout */
}

/* A block caret on the line currently being typed. */
.hero-lines p.typing::after {
  content: "\2588";
  margin-left: 0.1rem;
  animation: blink 1.1s step-end infinite;
}

.hero-cta {
  margin-top: 2rem;
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-cta a {
  text-decoration: none;
}

.hero-cta a:hover {
  text-decoration: underline;
}

/* ---- Prose blocks ---- */

.prose {
  max-width: 62ch;
  margin: 0 auto;
}

.prose p {
  margin: 0 0 1.1rem;
}

.page-head {
  margin-bottom: 2rem;
}

.page-head h1 {
  font-size: 2.4rem;
  margin: 0 0 0.4rem;
}

.lede {
  color: var(--phosphor-dim);
  font-size: 1.05rem;
}

/* ---- Features grid ---- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}

.feature {
  border: 1px solid var(--phosphor-dim);
  background: var(--bg-panel);
  padding: 1.1rem 1.2rem;
}

.feature h2 {
  font-size: 1.05rem;
  margin: 0 0 0.6rem;
}

.feature p {
  margin: 0;
  font-size: 0.95rem;
}

/* ---- Download / platforms ---- */

.platform-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  max-width: 26ch;
}

.platform-list li {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.3rem 0;
  white-space: nowrap;
}

.platform-name {
  color: var(--phosphor-bright);
}

.platform-note {
  color: var(--phosphor-dim);
  font-size: 0.9rem;
}

.note {
  color: var(--phosphor-dim);
  font-size: 0.9rem;
}

/* ---- Roadmap timeline ---- */

.legend {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  padding: 0;
  margin: 1rem 0 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-done {
  color: var(--done);
}

.legend-done .dot {
  background: var(--done);
  box-shadow: var(--done-glow);
}

.legend-planned {
  color: var(--planned);
}

.legend-planned .dot {
  background: var(--planned);
  box-shadow: var(--planned-glow);
}

.timeline {
  list-style: none;
  position: relative;
  max-width: 760px;
  margin: 2.5rem auto 0;
  padding: 0;
}

/* The glowing central line. */
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-1px);
  background: var(--phosphor-dim);
  box-shadow: var(--glow);
}

.milestone {
  position: relative;
  width: 50%;
  padding: 0 2.4rem 2.5rem;
  box-sizing: border-box;
}

/* Odd milestones sit on the left, even on the right (the alternating zig-zag). */
.milestone:nth-child(odd) {
  left: 0;
  text-align: right;
}

.milestone:nth-child(even) {
  left: 50%;
  text-align: left;
}

/* The node dot on the central line. Colour comes from the status class. */
.milestone::after {
  content: "";
  position: absolute;
  top: 0.5rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--bg);
}

.milestone:nth-child(odd)::after {
  right: -8px;
}

.milestone:nth-child(even)::after {
  left: -8px;
}

.milestone.done::after {
  background: var(--done);
  box-shadow: var(--done-glow);
}

.milestone.planned::after {
  background: var(--planned);
  box-shadow: var(--planned-glow);
}

.card {
  border: 1px solid var(--phosphor-dim);
  background: var(--bg-panel);
  padding: 1rem 1.1rem;
  display: inline-block;
  text-align: left;
}

.milestone.done .card {
  border-color: var(--done);
}

.milestone.planned .card {
  border-color: var(--planned);
}

.card .status-tag {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  padding: 0.1rem 0.4rem;
  border: 1px solid currentColor;
  margin-bottom: 0.6rem;
}

.milestone.done .status-tag {
  color: var(--done);
}

.milestone.planned .status-tag {
  color: var(--planned);
}

.card .kicker {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--phosphor-dim);
}

.card h2 {
  font-size: 1.15rem;
  margin: 0.2rem 0 0.5rem;
}

.milestone.done .card h2 {
  color: var(--done);
  text-shadow: var(--done-glow);
}

.milestone.planned .card h2 {
  color: var(--planned);
  text-shadow: var(--planned-glow);
}

.card p {
  margin: 0;
  font-size: 0.92rem;
}

/* On narrow screens, collapse to a single column with the line on the left. */
@media (max-width: 620px) {
  .timeline::before {
    left: 8px;
  }

  .milestone,
  .milestone:nth-child(odd),
  .milestone:nth-child(even) {
    width: 100%;
    left: 0;
    text-align: left;
    padding-left: 2.2rem;
    padding-right: 0;
  }

  .milestone:nth-child(odd)::after,
  .milestone:nth-child(even)::after {
    left: 1px;
    right: auto;
  }
}

/* ---- Status badge (home hero) ---- */

.status-badge {
  display: inline-block;
  margin: 0.75rem auto 0;
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--planned);
  color: var(--planned);
  text-shadow: var(--planned-glow);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

/* ---- Roadmap wry note ---- */

.roadmap-note {
  margin: 1.25rem 0 0;
  color: var(--phosphor-dim);
  font-size: 0.9rem;
  font-style: italic;
}

/* ---- Follow along (download) ---- */

.follow {
  margin-top: 2.5rem;
}

.follow h2 {
  font-size: 1.1rem;
  margin: 0 0 0.6rem;
}

.follow p {
  margin: 0;
  max-width: 52ch;
}

/* ---- Devlog ---- */

.feed-link {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border: 1px solid var(--phosphor-dim);
  padding: 0.05rem 0.4rem;
  margin-left: 0.5rem;
  text-decoration: none;
  vertical-align: middle;
}

.notes {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 64ch;
}

.note {
  border-bottom: 1px dashed var(--phosphor-dim);
  padding: 1.2rem 0;
}

.note:first-child {
  padding-top: 0;
}

.note-date {
  margin: 0 0 0.2rem;
  color: var(--phosphor-dim);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.note-title {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
}

.note-blurb {
  margin: 0 0 0.6rem;
  white-space: pre-wrap;
}

.note-tags {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--phosphor-dim);
  border: 1px solid var(--phosphor-dim);
  padding: 0.05rem 0.4rem;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 64ch;
  margin-top: 1.5rem;
}

.pager .disabled {
  color: var(--phosphor-dim);
  opacity: 0.5;
}

.pager-pos {
  color: var(--phosphor-dim);
  font-size: 0.85rem;
}

/* ---- Footer with blinking cursor ---- */

.footer {
  flex-shrink: 0;
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--phosphor-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--phosphor-dim);
  font-size: 0.85rem;
}

.prompt {
  letter-spacing: 0.1em;
}

.cursor {
  margin-left: 0.2rem;
  animation: blink 1.1s step-end infinite;
}

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

/* Respect users who do not want motion. */
@media (prefers-reduced-motion: reduce) {
  .cursor {
    animation: none;
  }
}
