/* Rainbow Universe website. One pastel look, shared by every page. */
@font-face {
  font-family: "Nunito";
  src: url(fonts/nunito.woff2) format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  color-scheme: light;
  /* Brand colours, taken from the Kids Rainbow Universe logo. */
  --purple: #8663c3;
  --purple-deep: #6a4bab;
  --ink: #4a3a78;
  --ink-soft: #6f639a;
  --lavender: #e4e0fb;
  --lavender-soft: #f3f1ff;
  --paper: #fbfaff;
  --pink: #ef7fa2;
  --orange: #f2a064;
  --yellow: #e6b33b;
  --green: #63bd89;
  --blue: #5ea2df;
  --violet: #9a7bd6;
  --card: #ffffff;
  --radius: 28px;
  --shadow: 0 10px 0 rgba(124, 111, 208, .08), 0 18px 40px rgba(124, 111, 208, .18);
  --font: "Nunito", ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  font-weight: 600;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.wrap { width: min(1180px, 100%); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------------- hero ---------------- */
.hero {
  position: relative;
  min-height: min(92svh, 900px);
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
  padding: calc(env(safe-area-inset-top, 0px) + 88px) var(--gutter) 150px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: radial-gradient(ellipse 80% 70% at 50% 42%, #f1eeff 0%, #e4e0fb 55%, #d5d1f6 100%);
}
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.06) translateY(-1.5%); } }

.hero-inner { max-width: 760px; display: grid; justify-items: center; gap: 18px; }
.brand { display: block; width: min(640px, 92vw); height: auto; overflow: visible; }
.logo {
  width: min(640px, 92vw);
  animation: pop-in 1s cubic-bezier(.3, 1.6, .5, 1) both, bob 5s ease-in-out 1s infinite;
}
.tagline {
  margin: 0;
  font-size: clamp(22px, 3.4vw, 34px);
  font-weight: 900;
  line-height: 1.2;
  color: var(--purple);
  -webkit-text-stroke: 8px #fff;
  paint-order: stroke fill;
  text-wrap: balance;
  filter: drop-shadow(0 4px 5px rgba(124, 111, 208, .25));
  animation: rise-in .8s .25s ease-out both;
}
/* the little promises under the tagline, one chip each */
.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  animation: rise-in .8s .4s ease-out both;
}
.badges li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px 7px 11px;
  border-radius: 999px;
  font-size: clamp(14px, 1.7vw, 16px);
  font-weight: 800;
  color: var(--ink);
  background: rgba(255, 255, 255, .8);
  box-shadow: 0 3px 0 rgba(124, 111, 208, .12);
}
.badges li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 25%, transparent); }

