@import url("styles.css");

:root {
  color-scheme: dark;
  --ink: #e7e0e6;
  --muted: #918792;
  --red: #ff334f;
  --amber: #ffcf6e;
  --paper: #08070b;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse at 50% 45%, rgb(111 15 37 / 17%), transparent 34rem),
    repeating-linear-gradient(0deg, rgb(255 255 255 / 1.5%) 0 1px, transparent 1px 4px),
    #08070b;
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
}

.nightmare {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  overflow: hidden;
  text-align: center;
  animation: room-flicker 8s linear infinite;
}

.nightmare::before,
.nightmare::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  content: "";
}

.nightmare::before {
  background: linear-gradient(90deg, transparent 0 49.8%, rgb(255 51 79 / 9%) 50%, transparent 50.2%);
  opacity: 0.4;
}

.nightmare::after {
  background: radial-gradient(ellipse at center, transparent 25%, rgb(0 0 0 / 82%) 100%);
}

.eyebrow,
.disclaimer {
  color: #a990a1;
  font-family: "Space Grotesk", sans-serif;
  font-size: 10px;
  letter-spacing: 2px;
}

.eyebrow { margin-bottom: 28px; }

.glitch-mark {
  color: var(--red);
  font-family: "Space Grotesk", sans-serif;
  font-size: 42px;
  font-weight: 700;
  text-shadow: 3px 0 #62152d, -3px 0 #43315d;
  animation: glitch 3.2s steps(1, end) infinite;
}

h1 {
  margin: 17px 0 12px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(38px, 8vw, 72px);
  letter-spacing: -3px;
  line-height: 1.03;
}

h1 span { color: var(--red); }

.warning {
  margin: 16px 0 0;
  color: #ff9a9b;
  font-size: 15px;
}

.price-display {
  margin: 27px 0 18px;
  color: var(--amber);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(64px, 14vw, 116px);
  font-weight: 700;
  letter-spacing: -7px;
  text-shadow: 0 0 22px rgb(255 51 79 / 45%);
  animation: price-haunt 4s ease-in-out infinite;
}

.story {
  max-width: 440px;
  color: #b7aeb7;
  font-size: 15px;
  line-height: 1.7;
}

.disclaimer {
  max-width: 520px;
  margin: 20px 0 28px;
  color: #7d707d;
  font-size: 9px;
  line-height: 1.8;
}

.escape-link {
  padding: 12px 17px;
  border: 1px solid #55313e;
  border-radius: 3px;
  color: #ffd5c1;
  font-size: 13px;
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease;
}

.escape-link:hover,
.escape-link:focus-visible {
  border-color: var(--red);
  background: rgb(255 51 79 / 12%);
  outline: none;
}

@keyframes room-flicker {
  0%, 19%, 21%, 53%, 55%, 100% { opacity: 1; }
  20%, 54% { opacity: 0.76; }
  50% { opacity: 0.94; }
}

@keyframes glitch {
  0%, 88%, 90%, 94%, 100% { transform: translate(0); }
  89% { transform: translate(3px, -1px); }
  91% { transform: translate(-2px, 1px); }
  93% { transform: translate(1px, 0); }
}

@keyframes price-haunt {
  0%, 100% { text-shadow: 0 0 18px rgb(255 51 79 / 30%); }
  50% { text-shadow: 0 0 34px rgb(255 51 79 / 65%); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
