@font-face {
  font-family: "VCR OSD Mono";
  src: url("fonts/VCR_OSD_MONO_1.001.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
:root {
  --bg: #181009;
  --panel: #211610;
  --raise: #2a1d15;
  --line: #3a2a1e;
  --line-hi: #574131;
  --white: #f6ead5;
  --text: #e8d9c0;
  --grey: #b59f82;
  --muted: #8a7458;
  --accent: #e3cfa8;
  --accent-hi: #f6ead5;
  --copper: #c9794a;
  --chart: #e3cfa8;
  --ok: #9ccf6e;

  --head: "VT323", "IBM Plex Mono", ui-monospace, monospace;
  --pix: "Silkscreen", "Pixelify Sans", ui-monospace, monospace;
  --body: "VT323", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --vcr: "VCR OSD Mono", "Silkscreen", ui-monospace, monospace;
  --grid: #2a1c12;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --nav-h: 56px;
  --gutter: clamp(16px, 4vw, 48px);
}

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

/* One page per scroll step */
html { scroll-snap-type: y mandatory; scroll-behavior: smooth; }

body {
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    var(--bg);
  background-size: 48px 48px, 48px 48px, auto;
  background-position: center top;
  color: var(--text);
  font-family: var(--body);
  font-weight: 400;
  font-size: 1.3rem;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

strong, b { font-weight: 600; color: var(--white); }
em, i { font-style: italic; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--bg); }

/* Logo / wordmark */
.logo, .wordmark { font-family: var(--vcr); font-weight: 400; color: var(--white); text-decoration: none; line-height: 1; }
.logo { font-size: 1.25rem; }

/* Nav */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 var(--gutter);
  background: rgba(24, 16, 9, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--line);
}
.nav nav { display: flex; gap: 1.6rem; margin-left: auto; }
.nav nav a {
  font-family: var(--pix);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--grey);
  transition: color 0.15s;
}
.nav nav a:hover { color: var(--white); }

/* Buttons: blocky, hard shadow */
.btn {
  display: inline-block;
  padding: 0.5rem 0.9rem;
  background: var(--panel);
  color: var(--text);
  border: 2px solid var(--accent);
  box-shadow: 3px 3px 0 var(--line-hi);
  font-family: var(--pix);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.1s, color 0.1s, transform 0.1s, box-shadow 0.1s;
}
.btn:hover, .btn:focus-visible { background: var(--accent); color: var(--bg); transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--line-hi); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--line-hi); }
.btn-lg { padding: 0.9rem 1.5rem; font-size: 0.8rem; margin-top: 2rem; box-shadow: 4px 4px 0 var(--line-hi); }

/* Pages */
.page {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 2.5rem) var(--gutter) 3rem;
}
.inner { width: 100%; max-width: 1100px; margin: 0 auto; }

/* Hero */
.hero {
  align-items: center;
  text-align: center;
  padding-bottom: 4rem;
  background: radial-gradient(ellipse at 50% 60%, rgba(227, 207, 168, 0.09), transparent 60%);
  box-shadow: inset 0 0 160px rgba(0, 0, 0, 0.45);
}
.wordmark {
  font-size: clamp(3rem, min(13vw, 20vh), 10rem);
  line-height: 1;
}
.wordmark .cy { letter-spacing: 0.22em; margin-right: -0.22em; }
.tags {
  margin-top: 1.75rem;
  font-family: var(--pix);
  font-size: clamp(0.62rem, 1.6vw, 0.85rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--grey);
}
.tags span { color: var(--accent); }
.scroll {
  position: absolute;
  bottom: 2rem;
  display: block;
  line-height: 0;
  color: var(--grey);
  text-decoration: none;
  transition: color 0.15s, transform 0.15s;
}
.scroll:hover { color: var(--white); transform: translateY(3px); }

h2 {
  font-family: var(--head);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: clamp(2.6rem, 6.5vw, 4.4rem);
  line-height: 1;
  color: var(--white);
  margin-bottom: 2rem;
}
h2::after {
  content: "";
  display: block;
  width: 48px;
  height: 6px;
  margin-top: 1rem;
  background: var(--accent);
  box-shadow: 3px 3px 0 var(--line-hi);
}
h3 {
  font-family: var(--head);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 1.5rem;
  color: var(--white);
  margin-bottom: 0.5rem;
}
.lead { font-size: clamp(1.35rem, 2.6vw, 1.7rem); max-width: 44ch; }
.muted { color: var(--muted); }

/* Features */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2px;
  background: var(--line);
  border: 2px solid var(--line);
  box-shadow: 4px 4px 0 var(--line-hi);
}
.grid article { background: var(--bg); padding: 1.6rem; }
.grid p { color: var(--text); font-size: 1.2rem; }

kbd {
  font-family: var(--pix);
  font-size: 0.7em;
  color: var(--white);
  border: 1px solid var(--accent);
  padding: 0.05em 0.4em;
  box-shadow: 2px 2px 0 var(--line-hi);
}

