@font-face {
  font-family: "Poppins";
  src: url("/poppins-600.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

:root {
  --bg: #FAF7FC;
  --glow: rgba(155, 63, 191, 0.14);
  --ink: #1E1E1E;
  --accent: #9B3FBF;
  --shadow: rgba(30, 30, 30, 0.12);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141314;
    --glow: rgba(212, 139, 234, 0.16);
    --ink: #F4F1F5;
    --accent: #D48BEA;
    --shadow: rgba(0, 0, 0, 0.45);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: radial-gradient(60vmax 60vmax at 50% 38%, var(--glow), transparent 70%), var(--bg);
  color: var(--ink);
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.stage {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 4vh, 40px);
  padding: 32px 16px;
  text-align: center;
}

/* Boo */
.boo {
  position: relative;
  width: clamp(140px, 32vw, 220px);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  border-radius: 24px;
}
.boo:focus-visible { outline: 3px solid var(--accent); outline-offset: 8px; }
.boo svg { display: block; width: 100%; height: auto; overflow: visible; }
.boo-body { fill: #FFFFFF; stroke: #1E1E1E; stroke-width: 4; stroke-linejoin: round; }
.boo-eyes ellipse { fill: #1E1E1E; }
.boo-shine { fill: #FFFFFF; }
.boo-cheek { fill: #F4A6B8; }
.boo-smile { fill: none; stroke: #1E1E1E; stroke-width: 3.5; stroke-linecap: round; }
.boo-open { fill: #1E1E1E; opacity: 0; }
.boo-hand { fill: #FFFFFF; stroke: #1E1E1E; stroke-width: 3.5; opacity: 0; transform-box: view-box; transform-origin: 98px 84px; }
.boo-spark { fill: var(--accent); transform-box: fill-box; transform-origin: center; }
.boo-look { transition: transform .12s ease-out; }
.boo-shadow {
  display: block;
  width: 56%;
  height: 10px;
  margin: 10px auto 0;
  border-radius: 50%;
  background: var(--shadow);
  filter: blur(3px);
}

/* Saying hi: the hand waves, the mouth opens */
.boo.is-hi .boo-hand { opacity: 1; }
.boo.is-hi .boo-open { opacity: 1; }
.boo.is-hi .boo-smile { opacity: 0; }

/* The words */
.title { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 600; line-height: 1.05; }
.word { font-size: clamp(40px, 11vw, 88px); letter-spacing: 0.08em; padding-left: 0.08em; }
.soon { font-size: clamp(16px, 3.6vw, 24px); letter-spacing: 0.32em; padding-left: 0.32em; text-transform: uppercase; color: var(--accent); }

/* Sparkles when Boo says hi */
.burst { position: fixed; pointer-events: none; z-index: 2; }
.burst span {
  position: absolute; left: 0; top: 0;
  width: var(--s); height: var(--s);
  margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  background: var(--c);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: burst .9s ease-out forwards;
}

/* Motion, only for people who haven't asked for less */
@media (prefers-reduced-motion: no-preference) {
  .boo-float { animation: float 3.6s ease-in-out infinite; }
  .boo-shadow { animation: shadow 3.6s ease-in-out infinite; }
  .boo-eyes { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
  .boo-spark { animation: twinkle 2.2s ease-in-out infinite; }
  .boo-spark.two { animation-delay: 1.1s; }
  .boo.is-hi .boo-hand { animation: wave .45s ease-in-out 4 alternate; }
}

@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes shadow { 50% { transform: scaleX(.82); opacity: .7; } }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes twinkle { 50% { transform: scale(.55); opacity: .55; } }
@keyframes wave { from { transform: rotate(-14deg); } to { transform: rotate(18deg); } }
@keyframes burst { to { transform: translate(var(--dx), var(--dy)) scale(.4); opacity: 0; } }
