:root {
  color-scheme: dark;
  --background: #000;
  --foreground: #fff;
  --muted: #a7a7ad;
  --line: #27272c;
  --blue: #169cf4;
  --pink: #ff299f;
  --display: "Arial Rounded MT Bold", "Trebuchet MS", "Avenir Next Rounded",
    sans-serif;
  --body: "Trebuchet MS", "Avenir Next", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  isolation: isolate;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--body);
  line-height: 1.5;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
  background-repeat: repeat;
  will-change: opacity;
}

body::before {
  opacity: 0.38;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(147, 220, 255, 0.9) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(255, 255, 255, 0.7) 0 0.7px, transparent 1.2px);
  background-position:
    18px 28px,
    73px 101px,
    126px 54px;
  background-size:
    157px 173px,
    211px 197px,
    131px 149px;
  animation: twinkle-near 5.8s ease-in-out infinite alternate;
}

body::after {
  opacity: 0.2;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.9) 0 1.3px, transparent 2px),
    radial-gradient(circle, rgba(255, 124, 202, 0.72) 0 0.8px, transparent 1.5px);
  background-position:
    44px 86px,
    151px 31px;
  background-size:
    293px 271px,
    347px 319px;
  animation: twinkle-far 8.4s ease-in-out infinite alternate-reverse;
}

body > * {
  position: relative;
  z-index: 1;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

.shell {
  width: min(1160px, calc(100% - 40px));
  margin-inline: auto;
}

.above-fold {
  position: relative;
  min-height: 100svh;
  overflow: visible;
  isolation: isolate;
}

.intro {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  flex-direction: column;
  padding-top: clamp(48px, 7vh, 84px);
  text-align: center;
}

.brand-logo {
  width: min(460px, 76vw);
  height: auto;
  aspect-ratio: 845 / 408;
  object-fit: contain;
}

.brand-heading {
  margin: 0;
  font-size: 0;
  line-height: 0;
}

.parents-link {
  position: absolute;
  top: 28px;
  right: 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 180ms ease;
}

.parents-link:hover {
  color: white;
}

.app-store-badge {
  display: block;
  width: min(230px, 72vw);
  margin-top: 28px;
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
  text-decoration: none;
  transition:
    filter 180ms ease,
    transform 180ms ease;
}

.intro .app-store-badge {
  position: absolute;
  top: 50svh;
  left: 50%;
  margin-top: 0;
  transform: translate(-50%, -50%);
}

.intro .app-store-badge:hover {
  transform: translate(-50%, calc(-50% - 2px));
}

.app-store-badge:hover {
  filter: brightness(1.12);
  transform: translateY(-2px);
}

.app-store-badge:focus-visible,
.parents-link:focus-visible,
footer a:focus-visible,
.legal-back:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}

.app-store-badge img {
  width: 100%;
  height: auto;
  aspect-ratio: 3840 / 1138;
  object-fit: contain;
}

.world {
  position: relative;
  padding-top: clamp(70px, 10vh, 110px);
  scroll-margin-top: 0;
}

.planet-wrap {
  position: absolute;
  left: 50%;
  top: clamp(245px, 34vh, 340px);
  z-index: 0;
  width: min(1200px, 104vw);
  aspect-ratio: 1920 / 1910;
  pointer-events: none;
  transform: translateX(-50%);
}

.planet {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 60px rgba(15, 188, 239, 0.14));
  animation: spin 72s linear infinite;
  will-change: transform;
}

.screenshot-grid {
  position: relative;
  z-index: 1;
  display: grid;
  width: 80vw;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 0;
  margin-inline: auto;
  padding-bottom: 42px;
}

.scroll-arrow {
  position: absolute;
  left: 50%;
  bottom: clamp(18px, 4vh, 42px);
  z-index: 3;
  display: block;
  width: clamp(38px, 3.5vw, 56px);
  text-decoration: none;
  transform: translateX(-50%);
  animation: arrow-bounce 1.55s ease-in-out infinite;
  filter:
    drop-shadow(0 0 14px rgba(255, 41, 159, 0.58))
    drop-shadow(0 8px 10px rgba(0, 0, 0, 0.72));
}

.scroll-arrow img {
  width: 100%;
  height: auto;
  aspect-ratio: 293 / 1036;
  object-fit: contain;
}

.scroll-arrow:focus-visible {
  outline: 3px solid white;
  outline-offset: 5px;
}

.screenshot-grid > img {
  width: 100%;
  height: auto;
  aspect-ratio: 2688 / 1242;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #111;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.58);
  object-fit: cover;
  transition:
    border-color 180ms ease,
    transform 220ms ease;
}

.screenshot-grid > img:hover {
  z-index: 2;
  border-color: #5b5b63;
  transform: translateY(-4px);
}

.post-gallery {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: clamp(70px, 9vw, 120px);
  padding-top: clamp(80px, 10vw, 130px);
  isolation: isolate;
}

.post-gallery .app-store-badge {
  position: relative;
  z-index: 1;
  margin-top: 0;
}

.robot-stars {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 0;
  width: min(820px, 100%);
  height: 100%;
  pointer-events: none;
  transform: translateX(-50%);
}

.post-team-royal {
  position: relative;
  z-index: 1;
  display: block;
  width: 216px;
  opacity: 1;
  filter: grayscale(1);
  transition:
    filter 220ms ease,
    transform 180ms ease;
}