/* Servers */
.servers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 2px;
  background: var(--line);
  border: 2px solid var(--line);
  box-shadow: 4px 4px 0 var(--line-hi);
}
.srv { background: var(--bg); padding: 1.5rem 1.75rem; display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.srv-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.srv-map { font-family: var(--head); font-weight: 400; text-transform: uppercase; letter-spacing: 0.06em; font-size: 2rem; line-height: 1; color: var(--white); }
.pill {
  display: inline-flex; align-items: center; gap: 0.45em;
  font-family: var(--pix); font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--grey); white-space: nowrap;
}
.pill::before { content: ""; width: 8px; height: 8px; background: var(--muted); }
.pill.on { color: var(--white); }
.pill-age { display: block; margin-top: 0.3rem; text-align: right; font-size: 0.95rem; color: var(--muted); }
.pill.on::before { background: var(--ok); box-shadow: 0 0 0 2px rgba(156, 207, 110, 0.25); }
.srv-pop b { font-family: var(--head); font-weight: 400; font-size: 3rem; line-height: 1; color: var(--white); }
.srv-pop b small { font-size: 1.3rem; color: var(--grey); }
.chart-head { display: flex; justify-content: space-between; align-items: center; color: var(--grey); font-family: var(--pix); font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; min-height: 1.6rem; }
.chart-head .live { color: var(--white); font-family: var(--body); text-transform: none; letter-spacing: 0; font-size: 1.1rem; }
.range { display: flex; gap: 2px; }
.range button {
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--grey);
  background: none; border: 1px solid transparent; padding: 0.15rem 0.5rem; cursor: pointer;
}
.range button[aria-pressed="true"] { color: var(--white); border-color: var(--line-hi); }
.chart { position: relative; height: 72px; touch-action: pan-y; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart-empty { height: 72px; display: grid; place-items: center; color: var(--muted); font-size: 1.1rem; border: 1px dashed var(--line-hi); }
.addr { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 1rem; }
.addr code { font-family: var(--mono); font-size: 0.95rem; color: var(--white); }
.copy {
  font: 0.6rem var(--pix); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--grey); background: none; border: 1px solid var(--line-hi); padding: 0.25rem 0.6rem; cursor: pointer;
}
.copy:hover { color: var(--bg); background: var(--accent); border-color: var(--accent); }
.srv.soon > * { opacity: 0.6; }

/* Play + footer */
.play { text-align: center; }
.play h2::after { margin-left: auto; margin-right: auto; }
.play .lead { margin: 0 auto; }
.play footer {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem var(--gutter);
  border-top: 2px solid var(--line);
  color: var(--grey);
  font-size: 1.1rem;
  text-align: left;
}
.play footer .logo { font-size: 0.9rem; }

@media (max-width: 720px) {
  .nav nav { display: none; }
  .nav .btn { margin-left: auto; }
  .page { padding-top: calc(var(--nav-h) + 1.5rem); }
  .play { padding-bottom: 7rem; }
}

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

/* CYBERIA wordmark: copper to cream, with a quick prismatic sweep now and then */
.cy {
  position: relative; display: inline-block; font-family: var(--vcr); font-weight: 400; letter-spacing: 0.18em; text-indent: 0;
  background: linear-gradient(100deg, var(--copper) 0%, #d9a773 22%, var(--accent-hi) 48%, #d9a773 70%, var(--copper) 100%);
  background-size: 320% 320%; background-position: 0% 50%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: cy-drift 23s ease-in-out infinite;
}
/* the gradient wanders: uneven stops so the motion never settles into a beat */
@keyframes cy-drift {
  0% { background-position: 0% 50%; }
  17% { background-position: 38% 20%; }
  31% { background-position: 14% 76%; }
  48% { background-position: 71% 44%; }
  63% { background-position: 46% 90%; }
  79% { background-position: 92% 30%; }
  100% { background-position: 0% 50%; }
}
.cy::after {
  content: attr(data-text); position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 38%, #ffb8b8 43%, #fff2a8 47%, #b8ffd9 51%, #b8dcff 55%, #e6bfff 59%, transparent 64%);
  background-size: 300% 100%; background-position: 160% 0;
  -webkit-background-clip: text; background-clip: text; color: transparent; opacity: 0;
  animation: cy-shine 13s linear infinite;
}
@keyframes cy-shine {
  0%, 90% { background-position: 160% 0; opacity: 0; }
  90.5% { opacity: 1; }
  99.5% { background-position: -60% 0; opacity: 1; }
  100% { opacity: 0; }
}
/* Scanlines */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 2000; pointer-events: none; opacity: 0.22;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.35) 0 1px, transparent 1px 3px);
}
@media (prefers-reduced-motion: reduce) { .cy, .cy::after { animation: none; } }

/* Pixelify Sans ships odd fi/fl ligatures */
h1, h2, h3, .cy, .logo, .wordmark, .srv-map, .stat dd, .card h3, .pop h4, .tile h2, .panel h2, .facts dd { font-variant-ligatures: none; font-feature-settings: "liga" 0, "clig" 0; }
