/* HeroLingo site — the game's look: sky, cream cards with navy frames, chunky rounded type. */
@font-face {
  font-family: "Baloo 2";
  src: url("fonts/Baloo2.ttf") format("truetype");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --ink: #1a2150;
  --ink-soft: #1a2150b3;
  --cream: #fff8e6;
  --frame: #3d4087;
  --rim: #ccc7fa;
  --orange: #ff8a1f;
  --orange-dark: #e2600a;
  --green: #36c75f;
  --blue: #3a8df0;
  --sky-top: #5c9ef9;
  --sky-bottom: #b8ddff;
  --red: #ef4b4b;
  --radius: 26px;
  --font: "Baloo 2", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--sky-bottom);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Baloo 2 has no Arabic or Cyrillic: fall back to the system's rounded face there. */
html[lang="ar"] body, html[lang="ru"] body { --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif; }

img { max-width: 100%; height: auto; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }

/* Outlined white game text */
.outlined, h1, .ribbon {
  text-shadow: 2px 0 var(--ink), -2px 0 var(--ink), 0 2px var(--ink), 0 -2px var(--ink),
               2px 2px var(--ink), -2px 2px var(--ink), 2px -2px var(--ink), -2px -2px var(--ink), 0 5px #1a215099;
}

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 10px max(16px, calc((100% - 1120px) / 2));
  background: #1a2150e6;
  backdrop-filter: blur(8px);
  color: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 22px; }
.brand img { border-radius: 10px; }
.links { display: flex; gap: 18px; margin-inline-start: auto; }
.links a { text-decoration: none; font-weight: 700; opacity: .9; }
.links a:hover { opacity: 1; text-decoration: underline; }
.lang select {
  font: inherit; font-weight: 700; color: var(--ink);
  background: var(--cream); border: 2px solid var(--rim); border-radius: 999px;
  padding: 4px 12px;
}
@media (max-width: 760px) { .links { display: none; } .lang { margin-inline-start: auto; } }

