/* Freedom Avry Kids website
   Layout concept: building blocks. Age groups stack like a staircase that grows with the child;
   courses read as numbered building levels (101 -> 302). Brand matches the Young Kingdom Builders app:
   royal purple + sunshine yellow on warm paper. */
:root {
  --bg: #fbf6ee;
  --bg-2: #f4ead9;
  --card: #ffffff;
  --ink: #2a2233;
  --ink-soft: #5c5266;
  --line: #e6dccb;
  --purple: #5b2a86;
  --purple-ink: #3f1a60;
  --purple-soft: #efe5f8;
  --yellow: #f6c324;
  --yellow-ink: #6b4f00;
  --yellow-soft: #fff4cc;
  --green: #1f7a3f;
  --green-soft: #e6f5ea;
  --on-purple: #ffffff;
  --on-yellow: #2a2233;
  --shadow: 0 2px 0 rgba(63, 26, 96, 0.08), 0 10px 28px rgba(63, 26, 96, 0.10);
  --display: 'Fredoka', 'Nunito', 'Segoe UI Rounded', system-ui, sans-serif;
  --body: 'Nunito', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  --r: 20px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17111f; --bg-2: #1f1729; --card: #251b31; --ink: #f3ecf8; --ink-soft: #c9bdd6; --line: #3a2d49;
    --purple: #c9a2ee; --purple-ink: #e8d6fa; --purple-soft: #33244a; --yellow: #f6c324; --yellow-ink: #f6c324; --yellow-soft: #3a3016;
    --green: #7fd69b; --green-soft: #18321f; --on-purple: #1b1224; --on-yellow: #1b1224;
    --shadow: 0 2px 0 rgba(0,0,0,.3), 0 10px 28px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #17111f; --bg-2: #1f1729; --card: #251b31; --ink: #f3ecf8; --ink-soft: #c9bdd6; --line: #3a2d49;
  --purple: #c9a2ee; --purple-ink: #e8d6fa; --purple-soft: #33244a; --yellow: #f6c324; --yellow-ink: #f6c324; --yellow-soft: #3a3016;
  --green: #7fd69b; --green-soft: #18321f; --on-purple: #1b1224; --on-yellow: #1b1224;
  --shadow: 0 2px 0 rgba(0,0,0,.3), 0 10px 28px rgba(0,0,0,.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--purple); font-weight: 700; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 10px; }
h1, h2, h3 { font-family: var(--display); color: var(--purple-ink); line-height: 1.12; margin: 0; text-wrap: balance; font-weight: 600; }
h1 { font-size: clamp(2.1rem, 5.4vw, 3.6rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.stack { display: grid; gap: 14px; }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 60ch; }
.kicker { font-family: var(--body); font-weight: 800; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--purple); }
.muted { color: var(--ink-soft); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { left: 16px; }

/* ---------- header ---------- */
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 21; background: var(--bg); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 10px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--purple-ink); }
.brand img { width: 38px; height: 38px; }
.brand span { font-family: var(--display); font-size: 1.25rem; font-weight: 600; }
.nav { display: flex; gap: 4px 18px; flex-wrap: wrap; font-size: .95rem; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 700; padding: 6px 2px; }
.nav a:hover { color: var(--purple); }
.nav a[aria-current="page"] { color: var(--purple); box-shadow: inset 0 -3px 0 var(--yellow); }

/* ---------- buttons & chips ---------- */
.btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 10px 22px; border-radius: 999px; font: inherit; font-weight: 800; text-decoration: none; border: 2px solid transparent; transition: transform .12s ease; }
.btn:active { transform: translateY(2px); }
.btn.primary { background: var(--purple); color: var(--on-purple); box-shadow: 0 4px 0 var(--purple-ink); }
.btn.sun { background: var(--yellow); color: var(--on-yellow); box-shadow: 0 4px 0 #c99a0c; }
.btn.ghost { background: transparent; color: var(--purple); border-color: var(--purple); }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 800; letter-spacing: .04em; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.chip.free { background: var(--green-soft); color: var(--green); }
.chip.app { background: var(--purple-soft); color: var(--purple); }
.chip.soon { background: var(--bg-2); color: var(--ink-soft); }
.chip.open { background: var(--yellow); color: var(--on-yellow); }

/* ---------- hero ---------- */
.hero { padding-block: clamp(28px, 6vw, 64px) 0; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: end; }
.hero-copy { display: grid; gap: 18px; padding-bottom: clamp(20px, 5vw, 56px); min-width: 0; }
.hero-art { position: relative; display: flex; justify-content: center; align-items: flex-end; min-height: 300px; }
.hero-art::before { content: ""; position: absolute; left: 6%; right: 6%; bottom: 0; height: 62%; background: var(--yellow); border-radius: 28px 28px 0 0; }
.hero-art::after { content: ""; position: absolute; right: 10%; bottom: 62%; width: 22%; aspect-ratio: 1; background: var(--purple); border-radius: 14px; opacity: .9; }
.guide { position: relative; z-index: 1; margin: 0; display: grid; justify-items: center; }
.guide img { display: block; width: auto; }
.guide.payden img { height: clamp(250px, 34vw, 400px); }
.guide.nylah img { height: clamp(220px, 30vw, 350px); margin-left: -14px; }
.guide figcaption { position: absolute; bottom: 10px; background: var(--card); color: var(--purple-ink); font-weight: 800; font-size: .85rem; padding: 4px 12px; border-radius: 999px; box-shadow: var(--shadow); white-space: nowrap; }

/* ---------- bands ---------- */
.band { padding-block: clamp(44px, 7vw, 80px); }
.band.alt { background: var(--bg-2); }
.band-head { display: grid; gap: 10px; margin-bottom: 28px; max-width: 70ch; }

/* ---------- age staircase ---------- */
.stairs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; align-items: end; }
.step { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; background: var(--card); border: 2px solid var(--line); border-radius: var(--r) var(--r) 8px 8px; padding: 16px; box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease; min-width: 0; }
.step:hover { transform: translateY(-4px); border-color: var(--purple); }
.step .ages { font-family: var(--display); font-size: 2rem; color: var(--purple); line-height: 1; font-weight: 600; font-variant-numeric: tabular-nums; }
.step h3 { font-size: 1.1rem; }
.step p { font-size: .92rem; color: var(--ink-soft); }
.step .go { margin-top: auto; font-weight: 800; color: var(--purple); font-size: .92rem; }
.step.s1 { min-height: 230px; } .step.s2 { min-height: 270px; } .step.s3 { min-height: 330px; border-color: var(--yellow); }
.step.s4 { min-height: 300px; } .step.s5 { min-height: 320px; }
.step.s3 .ages { color: var(--purple-ink); }
.step.s3 { background: linear-gradient(var(--yellow-soft), var(--card) 55%); }

