@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/nunito-latin-wght-normal.ba344451ea.woff2") format("woff2-variations");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --ink: #3c3c3c;
  --muted: #777;
  --line: #e5e5e5;
  --soft: #f7f7f7;
  --coral: #ff6b4a;
  --coral-dark: #e2492b;
  --green: #58c90a;
  --green-dark: #46a003;
  --blue: #1cb0f6;
  --blue-dark: #1899d6;
  --yellow: #ffc800;
  --purple: #ce82ff;
  --font: "Nunito", ui-rounded, "Arial Rounded MT Bold", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 8px;
}

.wrap {
  width: min(1080px, 100% - 40px);
  margin-inline: auto;
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Header ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  padding-top: env(safe-area-inset-top);
  border-bottom: 2px solid var(--line);
  background: #fff;
}

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 70px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  color: var(--coral);
  font-size: clamp(2rem, 4vw, 2.4rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.dog9 {
  width: auto;
  height: 0.72em;
  margin: 0 0.01em 0 0.03em;
  overflow: visible;
}

.dog9 .ear {
  transform-box: fill-box;
  transform-origin: 20% 6%;
  animation: flap 5.5s ease-in-out 1.2s infinite;
}

.dog9 .blink,
.mascot .eyes {
  transform-box: fill-box;
  transform-origin: center;
  animation: blink 4.6s ease-in-out 2s infinite;
}

.brand:hover .ear {
  animation: flap 0.9s ease-in-out infinite;
}

.top nav {
  display: flex;
  gap: clamp(14px, 3vw, 28px);
}

.top nav a {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.top nav a:hover {
  color: var(--ink);
}

@media (max-width: 520px) {
  .top nav a:first-child {
    display: none;
  }
}

/* ---------- Buttons (pressable, like a toy) ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 24px;
  border: 0;
  border-radius: 16px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.15s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn-lg {
  width: 100%;
  max-width: 340px;
  min-height: 54px;
  font-size: 1rem;
}

.btn-green {
  background: var(--green);
  color: #fff;
  box-shadow: 0 5px 0 var(--green-dark);
}

.btn-white {
  border: 2px solid var(--line);
  background: #fff;
  color: var(--blue);
  box-shadow: 0 4px 0 var(--line);
}

.btn-green:hover,
.btn-white:hover {
  filter: brightness(1.05);
}

.btn-green:active {
  transform: translateY(5px);
  box-shadow: 0 0 0 var(--green-dark);
}

.btn-white:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 var(--line);
}

.btn-off {
  background: var(--line);
  color: #afafaf;
  cursor: default;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  justify-items: center;
  align-items: center;
  gap: 18px clamp(32px, 6vw, 80px);
  padding: clamp(24px, 4vw, 56px) 0 clamp(20px, 3vw, 40px);
}

@media (min-width: 820px) {
  .hero {
    grid-template-columns: auto auto;
    justify-content: center;
  }
}

.mascot {
  width: clamp(190px, 26vw, 320px);
  height: auto;
  overflow: visible;
  animation: bob 3.4s ease-in-out infinite;
}

.mascot .wave {
  transform-box: view-box;
  transform-origin: 100px 240px;
  animation: wave 2.6s ease-in-out infinite;
}

.mascot .tail {
  transform-box: view-box;
  transform-origin: 236px 290px;
  animation: wag 0.9s ease-in-out infinite alternate;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 460px;
  text-align: center;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(1.9rem, 3.8vw, 2.7rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.hero-sub {
  margin: 0;
  color: var(--muted);
  font-size: 1.12rem;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin-top: 10px;
}

/* ---------- Game cards ---------- */

.section-title {
  margin: 0 0 26px;
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.games {
  padding: clamp(20px, 4vw, 48px) 0 clamp(40px, 6vw, 72px);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 2px solid var(--line);
  border-bottom-width: 5px;
  border-radius: 20px;
  background: #fff;
  transition: transform 0.15s ease;
}

.card:hover {
  transform: translateY(-3px);
}

.card-art {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--soft);
}

.card-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

a.card-art:hover img {
  transform: scale(1.04);
}

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px 5px;
  border-radius: 10px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 3px 0 #e5a900;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 18px 18px 20px;
}

.card-title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.2;
}

.card-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 4px;
  padding: 0;
  list-style: none;
}