/* Sky backgrounds */
.sky {
  background: linear-gradient(var(--sky-top), var(--sky-bottom) 70%), var(--sky-bottom);
  position: relative; overflow: hidden;
}
.sky::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 45%;
  background: url("img/bg.jpg") center bottom / cover no-repeat;
  mask-image: linear-gradient(transparent, #000 45%);
  -webkit-mask-image: linear-gradient(transparent, #000 45%);
  opacity: .9; pointer-events: none;
}
.sky-soft { background: linear-gradient(#cfe8ff, #e9f5ff); }

/* Hero */
.hero { padding: 48px 0 72px; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: 32px; align-items: center; }
.hero-copy { color: #fff; }
.logo { width: min(360px, 80%); filter: drop-shadow(0 8px 10px #1a215055); }
h1 { font-size: clamp(32px, 4.6vw, 52px); line-height: 1.1; margin: 10px 0 12px; }
.lead { font-size: 20px; font-weight: 600; max-width: 30em; text-shadow: 0 2px 4px #1a215066; }
.cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 24px 0 18px; }
.store-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: #000; color: #fff; text-decoration: none;
  padding: 10px 20px; border-radius: 14px; border: 2px solid #fff;
  box-shadow: 0 6px 0 var(--ink);
}
.store-btn small { display: block; font-size: 12px; line-height: 1; opacity: .85; }
.store-btn b { font-size: 22px; line-height: 1.1; }
.store-btn[aria-disabled="true"] { cursor: default; }
.devices { font-weight: 700; text-shadow: 0 2px 3px #1a215066; }
.badges { list-style: none; padding: 0; margin: 0; display: flex; gap: 10px; flex-wrap: wrap; }
.badges li {
  display: flex; align-items: center; gap: 6px;
  background: #1a21504d; padding: 6px 14px 6px 8px; border-radius: 999px; font-weight: 800;
}

.hero-visual { position: relative; height: 600px; }
.hero-visual .phone { position: absolute; width: 270px; }
.hero-visual .tilt-left { inset-inline-start: 4%; top: 30px; transform: rotate(-7deg); }
.hero-visual .tilt-right { inset-inline-end: 4%; top: 0; transform: rotate(6deg); }
.hero-visual .front { z-index: 2; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .lead { margin-inline: auto; }
  .cta, .badges { justify-content: center; }
  .hero-visual { height: 470px; max-width: 460px; margin: 0 auto; width: 100%; }
  .hero-visual .phone { width: 210px; }
}

/* Phone frame around screenshots */
.phone {
  border-radius: 38px; padding: 9px;
  background: #11142e;
  box-shadow: 0 0 0 3px #3b3f73, 0 22px 40px #1a215055;
}
.phone img { display: block; width: 100%; border-radius: 30px; aspect-ratio: 540 / 1170; object-fit: cover; background: #cfe8ff; }

/* Sections */
.section { padding: 72px 0; }
.ribbon {
  position: relative; display: table; margin: 0 auto 36px;
  color: #fff; font-size: clamp(26px, 3.4vw, 38px); line-height: 1.1;
  padding: 12px 42px 16px;
  background: linear-gradient(#f2555a, #d92c38);
  border: 4px solid var(--ink); border-radius: 18px;
  box-shadow: 0 6px 0 var(--ink);
}
.ribbon.left { margin-inline: 0; }

/* Cream game card */
.card {
  background: linear-gradient(#fffdf6, var(--cream));
  border: 4px solid var(--ink);
  outline: 6px solid var(--rim); outline-offset: -10px;
  border-radius: var(--radius);
  box-shadow: 0 8px 0 var(--ink), 0 16px 28px #1a215033;
  padding: 26px;
}
.card h3 { margin: 10px 0 6px; font-size: 22px; line-height: 1.2; }
.card p { margin: 0; color: var(--ink-soft); font-weight: 600; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { position: relative; text-align: center; padding-top: 34px; }
.step .num {
  position: absolute; top: -20px; inset-inline-start: 50%; transform: translateX(-50%);
  width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--orange); color: #fff; font-weight: 800; font-size: 24px;
  border: 3px solid var(--ink); border-radius: 50%;
}
html[dir="rtl"] .step .num { transform: translateX(50%); }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.gallery figure { margin: 0; text-align: center; }
.gallery figcaption { margin-top: 14px; font-weight: 800; font-size: 19px; }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; gap: 36px; }
  .gallery { grid-template-columns: repeat(4, 220px); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 16px; }
  .gallery figure { scroll-snap-align: center; }
}

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature { text-align: center; }
.power-row { display: flex; justify-content: center; gap: 4px; height: 84px; align-items: center; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.phone.solo { width: 280px; margin: 0 auto; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checks li {
  position: relative; padding: 14px 18px; padding-inline-start: 56px;
  background: #fff; border: 3px solid var(--ink); border-radius: 18px;
  font-weight: 700; box-shadow: 0 4px 0 var(--ink);
}
.checks li::before {
  content: "✓"; position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; display: grid; place-items: center;
  background: var(--green); color: #fff; font-weight: 900; border: 2px solid var(--ink); border-radius: 50%;
}
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .ribbon.left { margin-inline: auto; } }

.schools { display: flex; align-items: center; gap: 28px; }
.schools h2 { margin: 0 0 8px; font-size: 30px; }
.schools p { margin-bottom: 18px; }
@media (max-width: 640px) { .schools { flex-direction: column; text-align: center; } }

.btn {
  display: inline-block; text-decoration: none; color: #fff; font-weight: 800; font-size: 19px;
  padding: 12px 26px; border-radius: 999px;
  background: linear-gradient(#ffa643, var(--orange-dark));
  border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink);
}
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }

.faq { padding: 18px 24px; margin-bottom: 18px; }
.faq summary { cursor: pointer; font-weight: 800; font-size: 20px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: inline-end; font-size: 26px; line-height: 1; color: var(--orange-dark); }
.faq[open] summary::after { content: "–"; }
.faq p { margin-top: 10px; }

/* Footer */
.footer { background: var(--ink); color: #fff; padding: 28px 0; }
.footer-grid { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer nav { display: flex; gap: 18px; margin-inline-start: auto; }
.footer nav a { font-weight: 700; }
.copy { margin: 0; opacity: .75; width: 100%; font-size: 14px; }

/* Legal / support pages */
.doc { padding: 48px 0 80px; }
.doc .card { padding: 32px; }
.doc h1 { color: #fff; text-align: center; margin: 0 0 28px; }
.doc h2 { font-size: 22px; margin: 26px 0 8px; }
.doc p, .doc li { color: var(--ink); font-weight: 500; }
.doc .note { font-size: 14px; color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
