/* Lao Alphabet for Kids – colours of the app: sky, whiteboard, warm
   orange frames, letter blue, star yellow, meadow green. */
:root {
  --sky: #aae4f8;
  --blue: #1f3fd1;
  --ink: #23305e;
  --ink-soft: #55608a;
  --orange: #e8a878;
  --orange-deep: #d9824a;
  --yellow: #ffe23d;
  --green: #8bd66b;
  --green-deep: #5aa83c;
  --white: #ffffff;
  --radius: 28px;
  --shadow: 0 14px 40px rgba(35, 48, 94, .14);
  --font: "Baloo 2", "Noto Sans Lao Looped", system-ui, sans-serif;
  --lao: "Noto Serif Lao", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: #fffdf7;
  line-height: 1.55;
  overflow-x: hidden;
}
html:lang(lo) body { font-family: "Noto Sans Lao Looped", var(--font); }
img { max-width: 100%; display: block; }
a { color: var(--blue); }
.wrap { width: min(1140px, 100% - 32px); margin: 0 auto; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(35, 48, 94, .08);
}
.nav .wrap { display: flex; align-items: center; gap: 18px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.15rem; }
.brand img { width: 40px; height: 40px; border-radius: 11px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { text-decoration: none; color: var(--ink-soft); font-weight: 600; }
.nav-links a:hover { color: var(--blue); }
.langs { display: flex; gap: 4px; background: #eef4fb; border-radius: 99px; padding: 4px; }
.langs button {
  border: 0; background: transparent; font: inherit; font-weight: 700; font-size: .9rem;
  color: var(--ink-soft); padding: 4px 12px; border-radius: 99px; cursor: pointer;
}
.langs button[aria-pressed="true"] { background: var(--white); color: var(--blue); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
@media (max-width: 860px) { .nav-links { display: none; } .langs { margin-left: auto; } .brand span { display: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--sky) url(img/sky.webp) center top / cover;
  padding: 70px 0 160px;
}
.clouds {
  position: absolute; inset: 0; pointer-events: none;
  background: url(img/sky.webp) 0 0 / auto 100% repeat-x;
  opacity: .5; animation: drift 90s linear infinite;
}
@keyframes drift { to { background-position: -1600px 0; } }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 920px) { .hero .wrap { grid-template-columns: 1fr; text-align: center; } }
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); line-height: 1.08; margin: 0 0 16px; }
.hero h1 .accent { color: var(--blue); }
.hero p.lead { font-size: 1.25rem; color: var(--ink-soft); margin: 0 0 26px; max-width: 34em; }
@media (max-width: 920px) { .hero p.lead { margin-inline: auto; } }
.badge-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
@media (max-width: 920px) { .badge-row { justify-content: center; } }
.store-badge img { height: 58px; width: auto; transition: transform .2s; }
.store-badge:hover img { transform: translateY(-3px) scale(1.03); }
.price-note { font-weight: 700; background: rgba(255,255,255,.8); padding: 8px 16px; border-radius: 99px; }

/* Floating Lao letters */
.float-letters { position: absolute; inset: 0; pointer-events: none; }
.float-letters span {
  position: absolute; font-family: var(--lao); font-weight: 700; color: var(--blue);
  opacity: .16; animation: bob 7s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-22px) rotate(5deg); } }

