/*
  G33Z3R Radio's Last Page on the Internet
  Deliberately handmade. Deliberately a little too much.
*/

:root {
  --ink: #f6f1ff;
  --muted: #b9b4cb;
  --space: #05051a;
  --panel: #101044;
  --panel-dark: #080829;
  --cyan: #32f6ff;
  --pink: #ff3bd4;
  --yellow: #fff56a;
  --lime: #8dff6a;
  --purple: #8c63ff;
  --red: #ff544f;
  --line: #7777ff;
  --shadow: #000;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 10%, rgba(140, 99, 255, .18), transparent 28rem),
    radial-gradient(circle at 80% 35%, rgba(255, 59, 212, .12), transparent 25rem),
    var(--space);
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: .38;
  background-image:
    radial-gradient(circle, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle, #55eaff 0 1px, transparent 1.5px),
    radial-gradient(circle, #ff64dd 0 1px, transparent 1.5px);
  background-size: 47px 47px, 73px 73px, 109px 109px;
  background-position: 4px 8px, 19px 31px, 51px 12px;
}

a {
  color: var(--cyan);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover, a:focus-visible { color: var(--yellow); }

button, a { -webkit-tap-highlight-color: transparent; }

button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px dashed var(--yellow);
  outline-offset: 4px;
}

.top-strip {
  padding: .45rem 1rem;
  overflow: hidden;
  color: #000;
  background: repeating-linear-gradient(-45deg, var(--yellow) 0 12px, #ffbd31 12px 24px);
  border-bottom: 4px ridge #fff;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-align: center;
  text-shadow: 1px 1px 0 rgba(255,255,255,.55);
}

.page-shell {
  width: min(1060px, calc(100% - 24px));
  margin: 1.2rem auto 3rem;
}

.panel {
  position: relative;
  margin-bottom: 1rem;
  padding: clamp(1rem, 3vw, 1.8rem);
  background: linear-gradient(180deg, rgba(23, 23, 85, .96), rgba(8, 8, 41, .98));
  border: 4px ridge var(--line);
  box-shadow: 8px 8px 0 rgba(0,0,0,.8);
}

.hero {
  text-align: center;
  background:
    linear-gradient(rgba(7,7,38,.88), rgba(7,7,38,.94)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 1px, transparent 1px 6px);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 9px;
  pointer-events: none;
  border: 1px dotted rgba(50,246,255,.7);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 1rem;
}

.badge {
  display: inline-block;
  padding: .2rem .45rem;
  color: #000;
  background: var(--yellow);
  border: 2px outset #fff;
  font: 900 .68rem/1.2 "Courier New", monospace;
  transform: rotate(-1deg);
}

.badge.hot { color: #fff; background: var(--red); transform: rotate(2deg); }
.badge.lime { background: var(--lime); transform: rotate(-2deg); }

.eyebrow {
  margin: 0 0 .6rem;
  color: var(--yellow);
  font: 700 .78rem/1.4 "Courier New", monospace;
  letter-spacing: .13em;
  text-transform: uppercase;
}

h1, h2, h3 { margin-top: 0; }

h1 {
  margin-bottom: 1rem;
  color: var(--yellow);
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(2.8rem, 8vw, 6rem);
  line-height: .88;
  letter-spacing: .025em;
  text-transform: uppercase;
  text-shadow:
    4px 4px 0 var(--pink),
    8px 8px 0 #2640e8,
    12px 12px 0 #000;
}

h1 span {
  display: block;
  margin-bottom: .2em;
  color: var(--cyan);
  font-family: "Courier New", monospace;
  font-size: .42em;
  letter-spacing: .2em;
  text-shadow: 2px 2px 0 #000;
}

.hero-copy {
  width: min(760px, 100%);
  margin: 0 auto 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.small-print {
  margin: 0;
  color: var(--muted);
  font-size: .72rem;
}

.marquee-wrap {
  margin: 1rem 0;
  overflow: hidden;
  color: #000;
  background: var(--cyan);
  border: 3px outset #fff;
  font: 900 .78rem/1 "Courier New", monospace;
  white-space: nowrap;
}

.marquee {
  display: flex;
  width: max-content;
  animation: crawl 24s linear infinite;
}

.marquee span { padding: .65rem 2rem .6rem 0; }

@keyframes crawl {
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee { animation: none; }
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1rem;
  align-items: start;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  margin-bottom: .6rem;
  text-align: center;
}

.section-title h2,
.sidebar h2,
.escape-hatch h2,
.last-message h2 {
  margin-bottom: 0;
  color: var(--cyan);
  font: 900 clamp(1.15rem, 3vw, 1.8rem)/1.1 "Courier New", monospace;
  letter-spacing: .04em;
  text-shadow: 2px 2px 0 #000;
}

.tiny-icon { color: var(--pink); }
.intro { margin-top: 0; color: var(--muted); text-align: center; }

.decade-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
  margin: 1.2rem 0;
}

.decade-buttons button,
.mini-button,
.secret-button {
  min-height: 48px;
  padding: .7rem .8rem;
  color: #000;
  background: #d5d5d5;
  border: 4px outset #fff;
  border-radius: 0;
  font: 900 .78rem/1.1 "Courier New", monospace;
  cursor: pointer;
}

.decade-buttons button:hover,
.mini-button:hover,
.secret-button:hover {
  color: #000;
  background: var(--yellow);
}

.decade-buttons button:active,
.mini-button:active,
.secret-button:active {
  border-style: inset;
  transform: translate(1px, 1px);
}

.decade-buttons .surprise {
  grid-column: 1 / -1;
  color: #fff;
  background: linear-gradient(90deg, #5d36ec, #c625aa);
}

.memory-card {
  padding: .7rem;
  background: #232323;
  border: 5px ridge #888;
  box-shadow: inset 0 0 0 2px #000;
}

.memory-screen {
  min-height: 225px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1rem, 4vw, 2rem);
  color: #91ffa7;
  background:
    linear-gradient(rgba(0,35,8,.82), rgba(0,22,5,.95)),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,.06) 3px 4px);
  border: 8px inset #565656;
  border-radius: 8% / 5%;
  box-shadow: inset 0 0 35px rgba(80,255,120,.25);
  text-shadow: 0 0 8px rgba(90,255,135,.8);
}

.screen-label {
  margin: 0 0 .75rem;
  color: #bfffc9;
  font: 700 .72rem/1.2 "Courier New", monospace;
  letter-spacing: .13em;
}

.memory-text {
  margin: 0;
  font: 700 clamp(1.03rem, 3vw, 1.32rem)/1.55 "Courier New", monospace;
}

.machine-controls {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin: .8rem 0 .2rem;
}

.mini-button { flex: 1 1 180px; }
.mini-button:disabled { cursor: not-allowed; opacity: .45; }
.machine-status { margin: .55rem 0 0; color: #bbb; font: .7rem/1.4 "Courier New", monospace; }

.sidebar .panel { padding: 1rem; }
.sidebar h2 { margin-bottom: .85rem; font-size: 1rem; text-align: center; }
.sidebar p { margin-bottom: 0; color: var(--muted); font-size: .78rem; }

.counter {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin: .4rem 0 .8rem;
}

.counter span {
  padding: .15rem .28rem;
  color: #ff4646;
  background: #050505;
  border: 2px inset #777;
  font: 900 1rem/1.2 "Courier New", monospace;
}

.checklist label {
  display: block;
  margin: .55rem 0;
  font-size: .78rem;
}

.checklist input { accent-color: var(--pink); }

.weather-art {
  color: #e8e8e8;
  font-size: 3rem;
  text-align: center;
  text-shadow: 4px 4px 0 #000;
}

.weather-art span { color: var(--yellow); }

.museum-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8rem;
  margin-top: 1.2rem;
}

.museum-grid article {
  padding: 1rem;
  background: rgba(0,0,0,.22);
  border: 2px dotted var(--purple);
}

.museum-grid article:nth-child(even) { transform: rotate(.3deg); }
.museum-grid article:nth-child(odd) { transform: rotate(-.25deg); }

.museum-icon { margin-bottom: .45rem; font-size: 2rem; }
.museum-grid h3 { margin-bottom: .4rem; color: var(--yellow); font: 900 .9rem/1.2 "Courier New", monospace; }
.museum-grid p { margin: 0; color: #d2cee0; font-size: .82rem; }

.escape-hatch { text-align: center; }
.escape-hatch > p:not(.eyebrow):not(.honest-link) { width: min(700px, 100%); margin-right: auto; margin-left: auto; }

.exit-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .8rem;
  margin: 1.3rem 0 .8rem;
}

.exit-buttons a {
  display: inline-block;
  padding: .85rem 1rem;
  color: #000;
  background: var(--yellow);
  border: 4px outset #fff;
  font: 900 .85rem/1.1 "Courier New", monospace;
  text-decoration: none;
  box-shadow: 4px 4px 0 #000;
}

.exit-buttons a:hover { background: var(--cyan); }
.exit-buttons .big-exit { color: #fff; background: var(--red); }
.exit-buttons .big-exit:hover { color: #000; background: var(--lime); }
.honest-link { color: var(--muted); font-size: .7rem; }

.last-message { text-align: center; }
.last-message p { margin-bottom: 1rem; }
.secret-button { min-height: 0; padding: .35rem .6rem; font-size: .67rem; }
.secret-message { color: var(--pink); font: 900 .8rem/1.4 "Courier New", monospace; }

footer {
  width: min(1060px, calc(100% - 24px));
  margin: 0 auto 2.5rem;
  color: #a7a2b8;
  font: .72rem/1.6 "Courier New", monospace;
  text-align: center;
}

footer p { margin: .25rem 0; }
.source-note { color: #77728a; }

.noscript-note {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 9;
  padding: .7rem;
  color: #000;
  background: var(--yellow);
  border: 4px outset #fff;
  font-weight: 700;
  text-align: center;
}

@media (max-width: 760px) {
  .two-column { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .sidebar .panel { margin-bottom: 0; }
  .weather-box { grid-column: 1 / -1; }
  .museum-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  h1 { text-shadow: 3px 3px 0 var(--pink), 6px 6px 0 #2640e8, 9px 9px 0 #000; }
}

@media (max-width: 500px) {
  .page-shell { width: min(100% - 14px, 1060px); }
  .panel { padding: 1rem; box-shadow: 5px 5px 0 rgba(0,0,0,.8); }
  .decade-buttons, .museum-grid, .sidebar { grid-template-columns: 1fr; }
  .decade-buttons .surprise, .weather-box { grid-column: auto; }
  .counter span:nth-child(-n+3) { display: none; }
  .memory-screen { min-height: 260px; }
}

.memory-card.flash .memory-screen {
  animation: screen-flicker .34s steps(2, end);
}

@keyframes screen-flicker {
  0% { opacity: .55; filter: brightness(1.7); }
  35% { opacity: 1; filter: brightness(.75); }
  70% { opacity: .72; filter: brightness(1.35); }
  100% { opacity: 1; filter: brightness(1); }
}

@media (prefers-reduced-motion: reduce) {
  .memory-card.flash .memory-screen { animation: none; }
}

/* Permanent memory archives */
.archive-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .55rem;
  padding: .75rem 1rem;
  text-align: center;
}

.archive-nav a {
  display: inline-block;
  padding: .45rem .65rem;
  color: #000;
  background: var(--cyan);
  border: 3px outset #fff;
  font: 900 .7rem/1.1 "Courier New", monospace;
  text-decoration: none;
}

.archive-nav a:hover,
.archive-nav a[aria-current="page"] {
  color: #000;
  background: var(--yellow);
}

.browse-note {
  margin: -.2rem 0 1rem;
  color: #cfc9dc;
  font: .72rem/1.45 "Courier New", monospace;
  text-align: center;
}

.archive-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  margin-top: 1.2rem;
}

.archive-cards a {
  display: flex;
  min-height: 125px;
  flex-direction: column;
  justify-content: center;
  padding: 1rem;
  color: var(--ink);
  background: rgba(0,0,0,.3);
  border: 3px ridge var(--purple);
  text-decoration: none;
}

.archive-cards a:hover {
  color: #000;
  background: var(--yellow);
  transform: translate(-1px, -1px);
}

.archive-cards strong {
  margin-bottom: .45rem;
  color: var(--cyan);
  font: 900 1.3rem/1 "Courier New", monospace;
}

.archive-cards a:hover strong { color: #000; }
.archive-cards span { font-size: .78rem; }
.archive-fine-print { margin-bottom: 0; color: var(--muted); font-size: .7rem; text-align: center; }

.archive-hero h1 { font-size: clamp(2.45rem, 7vw, 5.4rem); }
.archive-hero .hero-copy { max-width: 800px; }
.archive-intro { max-width: 800px; margin: 0 auto; }

.memory-ledger {
  counter-reset: memory-file;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
}

.memory-ledger li {
  counter-increment: memory-file;
  position: relative;
  min-height: 170px;
  padding: 1.25rem 1.1rem 1rem 4.35rem;
  color: #1d1730;
  background:
    linear-gradient(90deg, transparent 0 3.1rem, rgba(210,54,54,.32) 3.1rem 3.18rem, transparent 3.18rem),
    repeating-linear-gradient(0deg, #fffde9 0 27px, #c9d9ef 27px 28px);
  border: 1px solid #c9bf94;
  box-shadow: 4px 5px 0 #000;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
}

.memory-ledger li::before {
  content: counter(memory-file, decimal-leading-zero);
  position: absolute;
  top: 1rem;
  left: .8rem;
  width: 2rem;
  color: #6d3fbf;
  font: 900 1rem/1 "Courier New", monospace;
  text-align: center;
}

.memory-ledger li:nth-child(4n+2) { transform: rotate(.18deg); }
.memory-ledger li:nth-child(4n+3) { transform: rotate(-.16deg); }
.memory-ledger p { margin: 0; }
.memory-ledger .memory-permalink {
  display: inline-block;
  margin-top: .85rem;
  color: #5c248a;
  font: 700 .68rem/1.2 "Courier New", monospace;
}

.archive-note {
  margin-top: 1rem;
  padding: 1rem;
  color: #d9d4e5;
  background: rgba(0,0,0,.24);
  border-left: 5px solid var(--pink);
  font-family: Georgia, "Times New Roman", serif;
}

.archive-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .8rem;
  text-align: center;
}

.archive-bottom a {
  display: inline-block;
  padding: .8rem 1rem;
  color: #000;
  background: var(--yellow);
  border: 4px outset #fff;
  font: 900 .78rem/1.1 "Courier New", monospace;
  text-decoration: none;
}

.archive-bottom a:first-child { color: #fff; background: var(--red); }
.archive-bottom a:hover { color: #000; background: var(--lime); }

@media (max-width: 820px) {
  .archive-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .memory-ledger { grid-template-columns: 1fr; }
}

@media (max-width: 500px) {
  .archive-cards { grid-template-columns: 1fr; }
  .archive-nav a { flex: 1 1 42%; }
  .memory-ledger li { min-height: 150px; padding-left: 3.8rem; }
}

