@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400;500&family=Manrope:wght@300;400;500&display=swap");

:root {
  color-scheme: dark;
  --bg: #07101d;
  --ink: #eef5ff;
  --muted: #8f9daf;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #6ce8cf;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    var(--bg);
  background-size: 48px 48px;
  font-family: "Manrope", system-ui, sans-serif;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.orb {
  position: fixed;
  z-index: -2;
  width: 46vw;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.12;
}

.orb-one {
  top: -20vw;
  right: -8vw;
  background: #5ce5ca;
}

.orb-two {
  bottom: -24vw;
  left: -12vw;
  background: #467cff;
}

main,
footer {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 104px;
  border-bottom: 1px solid var(--line);
  font-family: "DM Mono", monospace;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
}

.online {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.18em;
}

.online i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
  animation: pulse 2.4s infinite;
}

.hero {
  min-height: 680px;
  padding: 112px 0 92px;
  border-bottom: 1px solid var(--line);
}

.eyebrow,
.coordinates,
.number,
footer {
  font-family: "DM Mono", monospace;
}

.eyebrow {
  margin: 0 0 32px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.22em;
}

h1 {
  max-width: 920px;
  margin: 0;
  font-size: clamp(58px, 9.2vw, 128px);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.055em;
}

h1 span {
  color: transparent;
  -webkit-text-stroke: 1px rgba(238, 245, 255, 0.6);
}

.intro {
  max-width: 610px;
  margin: 48px 0 0;
  color: var(--muted);
  font-size: 17px;
  font-weight: 300;
  line-height: 1.95;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 64px;
}

.primary {
  display: inline-flex;
  gap: 42px;
  align-items: center;
  padding: 16px 22px;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
  transition: 180ms ease;
}

.primary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.coordinates {
  color: #647083;
  font-size: 10px;
  letter-spacing: 0.14em;
}

.about {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}

.game-shell {
  padding: 72px 0 96px;
}

.game-shell + .game-shell {
  border-top: 1px solid var(--line);
}

.game-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 34px;
}

.game-heading h2 {
  margin: 20px 0 10px;
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 300;
  letter-spacing: -0.04em;
}

.game-heading p {
  margin: 0;
  color: var(--muted);
}

.game-score {
  display: flex;
  gap: 32px;
  padding-bottom: 7px;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
}

.game-score b {
  margin-left: 8px;
  color: var(--accent);
  font-size: 15px;
  font-weight: 400;
}

.game-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(3, 10, 19, 0.74);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.35);
}

#signal-game,
#snake-game {
  display: block;
  width: 100%;
  height: min(420px, 56vw);
  min-height: 300px;
  touch-action: manipulation;
}

#snake-game {
  height: min(520px, 64vw);
  touch-action: none;
}

.game-start {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  gap: 8px;
  min-width: 184px;
  padding: 17px 22px;
  border: 1px solid var(--accent);
  color: var(--ink);
  background: rgba(7, 16, 29, 0.9);
  font: inherit;
  letter-spacing: 0.08em;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: 180ms ease;
}

.game-start:hover,
.game-start:focus-visible {
  color: var(--bg);
  background: var(--accent);
  outline: none;
}

.game-start small {
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
}

.game-start:hover small,
.game-start:focus-visible small {
  color: rgba(7, 16, 29, 0.65);
}

.game-start.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -45%);
}

.about article {
  min-height: 330px;
  padding: 64px 48px 72px 0;
}

.about article + article {
  padding-left: 48px;
  border-left: 1px solid var(--line);
}

.number {
  color: var(--accent);
  font-size: 11px;
}

h2 {
  margin: 42px 0 18px;
  font-size: 26px;
  font-weight: 400;
}

.about p {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: #647083;
  font-size: 10px;
  letter-spacing: 0.12em;
}

@keyframes pulse {
  50% {
    opacity: 0.35;
    transform: scale(0.8);
  }
}

@media (max-width: 680px) {
  main,
  footer {
    width: min(100% - 32px, 1180px);
  }

  nav {
    min-height: 84px;
  }

  .hero {
    min-height: auto;
    padding: 82px 0 70px;
  }

  .eyebrow {
    margin-bottom: 24px;
    font-size: 10px;
  }

  h1 {
    font-size: clamp(52px, 18vw, 84px);
  }

  .intro {
    margin-top: 34px;
    font-size: 15px;
  }

  .actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 34px;
    margin-top: 46px;
  }

  .about {
    grid-template-columns: 1fr;
  }

  .game-shell {
    padding: 58px 0 64px;
  }

  .game-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 24px;
  }

  .game-score {
    width: 100%;
    justify-content: space-between;
  }

  .about article {
    min-height: 280px;
    padding: 52px 12px 58px 0;
  }

  .about article + article {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  footer {
    gap: 20px;
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  .online i {
    animation: none;
  }
}
