:root {
  color-scheme: dark;
  --background: #0d0b0a;
  --foreground: #fff7ed;
  --accent: #f97316;
  --accent-soft: rgba(249, 115, 22, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  position: relative;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow: hidden;
  background: var(--background);
  color: var(--foreground);
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Code", "Roboto Mono", Consolas, monospace;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before,
body::after {
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  content: "";
}

body::before {
  background:
    radial-gradient(circle at 28% 35%, rgba(249, 115, 22, 0.18), transparent 25%),
    radial-gradient(circle at 72% 64%, rgba(234, 88, 12, 0.12), transparent 28%);
  filter: blur(30px);
  animation: ambient-glow 10s ease-in-out infinite alternate;
}

body::after {
  background-image:
    linear-gradient(rgba(249, 115, 22, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(249, 115, 22, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at center, black, transparent 72%);
  animation: grid-drift 18s linear infinite;
}

.page-shell {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  padding: 2rem 1rem;
}

.message {
  width: min(100%, 72rem);
}

.message__title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  font-size: clamp(1rem, 4.8vw, 4rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.015em;
  text-shadow: 0 0 2.5rem var(--accent-soft);
}

.message__line {
  position: relative;
  display: block;
  width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.message__line::after {
  position: absolute;
  top: 0.1em;
  right: 0;
  width: 0.1em;
  height: 1.08em;
  background: var(--accent);
  box-shadow: 0 0 0.8em rgba(249, 115, 22, 0.8);
  opacity: 0;
  content: "";
}

.message__line--first {
  animation: type-first 2.25s steps(26, end) 0.45s forwards;
}

.message__line--first::after {
  animation:
    caret 0.7s step-end 0.45s 4,
    hide-caret 0.01s linear 2.95s forwards;
}

.message__line--second {
  color: #fdba74;
  animation: type-second 1.85s steps(22, end) 3s forwards;
}

.message__line--second::after {
  animation: caret 0.7s step-end 3s infinite;
}

@keyframes type-first {
  to {
    width: 26ch;
  }
}

@keyframes type-second {
  to {
    width: 22ch;
  }
}

@keyframes caret {
  0%,
  49% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

@keyframes hide-caret {
  to {
    opacity: 0;
  }
}

@keyframes ambient-glow {
  from {
    opacity: 0.7;
    transform: translate3d(-2%, -1%, 0) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translate3d(2%, 1%, 0) scale(1.04);
  }
}

@keyframes grid-drift {
  to {
    transform: translate3d(56px, 56px, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after,
  .message__line,
  .message__line::after {
    animation: none;
  }

  .message__line {
    width: auto;
  }

  .message__line::after {
    display: none;
  }
}
