/* ONYXKIDS site — the app's own world: its cream, ink and colours, its chunky pressable buttons, and the real screens in a
   tablet's frame with Bubu sitting on top. Light only. One family per script: Baloo Bhaijaan 2 (the app's) for headings
   in Arabic and English, Rubik for Hebrew; body IBM Plex Sans Arabic / Rubik. */
:root {
  color-scheme: light;
  --bg: #fff7ec;
  --card: #ffffff;
  --ink: #3d2c1e;
  --muted: #7a6553;
  --line: #f1e1cc;
  --orange: #f28c28;
  --orange-d: #c96a12;
  --teal: #22a698;
  --teal-d: #16786e;
  --yellow: #ffd45c;
  --purple: #8b6cef;
  --bezel: #2f2a26;
  --head: "Baloo Bhaijaan 2", "Rubik", system-ui, sans-serif;
  --body: "IBM Plex Sans Arabic", "Rubik", system-ui, sans-serif;
  --wrap: 1120px;
}
.l-en { --body: "Rubik", system-ui, sans-serif; }
.l-he { --head: "Rubik", system-ui, sans-serif; --body: "Rubik", system-ui, sans-serif; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 18px/1.7 var(--body); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { font-family: var(--head); line-height: 1.2; margin: 0; }
.l-he h1, .l-he h2 { font-weight: 800; }

/* ---- the app's key: a raised button that presses down ---- */
.key { --c: var(--orange); --d: var(--orange-d); display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 28px;
  border-radius: 20px; background: var(--c); color: #fff; font: 700 20px/1 var(--head); text-decoration: none; box-shadow: 0 6px 0 var(--d);
  transition: transform 0.08s, box-shadow 0.08s; }
.key:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--d); }
.key-teal { --c: var(--teal); --d: var(--teal-d); }
.key-white { --c: #fff; --d: var(--line); color: var(--ink); }
.key.small { min-height: 44px; padding: 0 18px; font-size: 17px; border-radius: 14px; box-shadow: 0 4px 0 var(--d); }

/* ---- top ---- */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px; padding: 10px max(16px, calc((100vw - var(--wrap)) / 2));
  background: rgba(255, 247, 236, 0.94); backdrop-filter: blur(8px); border-bottom: 2px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 24px/1 var(--head); }
