:root {
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  color: #203040;
  background: #ddf4ff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --sky: #ddf4ff;
  --leaf: #3b9b70;
  --leaf-dark: #287153;
  --sun: #ffd55a;
  --coral: #ff806e;
  --plum: #5c3c78;
  --ink: #203040;
  --cream: #fff9e8;
  --shadow: 0 10px 0 rgb(32 48 64 / 10%), 0 18px 38px rgb(32 48 64 / 13%);
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background: linear-gradient(180deg, #ddf4ff 0 25rem, #eefaf2 50rem, #d7efcf 100%);
}

button,
a { -webkit-tap-highlight-color: transparent; }

button { font: inherit; }

a:focus-visible,
button:focus-visible {
  outline: 4px solid #1c75d8;
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 50;
  padding: 10px 14px;
  border-radius: 12px;
  color: white;
  background: var(--plum);
  translate: 0 -150%;
}

.skip-link:focus { translate: 0; }

.page-shell {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  padding: max(24px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
}

.sky {
  position: absolute;
  inset: 0 0 auto;
  z-index: -1;
  height: 40rem;
  overflow: hidden;
  pointer-events: none;
}

.sky::after {
  content: "";
  position: absolute;
  right: -10%;
  bottom: -8rem;
  left: -10%;
  height: 14rem;
  border-radius: 50% 50% 0 0;
  background: #abd99c;
  box-shadow: 0 -28px 0 #c4e8b8;
}

.cloud {
  position: absolute;
  width: 116px;
  height: 36px;
  border-radius: 99px;
  background: rgb(255 255 255 / 72%);
  animation: cloud-drift 28s ease-in-out infinite alternate;
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  bottom: 0;
  border-radius: 50%;
  background: inherit;
}

.cloud::before { left: 16px; width: 54px; height: 54px; }
.cloud::after { right: 12px; width: 66px; height: 66px; }
.cloud-one { top: 8%; left: 4%; scale: .78; }
.cloud-two { top: 17%; right: 2%; scale: 1.1; animation-direction: alternate-reverse; }
.cloud-three { top: 43%; left: 47%; scale: .58; opacity: .48; }

.sun {
  position: absolute;
  top: 4.5rem;
  right: clamp(4rem, 13vw, 12rem);
  width: 82px;
  aspect-ratio: 1;
  border: 8px solid rgb(255 255 255 / 50%);
  border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #fff4bd, var(--sun) 62%, #f2be42);
  box-shadow: 0 0 0 14px rgb(255 213 90 / 16%);
  animation: sun-bob 8s ease-in-out infinite alternate;
}

@keyframes cloud-drift { to { translate: 24px 0; } }
@keyframes sun-bob { to { translate: 0 8px; rotate: 5deg; } }

.hero {
  display: grid;
  justify-items: center;
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: clamp(24px, 6vw, 72px) 0 clamp(46px, 7vw, 86px);
  text-align: center;
}

.brand-pill,
.eyebrow {
  font-family: system-ui, sans-serif;
  font-weight: 850;
  letter-spacing: .04em;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 8px 17px;
  gap: 8px;
  margin-bottom: 20px;
  border: 2px solid rgb(59 155 112 / 18%);
  border-radius: 99px;
  color: var(--leaf-dark);
  background: rgb(255 255 255 / 76%);
  box-shadow: 0 5px 0 rgb(32 48 64 / 7%);
}

.hero h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(3rem, 8vw, 6.7rem);
  line-height: .92;
  letter-spacing: -.055em;
  text-shadow: 0 5px 0 rgb(255 255 255 / 70%);
}

.hero h1 span { color: var(--plum); }

.hero > p {
  max-width: 650px;
  margin: 20px 0 24px;
  color: #486271;
  font-family: system-ui, sans-serif;
  font-size: clamp(1.05rem, 2.1vw, 1.35rem);
  font-weight: 700;
  line-height: 1.5;
}

.hero-friends {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 118px;
  gap: clamp(5px, 1.4vw, 16px);
}

.hero-friends img {
  width: clamp(78px, 13vw, 126px);
  aspect-ratio: 1;
  border: 5px solid rgb(255 255 255 / 75%);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 9px 20px rgb(32 48 64 / 15%);
  animation: friend-wave 7s ease-in-out infinite;
}

.hero-friends img:nth-of-type(2) { animation-delay: -2.3s; }
.hero-friends img:nth-of-type(3) { animation-delay: -4.6s; }

.hero-friends > span {
  display: grid;
  place-items: center;
  min-width: clamp(58px, 9vw, 84px);
  min-height: clamp(48px, 8vw, 68px);
  padding: 6px;
  border: 3px solid rgb(92 60 120 / 12%);
  border-radius: 21px;
  color: var(--plum);
  background: rgb(255 255 255 / 82%);
  box-shadow: 0 5px 0 rgb(32 48 64 / 10%);
  font-size: clamp(1.25rem, 3vw, 2rem);
}

@keyframes friend-wave {
  0%, 84%, 100% { transform: translateY(0) rotate(0); }
  90% { transform: translateY(-9px) rotate(3deg); }
  95% { transform: translateY(2px) rotate(-2deg); }
}

main {
  width: min(100%, 1120px);
  margin: 0 auto;
}

.games-section,
.balloon-play {
  border: 4px solid rgb(255 255 255 / 74%);
  border-radius: clamp(28px, 5vw, 46px);
  background: rgb(255 255 255 / 64%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.games-section { padding: clamp(24px, 5vw, 54px); }

.section-heading {
  max-width: 690px;
  margin: 0 auto 30px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--leaf-dark);
  font-size: .83rem;
  text-transform: uppercase;
}

.section-heading h2,
.balloon-copy h2 {
  margin: 0;
  color: var(--plum);
  font-size: clamp(2rem, 5vw, 3.7rem);
  line-height: 1;
  letter-spacing: -.04em;
}

.section-heading > p:last-child {
  margin: 12px 0 0;
  color: #536b77;
  font-family: system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.5;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2.4vw, 24px);
}

.game-card {
  position: relative;
  display: grid;
  align-content: start;
  min-height: 260px;
  padding: 22px;
  gap: 15px;
  overflow: hidden;
  border: 4px solid rgb(255 255 255 / 80%);
  border-radius: 30px;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 8px 0 rgb(32 48 64 / 10%), 0 14px 24px rgb(32 48 64 / 10%);
}

.game-card::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -42px;
  width: 130px;
  aspect-ratio: 1;
  border: 20px solid rgb(255 255 255 / 20%);
  border-radius: 50%;
}

