/* Bzilla — colours sampled from the mascot */
:root {
  --green: #2F9E47;
  --green-600: #278A3D;
  --green-800: #22412A;
  --cream: #FBF8E6;
  --cream-2: #F3EFCF;
  --butter: #F5F09C;
  --ink: #17251B;
  --muted: #55665A;
  --card: #FFFFFF;
  --line: rgba(34, 65, 42, .12);
  --radius: 22px;
  --shadow: 0 10px 30px rgba(23, 37, 27, .08), 0 2px 6px rgba(23, 37, 27, .06);
  --font-display: "Baloo Bhaijaan 2", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-body: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; margin: 0; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* Language switching: Arabic is the default markup */
html[lang="ar"] .en { display: none !important; }
html[lang="en"] .ar { display: none !important; }

.skip { position: absolute; inset-inline-start: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { inset-inline-start: 8px; }

:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 6px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--cream) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--green-800); }
.nav { display: flex; gap: 6px; margin-inline-start: auto; }
.nav a { text-decoration: none; font-weight: 500; padding: 6px 12px; border-radius: 999px; color: var(--muted); }
.nav a:hover { color: var(--ink); background: var(--cream-2); }
.lang-toggle {
  font: 700 .9rem var(--font-body);
  border: 2px solid var(--green-800); color: var(--green-800); background: transparent;
  border-radius: 999px; padding: 4px 14px; cursor: pointer;
}
.lang-toggle:hover { background: var(--green-800); color: var(--cream); }

/* Hero */
.hero { overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 40px; padding-block: 56px 72px; }
.eyebrow { display: inline-block; margin: 0 0 14px; font-weight: 700; color: var(--green-600); background: #E3F2DF; padding: 4px 14px; border-radius: 999px; font-size: .95rem; }
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); font-weight: 800; color: var(--green-800); }
.hero h1 em {
  font-style: normal; color: var(--green);
  background: linear-gradient(transparent 68%, var(--butter) 68%, var(--butter) 92%, transparent 92%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  padding-inline: 4px;
}
.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; margin: 18px 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 700 1rem var(--font-body); text-decoration: none;
  padding: 12px 24px; border-radius: 999px; border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 6px 0 var(--green-800); }
.btn-primary:hover { box-shadow: 0 8px 0 var(--green-800); }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 3px 0 var(--green-800); }
.btn-ghost { border-color: var(--green-800); color: var(--green-800); }
.btn-ghost:hover { background: var(--green-800); color: var(--cream); }
.comeback { display: flex; align-items: center; gap: 10px; margin-top: 28px; color: var(--muted); font-size: .95rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); flex: none; box-shadow: 0 0 0 0 rgba(47,158,71,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(47,158,71,0); } 100% { box-shadow: 0 0 0 0 rgba(47,158,71,0); } }

