@font-face {
  font-family: "Super Playful";
  src: url("fonts/Super%20Playful.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Valentine Delight";
  src: url("fonts/Valentine%20Delight.ttf") format("truetype");
  font-display: swap;
}

:root {
  --ink: #263246;
  --muted: #657186;
  --paper: #fffaf0;
  --cream: #fff6dc;
  --sky: #dff4ff;
  --blue: #2769e8;
  --red: #ff4f4f;
  --yellow: #ffd650;
  --green: #52c96f;
  --pink: #ff83b7;
  --purple: #8b62ff;
  --shadow: 0 18px 45px rgba(38, 50, 70, .16);
  --radius: 8px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #fffdf6 0%, #eefaff 45%, #fff8e7 100%);
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.55;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

h1, h2, h3 {
  margin: 0 0 .35em;
  line-height: 1.02;
  letter-spacing: 0;
}

h1, h2 { font-family: "Super Playful", "Trebuchet MS", sans-serif; }

h1 { font-size: clamp(2.7rem, 8vw, 6.6rem); }
h2 { font-size: clamp(2rem, 4.3vw, 4.3rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: rgba(255, 253, 246, .88);
  backdrop-filter: blur(16px);
  border-bottom: 4px solid rgba(255, 214, 80, .65);
}

.brand img { width: min(240px, 52vw); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.main-nav a {
  padding: 10px 13px;
  text-decoration: none;
  border-radius: 999px;
}

.main-nav a:hover,
.main-nav a.active { background: #fff1a9; }

.nav-cta {
  background: var(--blue);
  color: white;
  box-shadow: 0 8px 0 #1747a5;
}

.main-nav .nav-cta:hover,
.main-nav .nav-cta.active { background: var(--red); }

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: var(--blue);
  font-size: 1.35rem;
}

.hero {
  position: relative;
  min-height: calc(100vh - 76px);
  overflow: hidden;
  display: grid;
  align-items: end;
  padding: clamp(24px, 6vw, 70px);
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 108%;
  object-fit: cover;
  z-index: -2;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.74) 42%, rgba(255,255,255,.12) 100%);
  z-index: -1;
}

.hero-content {
  width: min(760px, 100%);
  padding-bottom: min(8vh, 80px);
}

.hero-copy { font-size: clamp(1.05rem, 2vw, 1.35rem); color: #34445f; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin-bottom: .7rem;
  padding: 5px 12px;
  border: 3px solid currentColor;
  border-radius: 999px;
  color: #1b7f42;
  background: white;
  font-size: .82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}

.button:hover { transform: translateY(-3px) rotate(-1deg); }
.primary { color: white; background: var(--red); box-shadow: 0 8px 0 #c93636; }
.secondary { color: var(--ink); background: var(--yellow); box-shadow: 0 8px 0 #d4a900; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 24px; }

.section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(54px, 8vw, 105px) 0;
}

.intro-grid,
.split,
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .95fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
}

.section-copy p { color: var(--muted); }

.cue-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.cue-card {
  min-height: 166px;
  padding: 18px;
  border: 4px solid rgba(38,50,70,.12);
  border-radius: var(--radius);
  color: white;
  box-shadow: var(--shadow);
  transform: rotate(var(--tilt, -2deg));
}

.cue-card:nth-child(even) { --tilt: 2deg; }
.cue-card span { display: block; font-family: "Super Playful"; font-size: 3rem; line-height: 1; }
.cue-card strong { display: block; font-size: 1.35rem; }
.cue-card small { font-weight: 900; }
.red { background: var(--red); }
.blue { background: var(--blue); }
.green { background: var(--green); }
.yellow { background: #f1b800; color: #392c00; }

.band {
  width: 100%;
  max-width: none;
  background: linear-gradient(135deg, #ffe26a 0%, #ff8aaa 28%, #6bd8ff 58%, #85e68f 100%);
  padding-inline: clamp(18px, 5vw, 70px);
}

.band > * { width: min(1180px, 100%); margin-inline: auto; }
.section-heading { text-align: center; margin-bottom: 34px; }
.section-heading p:not(.eyebrow) { color: var(--muted); max-width: 720px; margin-inline: auto; }

.feature-grid,
.character-row,
.product-grid,
.blog-list,
.video-grid,
.book-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.feature,
.character-card,
.product,
.post,
.video-tile,
.book-card,
.contact-card,
.contact-form {
  border: 4px solid rgba(38,50,70,.1);
  border-radius: var(--radius);
  background: rgba(255,255,255,.9);
  box-shadow: var(--shadow);
}

.feature { padding: 22px; }
.feature-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  border-radius: 50%;
  color: white;
  background: var(--blue);
  font-family: "Super Playful";
  font-size: 1.8rem;
}

.character-card,
.product,
.post,
.video-tile { padding: 22px; }

.character-card img {
  height: 240px;
  width: 100%;
  object-fit: contain;
  animation: floaty 4.5s ease-in-out infinite;
}

.media-stack img,
.product img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 6px solid white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.newsletter {
  display: grid;
  grid-template-columns: 140px 1fr minmax(260px, 360px);
  gap: 24px;
  align-items: center;
  padding: 24px;
  margin-bottom: 70px;
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
}

.newsletter img { animation: wiggle 2.4s ease-in-out infinite; }

.signup {
  display: grid;
  gap: 12px;
}

input, textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 3px solid #d9e2ef;
  border-radius: var(--radius);
  font: inherit;
  background: white;
}

textarea { resize: vertical; }

.site-footer {
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 42px 18px;
  text-align: center;
  background: #263246;
  color: white;
}

.site-footer img {
  width: 220px;
  padding: 10px;
  border-radius: var(--radius);
  background: white;
}

.page-hero {
  position: relative;
  min-height: 48vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: clamp(42px, 8vw, 90px) clamp(18px, 7vw, 90px);
}

.page-hero > div { width: min(850px, 100%); }
.page-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,.92), rgba(255,255,255,.58));
  z-index: -1;
}