/* Phone mockup (landscape) */
.phone-stage { position: relative; }
.phone {
  position: relative; margin: 0 auto; width: min(560px, 100%);
  aspect-ratio: 2868 / 1320; border-radius: 34px; padding: 12px;
  background: #1b1d29; box-shadow: 0 30px 70px rgba(20, 30, 80, .35), inset 0 0 0 2px #3a3d4f;
  animation: tilt 8s ease-in-out infinite;
}
@keyframes tilt { 0%,100% { transform: rotate(-3deg) translateY(0); } 50% { transform: rotate(-1deg) translateY(-10px); } }
.phone .screen { position: relative; width: 100%; height: 100%; border-radius: 24px; overflow: hidden; background: var(--sky); }
.phone .screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .9s; }
.phone .screen img.on { opacity: 1; }
.mascot { position: absolute; width: 120px; right: -10px; top: -56px; animation: hop 2.6s ease-in-out infinite; filter: drop-shadow(0 8px 10px rgba(0,0,0,.15)); }
@keyframes hop { 0%,100% { transform: translateY(0) rotate(0); } 40% { transform: translateY(-26px) rotate(-8deg); } 60% { transform: translateY(-26px) rotate(8deg); } }
.kid-peek { position: absolute; width: 120px; left: -50px; bottom: -100px; animation: bob 6s ease-in-out infinite; }
@media (max-width: 600px) { .mascot { width: 80px; top: -40px; } .kid-peek { width: 90px; bottom: -60px; } }

.grass {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 110px; background: var(--green);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 110' preserveAspectRatio='none'%3E%3Cpath d='M0,60 C240,0 480,90 720,40 C960,-10 1200,70 1440,30 L1440,110 L0,110 Z'/%3E%3C/svg%3E") 0 0 / 100% 100%;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 110' preserveAspectRatio='none'%3E%3Cpath d='M0,60 C240,0 480,90 720,40 C960,-10 1200,70 1440,30 L1440,110 L0,110 Z'/%3E%3C/svg%3E") 0 0 / 100% 100%;
}

/* ---------- Stats ---------- */
.stats { background: var(--green); padding: 0 0 46px; }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 700px) { .stats .wrap { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--white); border-radius: 22px; padding: 18px; text-align: center; box-shadow: var(--shadow); border: 4px solid var(--orange); }
.stat b { display: block; font-size: 2.2rem; color: var(--blue); line-height: 1.1; }
.stat span { color: var(--ink-soft); font-weight: 600; }

/* ---------- Sections ---------- */
section { padding: 90px 0; }
.eyebrow { display: inline-block; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: .85rem; color: var(--orange-deep); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.15; margin: 6px 0 14px; }
.section-lead { color: var(--ink-soft); font-size: 1.15rem; max-width: 40em; margin: 0 0 40px; }
.center { text-align: center; }
.center .section-lead { margin-inline: auto; }

/* Steps: listen / find / write / dictation */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.step {
  background: var(--white); border-radius: var(--radius); padding: 26px 22px; box-shadow: var(--shadow);
  border: 5px solid var(--orange); text-align: center; transition: transform .25s;
}
.step:hover { transform: translateY(-8px) rotate(-1deg); }
.step img { width: 120px; height: 120px; object-fit: contain; margin: 0 auto 12px; }
.step:hover img { animation: wiggle .6s ease-in-out; }
@keyframes wiggle { 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
.step h3 { margin: 0 0 6px; font-size: 1.35rem; }
.step p { margin: 0; color: var(--ink-soft); }
.step .num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--yellow); font-weight: 800; margin-bottom: 8px; }

/* Writing demo */
.write { background: linear-gradient(180deg, #fffdf7, #eaf7fd); }
.write .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
@media (max-width: 860px) { .write .wrap { grid-template-columns: 1fr; } }
.board {
  position: relative; background: #fbfbfb; border: 12px solid #c99a6b; border-radius: 18px;
  box-shadow: var(--shadow), inset 0 0 30px rgba(0,0,0,.05); aspect-ratio: 4 / 3; display: grid; place-items: center;
}
.board .letter-box { position: relative; width: 70%; aspect-ratio: 1; }
.board .letter-box img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .14; }
.board svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.board svg path { fill: none; stroke: var(--green-deep); stroke-width: 4.2; stroke-linecap: round; stroke-linejoin: round; }
.board svg circle { fill: var(--orange-deep); }
.board .pencils { position: absolute; bottom: -34px; right: 14px; display: flex; gap: 6px; }
.board .pencils img { width: 22px; transform: rotate(8deg); }
.ticks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; font-size: 1.08rem; }
.ticks li::before { content: "★"; color: var(--orange-deep); font-size: 1.2rem; line-height: 1.4; }

