@font-face {
  font-family: Fredoka;
  src: url('assets/Fredoka-Variable.ttf') format('truetype');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #222249;
  --ink: #f4f2ff;
  --muted: #b9b9d9;
  --yellow: #ffc94a;
  --coral: #ff9278;
  --line: #ffffff18;
  --display: Fredoka, 'Trebuchet MS', sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 'Trebuchet MS', Arial, sans-serif;
}
main { flex: 1; display: flex; align-items: center; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--yellow); }
button { font: inherit; cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
svg { display: block; width: 100%; height: 100%; }
img { max-width: 100%; display: block; }
h1, h2, p { margin: 0; }
h1, h2 { font: 500 1em/1.08 var(--display); }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 6px;
}
[hidden] { display: none !important; }
.container { width: min(1180px, calc(100% - 96px)); margin-inline: auto; }
.svg-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link {
  position: fixed; top: 10px; left: 10px; transform: translateY(-200%);
  z-index: 10; background: var(--yellow); color: var(--bg);
  padding: 10px 18px; border-radius: 8px;
}
.skip-link:focus { transform: translateY(0); }
.site-header { height: 84px; flex-shrink: 0; display: flex; align-items: center; }
.brand { display: flex; align-items: center; gap: 11px; font: 550 29px var(--display); letter-spacing: -1px; }
.brand img { border-radius: 12px; }
.brand-dot { color: var(--coral); }
.hero {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px;
  align-items: center; padding-block: 38px 46px;
}
.eyebrow { font-size: 10px; letter-spacing: 1.8px; font-weight: 700; line-height: 1.6; color: #c4c3e2; }
.hero .eyebrow { display: flex; align-items: center; gap: 10px; }
.little-star { color: var(--yellow); font-size: 22px; }
.hero h1 { font-size: clamp(52px, 5vw, 68px); letter-spacing: -1.7px; margin-top: 20px; line-height: 1.07; }
.home-word { color: var(--coral); position: relative; display: inline-block; }
.home-word svg { position: absolute; left: 0; bottom: -12px; width: 100%; height: 18px; fill: none; stroke: var(--coral); stroke-width: 3; stroke-linecap: round; }
.hero-description { max-width: 390px; color: var(--muted); margin-top: 30px; font-size: 16px; line-height: 1.8; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 28px;
  padding: 15px 26px; min-height: 54px; border: 0; border-radius: 14px;
  font-size: 15px; font-weight: 700; line-height: 1.4;
  transition: transform .2s, background .2s, box-shadow .2s;
}
.button:hover { transform: translateY(-3px); }
.button-primary, .store-button { background: var(--yellow); color: #292441; box-shadow: 0 4px 0 #c5932f; }
.button-primary:hover, .store-button:hover { background: #ffda78; color: #292441; box-shadow: 0 6px 0 #c5932f; }
.platforms { font-size: 12px; letter-spacing: .3px; color: var(--muted); margin-top: 19px; }
.platforms span { font-size: 13px; margin-right: 5px; }
.hero-art { position: relative; isolation: isolate; padding: 16px 0 8px; scroll-margin-top: 30px; }
.orbit { position: absolute; z-index: -1; border: 1px solid #aaa2f019; border-radius: 50%; left: 50%; top: 48%; transform: translate(-50%, -50%); pointer-events: none; }
.orbit-one { width: 104%; aspect-ratio: 1; }
.orbit-two { width: 116%; aspect-ratio: 1; }
.game-card {
  width: min(100%, 390px); margin: auto; background: #353576;
  border: 1px solid #b3afff24; border-radius: 28px; padding: 24px 22px 22px;
  box-shadow: 0 30px 70px #10102565, 0 9px 0 #161630;
  position: relative; transform: rotate(-3deg);
}
.game-card-heading { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: #d0cdef; gap: 8px; }
.chapter-tag { font-size: 9px; letter-spacing: 1.4px; color: var(--yellow); }
.game-card h2 { font-size: 27px; text-align: center; margin-top: 22px; }
.game-caption { font-size: 12px; color: #c0bfe3; text-align: center; margin-top: 7px; }
.puzzle {
  position: relative; margin: 23px 0 17px; user-select: none; touch-action: pan-y;
  border-radius: 16px; overflow: hidden; background: #1b1c44; padding: 0;
  border: 7px solid #1b1c44; box-shadow: 0 5px 0 #151631;
}
.board-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.tile { aspect-ratio: 1; background: #7a80d6; border: 1px solid #9ca0ed55; box-shadow: inset 0 -4px 0 #5a60b4; border-radius: 5px; }
.tile:nth-child(even) { background: #8188dc; }
.tile.wall { background: #292b60; border-color: #36386b; box-shadow: inset 0 -4px 0 #20214d; }
.tile.target { display: flex; align-items: center; justify-content: center; color: #ffb39e; background: #6b5a9b; }
.target svg { width: 64%; height: 64%; }
.board-piece { position: absolute; left: 14.285714%; width: 14.285714%; height: 20%; z-index: 2; transition: left .65s cubic-bezier(.25, .8, .25, 1), transform .3s; }
.piece-one { top: 20%; }
.piece-two { top: 60%; }
.is-solved .board-piece { left: 71.428571%; }
.is-solved .target { background: #9d698a; }
.slide-trail { position: absolute; left: 33%; width: 31%; text-align: center; color: #35336d; font: 700 25px/1 var(--display); letter-spacing: 2px; transition: opacity .2s; pointer-events: none; }
.trail-one { top: 25.5%; }
.trail-two { top: 65.5%; }
.is-solved .slide-trail { opacity: 0; }
.puzzle-controls { text-align: center; }
.puzzle-controls p { font-size: 11px; color: #d4d1ee; min-height: 34px; line-height: 1.6; }
.slide-button { color: #272249; background: #b8adeb; font-size: 14px; padding: 11px 23px; min-height: 44px; min-width: 170px; border-radius: 12px; box-shadow: 0 3px 0 #8175bd; }
.slide-button:hover { background: #c9c0f8; }
.reset-button { display: block; margin: 10px auto -6px; background: none; border: 0; color: #d3d0ef; text-decoration: underline; text-underline-offset: 4px; font-size: 11px; padding: 6px 12px; }
.noscript-note { font-size: 12px; text-align: center; margin-top: 15px; }
.floating-friend { position: absolute; z-index: 3; filter: drop-shadow(0 12px 10px #15152d33); }
.friend-yellow { width: 90px; height: 90px; right: 0; top: -25px; transform: rotate(14deg); animation: bob 5s ease-in-out infinite; }
.friend-mint { width: 95px; height: 95px; left: -16px; bottom: 35px; transform: rotate(-14deg); animation: bob 6s ease-in-out infinite reverse; }
.spark { position: absolute; color: var(--yellow); font-size: 32px; }
.spark-one { left: 0; top: -15px; }
.spark-two { right: 0; bottom: 75px; color: #c08cff; }
.handwritten-note { font: 400 14px var(--display); color: #c9bde8; text-align: right; margin: 30px 23px 0 0; transform: rotate(-4deg); }
.note-arrow { font-size: 27px; display: inline-block; margin-left: 9px; }
.site-footer { flex-shrink: 0; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 14px; font-size: 12px; color: var(--muted); }
.footer-links { display: flex; align-items: center; gap: 27px; }
.footer-links > * { padding-block: 10px; }
.footer-links [aria-disabled] { cursor: default; }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
@media (max-width: 1050px) {
  .container { width: calc(100% - 64px); }
  .hero { gap: 35px; }
  .hero h1 { font-size: 53px; }
  .hero .eyebrow { font-size: 9px; letter-spacing: 1.1px; }
  .hero-description { font-size: 14px; max-width: 340px; }
  .game-card { padding: 22px 16px 20px; }
  .game-card h2 { font-size: 25px; }
  .friend-yellow { width: 75px; height: 75px; right: -8px; }
  .friend-mint { width: 80px; height: 80px; left: -22px; }
  .handwritten-note { font-size: 12px; margin-right: 0; }
}
@media (min-width: 761px) and (max-height: 1000px) {
  .site-header { height: 70px; }
  .hero { padding-block: 18px 22px; }
  .hero h1 { font-size: 56px; }
  .game-card { max-width: 330px; padding: 18px 18px 19px; }
  .game-card h2 { margin-top: 15px; font-size: 24px; }
  .puzzle { margin-block: 18px 14px; }
  .handwritten-note { display: none; }
  .friend-yellow { width: 75px; height: 75px; right: 10px; top: -15px; }
  .friend-mint { width: 80px; height: 80px; left: 0; }
  .site-footer { padding-block: 8px; }
}
@media (max-width: 760px) {
  .container { width: calc(100% - 44px); }
  .site-header { height: 66px; }
  .brand { font-size: 26px; }
  .brand img { width: 35px; height: 35px; }
  .hero { grid-template-columns: 1fr; gap: 25px; padding-block: 18px 22px; text-align: center; }
  .hero .eyebrow { justify-content: center; font-size: 8px; }
  .little-star { font-size: 17px; }
  .hero h1 { font-size: clamp(38px, 9.8vw, 49px); margin-top: 12px; letter-spacing: -1px; }
  .home-word svg { height: 12px; bottom: -7px; }
  .hero-description { font-size: 13px; line-height: 1.65; max-width: 355px; margin: 20px auto 0; }
  .hero-actions { justify-content: center; margin-top: 18px; }
  .button { font-size: 13px; padding: 11px 20px; min-height: 44px; border-radius: 12px; }
  .platforms { font-size: 10px; margin-top: 13px; }
  .hero-art { width: min(315px, calc(100% - 28px)); margin: 0 auto; padding-block: 6px; }
  .game-card { padding: 15px 16px 17px; border-radius: 23px; }
  .game-card h2 { font-size: 23px; margin-top: 13px; }
  .game-caption { display: none; }
  .puzzle { margin-block: 16px 13px; border-width: 6px; }
  .puzzle-controls p { font-size: 10px; min-height: 29px; }
  .slide-button { min-height: 44px; font-size: 13px; }
  .slide-trail { font-size: 20px; }
  .friend-yellow { width: 64px; height: 64px; right: -22px; top: -14px; }
  .friend-mint { width: 65px; height: 65px; left: -26px; bottom: 3px; }
  .spark-one { left: -20px; top: -12px; font-size: 24px; }
  .spark-two { right: -24px; bottom: 30px; font-size: 24px; }
  .orbit-two { width: 112%; }
  .orbit-one { width: 99%; }
  .handwritten-note { display: none; }
  .site-footer { padding-block: 6px; gap: 10px; font-size: 10px; }
  .footer-links { gap: 20px; }
  .footer-links > * { padding-block: 14px; }
}
@media (max-width: 370px) {
  .container { width: calc(100% - 32px); }
  .hero h1 { font-size: 36px; }
  .hero .eyebrow { font-size: 7px; letter-spacing: .9px; }
  .hero-description { font-size: 12px; }
  .hero-art { width: calc(100% - 32px); }
  .game-card { padding-inline: 12px; }
  .game-card h2 { font-size: 21px; }
  .game-card-heading { font-size: 10px; }
  .chapter-tag { font-size: 8px; }
  .puzzle-controls p { font-size: 9px; }
  .slide-trail { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
