/* Algo the Turtle · colors and fonts from the cover drafts */
:root {
  --cream: #FFF6E3;
  --cream-2: #FFF8E7;
  --sky: #BDE6FA;

  --line: #E9D9AE;
  --brown: #4A3420;
  --brown-2: #5C4630;
  --brown-3: #8A5A2B;
  --green: #3E6B2F;      /* headline green */
  --green-btn: #2F7A3E;  /* button green (white text passes contrast) */
  --green-btn-dark: #24602F;
  --leaf: #6BBF6A;
  --sun: #F2B33D;
  --radius: 22px;
  --display: "Baloo 2", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --body: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--brown);
  font-family: var(--body);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body > main { flex: 1 0 auto; width: 100%; }

a { color: var(--green-btn); font-weight: 700; }
a:hover { color: var(--green-btn-dark); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 6px; }

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

/* ---------- header ---------- */
.site-header { padding: 18px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--brown); font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 1; }
.brand img { width: 40px; height: 40px; }
.site-header nav { display: flex; gap: 20px; }
.site-header nav a { text-decoration: none; font-size: 17px; color: var(--brown-2); }
.site-header nav a:hover { color: var(--green-btn); }

/* ---------- home hero ---------- */
.hero { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: center; padding-top: 8px; padding-bottom: 56px; }
@media (min-width: 880px) {
  .hero { grid-template-columns: 1.05fr 1fr; gap: 56px; padding-top: 24px; padding-bottom: 80px; }
}
.hero-art { order: -1; }
@media (min-width: 880px) { .hero-art { order: 0; } }
.hero-art img { display: block; width: 100%; max-width: 560px; height: auto; aspect-ratio: 1; margin: 0 auto; }

/* sky band behind the hero, like the game-world banner */
.hero-band { background: var(--sky); position: relative; overflow: hidden; }
.hero-band::before, .hero-band::after {
  content: ""; position: absolute; background: #fff; border-radius: 999px; pointer-events: none;
}
.hero-band::before { width: 150px; height: 46px; opacity: .7; left: 44%; top: 40px; }
.hero-band::after { width: 110px; height: 34px; opacity: .6; left: 4%; bottom: 40px; }
.hero-band .hero { position: relative; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--cream-2); border: 3px solid var(--line); border-radius: 999px;
  padding: 6px 18px; font-size: 16px; font-weight: 800; color: #6B4A2A;
}
.pill .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--sun); }

