:root {
  --bg-0: #0f1021;
  --bg-1: #1b1538;
  --accent: #ffc23d;
  --accent-2: #ff5d73;
  --text: #f4f2ff;
  --muted: #b9b4d6;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.14);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  font-family:
    "Segoe UI",
    system-ui,
    -apple-system,
    sans-serif;
  color: var(--text);
  background: radial-gradient(
    1200px 800px at 20% 10%,
    var(--bg-1),
    var(--bg-0) 60%
  );
  overflow: hidden;
}

/* floating background orbs */
.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  filter: blur(60px);
}

.orb {
  position: absolute;
  border-radius: 50%;
  opacity: 0.55;
  animation: float 14s ease-in-out infinite;
}

.orb-1 {
  width: 340px;
  height: 340px;
  background: var(--accent);
  top: -80px;
  left: -60px;
}

.orb-2 {
  width: 280px;
  height: 280px;
  background: var(--accent-2);
  bottom: -70px;
  right: -40px;
  animation-delay: -4s;
}

.orb-3 {
  width: 220px;
  height: 220px;
  background: #6a5cff;
  top: 40%;
  right: 25%;
  animation-delay: -8s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) translateX(0);
  }
  50% {
    transform: translateY(-30px) translateX(20px);
  }
}

/* hero */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.card {
  text-align: center;
  padding: 3rem 3.5rem;
  border-radius: 24px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  max-width: 460px;
  animation: rise 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.logo {
  display: inline-flex;
  padding: 0.5rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 12px 24px rgba(255, 93, 115, 0.35));
  animation: bob 4s ease-in-out infinite;
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.card h1 {
  font-size: 2.4rem;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 0.6rem;
}

.accent {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 1.8rem;
}

.cta {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  color: #1a1030;
  padding: 0.8rem 1.8rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 24px rgba(255, 194, 61, 0.35);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(255, 93, 115, 0.45);
}

/* owner badge */
.owner {
  position: fixed;
  bottom: 18px;
  right: 20px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.owner strong {
  color: var(--text);
}

.owner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

@media (max-width: 480px) {
  .card {
    padding: 2.2rem 1.8rem;
  }
  .card h1 {
    font-size: 1.9rem;
  }
}

/* ---- bite / drop effect ---- */

/* zero-size SVG that only holds the mask definition */
.bite-svg {
  position: absolute;
  width: 0;
  height: 0;
}

/* wrapper that gets chomped and then dropped back in */
#stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  will-change:
    transform,
    -webkit-mask-position;
}

/* while biting, apply the SVG mask so holes become transparent */
#stage.biting {
  -webkit-mask: url(#biteMask);
  mask: url(#biteMask);
}

/* drop the whole stage back in from the top */
#stage.dropping {
  animation: dropIn 1.1s cubic-bezier(0.22, 1.2, 0.36, 1) both;
}

@keyframes dropIn {
  0% {
    transform: translateY(-120vh);
  }
  70% {
    transform: translateY(0);
  }
  82% {
    transform: translateY(-28px);
  }
  100% {
    transform: translateY(0);
  }
}

/* smooth chomp growth on each bite circle */
#biteHoles circle {
  transition: r 0.16s ease-out;
}

/* bite impact flashes */
#chompLayer {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
}

.chomp {
  position: absolute;
  width: 0;
  height: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.85) 0%,
    rgba(255, 194, 61, 0.55) 40%,
    rgba(255, 93, 115, 0) 70%
  );
  animation: chompPop 0.4s ease-out forwards;
}

@keyframes chompPop {
  0% {
    width: 0;
    height: 0;
    opacity: 0.9;
  }
  100% {
    width: 220px;
    height: 220px;
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  #stage.dropping,
  .orb,
  .logo {
    animation: none;
  }
}
