/* Kea Academy — the promotional site at kea-academy.co.nz
 *
 * The palette, the type and the hills are the app's own, so the site and the thing it sells
 * cannot drift apart. Tokens are copied verbatim from kea-academy.html's :root; the woff2
 * faces are decoded out of that same file by scripts/build-site.py, which is also why they
 * are self-hosted — a children's app whose whole privacy story is "no third parties" should
 * not open by asking Google for its type.
 *
 * Dark mode is here because the app has it. CLAUDE.md said for months that it did not.
 */

@font-face{
  font-family:'Fredoka'; font-weight:400 700; font-style:normal; font-display:swap;
  src:url(fonts/fredoka.woff2) format('woff2');
}
@font-face{
  font-family:'Nunito'; font-weight:300 800; font-style:normal; font-display:swap;
  src:url(fonts/nunito.woff2) format('woff2');
}
@font-face{
  font-family:'Nunito'; font-weight:300 800; font-style:italic; font-display:swap;
  src:url(fonts/nunito-italic.woff2) format('woff2');
}

:root{
  color-scheme:light;
  --sand-50:#F6EFDD;  --sand-100:#F0E6CC; --sand-200:#E6D8B6; --sand-300:#D8C79C;
  --bush-900:#22331D; --bush-800:#2C4025; --bush-600:#4C7A38; --bush-500:#5E8E48;
  --bush-300:#A9C08C; --bush-100:#DCE6CC;
  --kea-500:#CB6A2E;  --kea-600:#B85A22;  --gold-500:#C9932B;
  --ink-900:#2A2016;  --ink-700:#4A3D2E;  --ink-500:#7A6B57;
  --surface:#FFFDF8;  --surface-2:#FBF6EA; --line:#DFD1AE;
  --sub-maths:#2464A8; --sub-science:#1F9E7C; --sub-english:#D9642A;
  --shadow:0 4px 14px rgba(42,32,22,.14);
  --shadow-lg:0 12px 32px rgba(42,32,22,.22);
  --radius:18px;
  --heading:#22331D;
  --font-display:'Fredoka',system-ui,sans-serif;
  --font-body:'Nunito',system-ui,sans-serif;
}

@media (prefers-color-scheme: dark){
  :root{
    color-scheme:dark;
    --sand-50:#1B2418;  --sand-100:#212C1D; --sand-200:#293522; --sand-300:#33422A;
    --bush-900:#141F11; --bush-800:#1C2B18; --bush-600:#6FA654; --bush-500:#7FB863;
    --bush-300:#4E6A3D; --bush-100:#2B3A22;
    --kea-500:#E38A4C;  --kea-600:#F0954D;  --gold-500:#E0B04E;
    --ink-900:#F3ECDC;  --ink-700:#D8CBB0;  --ink-500:#A79A82;
    --surface:#222D1E;  --surface-2:#1D2819; --line:#3A4830;
    --sub-maths:#3987e5; --sub-science:#199e70; --sub-english:#d95926;
    --shadow:0 4px 14px rgba(0,0,0,.35);
    --shadow-lg:0 16px 40px rgba(0,0,0,.5);
    --heading:#EAF3E0;
  }
}

*{box-sizing:border-box;}

body{
  margin:0;
  background:var(--sand-100);
  color:var(--ink-900);
  font:17px/1.65 var(--font-body);
  -webkit-font-smoothing:antialiased;
}

.wrap{max-width:1040px; margin:0 auto; padding:0 20px;}
.narrow{max-width:720px;}

h1,h2,h3{font-family:var(--font-display); line-height:1.15; color:var(--heading); margin:0;}
h1{font-size:clamp(2.1rem,4.6vw,3.4rem); letter-spacing:-.01em;}
h2{font-size:clamp(1.5rem,3.6vw,2.1rem); margin:0 0 14px;}
h3{font-size:1.15rem; margin:0 0 6px;}
p{margin:0 0 16px;}
a{color:var(--bush-600);}
a:hover{color:var(--kea-600);}

.skip{
  position:absolute; left:-9999px; top:0; background:var(--surface); color:var(--ink-900);
  padding:10px 16px; border-radius:0 0 10px 0; z-index:10;
}
.skip:focus{left:0;}

:focus-visible{outline:3px solid var(--kea-500); outline-offset:3px; border-radius:6px;}

