@font-face {
  font-family: "VT323";
  src: url("fonts/vt323.woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg: #000;
  --fg: #c8f7c5;
  --glow: rgba(120, 255, 140, 0.35);
  --muted: #6f8f72;
  --title-font: "VT323", ui-monospace, monospace;
  /* "Programming" is about 4em wide in VT323: fill the phone width with it. */
  --title-size: min(calc((100vw - 32px) / 4.1), 10rem);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0 16px;
  font-family: "VT323", ui-monospace, monospace;
  font-size: 1.4rem;
  line-height: 1.3;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 2rem;
  padding: 3rem 0;
  position: relative;
}

.screen {
  width: 48px;
  height: auto;
  color: var(--fg);
  filter: drop-shadow(0 0 6px var(--glow));
}

h1 {
  margin: 0;
  font-family: var(--title-font);
  font-size: var(--title-size);
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: -0.04em;
  text-shadow: 0 0 12px var(--glow);
}

.questions {
  min-height: 4.5em;
  max-width: 32ch;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: clamp(1.25rem, 5vw, 2.2rem);
}

.fade {
  transition: opacity 1s ease;
}

.fade.hidden {
  opacity: 0;
}

/* The screen fades in slowly; it fades out as fast as the rest. */
.screen.fade:not(.hidden) {
  transition-duration: 2s;
}

/* Easter egg over the whole page; it lets clicks through. */
.egg {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  background: rgba(0, 0, 0, 0.9);
  color: var(--fg);
  font-family: "VT323", ui-monospace, monospace;
  font-size: clamp(1.5rem, 6vw, 2.5rem);
  text-align: center;
  text-shadow: 0 0 8px var(--glow);
  pointer-events: none;
}

.egg::before {
  content: "> ";
  white-space: pre;
}

.egg::after {
  content: "█";
  margin-left: 0.1em;
  animation: blink 1s steps(1) infinite;
}

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

.egg.fade {
  transition-duration: 0.3s;
}

/* While animated, the hint shows on its own, large, in the middle of the page. */
.hint {
  margin: 4rem 0 0;
  color: var(--muted);
  font-size: 1.2rem;
}

.animated .hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: var(--fg);
  font-size: var(--title-size);
  line-height: 0.85;
  letter-spacing: -0.04em;
  text-shadow: 0 0 12px var(--glow);
  pointer-events: none;
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  padding: 1.5rem 0;
  font-size: 1.1rem;
}

a {
  color: var(--muted);
}

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

.legal {
  max-width: 70ch;
  margin: 0 auto;
  padding: 3rem 0;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

.legal h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.legal h2 {
  font-family: "VT323", ui-monospace, monospace;
  font-size: 1.6rem;
  margin: 2rem 0 0.5rem;
}

@media (prefers-reduced-motion: reduce) {
  .fade {
    transition: none;
  }

  .egg::after {
    animation: none;
  }
}
