/* Kids Read For Free — palette taken from the Jungle Jimmy / Readit photo:
   Readit green, Jimmy's yellow shirt, safari brown. */

:root {
  --green:      #2E9E4F;
  --green-dk:   #1F7238;
  --green-soft: #E8F6EC;
  --sun:        #FFC72C;
  --sun-soft:   #FFF6DC;
  --brown:      #6B4A2F;
  --ink:        #26301F;
  --ink-2:      #4C5A47;
  --ink-3:      #7C8A78;
  --cream:      #FFFBF3;
  --line:       #E6E0D4;
  --white:      #fff;

  --shadow-sm: 0 2px 8px rgba(38,48,31,.07);
  --shadow:    0 10px 30px rgba(38,48,31,.10);
  --shadow-lg: 0 24px 60px rgba(38,48,31,.18);

  --r-sm: 12px;
  --r:    20px;
  --r-lg: 28px;
  --wrap: 1140px;
  --gut: clamp(20px, 5vw, 44px);

  --display: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --body: Nunito, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0; font-family: var(--body); font-size: 1.0625rem; line-height: 1.7;
  color: var(--ink-2); background: var(--white); overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-dk); }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--display); color: var(--ink); line-height: 1.1;
  margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em;
}
h1 { font-size: clamp(2.3rem, 6vw, 4rem); }
h2 { font-size: clamp(1.85rem, 4.2vw, 2.85rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.narrow { max-width: 720px; margin-inline: auto; }
.center { text-align: center; }

:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 200; background: var(--green-dk); color: #fff; padding: 12px 20px; }
.skip:focus { left: 0; }

.hl { color: var(--green); }

.tag {
  display: inline-block; font-family: var(--display); font-weight: 700;
  font-size: .8rem; letter-spacing: .13em; text-transform: uppercase;
  padding: .45em 1.05em; border-radius: 999px;
  background: var(--sun-soft); color: #8A6100; margin-bottom: 1rem;
}
.tag--onDark { background: rgba(255,255,255,.9); color: #1F7238; }

.pill {
  display: inline-block; font-family: var(--display); font-weight: 700; font-size: .72rem;
  letter-spacing: .1em; text-transform: uppercase; padding: .35em .9em;
  border-radius: 999px; background: var(--green-soft); color: var(--green-dk); margin-bottom: .8rem;
}

.lede { font-size: clamp(1.05rem, 1.8vw, 1.22rem); color: var(--ink-2); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--display); font-weight: 700; font-size: 1.02rem;
  padding: .8em 1.7em; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; text-decoration: none !important; line-height: 1.2;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, color .16s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--green); color: #fff; box-shadow: 0 6px 18px rgba(46,158,79,.3); }
.btn--primary:hover { background: var(--green-dk); }
.btn--onDark { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.5); backdrop-filter: blur(6px); }
.btn--onDark:hover { background: #fff; color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.94);
  backdrop-filter: saturate(150%) blur(12px); border-bottom: 1px solid var(--line);
}
.head-in { display: flex; align-items: center; gap: 1.4rem; min-height: 74px; }
.brand { display: flex; align-items: center; gap: .65rem; margin-right: auto; text-decoration: none !important; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 13px; flex: none;
  display: grid; place-items: center; font-size: 1.35rem;
  background: linear-gradient(135deg, var(--green) 0%, var(--sun) 100%);
  box-shadow: 0 3px 10px rgba(46,158,79,.28);
}
.brand-name { display: block; font-family: var(--display); font-weight: 800; font-size: 1.06rem; color: var(--ink); line-height: 1.1; }
.brand-sub { display: block; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }

.nav { display: none; align-items: center; gap: 1.5rem; }
@media (min-width: 900px) { .nav { display: flex; } }
.nav a { font-family: var(--display); font-weight: 600; color: var(--ink); text-decoration: none !important; }
.nav a:hover { color: var(--green-dk); }

.head-cta { display: none; }
@media (min-width: 1040px) { .head-cta { display: inline-flex; } }

.burger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 12px; background: var(--green-soft);
  border: 1px solid var(--line); cursor: pointer; margin-left: auto;
}
@media (min-width: 900px) { .burger { display: none; } }
.burger span { display: block; width: 20px; height: 2.5px; background: var(--ink); border-radius: 2px; position: relative; }
.burger span::before, .burger span::after {
  content: ""; position: absolute; left: 0; width: 20px; height: 2.5px; background: var(--ink);
  border-radius: 2px; transition: transform .2s ease, top .2s ease;
}
.burger span::before { top: -6.5px; }
.burger span::after { top: 6.5px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.burger[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

.mobile-nav { display: none; border-top: 1px solid var(--line); background: #fff; padding: .5rem 0 1.3rem; }
.mobile-nav.open { display: block; }
@media (min-width: 900px) { .mobile-nav, .mobile-nav.open { display: none; } }
.mobile-nav a { display: block; padding: .8rem .2rem; font-family: var(--display); font-weight: 700; font-size: 1.1rem; color: var(--ink); border-bottom: 1px solid var(--line); text-decoration: none !important; }
.mobile-nav .btn { margin-top: 1rem; width: 100%; }

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(150deg, var(--green-dk) 0%, var(--green) 55%, #58B86B 100%);
  color: rgba(255,255,255,.94); position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: auto -10% -40% auto; width: 60%; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(255,199,44,.28), transparent 68%);
}
.hero-in { position: relative; display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; padding-block: clamp(3rem, 7vw, 5rem); }
@media (min-width: 900px) { .hero-in { grid-template-columns: 1.05fr .95fr; } }
.hero h1 { color: #fff; }
.hero .hl { color: var(--sun); }
.hero-sub { font-family: var(--display); font-weight: 700; font-size: clamp(1.15rem, 2.4vw, 1.5rem); color: var(--sun); margin-bottom: 1.1rem; }
.hero p { color: rgba(255,255,255,.92); }
.hero-img img { border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }

/* ---------- sections ---------- */
.sec { padding: clamp(3.2rem, 7vw, 5.5rem) 0; }
.sec--tight { padding: clamp(2rem, 4vw, 3rem) 0; }
.sec--cream { background: var(--cream); }
.sec--sun { background: var(--sun-soft); }
.sec-head { max-width: 700px; margin-bottom: clamp(2rem, 4vw, 3rem); }
.sec-head--center { margin-inline: auto; text-align: center; }

/* ---------- cards ---------- */
.grid { display: grid; gap: clamp(1.1rem, 2.4vw, 1.7rem); }
.g-3 { grid-template-columns: repeat(auto-fit, minmax(288px, 1fr)); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: clamp(1.4rem, 2.5vw, 1.9rem); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #D6CDBB; }
.card h3 { margin-bottom: .5em; font-size: 1.18rem; line-height: 1.25; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--green-dk); }
.card p { font-size: .97rem; color: var(--ink-2); }
.card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-top: auto; padding-top: 1.1rem; border-top: 1px solid var(--line);
  font-size: .87rem; color: var(--ink-3);
}
.card-foot .more { font-family: var(--display); font-weight: 700; color: var(--green-dk); text-decoration: none; }

/* ---------- opt-in ---------- */
.form-wrap { margin-top: 2rem; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); background: #fff; }

.credit { font-size: .95rem; color: var(--ink-3); }

/* ---------- post ---------- */
.post { padding: clamp(2.5rem, 6vw, 4.5rem) 0 0; }
.post-head { text-align: center; margin-bottom: clamp(2rem, 4vw, 3rem); }
.post-head h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); }
.post-head time { color: var(--ink-3); font-size: .92rem; font-weight: 600; }

