@font-face {
  font-family: "Mystery Quest";
  src: url("/assets/MysteryQuest-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #07030d;
  --ink: #f6f1ff;
  --ink-soft: #c9b8e8;
  --violet: #9b6cff;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, "URW Palladio L", Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 5vw, 4rem);
  overflow-x: hidden;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 72% 58% at 50% 42%, rgba(91, 33, 182, 0.45) 0%, rgba(91, 33, 182, 0) 70%),
    radial-gradient(ellipse 52% 44% at 10% 90%, rgba(59, 7, 100, 0.55) 0%, rgba(59, 7, 100, 0) 70%),
    radial-gradient(ellipse 48% 40% at 92% 8%, rgba(126, 34, 206, 0.22) 0%, rgba(126, 34, 206, 0) 70%),
    linear-gradient(180deg, #07030d 0%, #0d0518 46%, #180a29 100%);
  background-repeat: no-repeat;
  background-size: cover;
  font-family: var(--sans);
  color: var(--ink);
}

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

body::before {
  z-index: 0;
  opacity: 0.72;
  background-image:
    radial-gradient(1.4px 1.4px at 8% 18%, rgba(246, 241, 255, 0.62) 0%, transparent 100%),
    radial-gradient(1px 1px at 16% 72%, rgba(246, 241, 255, 0.38) 0%, transparent 100%),
    radial-gradient(1.2px 1.2px at 27% 32%, rgba(246, 241, 255, 0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 38% 84%, rgba(246, 241, 255, 0.32) 0%, transparent 100%),
    radial-gradient(1.4px 1.4px at 52% 12%, rgba(246, 241, 255, 0.48) 0%, transparent 100%),
    radial-gradient(1px 1px at 63% 68%, rgba(246, 241, 255, 0.36) 0%, transparent 100%),
    radial-gradient(1.4px 1.4px at 74% 26%, rgba(246, 241, 255, 0.52) 0%, transparent 100%),
    radial-gradient(1px 1px at 83% 82%, rgba(246, 241, 255, 0.32) 0%, transparent 100%),
    radial-gradient(1.2px 1.2px at 91% 46%, rgba(246, 241, 255, 0.46) 0%, transparent 100%),
    radial-gradient(1px 1px at 7% 52%, rgba(246, 241, 255, 0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 44% 58%, rgba(246, 241, 255, 0.26) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 92%, rgba(246, 241, 255, 0.3) 0%, transparent 100%),
    radial-gradient(1.2px 1.2px at 33% 8%, rgba(155, 108, 255, 0.42) 0%, transparent 100%),
    radial-gradient(1.2px 1.2px at 87% 64%, rgba(155, 108, 255, 0.32) 0%, transparent 100%);
  background-repeat: no-repeat;
}

body::after {
  z-index: 0;
  background: radial-gradient(ellipse at center, transparent 42%, rgba(0, 0, 0, 0.38) 100%);
}

.stage {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.stage::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  width: min(76vw, 42rem);
  aspect-ratio: 1;
  transform: translate(-50%, -52%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.24) 0%, rgba(139, 92, 246, 0.08) 38%, transparent 70%);
  pointer-events: none;
}

.logo {
  position: relative;
  z-index: 1;
  width: clamp(15.5rem, 34vw, 24rem);
  max-width: 100%;
  min-width: 0;
  margin: 0;
  line-height: 0;
  filter: drop-shadow(0 0 1.25rem rgba(155, 108, 255, 0.12)) drop-shadow(0 0 4rem rgba(124, 58, 237, 0.08));
}

.logo img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.coming-soon {
  position: relative;
  z-index: 1;
  max-width: 100%;
  min-width: 0;
  margin: clamp(1.5rem, 4vh, 2.5rem) 0 0;
  font-family: "Mystery Quest", var(--serif);
  font-size: clamp(1.9rem, 4.2vw, 2.75rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.1;
  color: var(--ink);
  overflow-wrap: break-word;
  text-shadow: 0 0 1.5rem rgba(155, 108, 255, 0.22);
  text-wrap: balance;
}

::selection {
  background: rgba(155, 108, 255, 0.45);
  color: #fff;
}

.stage--error {
  max-width: 38rem;
}

.logo--small {
  width: clamp(10rem, 24vw, 15rem);
}

.logo--small img {
  transition: opacity 180ms ease;
}

.logo--small:hover img {
  opacity: 0.82;
}

.logo--small:focus-visible {
  border-radius: 4px;
  outline: 2px solid var(--violet);
  outline-offset: 6px;
}

.error-title {
  max-width: 100%;
  margin: clamp(1.25rem, 3vh, 2rem) 0 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.15;
  overflow-wrap: break-word;
}

.error-copy {
  margin: 0.7rem 0 0;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.6;
}

.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  margin-top: 2rem;
  padding: 0.75rem 1.25rem;
  text-align: center;
  border: 1px solid rgba(155, 108, 255, 0.45);
  border-radius: 999px;
  background: rgba(155, 108, 255, 0.08);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.back-link:hover {
  border-color: rgba(155, 108, 255, 0.72);
  background: rgba(155, 108, 255, 0.16);
}

.back-link:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 4px;
}

@media (max-height: 520px) {
  .logo:not(.logo--small) {
    width: min(46vh, 14rem);
  }

  .coming-soon {
    margin-top: 0.9rem;
    font-size: 1.45rem;
  }
}

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