/* game friends in round bubbles, floating around the logo */
.friends { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.friends img {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  object-fit: cover;
  object-position: var(--p);
  border-radius: 50%;
  border: 6px solid #fff;
  box-shadow: 0 14px 30px rgba(106, 75, 171, .22);
  animation: pop-in .9s cubic-bezier(.3, 1.6, .5, 1) both, float 7s ease-in-out infinite;
  animation-delay: 0s, var(--d);
}
@keyframes float { 0%, 100% { translate: 0 0; rotate: -3deg; } 50% { translate: 0 -14px; rotate: 3deg; } }
@media (max-width: 1100px) { .friends { display: none; } }

/* ---------------- top bar, shared with rainbowuniverse.video ---------------- */
.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) var(--gutter) 10px;
  transition: background .3s, box-shadow .3s;
}
.topbar.scrolled, .topbar.solid {
  background: rgba(251, 250, 255, .85);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 1px 0 rgba(124, 111, 208, .12), 0 10px 30px rgba(124, 111, 208, .1);
}
.home {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 900;
  color: var(--purple);
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
.topbar.scrolled .home, .topbar.solid .home { opacity: 1; visibility: visible; }
.home .mark { width: 44px; height: auto; filter: drop-shadow(0 2px 3px rgba(124, 111, 208, .3)); }
.switch {
  display: flex;
  gap: 4px;
  margin-left: auto;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .8);
  box-shadow: inset 0 0 0 2px #fff, 0 6px 18px rgba(124, 111, 208, .16);
}
.switch a {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 900;
  color: var(--purple);
  text-decoration: none;
  transition: background .2s;
}
.switch a:hover { background: var(--lavender-soft); }
.switch a svg { width: 18px; height: 18px; fill: currentColor; }
.switch a[aria-current="page"] { color: #fff; background: var(--purple); box-shadow: 0 3px 0 var(--purple-deep); }
@media (max-width: 560px) {
  .home span { display: none; }
  .switch a { padding: 7px 13px; font-size: 14px; }
}
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; animation: rise-in .8s .55s ease-out both; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font: 900 18px/1 var(--font);
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.btn-play {
  color: #fff;
  background: var(--purple);
  border: 4px solid #fff;
  box-shadow: 0 6px 0 var(--purple-deep), 0 12px 24px rgba(106, 75, 171, .3);
}
.btn-play:hover { transform: translateY(-2px); }
.btn-play:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--purple-deep), 0 6px 12px rgba(106, 75, 171, .3); }
.btn-play .arrow { font-size: 1.1em; }
.btn-soft { color: var(--purple); background: #fff; border: 4px solid #fff; box-shadow: 0 5px 0 rgba(124, 111, 208, .22); }
.btn-soft:hover { transform: translateY(-2px); }

/* cloud edge between the hero and the page */
.clouds { position: absolute; left: 0; right: 0; bottom: -1px; height: 120px; z-index: 0; }
.clouds svg { width: 100%; height: 100%; display: block; }

/* twinkles */
.twinkle {
  position: absolute;
  width: var(--s);
  height: var(--s);
  left: var(--x);
  top: var(--y);
  z-index: -1;
  background: var(--c);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  animation: twinkle var(--t) ease-in-out infinite;
  animation-delay: var(--d);
}
@keyframes twinkle { 0%, 100% { opacity: .35; transform: scale(.6) rotate(0deg); } 50% { opacity: 1; transform: scale(1.1) rotate(20deg); } }
@keyframes pop-in { from { opacity: 0; transform: scale(.4) translateY(-30px); } to { opacity: 1; transform: none; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { translate: 0 0; rotate: -1deg; } 50% { translate: 0 -8px; rotate: 1deg; } }

/* ---------------- sections ---------------- */
section { padding-block: clamp(48px, 8vw, 96px); }
.section-head { text-align: center; margin-bottom: clamp(28px, 5vw, 48px); }
.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 900;
  line-height: 1.1;
  color: var(--purple);
  -webkit-text-stroke: 10px #fff;
  paint-order: stroke fill;
  filter: drop-shadow(0 5px 6px rgba(124, 111, 208, .25));
}
.section-head h2::after {
  content: "";
  display: block;
  width: 120px;
  height: 8px;
  margin: 14px auto 0;
  border-radius: 8px;
  background: linear-gradient(90deg, #f9b8ce, #fcceb3, #fde6a4, #bfe5cd, #bcd4f3, #d8c8f5);
}
.section-head p { margin: 0 auto; max-width: 36em; color: var(--ink-soft); font-size: clamp(16px, 2vw, 19px); }

/* ---------------- games ---------------- */
.games { background: var(--paper); }
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: clamp(18px, 3vw, 32px);
}
.game {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .25s cubic-bezier(.3, 1.4, .5, 1), box-shadow .25s;
}
.game:hover { transform: translateY(-6px) rotate(-.4deg); box-shadow: 0 14px 0 rgba(59, 35, 82, .07), 0 26px 50px rgba(59, 35, 82, .16); }
.game .art { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #f3e8ff; }
.game .art img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.game:hover .art img { transform: scale(1.04); }
.game .body { display: flex; flex-direction: column; gap: 10px; padding: 18px 22px 22px; flex: 1; }
.game h3 { margin: 0; font-size: 26px; font-weight: 900; line-height: 1.1; color: var(--purple); }
.game p { margin: 0; color: var(--ink-soft); font-size: 16px; flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  font-weight: 800;
  color: var(--purple);
  background: var(--lavender-soft);
}
.game .play { align-self: flex-start; margin-top: 6px; }
.stores { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.store {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  background: #1d1a24;
}
.store[aria-disabled="true"] { color: var(--ink-soft); background: #f1edf6; cursor: default; }
.store svg { width: 16px; height: 16px; fill: currentColor; }

.game.soon .art img { filter: saturate(.92); }

/* the playable game gets a wide featured card: picture beside the text */
.game.featured { grid-column: 1 / -1; }
.game.featured h3 { font-size: clamp(28px, 3.4vw, 40px); }
.game-logo { line-height: 0; }
.game-logo-svg { display: block; width: min(340px, 100%); height: auto; overflow: visible; margin: 4px 0 2px -6px; }
.game.featured p { font-size: 17.5px; }
@media (min-width: 760px) {
  .game.featured { display: grid; grid-template-columns: 1.3fr 1fr; }
  .game.featured .art { aspect-ratio: auto; min-height: 100%; }
  .game.featured .body { padding: clamp(24px, 3vw, 40px); justify-content: center; gap: 14px; }
  .game.featured p { flex: 0; }
}
.soon-head { margin: clamp(40px, 6vw, 64px) 0 18px; text-align: center; font-size: 24px; color: var(--ink-soft); }
.swipe-hint { display: none; }
@media (max-width: 700px) { .swipe-hint { display: inline-block; animation: nudge 1.6s ease-in-out infinite; } }
@keyframes nudge { 0%, 100% { translate: 0 0; } 50% { translate: 6px 0; } }
.soon-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(12px, 2vw, 22px);
}
.soon-grid .game { border-radius: 22px; }
.soon-grid .body { padding: 14px 16px 16px; gap: 8px; }
.soon-grid h3 { font-size: 20px; }
.soon-grid p { font-size: 14.5px; }
.soon-grid .ribbon { top: 10px; right: 10px; font-size: 12px; padding: 4px 10px; }
.ribbon {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  color: var(--purple);
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 3px 0 rgba(59, 35, 82, .1);
}
.ribbon.new { color: #fff; background: var(--pink); border: 3px solid #fff; }

/* ---------------- promises ---------------- */
/* A tinted band with soft cloud scallops top and bottom instead of hard edges. The scallop
   SVG is filled with the same #ebe7fd as the band. */
.band {
  --scallop: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 36'%3E%3Cpath fill='%23ebe7fd' d='M0 36V18C16 2 48 2 66 16 84 2 116 2 134 16 152 2 184 2 202 16 214 7 230 8 240 18V36Z'/%3E%3C/svg%3E");
  position: relative;
  z-index: 1;
  background: radial-gradient(ellipse 70% 60% at 50% 40%, rgba(255, 255, 255, .6), transparent 70%), #ebe7fd;
}
.band::before, .band::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 36px;
  background: var(--scallop) repeat-x;
  background-size: 240px 36px;
  pointer-events: none;
}
.band::before { bottom: 100%; margin-bottom: -1px; }
.band::after { top: 100%; margin-top: -1px; transform: scaleY(-1); background-position: 120px 0; }
.promise-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 155px), 1fr)); gap: clamp(12px, 2vw, 20px); }
@media (max-width: 560px) {
  .promise { padding: 18px 14px; }
  .promise img { height: 72px; }
  .promise h3 { font-size: 17px; }
  .promise p { font-size: 14px; }
}
/* phones: the upcoming games become a row you can swipe */
@media (max-width: 700px) {
  .soon-grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 62%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    margin-inline: calc(var(--gutter) * -1);
    padding: 6px var(--gutter) 18px;
    scrollbar-width: none;
  }
  .soon-grid::-webkit-scrollbar { display: none; }
  .soon-grid .game { scroll-snap-align: start; }
  .soon-grid .game:hover { transform: none; }
}
.promise {
  background: rgba(255, 255, 255, .85);
  border-radius: var(--radius);
  padding: 26px 22px 24px;
  text-align: center;
  box-shadow: 0 8px 0 rgba(59, 35, 82, .05);
}
.promise img { height: 96px; width: auto; margin: 0 auto 12px; filter: drop-shadow(0 8px 8px rgba(59, 35, 82, .18)); }
.promise h3 { margin: 0 0 6px; font-size: 21px; font-weight: 900; color: var(--purple); }
.promise p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }

