@font-face {
  font-family: "Lemon";
  src: url("/fonts/Lemon-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Bungee";
  src: url("/fonts/Bungee-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #f6f2f7;
  --muted: rgba(246, 242, 247, 0.72);
  --font-display: "Lemon", "Trebuchet MS", sans-serif;
  --font-spell: "Bungee", "Trebuchet MS", sans-serif;
  --font-body: "Avenir Next", "Segoe UI", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: #07070c;
  color: var(--ink);
}

body.home {
  display: flex;
  flex-direction: column;
  height: 100svh;
  height: 100dvh;
  overscroll-behavior: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.stack {
  position: relative;
  display: block;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}

.panel {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 100%;
  flex-shrink: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  isolation: isolate;
}

.toolbar {
  flex: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: calc(0.55rem + env(safe-area-inset-top, 0px)) 1rem 0.55rem;
  background: rgba(7, 7, 12, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.toolbar__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(36px, 7vw, 48px);
  max-width: min(220px, 56vw);
}

.toolbar__logo img {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: brightness(1.06);
}

.panel__sky--spell {
  background:
    radial-gradient(ellipse 70% 50% at 20% 20%, rgba(70, 140, 150, 0.35), transparent 55%),
    radial-gradient(ellipse 60% 45% at 85% 75%, rgba(40, 90, 110, 0.4), transparent 50%),
    linear-gradient(165deg, #0f1c22 0%, #163038 48%, #0c161a 100%);
}

.spell-grid {
  position: absolute;
  inset: 8% 6%;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(0.45rem, 1.8vw, 0.9rem);
  align-content: center;
  justify-items: center;
  filter: blur(7px);
  opacity: 0.55;
  transform: scale(1.04);
  pointer-events: none;
  user-select: none;
}

.spell-grid span {
  width: min(100%, 4.2rem);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-family: var(--font-spell);
  font-size: clamp(1.1rem, 3.5vw, 1.85rem);
  letter-spacing: 0.04em;
  color: rgba(230, 244, 242, 0.92);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(210, 235, 230, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.panel--soon .panel__soon-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(8, 14, 18, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
}

.panel__content--soon {
  z-index: 2;
}

.panel__spell-mark {
  width: clamp(96px, 22vw, 148px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 32px;
  font-family: "Bungee", sans-serif;
  font-size: clamp(2.4rem, 8vw, 3.4rem);
  letter-spacing: 0.02em;
  color: #e8f6f3;
  background: linear-gradient(155deg, #2a5a62 0%, #1a3c44 55%, #122e34 100%);
  border: 1px solid rgba(210, 235, 230, 0.22);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.35);
  filter: blur(1.5px);
}

.panel--soon .panel__lede {
  filter: blur(0.8px);
  opacity: 0.85;
}

.panel__sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, #51b0f2 0%, #87cbf3 45%, #c6e4f4 100%);
  overflow: hidden;
}

.panel__clouds {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.panel__clouds .cloud {
  position: absolute;
  left: var(--x);
  width: var(--size);
  height: calc(var(--size) * 0.58);
  animation: drift-y var(--speed) linear infinite;
  animation-delay: calc(var(--phase) * -1s);
  opacity: var(--alpha);
  filter: drop-shadow(0 8px 14px rgba(255, 255, 255, 0.25));
}

.panel__clouds .cloud svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.panel__clouds .cloud ellipse {
  fill: rgba(255, 255, 255, 0.95);
}

.panel__birds {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.panel__birds .bird--live {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform, opacity;
  transition: opacity 0.2s linear;
  pointer-events: none;
}

.panel__birds .bird--live svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.panel__floats {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.panel__float {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: clamp(44px, 8.5vw, 78px);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(40, 20, 50, 0.18));
  animation: float-treat var(--speed, 5.5s) ease-in-out infinite;
  animation-delay: var(--d, 0s);
  pointer-events: none;
  opacity: 0.95;
}

.panel__content {
  position: relative;
  z-index: 2;
  width: min(720px, calc(100% - 2.5rem));
  text-align: center;
  padding: 1rem;
}

.panel__eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(71, 36, 56, 0.62);
}

.panel:not(.panel--sweetpop) .panel__eyebrow {
  color: rgba(255, 255, 255, 0.6);
}

.panel__logo-heading {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 0.85rem;
}

.panel__icon {
  width: clamp(96px, 22vw, 148px);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 32px;
  box-shadow: 0 18px 30px rgba(40, 20, 50, 0.22);
}

.panel__wordmark {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 9vw, 3.6rem);
  letter-spacing: 0.04em;
  line-height: 1.05;
  background: linear-gradient(90deg, #eb4770, #f2598c, #ffb8d1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.panel__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 9vw, 4.2rem);
  letter-spacing: 0.03em;
  line-height: 1.05;
}

.panel__lede {
  margin: 0.85rem auto 0;
  max-width: 28rem;
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  line-height: 1.45;
  font-weight: 600;
  color: rgba(71, 36, 56, 0.78);
}

.panel:not(.panel--sweetpop) .panel__lede {
  color: rgba(255, 255, 255, 0.78);
}

.panel__cta {
  position: relative;
  display: inline-flex;
  margin-top: 1.5rem;
  min-height: 52px;
  align-items: center;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: #fff;
  background: linear-gradient(180deg, #ff6aa3 0%, #ff5294 42%, #f26bb8 100%);
  border: 2.4px solid #c73a72;
  box-shadow:
    0 14px 28px rgba(242, 89, 140, 0.35),
    inset 0 -7px 0 rgba(120, 20, 60, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.2s ease;
  cursor: pointer;
}

.panel__cta:hover {
  transform: translateY(-2px);
}

.panel__cta:not(.panel__cta--soon)::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 46%;
  height: 58%;
  border-radius: 0 999px 0 70%;
  background: radial-gradient(
    ellipse 90% 80% at 88% 18%,
    rgba(255, 252, 245, 0.98) 0%,
    rgba(255, 250, 240, 0.72) 28%,
    rgba(255, 255, 255, 0.18) 52%,
    transparent 72%
  );
  pointer-events: none;
  mix-blend-mode: screen;
  z-index: 1;
}

.panel__cta:not(.panel__cta--soon)::after {
  content: "";
  position: absolute;
  top: 16%;
  right: 11%;
  width: 0.85rem;
  height: 0.55rem;
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.95);
  transform: rotate(-32deg);
  box-shadow: 0 0 6px 1px rgba(255, 252, 245, 0.7);
  pointer-events: none;
  mix-blend-mode: screen;
  z-index: 2;
}

.panel__cta--soon::before,
.panel__cta--soon::after {
  display: none;
}

/* Spell Check brand - must win over Sweet Pop .panel__wordmark / .panel__cta */
.panel--spellcheck .panel__wordmark,
.panel--spellcheck .panel__wordmark--spell {
  font-family: "Bungee", sans-serif;
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: #ffffff;
  color: #ffffff;
  text-shadow: none;
  filter: none;
}

.panel--spellcheck .panel__cta,
.panel--spellcheck .panel__cta--soon {
  font-family: "Bungee", sans-serif;
  letter-spacing: 0.04em;
  font-style: normal;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: none;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
}

.panel--spellcheck .panel__cta--soon:disabled {
  cursor: not-allowed;
  opacity: 0.92;
}

.panel--spellcheck .panel__cta:hover {
  transform: none;
}

.dots {
  position: fixed;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.65rem 0.45rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
}

.dots button {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: height 0.25s ease, background 0.25s ease;
}

.dots button[aria-current="true"] {
  height: 24px;
  background: #fff;
}

@keyframes drift-y {
  from {
    transform: translateY(110vh);
  }
  to {
    transform: translateY(-30vh);
  }
}

@keyframes float-treat {
  0%,
  100% {
    transform: translateY(0) rotate(-6deg);
  }
  50% {
    transform: translateY(-16px) rotate(7deg);
  }
}

@media (max-width: 720px) {
  .dots {
    right: 0.55rem;
  }

  .toolbar {
    min-height: 52px;
    padding: calc(0.4rem + env(safe-area-inset-top, 0px)) 0.75rem 0.4rem;
  }

  .toolbar__logo {
    height: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .stack {
    scroll-behavior: auto;
  }
}
