@font-face {
  font-family: 'Vazirmatn';
  src: url('/fonts/vazirmatn.woff2') format('woff2-variations'), url('/fonts/vazirmatn.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Lalezar';
  src: url('/fonts/lalezar.woff2') format('woff2');
  font-display: swap;
}

/* The app's palette (same tokens as learning/assets/site.css). */
:root {
  --cyan: #52dbe3;
  --cyan-deep: #1a9aa3;
  --cyan-soft: #e3fafb;
  --cream: #fff4d9;
  --sun: #ffb000;
  --orange: #ffa62b;
  --orange-deep: #c96d00;
  --coral: #ff6f61;
  --navy: #1f2b5c;
  --navy-soft: #4a5687;
  --green: #1f9d55;
  --green-soft: #e3f7ea;
  --line: #e4e8f3;
  --card: #ffffff;
  --radius: 28px;
  --display: 'Lalezar', 'Vazirmatn', system-ui, sans-serif;
  --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  overflow-x: clip;
  background: radial-gradient(900px 420px at 50% -60px, rgba(255, 246, 201, 0.85), transparent 70%),
    linear-gradient(180deg, #5fe2e9 0, var(--cyan) 40%, #49d2dc 100%);
  background-color: var(--cyan);
  color: var(--navy);
  font-family: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  font-size: 17px;
  line-height: 1.85;
  font-weight: 450;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--cyan-deep);
  text-underline-offset: 4px;
}

h1,
h2,
h3 {
  line-height: 1.45;
  margin: 0 0 0.5em;
}

h1,
h2 {
  font-family: var(--display);
  font-weight: 400;
}

h1 {
  font-size: clamp(34px, 7vw, 58px);
  line-height: 1.3;
}

h2 {
  font-size: clamp(27px, 4.6vw, 38px);
}

h3 {
  font-size: 18px;
  font-weight: 850;
}

.wrap {
  width: min(1120px, 100% - 32px);
  margin-inline: auto;
}

.wrap.narrow {
  width: min(820px, 100% - 32px);
}

.center {
  text-align: center;
}

.skip {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.skip:focus {
  width: auto;
  height: auto;
  clip-path: none;
  inset-inline-start: 16px;
  top: 8px;
  z-index: 10;
  background: #fff;
  padding: 6px 12px;
  border-radius: 10px;
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

/* ---- sky: four clouds and three sparkles, fixed behind the page ---- */

.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  contain: strict;
  pointer-events: none;
}

.cloud {
  position: absolute;
  left: 0;
  display: block;
  fill: #fff;
  will-change: transform;
  animation: drift linear infinite;
}

.cloud svg {
  display: block;
  width: 100%;
}

.c1 { top: 14%; width: 120px; opacity: 0.9; animation-duration: 70s; animation-delay: -12s; }
.c2 { top: 42%; width: 80px; opacity: 0.7; animation-duration: 95s; animation-delay: -60s; }
.c3 { top: 66%; width: 140px; opacity: 0.55; animation-duration: 120s; animation-delay: -35s; }
.c4 { top: 86%; width: 70px; opacity: 0.75; animation-duration: 80s; animation-delay: -5s; }

@keyframes drift {
  from { transform: translateX(-160px); }
  to { transform: translateX(calc(100vw + 20px)); }
}

.spark {
  position: absolute;
  width: 14px;
  height: 14px;
  background: #ffe066;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: twinkle 3s ease-in-out infinite;
}

.p1 { top: 24%; right: 6%; }
.p2 { top: 58%; left: 5%; animation-delay: -1s; }
.p3 { top: 78%; right: 12%; width: 10px; height: 10px; animation-delay: -2s; }

@keyframes twinkle {
  50% { transform: scale(0.6) rotate(45deg); opacity: 0.5; }
}

/* ---- header ---- */

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 3px 0 rgba(26, 154, 163, 0.35);
}

.top-in {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--navy);
  text-decoration: none;
  flex: none;
}

.logo b {
  font-family: var(--display);
  font-weight: 400;
  font-size: 28px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline-start: auto;
}

.nav a:not(.btn) {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--navy);
  text-decoration: none;
  font-weight: 800;
  font-size: 15px;
  white-space: nowrap;
}

.nav a:not(.btn):hover {
  background: var(--cyan-soft);
}

@media (max-width: 620px) {
  .nav a:not(.btn):not(.nav-school) {
    display: none;
  }
  .nav a.nav-school {
    padding: 6px 8px;
    font-size: 14px;
  }
}

/* ---- buttons ---- */

.btn,
.store {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 18px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s;
}

.btn {
  background: var(--orange);
  color: var(--navy);
  box-shadow: 0 4px 0 var(--orange-deep);
}

