/* Rising Maple landing. Mobile first: cut-paper colour bands, felt characters, one idea per screen. */
@font-face { font-family: "Fredoka"; src: url("/landing/fredoka.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/landing/nunito-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/landing/nunito-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --sun: #ffd54f;
  --ink: #102451;
  --ink-soft: #33496f;
  --teal: #08737c;
  --teal-deep: #065a61;
  --meadow: #cfeeb4;
  --sky: #cfeafb;
  --blush: #ffdce3;
  --night: #16295e;
  --cream: #fff8e8;
  --carrot: #f28c28;
  --display: "Fredoka", "Nunito", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 16px;
  --edge: 26px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(2.35rem, 10.5vw, 4.25rem); line-height: 1; text-wrap: balance; }
h3 { font-size: 1.5rem; line-height: 1.15; }
p { margin: 0; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
.center { text-align: center; }
.lead { font-size: 1.1875rem; line-height: 1.55; margin-top: 16px; max-width: 34em; color: var(--ink-soft); }
.fine { font-size: 0.9375rem; color: var(--ink-soft); margin-top: 20px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 8px; }

/* Buttons: chunky felt buttons with a pressed-paper base */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  background: var(--teal); color: #fff; text-decoration: none;
  font: 600 1.1875rem/1 var(--display); letter-spacing: 0.01em;
  box-shadow: 0 5px 0 var(--teal-deep);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 0 var(--teal-deep); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--teal-deep); }
.btn-lg { min-height: 60px; font-size: 1.3125rem; padding: 0 32px; }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 1rem; box-shadow: 0 3px 0 var(--teal-deep); }
.btn-ghost { background: #fff; color: var(--ink); box-shadow: 0 5px 0 rgba(16, 36, 81, 0.18); }
.btn-ghost:hover { box-shadow: 0 6px 0 rgba(16, 36, 81, 0.2); }
.btn-ghost:active { box-shadow: 0 1px 0 rgba(16, 36, 81, 0.2); }
.btn-block { display: flex; width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.actions.center { justify-content: center; }

/* Header */
.header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px var(--gutter); background: var(--sun);
  max-width: none;
}
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font: 600 1.375rem/1 var(--display); color: var(--ink); min-height: 48px; }
.nav { display: none; }
.header-actions { display: flex; align-items: center; gap: 6px; }
.login { display: inline-flex; align-items: center; min-height: 48px; padding: 0 10px; font-weight: 700; text-decoration: none; }
.login:hover { text-decoration: underline; }

/* Bands: each colour block gets a torn, scalloped paper top edge in its own colour */
.band { position: relative; background: var(--bg); padding: 56px 0 64px; }
.band + .band::before, .footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: calc(var(--edge) * -1 + 1px); height: var(--edge);
  background: var(--bg);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 26' preserveAspectRatio='none'%3E%3Cpath d='M0 26V15C10 6 22 4 34 11S56 23 70 15 94 1 108 7 126 19 138 16 154 20 160 15V26z'/%3E%3C/svg%3E") 0 0 / 160px 100% repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 26' preserveAspectRatio='none'%3E%3Cpath d='M0 26V15C10 6 22 4 34 11S56 23 70 15 94 1 108 7 126 19 138 16 154 20 160 15V26z'/%3E%3C/svg%3E") 0 0 / 160px 100% repeat-x;
  pointer-events: none;
}
.sun { --bg: var(--sun); }
.cream { --bg: var(--cream); }
.meadow { --bg: var(--meadow); }
.sky { --bg: var(--sky); }
.blush { --bg: var(--blush); }
.teal { --bg: var(--teal); }
.night { --bg: var(--night); }
.ink { --bg: var(--ink); }

/* 1. Hero */
.hero { padding: 20px 0 0; overflow: hidden; }
.hero-grid { display: grid; gap: 20px; }
.hero-grade {
  display: inline-block; font: 600 1.0625rem/1 var(--display); background: var(--ink); color: var(--sun);
  padding: 9px 14px 8px; border-radius: 999px; transform: rotate(-2deg);
}
.hero h1 {
  font-size: clamp(2.8rem, 11vw, 5.2rem); line-height: 1.04; letter-spacing: -0.025em; margin-top: 16px;
  color: var(--ink);
}
.hero .lead { color: var(--ink); font-size: 1.25rem; }
.hero-note { margin-top: 16px; font-weight: 700; font-size: 1rem; }
.hero-art { margin: 0 calc(var(--gutter) * -1); position: relative; }
.hero-art img {
  width: 100%; aspect-ratio: 1 / 1.04; object-fit: cover; object-position: 50% 100%;
  border-radius: 52% 48% 0 0 / 26% 26% 0 0;
  background: #b9dd8e;
}
.hero-art::after { /* felt stitching around the arch window */
  content: ""; position: absolute; inset: 10px 10px 0; border: 3px dashed rgba(255, 255, 255, 0.75); border-bottom: 0;
  border-radius: 52% 48% 0 0 / 26% 26% 0 0; pointer-events: none;
}