.brand img { width: 40px; }
.brand span { display: flex; flex-direction: column; gap: 4px; }
.brand em { font: 700 14px/1 var(--head); font-style: normal; color: var(--orange-d, #c96a12); }
.hero .slogan { margin: 0 0 10px; font: 700 18px/1.2 var(--head); color: var(--orange-d, #c96a12); }
.menu { display: flex; gap: 22px; margin-inline-start: auto; font-weight: 500; }
.menu a { text-decoration: none; color: var(--muted); }
.menu a:hover { color: var(--ink); }
.tools { display: flex; align-items: center; gap: 14px; }
.langs { display: flex; gap: 4px; font-size: 15px; background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 3px; }
.langs a, .langs span { padding: 3px 10px; border-radius: 9px; text-decoration: none; }
.langs span { background: var(--ink); color: #fff; }
.langs a:hover { background: var(--bg); }

/* ---- a real screen in a tablet's frame ---- */
.slate { margin: 0; padding: 14px; border-radius: 34px; background: var(--bezel); box-shadow: 0 18px 40px rgba(61, 44, 30, 0.18); }
.slate img { border-radius: 20px; width: 100%; }

/* ---- hero: the words, and the tablet with Bubu sitting on it ---- */
main > section { padding-inline: max(16px, calc((100vw - var(--wrap)) / 2)); }
.hero { display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 56px; padding-block: 56px 72px; }
.hero h1 { font-size: clamp(38px, 5.2vw, 62px); font-weight: 800; max-width: 16ch; text-wrap: balance; }
.l-en .hero h1 { max-width: 18ch; }
.hero p { font-size: 21px; color: var(--muted); max-width: 34em; margin: 22px 0 32px; }
.cta { display: flex; flex-wrap: wrap; gap: 16px; }
.hero-pic { position: relative; max-width: 380px; justify-self: center; width: 100%; padding-top: 92px; }
.hero-pic .perch { position: absolute; top: 0; inset-inline-end: 18%; width: 118px; z-index: 2; filter: drop-shadow(0 6px 4px rgba(61, 44, 30, 0.18)); }
.hero-pic .slate { transform: rotate(-3deg); }
[dir="rtl"] .hero-pic .slate { transform: rotate(3deg); }

/* ---- the three numbers ---- */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; background: var(--card); border-block: 2px solid var(--line); padding-block: 34px; }
.fact { display: flex; flex-direction: column; gap: 6px; padding-inline: 28px; border-inline-start: 2px solid var(--line); }
.fact:first-child { border-inline-start: 0; padding-inline-start: 0; }
.fact b { font: 800 56px/1 var(--head); color: var(--orange); }
.fact:nth-child(2) b { color: var(--teal); }
.fact:nth-child(3) b { color: var(--purple); }
.fact span { color: var(--muted); font-size: 17px; max-width: 24ch; }

/* ---- the app's parts, a screen beside each ---- */
.part { display: grid; grid-template-columns: 300px 1fr; gap: 64px; align-items: center; padding-block: 72px; }
.part.flip { grid-template-columns: 1fr 300px; }
.part.flip .slate { order: 2; }
.part h2, .parents h2, .tablet h2, .start h2 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 800; }
.part-text p { font-size: 20px; color: var(--muted); max-width: 32em; margin: 16px 0 0; }
.part + .part { border-top: 2px dashed var(--line); }

/* ---- the parents: their phone ---- */
.parents { display: grid; grid-template-columns: 1fr 320px; gap: 64px; align-items: center; padding-block: 80px; background: #eaf7f4; }
.parents p { color: var(--muted); font-size: 19px; margin: 16px 0; max-width: 34em; }
.parents ul { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.parents li { background: var(--card); border-radius: 16px; padding: 12px 18px; box-shadow: 0 3px 0 #cfe9e3; }
.parents .print { font-weight: 500; color: var(--ink); }
.phone { background: var(--card); border: 10px solid var(--bezel); border-radius: 40px; padding: 26px 18px 22px; display: grid; gap: 12px; box-shadow: 0 18px 40px rgba(22, 120, 110, 0.18); }
.ph-bar { width: 80px; height: 6px; border-radius: 3px; background: var(--line); justify-self: center; margin-bottom: 6px; }
.ph-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: var(--bg); border-radius: 14px; font-size: 16px; }
.ph-row b { font-weight: 600; }
.sw { width: 44px; height: 26px; border-radius: 13px; background: #34c759; position: relative; }
.sw::after { content: ""; position: absolute; top: 3px; inset-inline-end: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; }
.ph-kid { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 16px; }
.ph-kid img { width: 34px; }
.ph-kid div { display: flex; flex-direction: column; line-height: 1.3; }
.ph-kid small { color: var(--muted); }
.stars { margin-inline-start: auto; color: var(--yellow); letter-spacing: 2px; }
.l-ar .stars { letter-spacing: 0; }
.ph-btn { text-align: center; padding: 12px; border-radius: 14px; background: var(--teal); color: #fff; font-weight: 700; box-shadow: 0 4px 0 var(--teal-d); }

/* ---- the tablet: four promises ---- */
.tablet { padding-block: 80px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 32px; }
.tile { background: var(--card); border-radius: 26px; padding: 22px; box-shadow: 0 6px 0 var(--line); }
.tile h3 { font-size: 22px; margin-bottom: 8px; }
.tile p { margin: 0; color: var(--muted); font-size: 16px; }
.tile:nth-child(4n+1) { box-shadow: 0 6px 0 var(--orange); }
.tile:nth-child(4n+2) { box-shadow: 0 6px 0 var(--teal); }
.tile:nth-child(4n+3) { box-shadow: 0 6px 0 var(--purple); }
.tile:nth-child(4n+4) { box-shadow: 0 6px 0 var(--yellow); }

/* ---- how to start: a real sequence ---- */
.start { padding-block: 80px; background: var(--card); border-top: 2px solid var(--line); }
.start ol { list-style: none; counter-reset: s; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.start li { counter-increment: s; }
.start li::before { content: counter(s); display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--orange); color: #fff;
  font: 800 26px/1 var(--head); box-shadow: 0 5px 0 var(--orange-d); margin-bottom: 16px; }
.l-ar .start li::before { content: counter(s, arabic-indic); }
.start h3 { font-size: 21px; }
.start li p { color: var(--muted); margin: 6px 0 0; font-size: 16px; }
.contact { margin: 40px 0 14px; font-size: 19px; }
.reach { display: flex; flex-wrap: wrap; gap: 14px; }
.reach .key { font-family: var(--body); font-weight: 600; font-size: 18px; }
.foot a { text-decoration: none; }

/* ---- foot ---- */
.foot { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; padding: 28px max(16px, calc((100vw - var(--wrap)) / 2)); color: var(--muted); font-size: 15px; border-top: 2px solid var(--line); }
.foot .credit { margin-inline-start: auto; text-decoration: none; }


/* ---- the menu: where you are; on a phone a row of the pages under the bar ---- */
.menu a[aria-current="page"] { color: var(--ink); font-weight: 700; box-shadow: inset 0 -3px 0 var(--orange); }
.menu-s { display: none; }
.after { margin: 28px 0 0; }
.cta .key.small { align-self: center; }

/* ---- an inner page's top ---- */
.phead { display: grid; grid-template-columns: 1fr 280px; gap: 56px; align-items: center; padding-block: 56px 64px; }
.phead.solo { grid-template-columns: 1fr; padding-block: 56px 24px; }
.phead h1 { font-size: clamp(34px, 4.6vw, 54px); font-weight: 800; max-width: 18ch; text-wrap: balance; }
.phead p { font-size: 20px; color: var(--muted); max-width: 34em; margin: 18px 0 0; }
.phead .cta { margin-top: 28px; }
.slate.tilt { transform: rotate(3deg); }
[dir="ltr"] .slate.tilt { transform: rotate(-3deg); }
.also-h { padding-block: 64px 0; }
.also-h h2, .grades-wrap h2, .flow-wrap h2, .group h2, .together h2, .faq h2, .decide h2, .privacy h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; }
.lead { color: var(--muted); font-size: 18px; margin: 10px 0 0; max-width: 40em; }

/* ---- school: the five grades, each a card with its subjects ---- */
.grades-wrap { padding-block: 64px; background: var(--card); border-block: 2px solid var(--line); }
.grades { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 30px; align-items: start; }
.grade { --c: var(--orange); background: var(--bg); border-radius: 24px; padding: 18px 16px 14px; box-shadow: 0 6px 0 var(--c); }
.grade.g2 { --c: var(--teal); } .grade.g3 { --c: var(--purple); } .grade.g4 { --c: #f06292; } .grade.g5 { --c: #3d8bfd; }
.grade h3 { font-size: 22px; color: var(--c); margin-bottom: 10px; }
.grade ul { list-style: none; margin: 0; padding: 0; }
.grade li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 2px dashed var(--line); font-size: 15px; line-height: 1.4; }
.grade li b { font-weight: 600; color: var(--muted); }
.grade .sum { margin: 10px 0 0; font: 700 17px/1.3 var(--head); }

/* ---- school: a lesson, three real screens in order ---- */
.flow-wrap { padding-block: 72px 24px; }
.flow { list-style: none; counter-reset: f; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.flow li { counter-increment: f; }
.flow .slate { max-width: 240px; margin-bottom: 22px; }
.flow h3 { font-size: 22px; display: flex; align-items: center; gap: 12px; }
.flow h3::before { content: counter(f); display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 13px; background: var(--orange); color: #fff; font: 800 21px/1 var(--head); box-shadow: 0 4px 0 var(--orange-d); }
.l-ar .flow h3::before { content: counter(f, arabic-indic); }
.flow p { color: var(--muted); margin: 8px 0 0; font-size: 16px; }
.tiles.three { grid-template-columns: repeat(3, 1fr); }

/* ---- games: the app's own squares ---- */
.group { display: grid; grid-template-columns: 300px 1fr; gap: 48px; padding-block: 56px; align-items: start; }
.group + .group { border-top: 2px dashed var(--line); }
.group-text p, .tg-text p { color: var(--muted); font-size: 18px; margin: 12px 0 0; }
.squares { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 16px; }
.sq { position: relative; background: var(--card); border-radius: 22px; padding: 8px 8px 10px; box-shadow: 0 5px 0 var(--line); text-align: center; }
.sq img { width: 100%; border-radius: 16px; aspect-ratio: 1; object-fit: cover; }
.sq span { display: block; margin-top: 8px; font: 700 16px/1.25 var(--head); }
.sq i { position: absolute; top: 12px; inset-inline-end: 12px; font: 700 12px/1 var(--body); font-style: normal; background: var(--ink); color: #fff; border-radius: 8px; padding: 5px 7px 4px; }
.together { display: grid; grid-template-columns: 300px 1fr; gap: 48px; padding-block: 64px; background: #f3efff; align-items: start; }
.tg-text .slate { max-width: 230px; margin-top: 28px; }

/* ---- parents ---- */
.phone-shot { margin: 0; justify-self: center; max-width: 300px; width: 100%; border: 10px solid var(--bezel); border-radius: 40px; overflow: hidden; background: var(--bg); box-shadow: 0 18px 40px rgba(22, 120, 110, 0.18); }
.phone-shot img { width: 100%; }
.parents-head { grid-template-columns: 1fr 300px; }
.parents .cta { margin-top: 8px; }
.link-steps { border-top: 0; background: #eaf7f4; }
.start ol.three { grid-template-columns: repeat(3, 1fr); }
.start ol.five { grid-template-columns: repeat(5, 1fr); margin-top: 0; }
.start.first { background: transparent; border-top: 0; padding-block: 16px 72px; }
.decide { display: grid; grid-template-columns: 300px 1fr; gap: 56px; padding-block: 72px; align-items: start; background: var(--card); border-block: 2px solid var(--line); }
.decide .slate { max-width: 260px; margin-top: 28px; }
.decide dl { margin: 0; display: grid; gap: 14px; }
.decide dl div { background: var(--bg); border-radius: 20px; padding: 16px 20px; box-shadow: 0 4px 0 var(--line); }
.decide dt { font: 700 21px/1.3 var(--head); }
.decide dd { margin: 4px 0 0; color: var(--muted); }
.privacy { padding-block: 72px; text-align: center; }
.privacy p { max-width: 40em; margin: 16px auto 28px; color: var(--muted); font-size: 19px; }

/* ---- start: questions ---- */
.faq { padding-block: 64px; background: var(--card); border-top: 2px solid var(--line); }
.faq h2 { margin-bottom: 22px; }
.faq details { max-width: 760px; background: var(--bg); border-radius: 20px; margin-bottom: 12px; box-shadow: 0 4px 0 var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 22px; font: 700 20px/1.35 var(--head); display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--orange); font-size: 26px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0; padding: 0 22px 18px; color: var(--muted); }

/* ---- the band before the foot: Bubu, a line, the way to start ---- */
.band { display: flex; align-items: center; gap: 28px; margin-block: 24px 72px; margin-inline: max(16px, calc((100vw - var(--wrap)) / 2)); padding: 28px 36px !important; background: var(--orange); color: #fff; border-radius: 34px; box-shadow: 0 8px 0 var(--orange-d); }
.band img { width: 84px; flex: none; filter: drop-shadow(0 4px 2px rgba(0, 0, 0, 0.15)); }
.band div { flex: 1; }
.band h2 { font-size: clamp(24px, 2.8vw, 32px); font-weight: 800; }
.band p { margin: 6px 0 0; opacity: 0.95; }
.band .key { --c: #fff; --d: #e3c39c; color: var(--ink); flex: none; }
.reach-band { background: var(--teal); box-shadow: 0 8px 0 var(--teal-d); }
.reach-band .reach { margin-top: 14px; }

/* ---- smaller screens ---- */
@media (max-width: 980px) {
  .menu { display: none; }
  .tools { margin-inline-start: auto; }
  .tiles, .start ol, .tiles.three, .start ol.three, .start ol.five { grid-template-columns: repeat(2, 1fr); }
  .menu-s { display: flex; gap: 6px; overflow-x: auto; flex-basis: 100%; padding: 2px 0 4px; scrollbar-width: none; }
  .menu-s a { flex: none; text-decoration: none; color: var(--muted); font-weight: 500; font-size: 15px; padding: 5px 12px; border-radius: 10px; background: var(--card); border: 2px solid var(--line); }
  .menu-s a[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }
  .top { flex-wrap: wrap; row-gap: 8px; }
  .grades { grid-template-columns: repeat(3, 1fr); }
  .start ol.five { grid-template-columns: repeat(3, 1fr); }
  .group, .together, .decide { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 760px) {
  body { font-size: 17px; }
  .top { gap: 10px; }
  .brand span { display: none; }
  .langs { font-size: 13px; }
  .langs a, .langs span { padding: 3px 7px; }
  .hero, .part, .part.flip, .parents { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding-block: 32px 48px; }
  .hero-pic { order: -1; max-width: 260px; padding-top: 70px; }
  .hero-pic .perch { width: 88px; }
  .hero p { font-size: 18px; }
  .part .slate, .part.flip .slate { order: -1; max-width: 260px; justify-self: center; }
  .part { padding-block: 48px; }
  .facts { grid-template-columns: 1fr; gap: 22px; padding-block: 28px; }
  .fact, .fact:first-child { border: 0; padding-inline: 0; }
  .fact b { font-size: 44px; }
  .phone { max-width: 320px; justify-self: center; width: 100%; }
  .tiles, .start ol, .tiles.three, .start ol.three, .start ol.five { grid-template-columns: 1fr; }
  .phead, .parents-head { grid-template-columns: 1fr; gap: 32px; padding-block: 28px 40px; }
  .phead .slate { order: -1; max-width: 220px; justify-self: center; }
  .phead p { font-size: 18px; }
  .grades { grid-template-columns: 1fr 1fr; gap: 14px; }
  .flow { grid-template-columns: 1fr; gap: 36px; }
  .flow .slate { max-width: 220px; }
  .squares { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; }
  .sq span { font-size: 14px; }
  .band { flex-direction: column; text-align: center; padding: 26px 20px !important; margin-block: 16px 48px; }
  .band .reach { justify-content: center; }
  .tg-text .slate, .decide .slate { display: none; }
  .phone-shot { max-width: 260px; }
}
@media (max-width: 420px) { .grades { grid-template-columns: 1fr; } }