.btn.small {
  min-height: 40px;
  padding: 0 14px;
  font-size: 15px;
  border-radius: 14px;
  flex: none;
}

.btn:active,
.store:active {
  transform: translateY(2px);
}

.ctas {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 26px;
}

.center .ctas {
  align-items: center;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.center .stores {
  justify-content: center;
}

.store {
  position: relative;
  overflow: hidden;
  font-size: 17px;
  background: #fff;
  color: var(--navy);
  border: 3px solid var(--navy);
  box-shadow: 0 5px 0 var(--navy);
}

.store.bazaar {
  background: var(--orange);
}

/* A shine that crosses the main button now and then. */
.store.bazaar::after {
  content: '';
  position: absolute;
  inset: -20% auto -20% 0;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.75), transparent);
  translate: -120% 0;
  animation: shine 4.5s ease-in-out infinite 1.5s;
}

@keyframes shine {
  0% { translate: -120% 0; }
  25%, 100% { translate: 360% 0; }
}

.web {
  align-self: flex-start;
  font-weight: 800;
  font-size: 16px;
  color: var(--navy);
}

.center .web {
  align-self: center;
}

/* iPhone and desktop can't install the app: the web button leads. */
.not-android .ctas .web {
  order: -1;
  display: inline-flex;
  align-items: center;
  min-height: 56px;
  padding: 0 26px;
  border-radius: 18px;
  background: var(--orange);
  border: 3px solid var(--navy);
  box-shadow: 0 5px 0 var(--navy);
  text-decoration: none;
  font-size: 18px;
  font-weight: 900;
}

.not-android .store {
  min-height: 44px;
  font-size: 15px;
  box-shadow: 0 3px 0 var(--navy);
  border-width: 2px;
}

.not-android .store.bazaar {
  background: #fff;
}

.not-android .store.bazaar::after {
  content: none;
}

/* ---- hero ---- */

.hero {
  padding: clamp(24px, 6vw, 64px) 0 clamp(28px, 6vw, 72px);
}

.hero-in {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 24px;
  align-items: center;
}

.kicker {
  display: inline-block;
  margin: 0 0 12px;
  padding: 2px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  font-weight: 850;
  font-size: 15px;
}

.lead {
  font-size: clamp(18px, 2.4vw, 21px);
  font-weight: 650;
  margin: 0;
}

.stage {
  position: relative;
  aspect-ratio: 1;
  width: min(100%, 480px);
  margin-inline: auto;
  --px: 0;
  --py: 0;
}

.layer {
  position: absolute;
  translate: calc(var(--px) * var(--d, 0.4) * 1px) calc(var(--py) * var(--d, 0.4) * 1px);
  transition: translate 0.4s ease-out;
}

.board-wrap {
  inset: 16%;
  display: grid;
  place-items: center;
  --d: 12;
}

.board {
  width: 100%;
  rotate: -4deg;
  filter: drop-shadow(0 12px 0 rgba(31, 43, 92, 0.18));
}

.pop {
  width: 23%;
  scale: 0;
  animation: pop 0.7s var(--bounce) forwards;
}

.pop img {
  display: block;
  width: 100%;
  animation: float 4s ease-in-out infinite;
}

.a1 { top: 0; right: 4%; --d: 30; animation-delay: 0.15s; }
.a2 { top: 2%; left: 2%; --d: 22; animation-delay: 0.3s; width: 19%; }
.a3 { top: 40%; left: -3%; --d: 34; animation-delay: 0.45s; }
.a4 { bottom: 0; left: 10%; --d: 18; animation-delay: 0.6s; width: 21%; }
.a5 { bottom: 2%; right: 8%; --d: 26; animation-delay: 0.75s; width: 19%; }
.a6 { top: 42%; right: -4%; --d: 24; animation-delay: 0.9s; width: 18%; }

.a2 img { animation-delay: -1s; }
.a3 img { animation-delay: -2s; }
.a4 img { animation-delay: -0.5s; }
.a5 img { animation-delay: -3s; }
.a6 img { animation-delay: -1.5s; }

@keyframes pop {
  to { scale: 1; }
}

@keyframes float {
  50% { transform: translateY(-10px) rotate(3deg); }
}

@media (max-width: 860px) {
  .hero-in {
    grid-template-columns: 1fr;
  }
  .stage {
    width: min(100%, 360px);
    order: -1;
  }
}

/* ---- bands ---- */

.band {
  padding: 18px 0;
}

.band > .wrap {
  background: var(--card);
  border-radius: var(--radius);
  padding: clamp(24px, 5vw, 52px) clamp(18px, 4.5vw, 52px);
  box-shadow: 0 6px 0 rgba(31, 43, 92, 0.12);
}