/* 2. Subjects */
.subjects h2 { text-align: center; }
.subject-list { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 14px; }
.subject {
  display: grid; grid-template-columns: 112px 1fr; align-items: center; gap: 16px;
  padding: 16px 20px 16px 12px; border-radius: 28px; background: var(--bg);
}
.subject img { width: 112px; height: 104px; object-fit: contain; }
.subject h3 { font-size: 1.875rem; }
.subject p { margin-top: 4px; color: var(--ink-soft); font-size: 1rem; line-height: 1.45; }
.subject:nth-child(2) { transform: rotate(0.8deg); }
.subject:nth-child(3) { transform: rotate(-0.8deg); }

/* Phone frame */
.phone {
  margin: 0; width: min(290px, 78vw); justify-self: center; position: relative;
  padding: 9px; border-radius: 44px; background: var(--ink);
  box-shadow: 0 24px 48px -18px rgba(16, 36, 81, 0.45);
}
.phone img { border-radius: 36px; width: 100%; aspect-ratio: 540 / 1169; background: #f3efe4; }
.tilt-r { transform: rotate(2.5deg); }
.tilt-l { transform: rotate(-2.5deg); }

.split { display: grid; gap: 40px; align-items: center; }

/* 3. Lessons: steps on a stitched trail */
.trail { list-style: none; counter-reset: step; margin: 28px 0 0; padding: 0 0 0 4px; position: relative; }
.trail::before {
  content: ""; position: absolute; left: 25px; top: 24px; bottom: 30px;
  border-left: 4px dashed var(--teal); opacity: 0.55;
}
.trail li { counter-increment: step; position: relative; display: grid; gap: 2px; padding: 0 0 22px 64px; min-height: 52px; }
.trail li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; color: var(--teal); border: 3px solid var(--teal);
  font: 600 1.375rem/1 var(--display);
}
.trail li:last-child::before { background: var(--teal); color: #fff; }
.trail b { font: 600 1.375rem/1.2 var(--display); padding-top: 9px; }
.trail span { color: var(--ink-soft); }
.callout { margin-top: 8px; padding: 18px 20px; background: #fff; border-radius: 22px; display: grid; gap: 8px; outline: 2px dashed var(--meadow); outline-offset: -8px; }

/* 4. Peek carousel */
.peek { padding-bottom: 48px; }
.carousel {
  list-style: none; margin: 28px 0 0; padding: 8px var(--gutter) 28px; display: grid; grid-auto-flow: column;
  grid-auto-columns: min(270px, 74vw); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter); -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.carousel li { scroll-snap-align: start; }
.carousel .phone { width: 100%; }
.carousel p { margin-top: 14px; font-weight: 700; text-align: center; font-size: 1rem; }

/* 5. Games */
.teal, .night, .ink { color: #fff; }
.teal .lead, .night .lead { color: rgba(255, 255, 255, 0.92); }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 34px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--sun) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23102451' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.new-card {
  margin-top: 28px; padding: 22px; border-radius: 26px; background: var(--sun); color: var(--ink);
  transform: rotate(-1.2deg); box-shadow: 0 6px 0 rgba(0, 0, 0, 0.18);
}
.new-tag { display: inline-block; font: 600 0.9375rem/1 var(--display); background: var(--carrot); color: var(--ink); padding: 6px 12px; border-radius: 999px; }
.new-card h3 { font-size: 2rem; margin-top: 10px; }
.new-card p:last-child { margin-top: 6px; }
.games-art { width: min(100%, 480px); justify-self: center; }
.rewards { display: grid; gap: 18px; margin-top: 56px; padding-top: 40px; border-top: 3px dashed rgba(255, 255, 255, 0.35); }
.rewards img { width: min(100%, 360px); }
.rewards h3 { font-size: 2rem; }
.rewards p { margin-top: 8px; color: rgba(255, 255, 255, 0.92); }

/* 6. Worlds: coloured stops on a stitched trail */
.world-trail { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 22px; position: relative; }
.world-trail::before {
  content: ""; position: absolute; left: 50%; top: 10px; bottom: 10px; border-left: 4px dashed var(--ink); opacity: 0.25;
}
.world-trail li {
  position: relative; display: grid; gap: 2px; width: 84%; padding: 16px 20px 16px 64px; border-radius: 26px;
  background: var(--c); color: #fff; box-shadow: 0 5px 0 rgba(16, 36, 81, 0.2);
}
.world-trail li:nth-child(odd) { rotate: -1.5deg; }
.world-trail li:nth-child(even) { margin-left: auto; rotate: 1.5deg; }
.world-trail li::before {
  content: ""; position: absolute; left: 16px; top: 50%; translate: 0 -50%; width: 34px; height: 34px; border-radius: 50%;
  background: var(--sun); box-shadow: inset 0 0 0 7px rgba(255, 255, 255, 0.7);
}
.world-trail b { font: 600 1.4375rem/1.15 var(--display); }
.world-trail span { color: rgba(255, 255, 255, 0.92); font-size: 0.9875rem; }

/* 7. Library */
.library-art { border-radius: 30px; width: 100%; background: #1f3570; box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.12); }
.night .ticks li::before { background-color: var(--sun); }

/* 8. Parents */
.parents h2 { font-size: clamp(2.35rem, 10vw, 4.25rem); }
.tools {
  list-style: none; margin: 44px 0 0; padding: 8px; display: grid; grid-template-columns: 1fr 1fr;
  background: #fff; border-radius: 30px; box-shadow: 0 6px 0 rgba(176, 50, 79, 0.15);
}
.tools li { display: grid; align-content: start; gap: 4px; padding: 16px 12px; }
.tools li:nth-child(odd) { border-right: 2px dashed var(--blush); }
.tools li:nth-child(n + 3) { border-top: 2px dashed var(--blush); }
.tools svg { width: 44px; height: 44px; padding: 9px; margin-bottom: 6px; border-radius: 14px; background: var(--blush); fill: none; stroke: #b0324f; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tools b { font: 600 1.125rem/1.2 var(--display); }
.tools span { color: var(--ink-soft); font-size: 0.9375rem; line-height: 1.4; }

/* 9. Safety */
.promises { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 22px; }
.promises b { display: block; font: 600 clamp(2.25rem, 11vw, 3.5rem)/1 var(--display); color: var(--sun); }
.promises span { display: block; margin-top: 6px; color: rgba(255, 255, 255, 0.88); }
.safety-note { margin-top: 32px; padding-top: 22px; border-top: 3px dashed rgba(255, 255, 255, 0.3); font-size: 1.125rem; }

/* 10. Plans */
.plan-grid { display: grid; gap: 22px; margin-top: 32px; }
.plan { padding: 28px 22px 24px; border-radius: 30px; background: #fff; display: flex; flex-direction: column; box-shadow: 0 0 0 3px #f1e6c8; }
.plan h3 { font-size: 2.25rem; }
.plan-sub { color: var(--ink-soft); font-weight: 700; margin-top: 2px; }
.plan .ticks { margin: 20px 0 26px; flex: 1; }
.plan .fine { margin-top: 14px; font-size: 0.875rem; }
.premium { background: var(--sun); box-shadow: none; position: relative; outline: 3px dashed rgba(16, 36, 81, 0.25); outline-offset: -10px; }
.premium .ticks li::before { background-color: #fff; }
.plan-badge { align-self: flex-start; font: 600 1rem/1 var(--display); background: var(--ink); color: var(--sun); padding: 8px 14px; border-radius: 999px; margin-bottom: 14px; }

/* 11. FAQ */
.faq-list { margin-top: 28px; display: grid; gap: 10px; }
.faq-list details { background: #fff; border-radius: 22px; }
.faq-list summary {
  list-style: none; cursor: pointer; min-height: 60px; padding: 16px 56px 16px 20px; position: relative;
  font: 600 1.1875rem/1.3 var(--display); display: flex; align-items: center;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; position: absolute; right: 14px; top: 50%; translate: 0 -50%; width: 32px; height: 32px; border-radius: 50%;
  background: var(--sky); display: grid; place-items: center; font: 600 1.375rem/1 var(--display); transition: rotate 0.2s ease;
}
.faq-list details[open] summary::after { rotate: 45deg; }
.faq-list details p { padding: 0 20px 20px; color: var(--ink-soft); }

/* 12. Final */
.final { padding-bottom: 72px; }
.final-kids { width: min(100%, 420px); margin: 0 auto 28px; }
.final .lead { margin-left: auto; margin-right: auto; color: var(--ink); }
.final-login { margin-top: 22px; font-weight: 700; }
.final-login a { display: inline-block; padding: 12px 4px; }

/* Footer */
.footer { --bg: var(--ink); position: relative; background: var(--ink); color: #fff; padding: 44px 0 120px; }
.footer-grid { display: grid; gap: 22px; }
.logo-light { color: var(--sun); min-height: auto; }
.footer p { color: rgba(255, 255, 255, 0.8); margin-top: 4px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.footer nav a { display: inline-flex; align-items: center; min-height: 48px; text-decoration: none; font-weight: 700; }
.footer nav a:hover { text-decoration: underline; }
.footer small { color: rgba(255, 255, 255, 0.72); font-size: 0.875rem; }

/* Sticky "Start free" for thumbs on phones */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 248, 232, 0.94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 -6px 18px rgba(16, 36, 81, 0.12);
  translate: 0 110%; visibility: hidden; transition: translate 0.25s ease, visibility 0s linear 0.25s;
}
.show-dock .dock { translate: 0 0; visibility: visible; transition: translate 0.25s ease; }

/* Motion: gentle, and only when it's welcome */
@media (prefers-reduced-motion: no-preference) {
  .js .pop { opacity: 0; transform: translateY(18px) scale(0.96); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 1.4, 0.4, 1); }
  .js .pop.in { opacity: 1; transform: none; }
  .js .subject:nth-child(2) .pop { transition-delay: 0.08s; }
  .js .subject:nth-child(3) .pop { transition-delay: 0.16s; }
  .final-kids.in, .games-art.in { animation: bob 5s ease-in-out 0.8s infinite; }
  @keyframes bob { 50% { transform: translateY(-6px); } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Tablet */
@media (min-width: 700px) {
  :root { --gutter: 32px; --edge: 34px; }
  .band { padding: 80px 0 88px; }
  .hero { padding-top: 28px; }
  .hero-art { margin: 0; }
  .hero-art img { aspect-ratio: 760 / 640; border-radius: 50% 50% 28px 28px / 30% 30% 28px 28px; }
  .hero-art::after { inset: 12px; border-bottom: 3px dashed rgba(255, 255, 255, 0.75); border-radius: 50% 50% 22px 22px / 30% 30% 22px 22px; }
  .hero { padding-bottom: 72px; }
  .subject-list { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .subject { grid-template-columns: 1fr; text-align: center; padding: 24px 20px 28px; }
  .subject img { width: 160px; height: 150px; margin: 0 auto 6px; }
  .carousel { grid-auto-columns: 260px; }
  .world-trail { grid-template-columns: repeat(2, 1fr); column-gap: 28px; }
  .world-trail::before { display: none; }
  .world-trail li { width: auto; }
  .world-trail li:nth-child(even) { margin-left: 0; translate: 0 26px; }
  .tools { padding: 12px; }
  .tools li { padding: 20px 18px; }
  .promises { grid-template-columns: repeat(3, 1fr); }
  .plan-grid { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .rewards { grid-template-columns: 300px 1fr; align-items: center; }
  .footer { padding-bottom: 48px; }
  .footer-grid { grid-template-columns: 1fr 2fr; align-items: start; }
  .footer small { grid-column: 1 / -1; }
  .dock { display: none; }
}

/* Desktop */
@media (min-width: 1024px) {
  .nav { display: flex; gap: 4px; }
  .nav a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 12px; font-weight: 700; text-decoration: none; border-radius: 999px; }
  .nav a:hover { background: rgba(255, 255, 255, 0.5); }
  .header { padding: 14px max(var(--gutter), calc((100vw - 1180px) / 2 + var(--gutter))); }
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 56px; }
  .hero h1 { font-size: clamp(3.8rem, 5.5vw, 5rem); }
  .hero .lead { font-size: 1.375rem; }
  .split { grid-template-columns: 1.1fr 0.9fr; gap: 72px; }
  .split.flip > :first-child { order: 2; }
  .split .phone { width: 300px; }
  .lessons .split, .parents .split { grid-template-columns: 1.3fr 0.7fr; }
  .world-trail { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .world-trail li:nth-child(even) { translate: 0 0; }
  .world-trail li:nth-child(3n + 2) { translate: 0 30px; }
  .tools { grid-template-columns: repeat(4, 1fr); }
  .tools li:nth-child(odd) { border-right: 0; }
  .tools li:nth-child(n + 3) { border-top: 0; }
  .tools li:not(:nth-child(4n)) { border-right: 2px dashed var(--blush); }
  .tools li:nth-child(n + 5) { border-top: 2px dashed var(--blush); }
  .carousel { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 250px)); justify-content: center; gap: 28px; overflow: visible; }
  .hero-art img { aspect-ratio: 760 / 1018; max-height: 680px; object-position: 50% 0; }
  .carousel li:nth-child(odd) { translate: 0 24px; }
}
.nowrap { white-space: nowrap; }
