:root {
  color-scheme: dark;
  --bg: #0d1021;
  --panel: #181d36;
  --text: #f9f8ff;
  --subtle: #c4c9e4;
  --line: #333b60;
  --mint: #a4f6db;
  font: 100%/1.6 "Avenir Next", Avenir, system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
a { color: inherit; }
a:focus-visible { outline: 3px solid #fff; outline-offset: 5px; }
.shell { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
header { border-bottom: 1px solid var(--line); }
nav { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; gap: .6rem; align-items: center; font-size: 1.15rem; font-weight: 850; text-decoration: none; }
.brand-mark { color: var(--mint); font-size: 1.55rem; line-height: 1; }
.nav-link, .back { color: var(--mint); font-weight: 750; text-underline-offset: .25em; }
.skip { position: absolute; top: .7rem; left: .7rem; transform: translateY(-180%); background: var(--bg); padding: .5rem 1rem; z-index: 4; }
.skip:focus { transform: none; }
.home-intro { padding: clamp(2.7rem, 7vw, 5.2rem) 0 2.2rem; }
h1, h2, p { margin: 0; }
h1, h2 { line-height: 1.06; letter-spacing: -.042em; }
h1 { font-size: clamp(2.65rem, 7vw, 5.6rem); font-weight: 880; }
.home-intro p { margin-top: .9rem; font-size: clamp(1.05rem, 2.3vw, 1.3rem); color: var(--subtle); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; padding-bottom: 3.5rem; }
.card, .details { border: 1px solid var(--line); background: var(--panel); border-radius: 22px; overflow: hidden; }
.card { display: flex; flex-direction: column; }
.card-copy { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 1.3rem; }
.card-copy h2 { font-size: clamp(1.55rem, 2.55vw, 2.15rem); }
.card-copy p { margin: .55rem 0 1.2rem; color: var(--subtle); }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: .62rem 1.15rem; border-radius: 100px; background: var(--accent, var(--mint)); color: #14142a; font-weight: 850; text-decoration: none; }
.button:hover { filter: brightness(1.12); }
.card-copy .button { margin-top: auto; }
.blast { --accent: #c0b9ff; --sky: #27205b; --shine: #5240a2; }
.invaders { --accent: #a4f6db; --sky: #102f49; --shine: #12646a; }
.crust { --accent: #ffc98c; --sky: #4a2142; --shine: #93465c; }
.art { margin: 0; min-height: 190px; aspect-ratio: 1.7; display: grid; place-items: center; overflow: hidden; position: relative; isolation: isolate;
  background: radial-gradient(circle at 20% 25%, #f7e9ff 0 1px, transparent 2px), radial-gradient(circle at 79% 22%, #f7e9ff 0 1px, transparent 2px), radial-gradient(circle at 91% 61%, #f7e9ff 0 1px, transparent 2px), radial-gradient(circle at 13% 71%, #f7e9ff 0 1px, transparent 2px), radial-gradient(circle at center, var(--shine), var(--sky) 77%); }
.art::after { content: ''; position: absolute; z-index: -1; width: 76%; aspect-ratio: 2.5; border: 1px solid #ffffff50; border-radius: 50%; transform: rotate(-20deg); }
.blast .art-inner { position: relative; width: 136px; height: 110px; transform: rotate(-9deg); }
.tile { display: grid; place-items: center; position: absolute; width: 60px; height: 60px; border-radius: 14px; background: #d3caff; color: #2a1a64; font-size: 1.85rem; font-weight: 900; box-shadow: inset 0 -6px #0002, 0 6px 12px #100c31a0; }
.tile:nth-child(1) { left: 37px; top: 0; background: #f4efff; }
.tile:nth-child(2) { left: 11px; top: 48px; }
.tile:nth-child(3) { left: 66px; top: 48px; background: #a094ff; }
.pixel { width: 144px; display: grid; grid-template-columns: repeat(11, 1fr); filter: drop-shadow(0 0 13px #72ffc77a); transform: rotate(-6deg); }
.pixel span { display: block; aspect-ratio: 1; }
.pixel .lit { background: #a4f6db; }
.pizza { position: relative; width: 132px; aspect-ratio: 1; border-radius: 50%; transform: rotate(-14deg); border: 11px solid #e6924d; box-shadow: 0 7px 0 #8e3d3c, 0 0 38px #feba8e73; background: repeating-conic-gradient(from 13deg, transparent 0 58deg, #ae583d 58deg 60deg), radial-gradient(circle at 28% 27%, #bb443f 0 7%, transparent 8%), radial-gradient(circle at 70% 22%, #bb443f 0 7%, transparent 8%), radial-gradient(circle at 75% 53%, #bb443f 0 8%, transparent 9%), radial-gradient(circle at 42% 52%, #bb443f 0 7%, transparent 8%), radial-gradient(circle at 34% 78%, #bb443f 0 7%, transparent 8%), radial-gradient(circle at 66% 80%, #bb443f 0 7%, transparent 8%), #ffd17a; }
.game { padding: 2rem 0 3.5rem; }
.details { margin-top: 1.1rem; display: grid; grid-template-columns: 1fr 1fr; }
.details .art { aspect-ratio: auto; min-height: 330px; }
.details .art-inner { scale: 1.25; }
.details-copy { padding: clamp(1.4rem, 5vw, 3rem); }
.details h1 { font-size: clamp(2.4rem, 5.5vw, 4.3rem); }
.details p { color: var(--subtle); margin: 1rem 0; max-width: 40ch; }
.details .button { margin-top: .35rem; }
footer { border-top: 1px solid var(--line); color: var(--subtle); padding: 1.45rem 0; }
@media (max-width: 850px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 570px) { .shell { width: calc(100% - 32px); } .grid, .details { grid-template-columns: 1fr; } .details .art { min-height: 220px; } }
.nav-subjects { display: flex; flex-wrap: wrap; gap: .35rem 1rem; }
.subject { scroll-margin-top: 1rem; }
.subject > h2 { font-size: clamp(2rem, 3.8vw, 3.1rem); margin-bottom: 1.15rem; }
.card-copy h3 { margin: 0; font-size: clamp(1.55rem, 2.55vw, 2.15rem); line-height: 1.12; letter-spacing: -.035em; }
.quest { --accent: #f9d998; --sky: #36284a; --shine: #725444; }
.mental { --accent: #b0dcff; --sky: #18395a; --shine: #2a6390; }
.cursive { --accent: #f7bcf8; --sky: #49234f; --shine: #824a8c; }
.reading { --accent: #bbf1c0; --sky: #153f3d; --shine: #336952; }
.phonics { --accent: #fdd1b5; --sky: #573036; --shine: #965952; }
.story { --accent: #e3c9ff; --sky: #342a57; --shine: #634087; }
@media (max-width: 350px) { .nav-subjects { flex-direction: column; } }
.explorer { --accent: #bcecea; --sky: #193950; --shine: #35777f; }
.art.illustrated::after { display: none; }
.art.illustrated img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.art.illustrated { background: radial-gradient(ellipse at center, var(--sky), #101326 82%); }
.digestive { --accent: #ffbfb4; --sky: #193b48; --shine: #3a7882; }
.poop { --accent: #e6c6ff; --sky: #332451; --shine: #694581; }
.spinner { --accent: #c8d6ff; --sky: #202b54; --shine: #435c9a; }
@media (max-width: 570px) {
  nav { flex-wrap: wrap; justify-content: flex-start; gap: .45rem 1.5rem; padding-block: .75rem; }
  .nav-subjects { flex-direction: row; }
}
