:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #7a7a7a;
  --line: #e6e6e6;
  --accent: #5865f2; /* discord blurple */
  --fade: 1.6s;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  /* faint vignette so pure white doesn't feel flat */
  background-image: radial-gradient(ellipse at 50% 30%, #ffffff 0%, #f3f3f3 100%);
}

.stage {
  max-width: 420px;
  margin: 0 auto;
  padding: 10vh 24px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* --- the meme --------------------------------------------------- */

.true {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.true img {
  width: min(240px, 60vw);
  display: block;
  /* the meme has a white background; multiply makes that vanish into the page */
  mix-blend-mode: multiply;
  opacity: 0;
  animation: face var(--fade) cubic-bezier(.2,.7,.2,1) forwards;
  cursor: pointer;
  touch-action: manipulation; /* no double-tap zoom when people spam-tap him */
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* 404 page: the whole thing is upside down */
.true.false img { rotate: 180deg; }

.true img.nod { animation: face var(--fade) cubic-bezier(.2,.7,.2,1) forwards, nod .45s ease-out; }
.word.pop { animation: rise 0.9s ease-out forwards, pop .35s cubic-bezier(.2,.8,.3,1.4); }

.word {
  margin-top: 18px;
  font-size: clamp(56px, 18vw, 84px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--fg);
  opacity: 0;
  animation: rise 0.9s ease-out forwards;
  animation-delay: calc(var(--fade) * 0.75);
}

/* longer easter egg phrases get smaller so they still fit on a phone */
.word.long   { font-size: clamp(38px, 11vw, 52px); letter-spacing: -0.01em; }
.word.longer { font-size: clamp(28px, 8vw, 38px); letter-spacing: 0; line-height: 1.15; }

/* the three dots trickle in one after another, like the meme is thinking */
.dots { position: relative; color: transparent; }
.dots::after {
  content: '';
  position: absolute;
  left: 0;
  color: var(--fg);
  animation: dots 1.2s steps(1) forwards;
  animation-delay: calc(var(--fade) * 0.75 + 0.5s);
}

.agree {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
  opacity: 0;
  animation: rise 0.8s ease-out forwards;
  animation-delay: calc(var(--fade) * 0.75 + 1.4s);
}
.agree b { color: var(--fg); font-weight: 600; }
.agree a { color: var(--fg); }

/* --- everything after the meme fades in last ---------------------- */

.discord, .socials {
  width: 100%;
  opacity: 0;
  animation: rise 0.8s ease-out forwards;
  animation-delay: calc(var(--fade) * 0.75 + 1.8s);
}

.discord {
  margin-top: 44px;
  padding: 22px 22px 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fafafa;
}

.discord h1 + p + .button { margin-top: 18px; }

.discord h1 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 600;
}

.discord p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.discord .hint {
  margin-top: 12px;
  font-size: 13px;
}

.button {
  display: block;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  touch-action: manipulation;
  transition: transform .15s ease, filter .15s ease;
}
.button:hover { filter: brightness(1.1); transform: translateY(-1px); }
.button:active { transform: translateY(0); }

.socials { margin-top: 44px; }

.socials h2 {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.socials ul { list-style: none; margin: 0; padding: 0; }

.person {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.person:last-child { border-bottom: 1px solid var(--line); }

.person-name { font-weight: 600; font-size: 15px; }

.person-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

.person-links a {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg);
  font-size: 13px;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease;
}
.person-links a:hover { border-color: #bbb; background: #f4f4f4; }

/* --- animations --------------------------------------------------- */

@keyframes face {
  from { opacity: 0; transform: scale(0.96); filter: grayscale(1) contrast(1.1) blur(14px); }
  to   { opacity: 1; transform: scale(1);    filter: grayscale(1) contrast(1.1) blur(0); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes nod {
  0%   { rotate: 0deg; }
  30%  { rotate: -6deg; }
  60%  { rotate: 5deg; }
  100% { rotate: 0deg; }
}

@keyframes pop {
  0%   { scale: 1; }
  40%  { scale: 1.12; }
  100% { scale: 1; }
}

/* the little true that peeks out of the bottom-right corner now and then */
.peek {
  position: fixed;
  right: 14px;
  bottom: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .35s ease, transform .35s ease;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
.peek img {
  width: 28px;
  mix-blend-mode: multiply;
  filter: grayscale(1) contrast(1.1);
}
.peek.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  cursor: pointer;
}

/* raining faces */
.drop {
  position: fixed;
  top: -120px;
  z-index: 10;
  pointer-events: none;
  mix-blend-mode: multiply;
  filter: grayscale(1) contrast(1.1);
  animation: fall 3s linear forwards;
}
@keyframes fall {
  to { transform: translateY(120vh) rotate(var(--spin, 360deg)); }
}

@keyframes dots {
  0%   { content: ''; }
  33%  { content: '.'; }
  66%  { content: '..'; }
  100% { content: '...'; }
}

@media (prefers-reduced-motion: reduce) {
  .true img, .word, .agree, .discord, .socials { animation: none; opacity: 1; }
  .drop { display: none; }
  .peek { transition: none; }
  .true img { filter: grayscale(1) contrast(1.1); }
  .dots { color: var(--fg); }
  .dots::after { display: none; }
}