.band h2 {
  margin-top: 0;
}

.sub {
  margin: -6px 0 22px;
  color: var(--navy-soft);
  font-weight: 650;
}

.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 4vw, 48px);
  align-items: center;
}

@media (max-width: 860px) {
  .two {
    grid-template-columns: 1fr;
  }
}

/* How it works */

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.step > b {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--sun);
  border: 3px solid var(--navy);
  font-family: var(--display);
  font-weight: 400;
  font-size: 24px;
}

.step h3 {
  margin: 4px 0 2px;
}

.step p {
  margin: 0;
}

.demo {
  display: grid;
  gap: 16px;
  justify-items: center;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--cream);
}

.q-card {
  width: min(100%, 320px);
  background: #fff;
  border: 3px solid var(--navy);
  border-radius: 20px;
  padding: 12px 16px;
  text-align: center;
  box-shadow: 0 5px 0 var(--navy);
}

.q {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 900;
  direction: ltr;
}

.opts {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.opts span {
  flex: 1;
  border-radius: 12px;
  border: 2px solid var(--line);
  font-weight: 850;
  font-size: 18px;
}

.mini-board {
  width: min(100%, 260px);
  height: auto;
}

.grid path {
  stroke: var(--navy);
  stroke-width: 9;
  stroke-linecap: round;
  fill: none;
}

.m {
  fill: none;
  stroke-width: 14;
  stroke-linecap: round;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
}

.x { stroke: var(--coral); }
.o { stroke: #2f7df6; }

.win {
  fill: none;
  stroke: var(--sun);
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
}

/*
 * One 10.8s round, four 2.7s turns: the right option lights up just before
 * each X is drawn; O answers in between; the win line, a pause, and again.
 */
.demo.in .right { animation: right 2.7s infinite; }
.demo.in .m1 { animation: m1 10.8s infinite; }
.demo.in .m2 { animation: m2 10.8s infinite; }
.demo.in .m3 { animation: m3 10.8s infinite; }
.demo.in .m4 { animation: m4 10.8s infinite; }
.demo.in .m5 { animation: m5 10.8s infinite; }
.demo.in .win { animation: win 10.8s infinite; }

@keyframes right {
  5%, 28% { background: var(--green-soft); border-color: var(--green); color: var(--green); }
  0%, 3%, 32%, 100% { background: transparent; border-color: var(--line); color: inherit; }
}

@keyframes m1 { 0%, 8% { stroke-dashoffset: 200; opacity: 1; } 12%, 92% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes m2 { 0%, 20% { stroke-dashoffset: 200; opacity: 1; } 25%, 92% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes m3 { 0%, 33% { stroke-dashoffset: 200; opacity: 1; } 37%, 92% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes m4 { 0%, 45% { stroke-dashoffset: 200; opacity: 1; } 50%, 92% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes m5 { 0%, 58% { stroke-dashoffset: 200; opacity: 1; } 62%, 92% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes win { 0%, 66% { stroke-dashoffset: 340; opacity: 1; } 72%, 92% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }

/* For parents */

.points {
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (max-width: 700px) {
  .points {
    grid-template-columns: 1fr;
  }
}

.point {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  border-radius: 20px;
  background: var(--cyan-soft);
}

.point img {
  flex: none;
  width: 60px;
}

.point h3 {
  margin: 2px 0 2px;
}

.point p {
  margin: 0;
  font-size: 16px;
}

.report {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 20px;
  border-radius: 22px;
  border: 3px dashed #c9d1ea;
}

.report > div {
  flex: 1;
  min-width: 0;
}

.report-sun {
  flex: none;
}

.report-t {
  margin: 0 0 6px;
  font-weight: 900;
}

.bars {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}

.bars li {
  display: grid;
  grid-template-columns: 72px 1fr 48px;
  gap: 10px;
  align-items: center;
  font-weight: 750;
  font-size: 15px;
}

.bars i {
  display: block;
  height: 12px;
  border-radius: 99px;
  background: linear-gradient(270deg, var(--green) 0 calc(var(--v) * 1%), var(--line) 0);
  transform-origin: right;
}

.report-note {
  margin: 10px 0 0;
  font-size: 15px;
  color: var(--navy-soft);
}

@media (max-width: 520px) {
  .report {
    flex-direction: column;
    align-items: stretch;
  }
  .report-sun {
    align-self: center;
  }
}

.more {
  margin: 22px 0 0;
  font-weight: 850;
}

/* Middle call to action */

.mid-cta > .wrap {
  background: var(--navy);
  color: #fff;
}

.mid-cta .sub {
  color: #dfe5ff;
}

.mid-cta .web {
  color: #fff;
}

.mid-cta .store {
  border-color: #fff;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.35);
}

/* Games */

.game-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 700px) {
  .game-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .game img {
    width: 84px;
  }
}

.game {
  text-align: center;
  padding: 16px 14px 18px;
  border-radius: 22px;
  background: var(--cream);
  transition: transform 0.2s var(--bounce);
}

.game:hover {
  transform: translateY(-6px) rotate(-1deg);
}

.game img {
  width: 110px;
}

.game h3 {
  margin: 6px 0 2px;
}

.game p {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
}

/* Lessons and league */

.grades {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.grade {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--cyan-soft);
  font-weight: 850;
  text-decoration: none;
}

.lesson-art,
.league-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 240px;
}

.lesson-art .tilt,
.lesson-art .tilt2 {
  position: absolute;
  animation: float 5s ease-in-out infinite;
}

.lesson-art .tilt { top: 6%; right: 12%; }
.lesson-art .tilt2 { bottom: 8%; left: 12%; animation-delay: -2.5s; }

.league-art img {
  animation: float 5s ease-in-out infinite;
}

/* FAQ */

.faqs {
  display: grid;
  gap: 10px;
}

.faq {
  border-radius: 18px;
  background: var(--cyan-soft);
  padding: 4px 18px;
}

.faq summary {
  cursor: pointer;
  font-weight: 850;
  padding: 10px 0;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::before {
  content: '+';
  display: inline-block;
  width: 1.2em;
  font-weight: 900;
  transition: rotate 0.2s;
}

.faq[open] summary::before {
  rotate: 45deg;
}

.faq p {
  margin: 0 0 12px;
}

/* Final call to action */

.final > .wrap {
  background: var(--cream);
}

.final-sun {
  animation: float 4s ease-in-out infinite;
}

/* ---- inner pages ---- */

.page {
  padding: 24px 0 8px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: clamp(20px, 4.5vw, 48px);
  box-shadow: 0 6px 0 rgba(31, 43, 92, 0.12);
}

.card h2 {
  font-size: clamp(22px, 3.8vw, 28px);
  margin-top: 1.4em;
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy-soft);
}

.crumbs li + li::before {
  content: '‹';
  margin: 0 8px;
}

.crumbs a {
  color: var(--navy-soft);
  text-decoration: none;
}

/* ---- footer ---- */

.foot {
  margin-top: 40px;
  padding: 32px 0 24px;
  background: var(--navy);
  color: #dfe5ff;
}

.foot a {
  color: #fff;
  text-decoration: none;
}

.foot a:hover {
  text-decoration: underline;
}

.foot-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  font-weight: 700;
}

.foot-end {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
}

.copy {
  margin: 0;
  font-size: 13px;
  opacity: 0.75;
}

#enamad {
  flex: none;
  background: #fff;
  border-radius: 14px;
  padding: 6px;
  line-height: 0;
}

#enamad img {
  width: 96px;
  height: auto;
}

/* ---- scroll reveal (only when JS runs, so the page reads fine without it) ---- */

.js .reveal {
  opacity: 0;
  translate: 0 28px;
  transition: opacity 0.6s ease-out, translate 0.6s var(--bounce);
  transition-delay: calc(var(--i, 0) * 90ms);
}

.js .reveal.in {
  opacity: 1;
  translate: 0 0;
}

.js .bars i {
  transform: scaleX(0);
  transition: transform 1.1s ease-out 0.2s;
}

.js .report.in .bars i {
  transform: scaleX(1);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .pop {
    scale: 1;
  }
  .js .reveal {
    opacity: 1;
    translate: none;
  }
  .js .bars i {
    transform: none;
  }
  .m,
  .win {
    stroke-dashoffset: 0;
  }
}

.foot-contact {
  margin: 16px 0 0;
  font-size: 14px;
  font-weight: 700;
}

.foot-contact a {
  color: inherit;
}

/* ---- school league page, exam links ---- */

.league-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0 8px;
}

.btn.ghost {
  background: #fff;
  border: 2px solid var(--line);
  box-shadow: 0 4px 0 #cfd6ea;
}

.sample-report {
  border: 2px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  background: var(--cyan-soft);
}

.sr-head {
  margin: 0 0 10px;
}

.sr-table {
  overflow-x: auto;
}

.sample-report table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  font-size: 15px;
}

.sample-report th,
.sample-report td {
  padding: 8px 10px;
  text-align: start;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.sample-report th {
  background: var(--cream);
}

.sr-note {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--navy-soft);
}

.exam-h {
  margin: 22px 0 6px;
  font-size: 18px;
}

.exam-links p {
  margin: 4px 0;
}

.exam-links a {
  font-weight: 800;
}