.color-hero { background: radial-gradient(circle at 20% 20%, #ffdf5b 0 12%, transparent 13%), radial-gradient(circle at 80% 30%, #70d9ff 0 14%, transparent 15%), linear-gradient(135deg, #fff4bf, #ecfbff); }
.games-hero { background: linear-gradient(135deg, #e1fff0, #fff3bb 45%, #ffe2ef); }
.shop-hero { background: linear-gradient(135deg, #fff2c7, #def7ff); }
.blog-hero { background: linear-gradient(135deg, #e8fff0, #fff8cf); }
.contact-hero { background: linear-gradient(135deg, #f1f4ff, #fff1c9); }

.method-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.step {
  padding: 24px;
  border-left: 10px solid var(--red);
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.step:nth-child(2) { border-color: var(--blue); }
.step:nth-child(3) { border-color: var(--green); }
.step span { font-family: "Super Playful"; font-size: 3rem; color: var(--blue); }

.cue-lab {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 18px;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.cue-lab button {
  min-height: 116px;
  border: 0;
  border-radius: var(--radius);
  color: white;
  font-family: "Super Playful";
  font-size: 3rem;
  cursor: pointer;
}

.cue-lab button:nth-child(1) { background: var(--red); }
.cue-lab button:nth-child(2) { background: var(--blue); }
.cue-lab button:nth-child(3) { background: var(--green); }
.cue-lab button:nth-child(4) { background: #f1b800; color: #392c00; }
.cue-lab p { grid-column: 1 / -1; margin: 0; font-weight: 900; }

.book-card {
  grid-column: span 1;
  overflow: hidden;
}

.book-card img {
  width: 100%;
  height: 260px;
  object-fit: contain;
  padding: 16px;
  background: var(--sky);
}

.book-card div { padding: 22px; }
.book-card a, .post a { color: var(--blue); font-weight: 900; }

.game-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-weight: 900;
}

#spoken-card {
  min-height: 44px;
  padding: 8px 14px;
  border: 3px solid #d9e2ef;
  border-radius: 999px;
  background: white;
  color: var(--blue);
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(80px, 1fr));
  gap: 14px;
  max-width: 820px;
  margin-inline: auto;
}

.memory-card {
  position: relative;
  min-height: 150px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  perspective: 800px;
}

.memory-card span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  backface-visibility: hidden;
  border: 4px solid white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .45s ease;
}

.card-back {
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--pink));
  font-family: "Super Playful";
  font-size: 4rem;
}

.card-front {
  padding: 10px;
  background: white;
  transform: rotateY(180deg);
}

.card-front img {
  width: 100%;
  height: 96px;
  object-fit: contain;
}

.memory-card.flipped .card-back,
.memory-card.matched .card-back { transform: rotateY(180deg); }
.memory-card.flipped .card-front,
.memory-card.matched .card-front { transform: rotateY(360deg); }
.memory-card.matched .card-front { outline: 5px solid var(--green); }

.video-tile {
  min-height: 210px;
  background: #fff;
}

.video-tile span {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
  border-radius: 50%;
  color: white;
  background: var(--purple);
  font-size: 1.6rem;
}

.product img {
  height: 250px;
  object-fit: contain;
  background: var(--sky);
}

.post { min-height: 240px; }

.contact-form {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.contact-form label { display: grid; gap: 6px; font-weight: 900; }

.contact-card {
  padding: 24px;
  text-align: center;
}

.contact-card img {
  height: 270px;
  width: 100%;
  object-fit: contain;
  animation: floaty 4s ease-in-out infinite;
}

.reveal {
  opacity: 0;
  transform: translateY(28px) scale(.98);
  transition: opacity .72s ease, transform .72s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-12px) rotate(1deg); }
}

@keyframes wiggle {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(3deg) translateY(-5px); }
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-grid; place-items: center; }
  .main-nav {
    position: absolute;
    top: 76px;
    left: 18px;
    right: 18px;
    display: none;
    grid-template-columns: 1fr;
    padding: 14px;
    background: white;
    border: 4px solid #ffdf5b;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .main-nav.open { display: grid; }
  .intro-grid,
  .split,
  .contact-layout,
  .newsletter {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .character-row,
  .product-grid,
  .blog-list,
  .video-grid,
  .book-grid,
  .method-steps {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 760px;
    align-items: center;
  }

  .hero::after {
    background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.63), rgba(255,255,255,.88));
  }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .section { width: min(100% - 24px, 1180px); }
  .cue-board,
  .cue-lab,
  .memory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .memory-card { min-height: 128px; }
  .hero-actions { display: grid; }
  .button { width: 100%; }
}
