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

:root {
  color-scheme: only dark;
  --welcome-cyan: #00f5ff;
  --welcome-magenta: #fa00e8;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 280px;
  background: #000609;
}

.welcome-page {
  margin: 0;
  min-height: 100svh;
  background: #000609 url('/images/welcome-stars.webp') center / cover fixed;
  color: #f3f5fa;
  font-family: 'Courier New', monospace;
}

.welcome {
  display: grid;
  grid-template-columns: 290px 400px;
  align-items: center;
  justify-content: center;
  gap: 110px;
  min-height: 100svh;
  padding: 70px 32px 130px;
}

.welcome-portrait {
  width: 290px;
  aspect-ratio: 1;
  transform: translate(24px, -26px);
}

.welcome-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 5px solid var(--welcome-cyan);
  border-radius: 50%;
  box-shadow:
    0 0 12px #00f5ff,
    0 0 60px #00f5ff80;
  transition: box-shadow 180ms ease;
}

.welcome-panel {
  transform: translateX(24px);
}

.welcome-brand {
  margin: 0 0 23px;
  color: var(--welcome-magenta);
  font-family: VT323, monospace;
  font-size: 26px;
  letter-spacing: 5px;
}

.welcome h1 {
  margin: 0;
  font-size: 62px;
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: 5px;
}

.welcome-greeting {
  margin: 18px 0 30px;
  color: var(--welcome-cyan);
  font-family: VT323, monospace;
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: 2px;
}

.welcome-enter {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 62px;
  border: 2px solid var(--welcome-cyan);
  color: var(--welcome-cyan);
  font-family: VT323, monospace;
  font-size: 34px;
  letter-spacing: 1px;
  text-decoration: none;
  box-shadow:
    0 0 10px #00f5ff40,
    inset 0 0 12px #00f5ff0d;
  transition:
    background 140ms ease,
    box-shadow 140ms ease,
    color 140ms ease;
}

.welcome-enter:hover {
  background: var(--welcome-cyan);
  color: #000609;
  box-shadow: 0 0 20px #00f5ff60;
}

.welcome-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
}

.welcome-options a,
.welcome-options button,
.welcome-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #9ee9ee;
  font: inherit;
  font-size: 20px;
  line-height: 1.4;
  text-decoration: underline;
  text-underline-offset: 6px;
  cursor: pointer;
}

.welcome-options a:hover,
.welcome-options button:hover,
.welcome-footer a:hover {
  color: #fff;
}

.welcome-separator {
  color: #76bec7;
}

.welcome-rule {
  height: 1px;
  margin-top: 35px;
  background: var(--welcome-cyan);
  box-shadow: 0 0 6px #00f5ff50;
}

.welcome-footer {
  position: absolute;
  bottom: max(32px, env(safe-area-inset-bottom));
  left: max(48px, env(safe-area-inset-left));
}

.welcome-status {
  display: flex;
  align-items: center;
  min-height: 62px;
  margin: 0;
  color: var(--welcome-cyan);
  font-family: VT323, monospace;
  font-size: 29px;
  line-height: 1.2;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 7px;
}

.is-booting .welcome-portrait img {
  box-shadow:
    0 0 20px #00f5ff,
    0 0 65px #00f5ff90;
}

.is-booting .welcome-rule {
  animation: welcome-pulse 800ms ease-in-out infinite alternate;
}

.is-leaving .welcome-panel,
.is-leaving .welcome-footer {
  opacity: 0;
  transition: opacity 200ms ease;
}

@keyframes welcome-pulse {
  from {
    opacity: 0.35;
  }
  to {
    opacity: 1;
  }
}

@media (width <= 850px) {
  .welcome-panel {
    transform: none;
  }
  .welcome-portrait {
    transform: translateY(-6px);
  }
  .welcome {
    grid-template-columns: 220px minmax(0, 360px);
    gap: 48px;
  }

  .welcome-portrait {
    width: 220px;
  }
  .welcome h1 {
    font-size: 52px;
  }
  .welcome-greeting {
    font-size: 28px;
  }
}

@media (width <= 620px) {
  .welcome {
    grid-template-columns: minmax(0, 360px);
    align-content: center;
    gap: 30px;
    padding: max(38px, env(safe-area-inset-top)) 28px 26px;
    min-height: calc(100svh - 85px);
    text-align: center;
  }

  .welcome-portrait {
    width: 174px;
    justify-self: center;
    transform: none;
  }
  .welcome-brand {
    margin-bottom: 14px;
    font-size: 23px;
  }
  .welcome h1 {
    font-size: 46px;
    letter-spacing: 3px;
  }
  .welcome-greeting {
    margin: 16px 0 24px;
    font-size: 27px;
  }
  .welcome-options {
    gap: 10px;
  }
  .welcome-options a,
  .welcome-options button {
    font-size: 17px;
  }
  .welcome-rule {
    margin-top: 24px;
  }
  .welcome-status {
    justify-content: center;
    font-size: 25px;
  }
  .welcome-footer {
    position: static;
    padding: 0 28px max(28px, env(safe-area-inset-bottom));
    text-align: center;
  }
  .welcome-footer a {
    font-size: 17px;
  }
}

@media (height <= 560px) and (width > 620px) {
  .welcome {
    min-height: auto;
    padding-top: 34px;
    padding-bottom: 25px;
  }
  .welcome-footer {
    position: static;
    padding: 12px 32px 25px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .welcome-page {
    background-attachment: scroll;
  }
}