.game-card-ready {
  background: linear-gradient(145deg, #fff5c7, #ffd8bf);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.game-card-ready:hover {
  transform: translateY(-5px) rotate(-.4deg);
  box-shadow: 0 13px 0 rgb(32 48 64 / 10%), 0 21px 34px rgb(32 48 64 / 14%);
}

.game-card-ready:active {
  transform: translateY(5px) scale(.98);
  box-shadow: 0 3px 0 rgb(32 48 64 / 11%), 0 7px 16px rgb(32 48 64 / 10%);
}

.game-card-shapes { background: linear-gradient(145deg, #e5f8ff, #d9eef8); }
.game-card-colours { background: linear-gradient(145deg, #f8e8ff, #f3dbef); }
.game-card-music { background: linear-gradient(145deg, #e7f7e9, #d4edda); }
.game-card-puzzle { background: linear-gradient(145deg, #fff2dc, #f8dfc8); }
.game-card-stories { background: linear-gradient(145deg, #e9e7ff, #dddaf5); }

.game-badge {
  position: relative;
  z-index: 1;
  justify-self: start;
  min-height: 30px;
  padding: 6px 11px;
  border-radius: 99px;
  color: #60717a;
  background: rgb(255 255 255 / 72%);
  font-family: system-ui, sans-serif;
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.game-badge-ready { color: #216247; background: #e7fae8; }

.game-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: fit-content;
  min-width: 82px;
  min-height: 68px;
  padding: 8px 12px;
  border: 3px solid rgb(92 60 120 / 12%);
  border-radius: 22px;
  color: var(--plum);
  background: rgb(255 255 255 / 76%);
  box-shadow: 0 5px 0 rgb(32 48 64 / 9%);
  font-size: clamp(1.45rem, 3vw, 2.05rem);
  font-weight: 900;
  letter-spacing: -.04em;
}

.game-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
}

.game-copy strong { font-size: clamp(1.24rem, 2.3vw, 1.55rem); line-height: 1.05; }

.game-copy small {
  color: #536b77;
  font-family: system-ui, sans-serif;
  font-size: .94rem;
  font-weight: 680;
  line-height: 1.45;
}

.game-action {
  position: relative;
  z-index: 1;
  align-self: end;
  justify-self: start;
  min-height: 44px;
  padding: 11px 15px;
  border-radius: 15px;
  color: white;
  background: var(--leaf);
  box-shadow: 0 5px 0 var(--leaf-dark);
  font-size: .95rem;
}

.game-card-soon { opacity: .86; }

.balloon-play {
  display: grid;
  justify-items: center;
  margin-top: clamp(28px, 5vw, 52px);
  padding: clamp(26px, 5vw, 48px);
  text-align: center;
  background: linear-gradient(180deg, rgb(229 247 255 / 88%), rgb(255 249 232 / 88%));
}

.balloon-copy { max-width: 720px; }
.balloon-copy h2 { font-size: clamp(1.8rem, 4.5vw, 3.1rem); }

.balloon-row {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: min(100%, 680px);
  min-height: 150px;
  gap: clamp(4px, 2.5vw, 22px);
  margin: 18px 0 2px;
}

.balloon {
  --balloon-color: #ff806e;
  position: relative;
  width: clamp(52px, 10vw, 78px);
  height: 126px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.balloon:nth-child(2) { --balloon-color: #ffd55a; translate: 0 -14px; }
.balloon:nth-child(3) { --balloon-color: #65c9e8; }
.balloon:nth-child(4) { --balloon-color: #6fc58a; translate: 0 -8px; }
.balloon:nth-child(5) { --balloon-color: #b48fd9; }
.balloon:nth-child(6) { --balloon-color: #f2a45e; translate: 0 -16px; }

.balloon::after {
  content: "";
  position: absolute;
  top: 72px;
  left: 50%;
  width: 2px;
  height: 48px;
  background: #81939c;
  transform-origin: top;
  rotate: -5deg;
}

.balloon > span {
  position: absolute;
  top: 4px;
  left: 50%;
  z-index: 1;
  width: clamp(44px, 8.5vw, 66px);
  height: 76px;
  border-radius: 52% 48% 48% 52% / 45% 45% 55% 55%;
  background:
    radial-gradient(circle at 33% 27%, rgb(255 255 255 / 70%) 0 7%, transparent 8%),
    linear-gradient(145deg, color-mix(in srgb, var(--balloon-color) 72%, white), var(--balloon-color) 62%, color-mix(in srgb, var(--balloon-color) 80%, #203040));
  box-shadow: inset -8px -10px 16px rgb(32 48 64 / 12%), 0 8px 15px rgb(32 48 64 / 14%);
  translate: -50% 0;
  animation: balloon-float 1.8s ease-in-out infinite alternate;
}

.balloon:nth-child(even) > span { animation-delay: -.9s; }

.balloon > span::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  border-right: 7px solid transparent;
  border-bottom: 0;
  border-left: 7px solid transparent;
  border-top: 10px solid var(--balloon-color);
  translate: -50% 0;
}

.balloon:hover > span,
.balloon:focus-visible > span { scale: 1.08; }

.balloon.is-popped > span { animation: balloon-pop 280ms ease-out both; }
.balloon.is-popped::after { opacity: .25; }

@keyframes balloon-float { to { transform: translateY(-9px) rotate(4deg); } }
@keyframes balloon-pop {
  45% { opacity: 1; scale: 1.18; }
  100% { opacity: 0; scale: .05; }
}

.balloon-status {
  min-height: 28px;
  margin: 8px 0 0;
  color: #536b77;
  font-family: system-ui, sans-serif;
  font-weight: 800;
}

.reset-balloons {
  min-height: 48px;
  margin-top: 10px;
  padding: 10px 18px;
  border: 3px solid rgb(255 255 255 / 78%);
  border-radius: 17px;
  color: var(--plum);
  background: var(--sun);
  box-shadow: 0 5px 0 #d4a838;
  cursor: pointer;
}

.reset-balloons:active { translate: 0 4px; box-shadow: 0 1px 0 #d4a838; }

footer {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 760px;
  min-height: 96px;
  margin: 26px auto 0;
  gap: 10px;
  color: #536b77;
  text-align: center;
}

footer > span { font-size: 1.7rem; }
footer p { margin: 0; font-family: system-ui, sans-serif; line-height: 1.45; }

@media (max-width: 850px) {
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sun { right: 2rem; scale: .8; }
}

@media (max-width: 560px) {
  .page-shell { padding-inline: 12px; }
  .hero { padding-top: 18px; }
  .hero h1 { font-size: clamp(2.7rem, 15vw, 4.2rem); }
  .hero > p { margin-top: 15px; }
  .hero-friends img:nth-of-type(2) { display: none; }
  .hero-friends { gap: 5px; }
  .game-grid { grid-template-columns: 1fr; }
  .game-card { min-height: 220px; }
  .games-section { padding-inline: 14px; }
  .balloon-play { padding-inline: 12px; }
  .balloon-row { gap: 0; }
  .balloon { width: 52px; }
  .cloud-three, .sun { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