.hero-art { position: relative; display: grid; place-items: center; }
.blob {
  position: absolute; width: 92%; aspect-ratio: 1;
  background: radial-gradient(circle at 35% 35%, var(--butter), #E6EDB0 60%, transparent 61%);
  border-radius: 46% 54% 58% 42% / 48% 42% 58% 52%;
  animation: morph 12s ease-in-out infinite;
}
.mascot { position: relative; width: min(440px, 90%); animation: bob 5s ease-in-out infinite; filter: drop-shadow(0 18px 24px rgba(34,65,42,.25)); }
@keyframes bob { 50% { translate: 0 -12px; rotate: -2deg; } }
@keyframes morph { 50% { border-radius: 58% 42% 44% 56% / 42% 58% 42% 58%; rotate: 20deg; } }

/* Section heads */
.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2, .about h2, .contact h2 { font-size: clamp(2rem, 4vw, 2.8rem); color: var(--green-800); }
.section-head p { color: var(--muted); margin: 8px 0 0; }

/* Games */
.games { padding-block: 72px; background: #fff; border-block: 1px solid var(--line); }
.game {
  display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center;
  background: linear-gradient(160deg, var(--accent-soft), var(--card) 70%);
  border: 1px solid var(--line); border-radius: calc(var(--radius) + 8px);
  padding: 36px; box-shadow: var(--shadow);
}
.game > *, .hero-inner > * { min-width: 0; }
.game + .game { margin-top: 32px; }
.game--flagship { border: 2px solid var(--accent); }
.game-title { display: flex; align-items: center; gap: 18px; margin-bottom: 14px; }
.app-icon { width: 88px; height: 88px; border-radius: 22%; box-shadow: 0 6px 16px rgba(0,0,0,.15); flex: none; }
.game h3 { font-size: 2rem; font-weight: 800; }
.game h3 small { font-size: .55em; color: var(--muted); font-weight: 600; margin-inline-start: 6px; }
.genre { margin: 0; color: var(--accent); font-weight: 700; }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; margin-bottom: 4px; }
.badge-flagship { background: var(--accent); color: #fff; }
.desc { color: var(--muted); margin: 0 0 18px; }
.features { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.features li {
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 14px 4px 12px; font-size: .92rem; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
}
.features li::before { content: "★"; color: var(--accent); font-size: .85em; }
.store-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.store {
  display: inline-flex; align-items: center; padding: 9px 16px; border-radius: 12px;
  font-weight: 700; font-size: .9rem; background: var(--ink); color: #fff; text-decoration: none;
}
.store--soon { background: transparent; color: var(--muted); border: 2px dashed rgba(23,37,27,.25); }
.store--play { gap: 8px; padding: 9px 18px; transition: transform .15s, background .15s; }
.store--play:hover { transform: translateY(-2px); background: #000; }
.store-icon { flex: none; }
.trailer-btn {
  font: 700 .95rem var(--font-body); cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff; border: 0; border-radius: 12px; padding: 11px 18px;
  transition: transform .15s;
}
.trailer-btn::before { content: ""; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor; }
html[dir="rtl"] .trailer-btn::before { border-width: 6px 10px 6px 0; border-color: transparent currentColor transparent transparent; }
.trailer-btn:hover { transform: translateY(-2px); }

/* Screenshot strips */
.shots { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 4px 14px; scrollbar-width: thin; }
.shots img { scroll-snap-align: center; border-radius: 18px; box-shadow: 0 8px 20px rgba(0,0,0,.18); flex: none; background: #111; }
.shots--portrait img { width: calc((100% - 28px) / 3); min-width: 150px; aspect-ratio: auto; border: 5px solid #1d1d1f; }
.shots--landscape { flex-direction: column; overflow: visible; }
.shots--landscape img { width: 100%; border-radius: 14px; }

/* About */
.about { padding-block: 80px; }
.about-inner { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center; max-width: 860px; }
.about-logo { width: 180px; }
.about p { color: var(--muted); font-size: 1.1rem; }

/* Contact */
.contact { padding-block: 72px; text-align: center; background: var(--green); color: #fff; }
.contact h2 { color: #fff; }
.contact p { opacity: .9; margin: 8px 0 24px; }
.social { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.social-link {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  background: var(--green-800); color: #fff; font-weight: 700; padding: 12px 22px; border-radius: 999px;
  transition: transform .15s, background .15s;
}
.social-link:hover { transform: translateY(-2px); background: #142a1a; }

/* Footer */
.site-footer { background: var(--green-800); color: rgba(255,255,255,.75); font-size: .9rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 20px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: inherit; text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: underline; }

/* Legal pages */
.legal { padding-block: 56px 80px; min-height: calc(100vh - 68px - 64px); }
.legal-inner { max-width: 760px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); color: var(--green-800); }
.legal-meta { color: var(--muted); margin: 6px 0 32px; }
.legal-soon {
  text-align: center; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px 24px;
}
.legal-soon img { width: 120px; margin: 0 auto 8px; }
.legal-soon h2 { font-size: 2rem; color: var(--green); }
.legal-soon p { color: var(--muted); margin: 8px 0 0; }
.legal-body {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: clamp(20px, 4vw, 40px);
}
.legal-body h2 { font-size: 1.35rem; color: var(--green-800); margin: 28px 0 8px; }
.legal-body p, .legal-body li { color: #33443A; }
.legal-body ul { padding-inline-start: 1.3em; }
.legal-body li { margin-bottom: 4px; }
.legal-body a { color: var(--green-600); }

/* Video modal */
.video-modal { width: min(960px, 100% - 32px); padding: 0; border: 0; border-radius: 18px; background: #000; overflow: visible; }
.video-modal::backdrop { background: rgba(10, 20, 12, .8); backdrop-filter: blur(4px); }
.video-frame { aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; }
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-close {
  position: absolute; top: -48px; inset-inline-end: 0;
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: #fff; color: var(--ink); font-size: 1.6rem; line-height: 1;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; padding-block: 32px 56px; gap: 8px; }
  .hero-art { order: -1; }
  .mascot { width: min(280px, 70%); }
  .lead { margin-inline: auto; }
  .hero-actions, .comeback { justify-content: center; }
  .game { grid-template-columns: 1fr; padding: 24px; gap: 24px; }
  .about-inner { grid-template-columns: 1fr; text-align: center; justify-items: center; gap: 16px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; overflow-x: clip; }
  .nav { display: none; }
  .lang-toggle { margin-inline-start: auto; }
  .game { padding: 18px; border-radius: var(--radius); }
  .game h3 { font-size: 1.6rem; }
  .app-icon { width: 68px; height: 68px; }
  .shots--portrait img { width: 62%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