.hero h1 {
  font-family: var(--display); font-weight: 800; color: var(--green);
  font-size: clamp(56px, 12vw, 104px); line-height: .92; letter-spacing: -1px;
  margin: 20px 0 16px;
}
.hero .lede { font-size: clamp(19px, 2.6vw, 24px); line-height: 1.45; font-weight: 700; color: var(--brown-2); margin: 0 0 22px; max-width: 30ch; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 32px; padding: 0; list-style: none; }
.chips li { border-radius: 999px; padding: 6px 16px; font-size: 16px; font-weight: 800; }
.chip-green { background: #E5F4DC; color: #2F5A24; }
.chip-blue { background: #DDEBFB; color: #24508A; }
.chip-orange { background: #FDE9D2; color: #8A4A12; }

/* ---------- signup ---------- */
.signup-card {
  background: #fff; border: 3px solid var(--line); border-radius: var(--radius);
  padding: 22px; max-width: 520px;
}
.signup-card h2 { font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1.1; margin: 0 0 4px; color: var(--brown); }
.signup-card p { margin: 0 0 14px; font-size: 16px; color: var(--brown-2); }
.signup { display: flex; flex-wrap: wrap; gap: 10px; }
.signup input[type="email"] {
  flex: 1 1 220px; min-width: 0; min-height: 50px;
  font: inherit; font-size: 17px; color: var(--brown);
  padding: 10px 16px; background: var(--cream-2);
  border: 3px solid var(--line); border-radius: 14px;
}
.signup input[type="email"]::placeholder { color: #8C7660; }
.signup input[type="email"]:focus { outline: none; border-color: var(--green-btn); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px;
  font-family: var(--display); font-weight: 800; font-size: 20px; line-height: 1;
  background: var(--green-btn); color: #fff; text-decoration: none;
  border: 0; border-radius: 14px; padding: 12px 24px; cursor: pointer;
  box-shadow: 0 5px 0 #1E4F27; transition: transform .08s, box-shadow .08s;
}
.btn:hover { background: var(--green-btn-dark); color: #fff; }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #1E4F27; }
.fineprint { font-size: 14px !important; margin: 14px 0 0 !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- "what kids learn" strip ---------- */
.learn { background: var(--cream); padding: 64px 0; }
.learn h2 { font-family: var(--display); font-weight: 800; font-size: clamp(32px, 5vw, 44px); line-height: 1.05; margin: 0 0 28px; text-align: center; color: var(--brown); }
.blocks { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.block { background: #fff; border: 3px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 6px 0 var(--line); }
.block .tile {
  width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 12px;
}
.block h3 { font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 1.1; margin: 0 0 6px; }
.block p { margin: 0; font-size: 16px; color: var(--brown-2); }
.tile-green { background: #3FB15F; box-shadow: 0 5px 0 #2E8A48; }
.tile-blue { background: #4A8FE0; box-shadow: 0 5px 0 #356DB0; }
.tile-orange { background: #F2A034; box-shadow: 0 5px 0 #C47A1C; }
.tile-purple { background: #6B4C9A; box-shadow: 0 5px 0 #4E3573; }

/* ---------- content pages ---------- */
.page { padding-top: 16px; padding-bottom: 64px; }
.page h1 { font-family: var(--display); font-weight: 800; color: var(--green); font-size: clamp(40px, 7vw, 60px); line-height: 1; margin: 8px 0 8px; }
.page .updated { color: var(--brown-3); font-size: 16px; margin: 0 0 28px; }
.page h2 { font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1.15; margin: 40px 0 8px; }
.page p, .page li { color: var(--brown); }
.page ul { padding-left: 22px; }
.page li { margin-bottom: 8px; }
.page li::marker { color: var(--leaf); }
.callout { background: #fff; border: 3px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin: 16px 0; }
.callout p { margin: 0; }
details { background: #fff; border: 3px solid var(--line); border-radius: 16px; padding: 14px 18px; margin-bottom: 12px; }
summary { font-family: var(--display); font-weight: 800; font-size: 20px; cursor: pointer; }
details p { margin: 8px 0 0; }

/* ---------- small centered pages (thanks) ---------- */
.center { text-align: center; padding-top: 24px; padding-bottom: 80px; }
.center img { width: 180px; height: auto; }
.center h1 { font-family: var(--display); font-weight: 800; color: var(--green); font-size: clamp(44px, 8vw, 64px); line-height: 1; margin: 20px 0 10px; }
.center p { font-size: 20px; color: var(--brown-2); margin: 0 auto 28px; max-width: 32ch; }

/* ---------- footer ---------- */
.site-footer { background: var(--brown); color: #F3E7D3; padding: 28px 0 36px; font-size: 16px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer a { color: #FFF6E3; }
.site-footer a:hover { color: var(--sun); }

.home .site-header { background: var(--sky); }
.home { background: var(--cream); }
@media (max-width: 879px) { .hero-band::after { display: none; } .hero-band::before { top: 24px; left: 60%; } }

/* signup success + error */
.signup-done { display: flex; align-items: center; gap: 14px; background: #E5F4DC; border-radius: 16px; padding: 14px 16px; outline: none; }
.signup-done[hidden], .signup-error[hidden] { display: none; }
.signup-done img { flex: none; border-radius: 14px; }
.signup-done h3 { font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1.1; margin: 0 0 2px; color: #2F5A24; }
.signup-done p { margin: 0 !important; color: #2F5A24 !important; }
.signup-error { margin: 12px 0 0 !important; color: #9A2A1A !important; font-size: 15px !important; }
.btn:disabled { opacity: .7; cursor: wait; }
.signup[hidden] { display: none; }
