:root {
  --purple-900: #352060;
  --purple-700: #6139a6;
  --purple-500: #8b5bd6;
  --blue-700: #176cb3;
  --blue-500: #2c92d2;
  --teal-700: #087b78;
  --teal-500: #18a9a4;
  --ink: #20223a;
  --muted: #5e6175;
  --paper: #ffffff;
  --cloud: #f7f6fc;
  --line: #e6e1f0;
  --shadow: 0 18px 45px rgba(52, 32, 96, 0.12);
  --radius: 24px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Trebuchet MS", "Avenir Next", Avenir, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
}

a { color: inherit; }

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  color: #fff;
  background: var(--purple-900);
  border-radius: 8px;
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

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

.site-header {
  position: relative;
  z-index: 10;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 47px;
  height: 42px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-mark span {
  width: 22px;
  height: 22px;
  position: absolute;
  border: 5px solid;
  border-radius: 50%;
}

.brand-mark span:nth-child(1) { left: 0; border-color: var(--purple-500); }
.brand-mark span:nth-child(2) { right: 0; border-color: var(--blue-500); }
.brand-mark span:nth-child(3) { bottom: 0; border-color: var(--teal-500); }

.brand-copy { display: grid; line-height: 1.15; }
.brand-copy strong { color: var(--purple-900); font-size: 1.45rem; letter-spacing: -0.04em; }
.brand-copy strong span { color: var(--teal-700); }
.brand-copy small { margin-top: 4px; color: var(--muted); font-size: 0.76rem; letter-spacing: 0.04em; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  color: #47495f;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-list a:hover,
.nav-list .current { color: var(--purple-700); background: #f1ecfa; }

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(125deg, #f9f6ff 0%, #f0fbff 55%, #eefffb 100%);
}

.hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 10px;
  background: linear-gradient(90deg, var(--purple-500), var(--blue-500), var(--teal-500));
}

.hero-grid {
  min-height: 560px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 70px;
  padding-block: 72px 80px;
}

.hero-copy { position: relative; z-index: 2; max-width: 680px; }

.eyebrow {
  margin: 0 0 10px;
  color: var(--purple-700);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

h1, h2, h3 { margin-top: 0; line-height: 1.14; }

h1 {
  max-width: 720px;
  margin-bottom: 22px;
  color: var(--purple-900);
  font-size: clamp(2.45rem, 5.2vw, 4.35rem);
  letter-spacing: -0.055em;
}

h1 span { color: var(--teal-700); }

.hero-copy p:not(.eyebrow) { max-width: 640px; color: var(--muted); }
.hero-copy .lead { color: #3d4055; font-size: 1.22rem; font-weight: 700; }

.button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  padding: 12px 22px;
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
}

.button-primary {
  color: #fff;
  background: var(--purple-700);
  box-shadow: 0 8px 20px rgba(97, 57, 166, 0.25);
  transition: transform 180ms ease, background 180ms ease;
}

.button-primary:hover { background: var(--purple-900); transform: translateY(-2px); }

.hero-art { position: relative; min-height: 360px; }

.controller {
  width: 280px;
  height: 170px;
  position: absolute;
  right: 24px;
  bottom: 52px;
  z-index: 3;
  border: 9px solid var(--purple-900);
  border-radius: 45% 45% 34% 34%;
  background: linear-gradient(145deg, #fff, #eae4f7);
  box-shadow: 0 25px 45px rgba(53, 32, 96, 0.2);
  transform: rotate(-6deg);
}

.controller-grip { width: 82px; height: 100px; position: absolute; bottom: -49px; z-index: -1; border: 9px solid var(--purple-900); background: #eee9f8; }
.left-grip { left: 3px; border-radius: 20px 15px 50px 40px; transform: rotate(18deg); }
.right-grip { right: 3px; border-radius: 15px 20px 40px 50px; transform: rotate(-18deg); }
.d-pad { position: absolute; top: 46px; left: 52px; color: var(--blue-700); font: 700 3.2rem/1 monospace; }
.controller-dot { width: 22px; height: 22px; position: absolute; border-radius: 50%; background: var(--teal-500); box-shadow: inset 0 -3px 0 rgba(0,0,0,.15); }
.dot-one { top: 46px; right: 48px; }
.dot-two { top: 78px; right: 78px; background: var(--purple-500); }

.game-card {
  position: absolute;
  z-index: 4;
  display: grid;
  justify-items: center;
  padding: 12px 15px;
  color: #fff;
  border: 4px solid rgba(255,255,255,.8);
  border-radius: 16px;
  box-shadow: 0 12px 24px rgba(53, 32, 96, 0.18);
  font-size: .78rem;
  font-weight: 800;
}

.game-icon { font-size: 1.5rem; line-height: 1; }
.card-purple { top: 27px; right: 48px; background: var(--purple-500); transform: rotate(8deg); }
.card-blue { top: 115px; left: 6px; background: var(--blue-500); transform: rotate(-8deg); }
.card-teal { right: -12px; bottom: 8px; background: var(--teal-500); transform: rotate(6deg); }

.hero-orb { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .55; }
.orb-one { width: 160px; height: 160px; top: -50px; left: 46%; background: #d9c6ff; }
.orb-two { width: 220px; height: 220px; right: -80px; bottom: -50px; background: #a9eee5; }

.section { padding-block: 88px; }
.categories { background: #fff; }
.section-heading { max-width: 680px; margin: 0 auto 42px; text-align: center; }
.section-heading h2, .featured-copy h2 { margin-bottom: 12px; color: var(--purple-900); font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.035em; }
.section-heading > p:last-child { color: var(--muted); }

.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.category-card {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 28px;
  border: 1px solid var(--line);
  border-top: 7px solid;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 10px 30px rgba(53, 32, 96, 0.07);
}

.category-card.junior { border-top-color: var(--purple-500); }
.category-card.young { border-top-color: var(--blue-500); }
.category-card.teen { border-top-color: var(--teal-500); }
.category-card.carers { border-top-color: #da5b92; }
.category-icon { width: 58px; height: 58px; display: grid; place-items: center; margin-bottom: 20px; border-radius: 17px; background: #f3effb; font-size: 1.65rem; }
.young .category-icon { background: #eaf6fc; }
.teen .category-icon { background: #e5f8f5; }
.carers .category-icon { background: #fff0f6; }
.age-label { margin: 0 0 6px; color: var(--muted); font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.category-card h3 { margin-bottom: 12px; color: var(--purple-900); font-size: 1.35rem; }
.category-card > p:not(.age-label) { margin-top: 0; color: var(--muted); }
.status { margin-top: auto; padding: 5px 11px; color: #655f6e; background: #efedf2; border-radius: 999px; font-size: .78rem; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; }
.status.available { color: #5a318d; background: #eee5fa; }

.featured { background: var(--cloud); }

.featured-card {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  align-items: center;
  gap: 70px;
  padding: 58px 68px;
  overflow: hidden;
  border: 1px solid #ded5ed;
  border-radius: 34px;
  background: #fff;
  box-shadow: var(--shadow);
}

.book-cover {
  aspect-ratio: .76;
  max-width: 310px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 34px;
  color: #fff;
  border: 8px solid #fff;
  border-radius: 8px 24px 24px 8px;
  background: linear-gradient(150deg, var(--purple-900), var(--purple-500) 56%, var(--blue-500));
  box-shadow: -12px 15px 0 #d9d2e7, 0 25px 40px rgba(53,32,96,.23);
  transform: rotate(-2deg);
}

.book-cover::after { content: ""; position: absolute; inset: 0 auto 0 12px; width: 3px; background: rgba(255,255,255,.24); }
.book-ring { width: 190px; height: 190px; position: absolute; top: -70px; right: -70px; border: 26px solid rgba(39,205,192,.45); border-radius: 50%; }
.book-kicker { position: relative; font-size: .65rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.book-cover strong { position: relative; margin: 18px 0; font-size: clamp(1.55rem, 3vw, 2.15rem); line-height: 1.1; letter-spacing: -.04em; }
.book-controller { width: 65px; height: 50px; display: grid; place-items: center; position: relative; margin: 18px 0; color: var(--purple-900); background: #fff; border-radius: 22px 22px 16px 16px; font-size: 1.6rem; box-shadow: 0 8px 0 rgba(0,0,0,.14); }
.book-cover small { position: relative; font-weight: 700; }
.book-cover.handbook-cover { padding: 0; background: #fff; }
.book-cover.handbook-cover img { width: 100%; height: 100%; display: block; object-fit: contain; }
.featured-copy > p:not(.eyebrow, .resource-meta, .coming-note) { max-width: 580px; color: var(--muted); font-size: 1.08rem; }
.resource-meta { color: var(--teal-700); font-weight: 800; }
.button-disabled { color: #fff; background: #767180; cursor: not-allowed; opacity: 1; }
.coming-note { color: var(--muted); font-size: .86rem; }
.coming-note span { color: var(--teal-500); }

.values { padding-block: 30px; color: #fff; background: var(--purple-900); }
.values-inner { display: flex; justify-content: space-between; gap: 24px; }
.values p { margin: 0; font-weight: 700; }
.values span { margin-right: 8px; color: #5de0d5; }

.site-footer { padding-block: 44px; color: #dcd5e8; background: #261842; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; }
.brand-footer .brand-copy strong { color: #fff; }
.brand-footer .brand-copy strong span { color: #5de0d5; }
.site-footer p { margin: 8px 0 0; font-size: .88rem; }
.footer-links { text-align: right; }
.footer-links a { color: #fff; font-weight: 700; text-underline-offset: 4px; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 20px; }
  .hero-art { width: min(440px, 100%); min-height: 330px; margin: 0 auto; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-card { gap: 45px; padding: 48px; }
  .values-inner { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 650px) {
  .shell { width: min(100% - 28px, 1120px); }
  .header-inner { align-items: flex-start; flex-direction: column; gap: 14px; padding-block: 18px; }
  .nav-list { width: 100%; flex-wrap: wrap; }
  .nav-list a { padding: 8px 10px; font-size: .88rem; }
  .hero-grid { min-height: auto; padding-block: 58px 70px; }
  .hero-copy .lead { font-size: 1.1rem; }
  .hero-art { min-height: 280px; transform: scale(.86); transform-origin: center top; margin-bottom: -45px; }
  .controller { right: 50%; transform: translateX(50%) rotate(-6deg); }
  .card-blue { left: -5px; }
  .card-purple { right: 15px; }
  .card-teal { right: -5px; }
  .section { padding-block: 64px; }
  .category-grid { grid-template-columns: 1fr; }
  .category-card { min-height: 300px; }
  .featured-card { grid-template-columns: 1fr; gap: 48px; padding: 38px 24px; }
  .book-cover { width: 80%; margin-inline: auto; }
  .values-inner { align-items: flex-start; flex-direction: column; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
  .footer-links { text-align: left; }
}

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