/* Motivation */
.fun .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
@media (max-width: 860px) { .fun .wrap { grid-template-columns: 1fr; } }
.stickers { position: relative; min-height: 380px; }
.sticker {
  position: absolute; background: var(--white); border-radius: 26px; padding: 14px; box-shadow: var(--shadow);
  border: 4px dashed var(--orange); animation: bob 6s ease-in-out infinite;
}
.sticker img { width: 100%; height: 100%; object-fit: contain; }
.stars-line { font-size: 2.4rem; color: #f5c400; letter-spacing: .1em; text-shadow: 0 3px 0 #e19b00; }

/* Screens carousel */
.screens { background: var(--sky); }
.track { display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px 16px 30px; scrollbar-width: thin; }
.track figure { flex: 0 0 min(560px, 86vw); margin: 0; scroll-snap-align: center; }
.track img { width: 100%; border-radius: 22px; border: 8px solid #1b1d29; box-shadow: var(--shadow); background: #fff; }
.track figcaption { text-align: center; font-weight: 700; margin-top: 10px; }
.track-nav { display: flex; justify-content: center; gap: 12px; }
.track-nav button {
  width: 48px; height: 48px; border-radius: 50%; border: 4px solid var(--orange); background: var(--white);
  font-size: 1.3rem; cursor: pointer; color: var(--ink);
}

/* Parents */
.parents-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .parents-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .parents-grid { grid-template-columns: 1fr; } }
.feature { background: var(--white); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
.feature .ico { font-size: 2rem; }
.feature h3 { margin: 6px 0 4px; font-size: 1.2rem; }
.feature p { margin: 0; color: var(--ink-soft); }

/* Pricing */
.pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 860px; margin: 50px auto 0; }
@media (max-width: 700px) { .pricing { grid-template-columns: 1fr; } }
.plan { background: var(--white); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); border: 5px solid #e3ecf7; }
.plan.full { border-color: var(--yellow); position: relative; }
.plan.full::after { content: "★"; position: absolute; top: -30px; right: 22px; font-size: 3rem; color: var(--yellow); text-shadow: 0 3px 0 #e1a800; animation: hop 2.6s ease-in-out infinite; }
.plan h3 { margin: 0; font-size: 1.4rem; }
.plan .price { font-size: 2.6rem; font-weight: 800; color: var(--blue); margin: 4px 0; }
.plan ul { padding-left: 1.1em; margin: 10px 0 0; color: var(--ink-soft); }
.old-buyers { text-align: center; margin-top: 22px; font-weight: 600; color: var(--green-deep); }

/* CTA */
.cta { background: var(--sky) url(img/sky.webp) center / cover; text-align: center; padding: 100px 0 120px; overflow: hidden; }
.cta .card { background: rgba(255,255,255,.92); border-radius: 36px; padding: 44px 26px; max-width: 760px; margin: 0 auto; box-shadow: var(--shadow); position: relative; }
.cta .prof { position: absolute; width: 150px; left: -60px; bottom: -40px; animation: bob 5s ease-in-out infinite; }
@media (max-width: 860px) { .cta .prof { display: none; } }
.cta .badge-row { justify-content: center; }

/* Help */
.help details { background: var(--white); border-radius: 18px; padding: 16px 20px; box-shadow: 0 6px 18px rgba(35,48,94,.08); margin-bottom: 12px; }
.help summary { font-weight: 700; cursor: pointer; }
.help details p { margin: 10px 0 0; color: var(--ink-soft); }

footer { background: var(--ink); color: #d7def5; padding: 40px 0; font-size: .95rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: center; }
footer a { color: #fff; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .7s ease; }
.reveal.shown { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Small screens: keep stickers and pencils inside the page. */
.fun { overflow: hidden; }
.plan { text-align: left; }
@media (max-width: 520px) {
  .stickers { min-height: 300px; }
  .sticker { zoom: .78; }
  .board .pencils img { width: 14px; }
  .board .pencils { bottom: -22px; }
}