.chip {
  padding: 4px 9px 5px;
  border-radius: 10px;
  background: var(--tint, var(--soft));
  color: var(--tint-ink, var(--muted));
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.chip-grades { --tint: #fff4cc; --tint-ink: #b28800; }
.chip-math { --tint: #ddf4ff; --tint-ink: #1899d6; }
.chip-reading { --tint: #e5f8d4; --tint-ink: #46a003; }
.chip-writing { --tint: #ffe3dc; --tint-ink: #e2492b; }

.card .btn {
  width: 100%;
  margin-top: auto;
}

.card-mystery .card-art {
  display: grid;
  place-items: center;
  background: #f3e6ff;
}

.card-mystery:nth-child(odd) .card-art {
  background: #ddf4ff;
}

.card-mystery .card-art svg {
  width: 30%;
  overflow: visible;
}

.egg {
  transform-box: fill-box;
  transform-origin: 50% 90%;
  animation: hatch 4.5s ease-in-out infinite;
}

.card-mystery:nth-child(odd) .egg {
  animation-delay: 1.6s;
}

/* ---------- Why rows ---------- */

.why {
  display: grid;
  gap: clamp(48px, 8vw, 96px);
  padding: clamp(40px, 7vw, 88px) 0;
  border-top: 2px solid var(--line);
}

.row {
  display: grid;
  align-items: center;
  gap: 18px clamp(32px, 6vw, 72px);
}

@media (min-width: 820px) {
  .row {
    grid-template-columns: 1fr 1fr;
  }

  .row:nth-child(even) .row-art {
    order: 2;
  }
}

.row-art svg {
  display: block;
  width: min(340px, 78%);
  margin-inline: auto;
}

.art-text {
  fill: #fff;
  font-family: var(--font);
  font-size: 52px;
  font-weight: 900;
}

.row-copy h3 {
  margin: 0 0 10px;
  font-size: clamp(2.2rem, 4.6vw, 3.3rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
}

.row-copy p {
  max-width: 34ch;
  margin: 0;
  color: var(--muted);
  font-size: 1.15rem;
}

.c-coral { color: var(--coral); }
.c-blue { color: var(--blue); }
.c-green { color: var(--green); }

@media (max-width: 819px) {
  .row-copy {
    text-align: center;
  }

  .row-copy p {
    margin-inline: auto;
  }
}

/* ---------- Grown-ups ---------- */

.grownups {
  padding: clamp(40px, 7vw, 80px) 0;
  background: var(--soft);
}

.promises {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .promises { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1000px) {
  .promises { grid-template-columns: repeat(4, 1fr); }
}

.promise {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  border: 2px solid var(--line);
  border-bottom-width: 5px;
  border-radius: 20px;
  background: #fff;
}

.promise-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
  border-radius: 14px;
  color: #fff;
}

.promise-icon svg {
  width: 26px;
  height: 26px;
}

.i-coral { background: var(--coral); box-shadow: 0 4px 0 var(--coral-dark); }
.i-blue { background: var(--blue); box-shadow: 0 4px 0 var(--blue-dark); }
.i-green { background: var(--green); box-shadow: 0 4px 0 var(--green-dark); }
.i-purple { background: var(--purple); box-shadow: 0 4px 0 #a568cc; }

.promise strong {
  font-size: 1.12rem;
  font-weight: 800;
}

.promise span {
  color: var(--muted);
  font-size: 0.97rem;
}

/* ---------- Footer ---------- */

.foot {
  padding: 44px 0 calc(40px + env(safe-area-inset-bottom));
  background: var(--coral);
  color: #fff;
}

.foot-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.foot-brand {
  font-size: 2.6rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
}

.foot-links a {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.foot-links a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.foot p {
  margin: 0;
  opacity: 0.85;
  font-size: 0.9rem;
}

/* ---------- Motion ---------- */

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes wave {
  0%, 60%, 100% { transform: rotate(0deg); }
  70% { transform: rotate(14deg); }
  80% { transform: rotate(-6deg); }
  90% { transform: rotate(10deg); }
}

@keyframes wag {
  from { transform: rotate(-6deg); }
  to { transform: rotate(8deg); }
}

@keyframes flap {
  0%, 82%, 100% { transform: none; }
  86% { transform: rotate(-14deg); }
  90% { transform: rotate(8deg); }
  94% { transform: rotate(-5deg); }
}

@keyframes blink {
  0%, 94%, 100% { transform: none; }
  97% { transform: scaleY(0.1); }
}

@keyframes hatch {
  0%, 70%, 100% { transform: none; }
  74% { transform: rotate(-9deg); }
  79% { transform: rotate(8deg); }
  84% { transform: rotate(-5deg); }
  89% { transform: rotate(2deg); }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