.post-team-royal:hover {
  filter: grayscale(0);
  transform: translateY(-3px);
}

.post-team-royal:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 6px;
}

.post-team-royal img {
  width: 100%;
  height: auto;
  aspect-ratio: 265 / 276;
  object-fit: contain;
}

footer {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 26px;
  margin-top: clamp(80px, 10vw, 130px);
  padding-block: 52px 40px;
  border-top: 1px solid var(--line);
  text-align: center;
}

footer nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
}

footer nav a {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 180ms ease;
}

footer nav a:hover {
  color: white;
}

footer > p {
  margin: 0;
  color: #6f6f76;
  font-size: 0.75rem;
}

.legal-page {
  min-height: 100svh;
  padding: 48px 0;
}

.legal-shell {
  width: min(680px, calc(100% - 40px));
  margin-inline: auto;
}

.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(70px, 12vw, 130px);
}

.legal-header img {
  width: 150px;
  height: auto;
  aspect-ratio: 845 / 408;
  object-fit: contain;
}

.legal-back {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}

.legal-back:hover {
  color: white;
}

.legal-content p:first-child {
  margin-bottom: 12px;
  color: var(--pink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.legal-content h1 {
  margin: 0 0 30px;
  font-family: var(--display);
  font-size: clamp(3rem, 9vw, 5.4rem);
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.legal-content h2 {
  margin: 42px 0 12px;
  font-family: var(--display);
  font-size: 1.25rem;
}

.legal-content p,
.legal-content li {
  color: #c7c7cc;
  font-size: 1rem;
  line-height: 1.75;
}

.legal-content ul {
  padding-left: 22px;
}

.legal-content a {
  color: white;
  font-weight: 800;
  text-underline-offset: 4px;
}

.legal-note {
  margin-top: 45px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: #6f6f76 !important;
  font-size: 0.8rem !important;
}

.safety-shell {
  width: min(800px, calc(100% - 40px));
  margin-inline: auto;
}

.safety-content {
  padding-bottom: clamp(60px, 10vw, 110px);
}

.safety-content .safety-eyebrow {
  margin: 0 0 16px;
  color: white;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.safety-content h1,
.safety-content h2,
.safety-content h3 {
  margin-top: 0;
  color: var(--pink);
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1;
  text-transform: uppercase;
}

.safety-content h1 {
  max-width: 720px;
  margin-bottom: 30px;
  font-size: clamp(2.8rem, 8vw, 5.5rem);
}

.safety-content h2 {
  margin-bottom: 24px;
  padding-top: clamp(66px, 10vw, 100px);
  font-size: clamp(2rem, 5.5vw, 3.5rem);
}

.safety-content h3 {
  margin-bottom: 10px;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  letter-spacing: -0.015em;
}

.safety-content p {
  margin: 0;
  color: white;
  font-size: clamp(1.08rem, 2.2vw, 1.24rem);
  line-height: 1.75;
}

.safety-content p + p {
  margin-top: 20px;
}

.safety-feature {
  margin-top: 38px;
  padding-left: 22px;
  border-left: 3px solid var(--pink);
}

.safety-content a {
  color: var(--pink);
  font-weight: 900;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.safety-content a:hover {
  color: white;
}

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

@keyframes twinkle-near {
  0% {
    opacity: 0.2;
  }
  45% {
    opacity: 0.42;
  }
  100% {
    opacity: 0.3;
  }
}

@keyframes twinkle-far {
  0% {
    opacity: 0.1;
  }
  55% {
    opacity: 0.26;
  }
  100% {
    opacity: 0.17;
  }
}

@keyframes arrow-bounce {
  0%,
  100% {
    transform: translateX(-50%) translateY(-5px) scale(0.96);
    filter:
      drop-shadow(0 0 10px rgba(255, 41, 159, 0.4))
      drop-shadow(0 8px 10px rgba(0, 0, 0, 0.72));
  }
  50% {
    transform: translateX(-50%) translateY(7px) scale(1.03);
    filter:
      drop-shadow(0 0 20px rgba(255, 41, 159, 0.7))
      drop-shadow(0 10px 12px rgba(0, 0, 0, 0.78));
  }
}

@media (max-width: 820px) {
  .screenshot-grid {
    gap: 12px;
  }
}

@media (max-width: 540px) {
  .shell,
  .legal-shell,
  .safety-shell {
    width: min(100% - 24px, 480px);
  }

  .intro {
    padding-top: 44px;
  }

  .parents-link {
    top: 17px;
  }

  .brand-logo {
    width: min(340px, 82vw);
  }

  .world {
    padding-top: 64px;
  }

  .planet-wrap {
    top: clamp(225px, 31vh, 285px);
    width: 118vw;
  }

  .screenshot-grid {
    width: 80vw;
    gap: 8px;
  }

  .scroll-arrow {
    bottom: 24px;
    width: 42px;
  }

  .screenshot-grid > img {
    border-radius: 8px;
  }

  .post-team-royal {
    width: 174px;
  }

  footer nav {
    gap: 18px;
  }

  .legal-page {
    padding-top: 28px;
  }

  .legal-header {
    margin-bottom: 75px;
  }

  .legal-header img {
    width: 115px;
  }

  .safety-content h1 {
    font-size: clamp(2.55rem, 13vw, 4rem);
  }

  .safety-content h2 {
    font-size: clamp(1.85rem, 9vw, 2.7rem);
  }

  .safety-feature {
    margin-top: 32px;
    padding-left: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