/* ---------------- install how-to ---------------- */
.install .panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 18px;
  counter-reset: step;
}
.step {
  position: relative;
  background: #fff;
  border-radius: 22px;
  padding: 22px 22px 22px 70px;
  box-shadow: 0 8px 0 rgba(59, 35, 82, .05);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 18px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  background: var(--c, var(--purple));
  border: 3px solid #fff;
  box-shadow: 0 3px 0 rgba(124, 111, 208, .25);
}
.step:nth-child(1)::before { --c: var(--pink); }
.step:nth-child(2)::before { --c: var(--blue); }
.step:nth-child(3)::before { --c: var(--green); }
.step h3 { margin: 0 0 4px; font-size: 19px; font-weight: 900; color: var(--purple); }
.step p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }
.note { text-align: center; margin: 22px auto 0; color: var(--ink-soft); font-size: 15px; max-width: 40em; }

/* ---------------- our videos (rainbowuniverse.video) ---------------- */
.videos-promo { padding-top: 0; }
.promo {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  overflow: hidden;
  border-radius: calc(var(--radius) + 8px);
  background: #fff;
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform .25s cubic-bezier(.3, 1.4, .5, 1);
}
.promo:hover { transform: translateY(-5px); }
.promo-art {
  position: relative;
  display: grid;
  place-items: center;
  padding: clamp(24px, 4vw, 40px);
  background: radial-gradient(ellipse 80% 80% at 50% 45%, #f1eeff, #e4e0fb 60%, #d5d1f6);
}
.promo-art .avatar { position: relative; width: min(300px, 100%); }
.promo-art img { width: 100%; border-radius: 50%; border: 6px solid #fff; box-shadow: 0 12px 30px rgba(124, 111, 208, .3); }
/* sits on the avatar's lower-right rim, clear of the lettering */
.play-dot {
  position: absolute;
  right: -2%;
  bottom: -2%;
  width: 24%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 4px solid #fff;
  background: var(--pink);
  box-shadow: 0 6px 18px rgba(201, 90, 126, .35);
  transition: scale .2s;
}
.play-dot::after { content: ""; position: absolute; inset: 0; margin: auto; translate: 3px 0; width: 0; height: 0; border-style: solid; border-width: 13px 0 13px 21px; border-color: transparent transparent transparent #fff; }
.promo:hover .play-dot { scale: 1.1; }
.promo .body { display: grid; align-content: center; gap: 12px; padding: clamp(24px, 4vw, 44px); }
.promo .kicker { margin: 0; font-size: 14px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--pink); }
.promo h2 { margin: 0; font-size: clamp(28px, 3.6vw, 40px); font-weight: 900; line-height: 1.1; color: var(--purple); }
.promo p { margin: 0; color: var(--ink-soft); font-size: 17px; }
.promo .btn { justify-self: start; }
@media (max-width: 720px) {
  .promo { grid-template-columns: 1fr; }
  .promo-art .avatar { width: min(220px, 70%); }
}

/* ---------------- footer ---------------- */
footer {
  position: relative;
  margin-top: 36px;
  padding: 40px var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 40px);
  text-align: center;
  color: var(--ink-soft);
  background: radial-gradient(ellipse 60% 80% at 50% 20%, rgba(255, 255, 255, .6), transparent 70%), #ebe7fd;
}
footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  margin-bottom: -1px;
  height: 36px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 36'%3E%3Cpath fill='%23ebe7fd' d='M0 36V18C16 2 48 2 66 16 84 2 116 2 134 16 152 2 184 2 202 16 214 7 230 8 240 18V36Z'/%3E%3C/svg%3E") repeat-x;
  background-size: 240px 36px;
}
footer .brand { width: 220px; margin: 0 auto 12px; }
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-bottom: 8px; font-weight: 600; }
footer p { margin: 0; font-size: 14px; }
footer .mail { margin-bottom: 6px; font-weight: 800; color: var(--purple); user-select: all; }

/* ---------------- plain pages (privacy) ---------------- */
.page-top {
  position: relative;
  padding: calc(env(safe-area-inset-top, 0px) + 84px) var(--gutter) 90px;
  text-align: center;
  background: radial-gradient(ellipse 80% 90% at 50% 40%, #f1eeff, #d9d5f7);
  overflow: hidden;
}
.page-top .brand { width: min(340px, 72vw); margin: 0 auto; }
.prose { max-width: 720px; margin: 0 auto; padding: 40px var(--gutter) 64px; font-size: 17px; }
.prose h1 { font-size: clamp(32px, 5vw, 44px); font-weight: 900; color: var(--purple); line-height: 1.1; margin: 0 0 8px; }
.prose h2 { font-size: 23px; font-weight: 900; color: var(--purple); margin: 32px 0 6px; }
.prose p, .prose li { color: var(--ink); font-weight: 500; }
.prose .updated { color: var(--ink-soft); margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
