:root {
  --bg: #fffaf0;
  --ink: #0b1b3f;
  --white: #ffffff;
  --blue: #1f5eff;
  --coral: #e0362b; /* #ff5a4e darkened so white text passes AA */
  --sun: #ffd23f;
  --green: #16a34a;
  --purple: #7c3aed;
  --line: 3px solid var(--ink);
  --shadow: 5px 5px 0 var(--ink);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 1.4;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2 { font-weight: 900; line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.3rem, 7vw, 4.4rem); }
h2 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }

/* ---- top bar ---- */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1120px; margin: 0 auto; padding: 18px 16px;
}
.wordmark { font-weight: 900; font-size: clamp(1.3rem, 4vw, 1.7rem); text-decoration: none; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 64px; padding: 0 30px;
  font: inherit; font-weight: 900; font-size: 1.25rem; text-decoration: none;
  border: var(--line); border-radius: 999px; box-shadow: var(--shadow);
  cursor: pointer; transition: transform .08s, box-shadow .08s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.btn:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 4px solid var(--blue); outline-offset: 3px;
}
.btn[disabled] { opacity: .6; cursor: wait; }
.btn-small { min-height: 48px; padding: 0 20px; font-size: 1rem; box-shadow: 3px 3px 0 var(--ink); }
.btn-white { background: var(--white); color: var(--ink); }
.btn-blue { background: var(--blue); color: var(--white); }
.btn-coral { background: var(--coral); color: var(--white); }
.btn-purple { background: var(--purple); color: var(--white); }

/* ---- hero ---- */
.hero { padding-top: 36px; padding-bottom: 40px; text-align: center; }
.hero h1 { max-width: 15ch; margin: 0 auto; }
.sub { font-size: clamp(1.15rem, 3vw, 1.5rem); max-width: 32ch; margin: 18px auto 30px; }
.cta { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.cta .btn { min-width: 230px; }
.code-link { display: inline-block; margin-top: 22px; font-weight: 800; font-size: 1.15rem; text-underline-offset: 5px; }

/* ---- the games (the full list lives on the dashboard's /games) ---- */
.games-cta { padding-top: 8px; padding-bottom: 56px; }
.games-card {
  background: var(--sun); border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 44px); text-align: center;
}
.games-emoji { font-size: clamp(2rem, 6vw, 3rem); letter-spacing: .15em; }
.games-card h2 { margin: 10px 0 0; }
.games-card p { font-size: clamp(1.1rem, 2.6vw, 1.35rem); margin: 10px auto 26px; max-width: 34ch; }

/* ---- how ---- */
.how { padding-bottom: 56px; text-align: center; }
.steps {
  list-style: none; margin: 26px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: s;
}
.steps li {
  counter-increment: s; position: relative;
  background: var(--white); border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 30px 18px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 1.3rem;
}
.steps li::before {
  content: counter(s); position: absolute; top: -18px; left: -12px;
  width: 44px; height: 44px; border-radius: 50%; border: var(--line);
  background: var(--sun); display: grid; place-items: center; font-weight: 900;
}
.steps .emoji { font-size: 3.4rem; line-height: 1; }

/* ---- who ---- */
.who { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; padding-bottom: 56px; }
.card {
  background: var(--fill); border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
}
.card p { margin: 0; font-size: 1.2rem; flex: 1; }
.tag {
  background: var(--green); color: var(--white); border: var(--line); border-radius: 999px;
  padding: 2px 16px; font-weight: 900; font-size: 1rem;
}

/* ---- schools ---- */
.schools {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 28px; align-items: start;
  padding-bottom: 56px;
}
.schools-head p { font-size: 1.25rem; margin: 12px 0 0; }
.form {
  background: var(--white); border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px;
}
.form .full { grid-column: 1 / -1; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 800; font-size: 1.05rem; }
.form input, .form textarea {
  font: inherit; font-weight: 600; color: var(--ink); background: var(--bg);
  border: var(--line); border-radius: 14px; padding: 12px 14px; min-height: 54px; width: 100%;
}
.form textarea { resize: vertical; }
.form [aria-invalid="true"] { border-color: var(--coral); background: #fff0ee; }
.status { margin: 0; font-weight: 800; min-height: 1.4em; }
.status.ok { color: var(--green); }
.status.err { color: #b42318; }

/* ---- footer ---- */
.foot {
  display: flex; justify-content: space-between; gap: 12px;
  padding-top: 20px; padding-bottom: 32px; border-top: var(--line); font-size: 1rem;
}

/* ---- narrow ---- */
@media (max-width: 820px) {
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .steps, .who, .schools { grid-template-columns: minmax(0, 1fr); }
  .steps { gap: 28px; }
}
@media (max-width: 520px) {
  body { font-size: 18px; }
  .cta .btn { width: 100%; min-width: 0; }
  .game span { font-size: 1.1rem; }
  .form { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .card { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
.code-link { margin-left: 11px; margin-right: 11px; }
.bar-links { display: flex; align-items: center; gap: 18px; }
.bar-link { font-weight: 900; font-size: 1.1rem; text-decoration: none; }
.bar-link:hover { text-decoration: underline; text-underline-offset: 5px; }
