:root {
  color-scheme: light;
  --bg: #f6f4ef;
  --surface: #ffffff;
  --text: #151515;
  --muted: #6b665f;
  --line: #ded8cf;
  --accent: #e5484d;
  --accent-strong: #c92a2f;
  --shadow: 0 22px 60px rgba(33, 29, 24, 0.08);
  --cursor-x: 12%;
  --cursor-y: 18%;
  --cursor-x-inverse: 88%;
  --cursor-y-inverse: 82%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100dvh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: clamp(20px, 5vw, 48px);
  color: var(--text);
  background:
    radial-gradient(circle at var(--cursor-x) var(--cursor-y), rgba(255, 47, 102, 0.18), transparent 28rem),
    radial-gradient(circle at var(--cursor-x-inverse) 22%, rgba(37, 99, 235, 0.12), transparent 26rem),
    radial-gradient(circle at 50% var(--cursor-y-inverse), rgba(20, 184, 166, 0.1), transparent 30rem),
    linear-gradient(135deg, #fffdf8 0%, var(--bg) 48%, #eef4ff 100%);
  background-size: 140% 140%;
  animation: page-gradient 16s ease-in-out infinite alternate;
}

main {
  width: min(100%, 460px);
}

h1,
p {
  margin: 0;
}

h1 {
  max-width: 11ch;
  font-size: clamp(2.7rem, 11vw, 5.75rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.creator {
  display: grid;
  gap: 22px;
  padding: clamp(24px, 5vw, 36px);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(1.2);
}

.page-kicker {
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.lede {
  max-width: 30rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.link-form {
  display: grid;
  gap: 14px;
  margin-top: 6px;
}

.field {
  display: grid;
  gap: 8px;
}

label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

input,
button {
  width: 100%;
  border-radius: 8px;
  font: inherit;
}

input {
  min-height: 52px;
  border: 1px solid rgba(21, 21, 21, 0.12);
  padding: 0 15px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(229, 72, 77, 0.14);
}

button {
  min-height: 52px;
  border: 0;
  padding: 0 18px;
  color: #fff;
  background: var(--text);
  cursor: pointer;
  font-weight: 800;
  transition: background 160ms ease, transform 160ms ease;
}

button:hover {
  background: var(--accent-strong);
}

button:active {
  transform: translateY(1px);
}

output {
  min-height: 1.5em;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.message-page {
  text-align: center;
}

.message {
  width: min(100%, 980px);
  display: grid;
  justify-items: center;
  gap: clamp(20px, 4vw, 32px);
}

.message h1 {
  max-width: 12ch;
  overflow-wrap: anywhere;
  font-size: clamp(3rem, min(13vw, 14vh), 8rem);
  line-height: 0.92;
}

.home-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.68);
  font-weight: 800;
  text-decoration: none;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.home-link:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.wtf {
  display: inline-block;
}

.wtf--rainbow {
  animation: wtf-rainbow 2s linear infinite;
}

@keyframes wtf-rainbow {
  0% { color: #e5484d; text-shadow: 0 0 18px rgba(229, 72, 77, 0.34); }
  25% { color: #d97706; text-shadow: 0 0 18px rgba(217, 119, 6, 0.32); }
  50% { color: #12805c; text-shadow: 0 0 18px rgba(18, 128, 92, 0.32); }
  75% { color: #2563eb; text-shadow: 0 0 18px rgba(37, 99, 235, 0.32); }
  100% { color: #e5484d; text-shadow: 0 0 18px rgba(229, 72, 77, 0.34); }
}

.wtf--glitch {
  position: relative;
  color: var(--accent);
  animation: wtf-glitch-base 3s infinite;
}

.wtf--glitch::before,
.wtf--glitch::after {
  content: "wtf";
  position: absolute;
  inset: 0;
}

.wtf--glitch::before {
  color: #2563eb;
  animation: wtf-glitch-1 3s infinite;
}

.wtf--glitch::after {
  color: #e5484d;
  animation: wtf-glitch-2 3s infinite;
}

@keyframes wtf-glitch-base {
  0%, 94%, 97%, 100% { transform: none; }
  95% { transform: skewX(-5deg); }
  96% { transform: skewX(5deg); }
}

@keyframes wtf-glitch-1 {
  0%, 94%, 97%, 100% { clip-path: inset(50% 0 50% 0); transform: none; }
  95% { clip-path: inset(20% 0 40% 0); transform: translate(-4px); }
  96% { clip-path: inset(60% 0 10% 0); transform: translate(4px); }
}

@keyframes wtf-glitch-2 {
  0%, 94%, 97%, 100% { clip-path: inset(50% 0 50% 0); transform: none; }
  95% { clip-path: inset(55% 0 10% 0); transform: translate(4px); }
  96% { clip-path: inset(10% 0 55% 0); transform: translate(-4px); }
}

.wtf--neon {
  color: var(--accent);
  animation: wtf-neon-glow 1.8s ease-in-out infinite, wtf-neon-flicker 5s step-end infinite;
}

@keyframes wtf-neon-glow {
  0%, 100% { text-shadow: 0 0 5px rgba(229, 72, 77, 0.35), 0 0 22px rgba(229, 72, 77, 0.2); }
  50% { text-shadow: 0 0 8px rgba(229, 72, 77, 0.45), 0 0 38px rgba(229, 72, 77, 0.28); }
}

@keyframes wtf-neon-flicker {
  0%, 89%, 91%, 93%, 100% { opacity: 1; }
  90%, 92% { opacity: 0.2; }
}

.wtf--blink {
  color: #d97706;
  animation: wtf-blink 1s step-end infinite;
}

@keyframes wtf-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.18; }
}

.wtf--shake {
  color: var(--accent);
  animation: wtf-shake 0.35s ease-in-out infinite;
}

@keyframes wtf-shake {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  20% { transform: translate(-2px, 1px) rotate(-1deg); }
  40% { transform: translate(2px, -1px) rotate(1deg); }
  60% { transform: translate(-1px, 2px) rotate(-0.5deg); }
  80% { transform: translate(1px, -1px) rotate(0.5deg); }
}

@keyframes page-gradient {
  0% {
    background-position: 0% 0%, 100% 0%, 50% 100%, 0% 50%;
  }

  100% {
    background-position: 18% 8%, 82% 18%, 56% 84%, 100% 50%;
  }
}

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

  body {
    animation: none !important;
  }
}

@media (max-width: 520px) {
  body {
    padding: 16px;
  }

  .creator {
    padding: 22px;
  }

  .message h1 {
    max-width: 9ch;
  }
}
