@font-face {
  font-family: "Comic Relief";
  src: url("/assets/ComicRelief-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Comic Relief";
  src: url("/assets/ComicRelief-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #171513;
  --paper: #fffdf7;
  --orange: #ff4f17;
  --yellow: #ffc63d;
  --orbit-size: min(57vh, 600px, 88vw);
  --friend-size: clamp(58px, 8.2vw, 94px);
  --orbit-radius: calc(var(--orbit-size) * 0.425);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 17% 18%, rgb(255 198 61 / 0.12), transparent 24rem),
    radial-gradient(circle at 84% 78%, rgb(255 79 23 / 0.1), transparent 25rem),
    var(--paper);
  font-family: "Comic Relief", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  opacity: 0.2;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.11'/%3E%3C/svg%3E");
}

.landing {
  width: min(100%, 1200px);
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(24px, 4vh, 46px) 24px 18px;
  display: grid;
  grid-template-rows: auto 1fr;
}

.brand {
  display: flex;
  justify-content: center;
}

.brand h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wordmark {
  display: block;
  width: clamp(220px, 28vw, 355px);
  height: auto;
  filter: drop-shadow(0 2px 0 rgb(0 0 0 / 0.06));
}

.hero {
  display: grid;
  place-items: center;
  align-content: center;
  padding: 8px 0 16px;
  text-align: center;
}

.orbit {
  position: relative;
  width: var(--orbit-size);
  height: var(--orbit-size);
  isolation: isolate;
}

.orbit-ring {
  position: absolute;
  inset: 7.5%;
  z-index: -2;
  border: 2px dashed rgb(23 21 19 / 0.09);
  border-radius: 50%;
}

.orbit-ring-two {
  inset: 21%;
  border-style: solid;
  border-color: rgb(255 79 23 / 0.08);
}

.orbit-track {
  position: absolute;
  inset: 0;
  animation: orbit 28s linear infinite;
}

.friend-slot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  transform: rotate(var(--angle)) translateY(calc(-1 * var(--orbit-radius)));
}

.friend-anchor {
  transform: translate(-50%, -50%) rotate(calc(-1 * var(--angle)));
}

.friend {
  display: block;
  width: var(--friend-size);
  height: var(--friend-size);
  object-fit: contain;
  filter: drop-shadow(0 8px 8px rgb(30 20 12 / 0.11));
  opacity: 0;
  animation:
    appear 0.55s cubic-bezier(0.2, 0.85, 0.3, 1.25) forwards var(--delay),
    counter-orbit 28s linear infinite;
}

.junko-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 42%;
  transform: translate(-50%, -50%);
}

.junko-sunburst {
  position: absolute;
  inset: -30%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(255 198 61 / 0.34), rgb(255 198 61 / 0.08) 48%, transparent 70%);
  animation: breathe 3.2s ease-in-out infinite;
}

.junko {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 16px 10px rgb(104 40 7 / 0.16));
  animation: float 3.2s ease-in-out infinite;
}

.eyebrow {
  margin: -5px 0 7px;
  color: var(--orange);
  font-size: clamp(14px, 1.6vw, 18px);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h2 {
  margin: 0;
  font-size: clamp(24px, 3.2vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.waitlist-button {
  min-width: min(280px, 82vw);
  margin-top: 25px;
  padding: 15px 28px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  background: radial-gradient(circle at 50% 35%, #ffca46 0 34%, #ffae22 100%);
  box-shadow: 0 5px 0 var(--ink);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}

.waitlist-button:hover {
  filter: brightness(1.03) saturate(1.06);
  transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--ink);
}

.waitlist-button:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--ink);
}

.waitlist-button:focus-visible {
  outline: 4px solid rgb(255 79 23 / 0.3);
  outline-offset: 5px;
}

@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}

@keyframes counter-orbit {
  to {
    transform: rotate(-360deg);
  }
}

@keyframes appear {
  from {
    opacity: 0;
    scale: 0.2;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-8px) rotate(1deg);
  }
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.62;
    transform: scale(0.95);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

@media (max-height: 760px) and (min-width: 640px) {
  :root {
    --orbit-size: min(49vh, 520px, 76vw);
  }

  .landing {
    padding-top: 22px;
  }

  .hero {
    padding-top: 0;
  }
}

@media (max-width: 540px) {
  :root {
    --orbit-size: min(54vh, 460px, 94vw);
    --friend-size: clamp(55px, 18vw, 76px);
  }

  .landing {
    padding-inline: 14px;
  }

  .wordmark {
    width: min(275px, 70vw);
  }

  .junko-wrap {
    width: 46%;
  }

  .eyebrow {
    margin-top: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .orbit-track,
  .friend,
  .junko,
  .junko-sunburst {
    animation: none;
  }

  .friend {
    opacity: 1;
  }
}