.prose { font-size: 1.09rem; }
.prose h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 1.8em; }
.prose h3 { font-size: 1.25rem; margin-top: 1.6em; }
.prose img { border-radius: var(--r); margin: 1.6rem auto; box-shadow: var(--shadow-sm); }
.prose ul, .prose ol { padding-left: 1.3em; margin-bottom: 1.15em; }
.prose li { margin-bottom: .5em; }
.prose blockquote {
  border-left: 5px solid var(--sun); padding: .3rem 0 .3rem 1.4rem; margin: 1.8rem 0;
  font-family: var(--display); font-size: 1.2rem; color: var(--ink); font-weight: 600;
}
.prose a { color: var(--green-dk); }

.post-nav {
  display: flex; justify-content: space-between; gap: 1.4rem; flex-wrap: wrap;
  margin: 3rem 0 1.5rem; padding-top: 1.6rem; border-top: 1px solid var(--line);
  font-family: var(--display); font-weight: 700; font-size: .95rem;
}
.post-nav a { color: var(--green-dk); text-decoration: none; max-width: 46%; }
.post-nav a:hover { text-decoration: underline; }
.back { text-align: center; margin-bottom: 3rem; font-family: var(--display); font-weight: 700; }
.back a { color: var(--ink-3); text-decoration: none; }
.back a:hover { color: var(--green-dk); }

/* ---------- footer ---------- */
.site-foot { background: var(--ink); color: rgba(255,255,255,.62); padding: clamp(2.8rem, 6vw, 4rem) 0 2rem; font-size: .95rem; }
.foot-grid { display: grid; gap: 2.2rem; }
@media (min-width: 780px) { .foot-grid { grid-template-columns: 1.6fr 1fr 1fr; gap: 3rem; } }
.foot-brand { font-family: var(--display); font-weight: 800; font-size: 1.15rem; color: #fff; margin-bottom: .8rem; }
.site-foot h4 { color: #fff; font-size: 1rem; margin-bottom: .9rem; }
.foot-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.foot-links a { color: rgba(255,255,255,.68); text-decoration: none; }
.foot-links a:hover { color: var(--sun); }
.foot-bottom {
  margin-top: 2.6rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.13);
  display: flex; flex-wrap: wrap; gap: .7rem 1.5rem; justify-content: space-between; font-size: .86rem;
}

/* ---------- motion ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