/* ---------- header ---------- */
.site-head{
  display:flex; align-items:center; gap:14px;
  padding:18px 0; flex-wrap:wrap;
}
.brand{display:flex; align-items:center; gap:12px; text-decoration:none; color:var(--heading);}
.brand img{width:44px; height:44px; border-radius:11px; display:block;}
.brand b{font-family:var(--font-display); font-size:1.25rem; font-weight:600;}
.site-head nav{margin-left:auto; display:flex; gap:22px; flex-wrap:wrap;}
.site-head nav a{text-decoration:none; font-weight:700; font-size:.95rem;}
/* Hidden on phones rather than collapsed behind a menu button. These are anchors into a page
   you are going to scroll anyway, and on a 375px screen they wrapped to two lines and pushed
   the headline below the fold — which is the one thing the top of this page has to do. */
@media (max-width:699px){ .site-head nav{display:none;} }

/* ---------- hero ---------- */
.hero{padding:36px 0 8px;}
.hero-grid{display:grid; gap:40px; grid-template-columns:1fr;}
@media (min-width:1000px){
  .hero-grid{grid-template-columns:1.05fr .95fr; align-items:center; gap:56px;}
}
.lead{font-size:1.2rem; color:var(--ink-700); max-width:34em;}

.cta{display:flex; flex-wrap:wrap; gap:12px; margin:26px 0 12px;}
.btn{
  display:inline-flex; align-items:center; gap:10px;
  font:600 1rem/1 var(--font-body);
  padding:15px 24px; border-radius:999px; text-decoration:none;
  border:2px solid transparent; cursor:pointer;
}
.btn-primary{background:var(--bush-600); color:#fff;}
.btn-primary:hover{background:var(--bush-500); color:#fff;}
.btn-ghost{border-color:var(--line); color:var(--ink-900); background:var(--surface);}
.btn-ghost:hover{border-color:var(--bush-500); color:var(--ink-900);}
.btn[aria-disabled="true"]{opacity:.55; cursor:default; pointer-events:none;}

.price-note{color:var(--ink-500); font-size:.95rem; margin:0;}

/* The hero screens: two real screenshots, the back one offset rather than faked into a
   device render — the app's own drawing style is flat, and a photoreal bezel would be the
   only invented thing on the page. */
.shots{position:relative; display:flex; justify-content:center; padding:10px 0 20px;}
.shots img{
  width:min(260px,46vw); height:auto; border-radius:22px;
  box-shadow:var(--shadow-lg); border:1px solid var(--line); display:block;
}
.shots img:first-child{transform:translateX(9%) rotate(-4deg);}
.shots img:last-child{transform:translateX(-9%) rotate(4deg); position:relative; z-index:2;}

/* ---------- hills, lifted from entryScene() in the client ---------- */
.hills{display:block; width:100%; height:90px; margin-bottom:-1px;}

/* ---------- sections ---------- */
section{padding:52px 0;}
.on-surface{background:var(--surface-2); border-block:1px solid var(--line);}
.section-lead{color:var(--ink-700); max-width:38em; margin-bottom:34px;}

.steps{display:grid; gap:26px; grid-template-columns:1fr; counter-reset:step;}
@media (min-width:760px){.steps{grid-template-columns:repeat(3,1fr); gap:32px;}}
.step{counter-increment:step;}
.step::before{
  content:counter(step);
  display:grid; place-items:center; width:42px; height:42px; margin-bottom:12px;
  border-radius:50%; background:var(--bush-100); color:var(--heading);
  font:700 1.2rem/1 var(--font-display);
}
.step p{color:var(--ink-700); margin:0;}

.gallery{display:grid; gap:24px; grid-template-columns:repeat(auto-fit,minmax(200px,1fr));}
.gallery figure{margin:0;}
.gallery img{
  width:100%; height:auto; border-radius:18px; display:block;
  border:1px solid var(--line); box-shadow:var(--shadow);
}
.gallery figcaption{
  margin-top:10px; font-size:.92rem; color:var(--ink-500); line-height:1.45;
}

.features{display:grid; gap:28px; grid-template-columns:1fr; margin:0; padding:0; list-style:none;}
@media (min-width:700px){.features{grid-template-columns:1fr 1fr; gap:30px 44px;}}
.features h3{display:flex; align-items:center; gap:10px;}
.features .dot{width:10px; height:10px; border-radius:50%; flex:none;}
/* Classes rather than inline style attributes, so the Content-Security-Policy in
   netlify.toml can forbid inline styles outright instead of carving out an exception
   for six coloured dots. */
.dot-maths{background:var(--sub-maths);}
.dot-science{background:var(--sub-science);}
.dot-english{background:var(--sub-english);}
.dot-gold{background:var(--gold-500);}
.dot-bush{background:var(--bush-500);}
.dot-kea{background:var(--kea-500);}
.features p{color:var(--ink-700); margin:0;}

details{
  border-top:1px solid var(--line); padding:16px 0;
}
details:last-of-type{border-bottom:1px solid var(--line);}
summary{
  cursor:pointer; font-family:var(--font-display); font-size:1.08rem;
  color:var(--heading); list-style:none;
}
summary::-webkit-details-marker{display:none;}
summary::after{content:' +'; color:var(--bush-600); font-weight:700;}
details[open] summary::after{content:' –';}
details p{margin:12px 0 0; color:var(--ink-700);}

/* ---------- footer ---------- */
/* The footer is a dark band in BOTH schemes, so its colours are literal rather than tokens.
   Using --sand-100 for the text looked right in light mode and vanished in dark, where that
   token is itself near-black: a dark-on-dark footer that only one of the two schemes ever
   showed. A surface whose background does not follow the scheme must not take text colours
   that do. */
.site-foot{
  background:#141F11; color:#F0E6CC; padding:44px 0 56px; margin-top:0;
}
.site-foot a{color:#A9C08C;}
.site-foot a:hover{color:#fff;}
.site-foot .foot-note{color:#A9C08C;}
.foot-grid{display:flex; flex-wrap:wrap; gap:28px 48px; justify-content:space-between;}
.foot-links{display:flex; flex-wrap:wrap; gap:18px; list-style:none; margin:0; padding:0;}
.foot-note{color:var(--bush-300); font-size:.9rem; max-width:34em; margin:22px 0 0;}

@media (prefers-reduced-motion:no-preference){
  .btn, .brand{transition:background .15s ease, color .15s ease, border-color .15s ease;}
}

/* ---------- /learn: resources ---------- */
.article{padding:40px 0 60px;}
.article .wrap{max-width:720px;}
.kicker{
  font:700 .85rem/1 var(--font-body); letter-spacing:.08em; text-transform:uppercase;
  color:var(--kea-600); margin:0 0 12px;
}
.article h1{font-size:clamp(1.9rem,4.2vw,2.7rem); margin-bottom:14px;}
.article .standfirst{font-size:1.18rem; color:var(--ink-700); margin-bottom:8px;}
.article .meta{color:var(--ink-500); font-size:.92rem; margin:0 0 34px;}
.article h2{font-size:1.4rem; margin:38px 0 12px;}
.article h3{font-size:1.1rem; margin:26px 0 6px;}
.article ul,.article ol{padding-left:22px;}
.article li{margin:8px 0;}

table.phases{border-collapse:collapse; width:100%; margin:20px 0 26px; font-size:.97rem;}
table.phases th,table.phases td{
  text-align:left; padding:11px 12px; border-bottom:1px solid var(--line); vertical-align:top;
}
table.phases th{font-family:var(--font-display); font-weight:600; color:var(--heading);}
table.phases tr.is-ours td{background:var(--bush-100);}
table.phases caption{
  caption-side:bottom; text-align:left; padding-top:10px;
  color:var(--ink-500); font-size:.88rem;
}

.callout{
  background:var(--surface); border:1px solid var(--line); border-left:4px solid var(--kea-500);
  border-radius:0 12px 12px 0; padding:16px 20px; margin:26px 0;
}
.callout p:last-child{margin-bottom:0;}
.sources{font-size:.92rem; color:var(--ink-500);}
.sources a{color:var(--bush-600);}

.card-list{display:grid; gap:20px; grid-template-columns:1fr; list-style:none; margin:0; padding:0;}
@media (min-width:720px){.card-list{grid-template-columns:1fr 1fr;}}
.card-list a{
  display:block; height:100%; text-decoration:none; color:inherit;
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius);
  padding:22px 24px;
}
.card-list a:hover{border-color:var(--bush-500);}
.card-list h3{margin-bottom:8px;}
.card-list p{color:var(--ink-700); margin:0; font-size:.97rem;}
