@font-face {
  font-family: "DepartureMono";
  src:
    url("/fonts/DepartureMono-Regular.woff2") format("woff2"),
    url("/fonts/DepartureMono-Regular.woff") format("woff");
}

html,
body {
  height: 100vh;
  height: 100dvh;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  color: aliceblue;
  background: #111111;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  font-family: "DepartureMono", monospace;
}

.title-block,
.error-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

h1 {
  font-size: clamp(28px, 9vw, 55px);
  color: crimson;
  margin: 0;
  line-height: 1;
}

p {
  margin: 11px 0 0 0;
  font-size: clamp(14px, 4.5vw, 22px);
}

.bg-canvas {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: -2;
  touch-action: none;
}

.bg-glow {
  pointer-events: none;
  z-index: -1;
}

.title-links {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 11px;
  justify-content: center;
}

.title-link {
  font-size: 11px;
  color: crimson;
  text-decoration: none;
  background: rgba(17, 17, 17, 0.5);
  padding: 2px 4px;
  transition: all 0.15s;
  white-space: nowrap;
}

.title-link:hover {
  background: aliceblue;
  color: #111111;
}

.tl-bracket {
  color: aliceblue;
}

.title-links-dev {
  margin-top: 16px;
}

.title-link.title-link-dev {
  color: #80eaff;
}

.title-link:hover,
.title-link:hover .tl-bracket {
  color: #111111;
}

.sys-stats {
  position: fixed;
  bottom: 11px;
  left: 11px;
  font-size: 11px;
  color: rgba(240, 248, 255, 0.25);
  z-index: 10;
  pointer-events: none;
  user-select: none;
}

.sys-stats .num {
  color: rgba(220, 20, 60, 0.7);
}

.snake-trigger {
  position: fixed;
  width: 77px; /* 7 chars * 11px */
  height: 11px;
  z-index: 5;
  cursor: pointer;
}

::selection,
::-moz-selection {
  background-color: crimson;
  color: aliceblue;
  text-shadow: 0 0 4px aliceblue;
}

/* ── Mobile / touch ──────────────────────────────── */

@media (max-width: 600px), (pointer: coarse) {
  h1 {
    font-size: clamp(28px, 9vw, 55px);
  }

  p {
    font-size: clamp(14px, 4.5vw, 22px);
  }

  .title-link {
    padding: 10px 14px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .sys-stats {
    bottom: max(11px, env(safe-area-inset-bottom));
  }
}

/* ── Focus indicators ────────────────────────────── */

a:focus-visible {
  outline: 1px solid rgba(220, 20, 60, 0.6);
  outline-offset: 2px;
}

/* ── Reduced motion ──────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
