:root {
  --bg: #0a080e;
  --fg: #8f72c9;
  --dim: #4a3a6b;
  --faint: #2a2140;
}

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

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: ui-monospace, "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
  display: grid;
  place-items: center;
  overflow: hidden;
}

/* faint scanlines over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 2px,
    rgba(0, 0, 0, 0.25) 2px 3px
  );
}

/* ---------- boot sequence ---------- */
#boot {
  position: fixed;
  inset: 0;
  padding: 24px 16px;
  font: inherit;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--fg);
  background: var(--bg);
  white-space: pre-wrap;
  z-index: 1;
  transition: opacity 0.6s;
}

#boot::after {
  content: "_";
  animation: blink 1s steps(1) infinite;
}

#boot.gone {
  opacity: 0;
  pointer-events: none;
}

/* ---------- main page ---------- */
main {
  text-align: center;
  padding: 0 16px;
  opacity: 0;
  transition: opacity 1s 0.3s;
}

main.show { opacity: 1; }

/* easter egg: same colour as the background, only shows when selected */
.whisper {
  color: var(--bg);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  margin-bottom: 1.5rem;
}

.whisper::selection { color: var(--fg); background: var(--faint); }

.title {
  font-size: clamp(2rem, 8vw, 4.5rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-shadow: 0 0 12px rgba(143, 114, 201, 0.45);
  animation: flicker 6s infinite;
}

.tagline {
  margin-top: 1.5rem;
  color: var(--dim);
  font-size: 0.9rem;
}

.cursor { animation: blink 1s steps(1) infinite; }

.credit {
  position: fixed;
  bottom: 16px;
  right: 16px;
  font-size: 0.75rem;
  color: var(--faint);
  text-decoration: none;
  opacity: 0;
  transition: color 0.2s, opacity 1s 0.6s;
}

.credit.show { opacity: 1; }
.credit:hover { color: var(--fg); }

@keyframes blink { 50% { opacity: 0; } }

@keyframes flicker {
  0%, 92%, 100% { opacity: 1; transform: none; }
  93% { opacity: 0.4; transform: translateX(2px); }
  94% { opacity: 1; transform: translateX(-1px); }
  96% { opacity: 0.7; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .title, .cursor, #boot::after { animation: none; }
}