/* ---------- course path ---------- */
.path { display: grid; gap: 14px; counter-reset: lvl; }
.level { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.level .num { display: grid; place-items: center; align-content: center; background: var(--purple); color: var(--on-purple); border-radius: 14px; font-family: var(--display); font-size: 1.7rem; font-weight: 600; min-height: 84px; font-variant-numeric: tabular-nums; }
.level .num small { display: block; font-family: var(--body); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; opacity: .85; }
.level .body { display: grid; gap: 8px; min-width: 0; }
.level .ref { font-size: .88rem; color: var(--ink-soft); font-weight: 700; }
.items { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; }
.items li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 8px; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.items .what { font-weight: 700; min-width: 0; }
.items .fmt { font-weight: 400; color: var(--ink-soft); font-size: .9rem; }

/* compact path on home */
.mini-path { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.mini { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: grid; gap: 6px; align-content: start; min-width: 0; }
.mini b { font-family: var(--display); font-size: 1.5rem; color: var(--purple); font-weight: 600; }
.mini span { font-weight: 800; color: var(--purple-ink); }
.mini p { font-size: .9rem; color: var(--ink-soft); }

/* ---------- feature blocks ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
.panel { background: var(--card); border-radius: var(--r); padding: clamp(20px, 4vw, 34px); border: 1px solid var(--line); display: grid; gap: 14px; min-width: 0; }
.panel.sun { background: var(--yellow-soft); border-color: transparent; }
.quote { font-family: var(--display); font-size: clamp(1.25rem, 2.6vw, 1.6rem); color: var(--purple-ink); line-height: 1.35; font-weight: 500; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { padding-left: 30px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; border-radius: 5px; background: var(--yellow); box-shadow: inset 0 0 0 4px var(--yellow-soft); }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.card .row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }

/* ---------- age page hero ---------- */
.age-hero { padding-block: clamp(30px, 6vw, 60px); }
.age-hero .badge { font-family: var(--display); font-size: clamp(3rem, 9vw, 5.5rem); color: var(--purple); line-height: .9; font-weight: 600; font-variant-numeric: tabular-nums; }
.age-hero-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: center; }
.crumbs { font-size: .9rem; margin-bottom: 16px; }
.crumbs a { text-decoration: none; }
.notice { background: var(--yellow-soft); border-radius: 14px; padding: 14px 16px; font-size: .95rem; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding-block: 28px 40px; font-size: .92rem; color: var(--ink-soft); }
.foot-row { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.foot-row nav { display: flex; gap: 16px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .stairs { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
  .step.s1, .step.s2, .step.s3, .step.s4, .step.s5 { min-height: 0; }
  .step.s3 { grid-column: 1 / -1; order: -1; }
  .mini-path { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .hero-grid, .split { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 0; }
  .hero-art { min-height: 260px; }
  .age-hero-grid { grid-template-columns: 1fr; gap: 8px; }
  .level { grid-template-columns: 1fr; }
  .level .num { min-height: 56px; grid-auto-flow: column; gap: 10px; justify-content: start; padding-inline: 14px; }
  .level .num small { display: inline; }
  .grid3, .mini-path { grid-template-columns: 1fr; }
  .stairs { grid-template-columns: 1fr; }
}

/* fixes after first visual check */
.step .chip, .card .chip { align-self: flex-start; }
.hero-art { overflow: hidden; }
@media (max-width: 720px) {
  .guide figcaption { font-size: .72rem; padding: 3px 9px; bottom: 6px; }
  .guide.nylah img { margin-left: -4px; }
  .hero-art::after { width: 18%; }
}
