/* ==========================================================================
   حروف — Landing page
   ألوان الهوية مأخوذة حرفيا من lib/core/theme.dart في التطبيق.
   كل الخصائص الاتجاهية منطقية (inline-start/end) فتخدم الورقة نفسها
   الصفحة العربية (RTL) والإنجليزية (LTR) بلا نسختين.
   ========================================================================== */

@font-face {
  font-family: "IRANSans";
  src: url("../fonts/IRANSans.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IRANSans";
  src: url("../fonts/IRANSans_Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "IRANSans";
  src: url("../fonts/IRANSans_Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #0a0e27;
  --bg-2: #1a1f3a;
  --surface: #171c36;
  --surface-2: #1e2445;
  --tile: #232a4d;
  --gold: #f4c430;
  --gold-light: #ffe082;
  --gold-dark: #c99a10;
  --text: #f2f1ec;
  --muted: #9aa0be;
  --success: #34e89e;
  --error: #ff6b6b;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --gold-grad: linear-gradient(160deg, var(--gold-light), var(--gold) 55%, var(--gold-dark));
  --radius: 22px;
  --radius-lg: 32px;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  --glow: 0 0 0 1px rgba(244, 196, 48, 0.35), 0 10px 40px -10px rgba(244, 196, 48, 0.55);
  --container: 1180px;
  --gutter: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: "IRANSans", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  font-size: 17px;
  line-height: 1.85;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

html[lang="en"] body {
  line-height: 1.65;
}

img,
svg {
  display: block;
  max-width: 100%;
}
/* الصور تحمل width/height في HTML (تمنع قفز التخطيط)، والارتفاع يتبع
   العرض المحسوب لا الرقم المكتوب — بدون هذا تُعصر اللقطات بعرض 236 وطول 960 */
img {
  height: auto;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  line-height: 1.3;
  font-weight: 700;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

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

.skip-link {
  position: absolute;
  inset-inline-start: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--gold);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
}

.container {
  width: min(100% - var(--gutter) * 2, var(--container));
  margin-inline: auto;
}

.gold-text {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid rgba(244, 196, 48, 0.35);
  border-radius: 999px;
  background: rgba(244, 196, 48, 0.08);
  color: var(--gold-light);
  font-size: 14px;
  font-weight: 500;
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold);
}

/* ─────────────────────────── Buttons ─────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 26px;
  border: 0;
  border-radius: 18px;
  font: inherit;
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active {
  transform: scale(0.97);
}

.btn-gold {
  background: var(--gold-grad);
  color: #241a00;
  box-shadow: 0 10px 30px -8px rgba(244, 196, 48, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -8px rgba(244, 196, 48, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.09);
}

/* زرّ متجر Google Play: أيقونة + سطران */
.btn-store {
  gap: 12px;
  padding: 10px 22px 10px 18px;
  text-align: start;
  line-height: 1.2;
}
.btn-store .store-icon {
  width: 26px;
  height: 26px;
  flex: none;
}
.btn-store small {
  display: block;
  font-size: 12px;
  font-weight: 500;
  opacity: 0.8;
}
.btn-store strong {
  display: block;
  font-size: 18px;
  direction: ltr;
}

/* ─────────────────────────── Navigation ─────────────────────────── */

.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  transition: background 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
}
.nav.is-scrolled {
  background: rgba(10, 14, 39, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 var(--line);
}
.nav__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 26px;
}
.brand img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}
.brand__en {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  margin-inline-start: -2px;
}
.nav__links {
  display: flex;
  gap: 4px;
  margin-inline-start: auto;
  padding: 0;
  list-style: none;
}
.nav__links a {
  display: block;
  padding: 8px 14px;
  border-radius: 12px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: color 0.2s, background 0.2s;
}
.nav__links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}
.nav__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lang-switch {
  padding: 8px 12px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.lang-switch:hover {
  color: var(--text);
}
.nav .btn {
  min-height: 44px;
  padding: 8px 18px;
  font-size: 15px;
  border-radius: 14px;
}
.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
}
.nav__toggle svg {
  margin: auto;
}

/* ─────────────────────────── Hero ─────────────────────────── */

.hero {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  padding: 120px 0 180px;
  overflow: hidden;
  background:
    radial-gradient(1100px 600px at 75% 15%, rgba(80, 96, 200, 0.22), transparent 60%),
    radial-gradient(800px 500px at 15% 70%, rgba(244, 196, 48, 0.1), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, #0f1434 55%, var(--bg-2) 100%);
}

/* نقش هندسي (نجمة ثمانية) خفيف جدا فوق السماء */
.pattern {
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.06;
  background-image: url("../svg/pattern.svg");
  background-size: 120px 120px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
}

.stars {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}
.stars i {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.6;
  animation: twinkle 4s ease-in-out infinite;
}

/* القمر فوق عمود العرض لا فوق النصّ — في الاتجاهين */
.moon {
  position: absolute;
  top: 104px;
  inset-inline-end: 4%;
  width: 70px;
  height: 70px;
  z-index: -1;
  filter: drop-shadow(0 0 30px rgba(255, 224, 130, 0.45));
}

.floating-letters {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.floating-letters span {
  position: absolute;
  font-weight: 700;
  color: var(--gold);
  opacity: 0;
  text-shadow: 0 0 18px rgba(244, 196, 48, 0.8);
  animation: float-up linear infinite;
}

.dunes {
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  z-index: -1;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 48px;
}

.hero__copy h1 {
  margin-top: 22px;
  font-size: clamp(38px, 5.6vw, 68px);
  letter-spacing: -0.01em;
}
html[lang="en"] .hero__copy h1 {
  font-size: clamp(36px, 4.4vw, 58px);
  letter-spacing: -0.025em;
}
.hero__lead {
  margin-top: 20px;
  max-width: 34em;
  color: #c9cce0;
  font-size: clamp(17px, 1.6vw, 20px);
}
.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}
.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 15px;
}
.trust li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.trust svg {
  width: 18px;
  height: 18px;
  color: var(--success);
}

/* ─────────────────────────── Phone + live demo ─────────────────────────── */

.hero__visual {
  position: relative;
  display: grid;
  place-items: center;
}
.hero__glow {
  position: absolute;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 196, 48, 0.28), transparent 65%);
  filter: blur(10px);
  z-index: -1;
}

.phone {
  position: relative;
  width: min(340px, 82vw);
  aspect-ratio: 9 / 18.5;
  padding: 12px;
  border-radius: 48px;
  background: linear-gradient(145deg, #2b3263, #10142f 45%, #262c58);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    inset 0 0 0 2px rgba(0, 0, 0, 0.6),
    0 40px 90px -30px rgba(0, 0, 0, 0.9),
    0 0 80px -20px rgba(244, 196, 48, 0.25);
}
.phone::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 50%;
  z-index: 3;
  width: 34%;
  height: 22px;
  border-radius: 999px;
  background: #05071a;
  transform: translateX(-50%);
}
.phone__screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 38px;
  background:
    radial-gradient(120% 60% at 50% 100%, rgba(42, 52, 110, 0.55), transparent),
    linear-gradient(180deg, #0d1230, #151a3a);
}

.demo {
  display: flex;
  flex-direction: column;
  padding: 52px 16px 16px;
  direction: rtl;
  font-family: "IRANSans", system-ui, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}
.demo__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 17px;
}
.demo__coins {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--gold);
  font-size: 14px;
  direction: ltr;
  transition: transform 0.3s var(--ease);
}
.demo__coins img {
  width: 18px;
  height: 18px;
}
.demo__coins.bump {
  transform: scale(1.15);
}
.demo__board {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 18px 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px var(--line);
}
.demo__word {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.demo__tile {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--tile);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  font-weight: 700;
  font-size: 24px;
  color: #241a00;
  transition: background 0.35s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s;
}
.demo__tile.is-filled {
  background: var(--gold-grad);
  box-shadow: 0 6px 18px -6px rgba(244, 196, 48, 0.7);
  animation: tile-pop 0.45s var(--ease) both;
}
.demo__word.is-repeat .demo__tile {
  animation: tile-wiggle 0.5s var(--ease);
}
.demo__meaning {
  min-height: 26px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13.5px;
  text-align: center;
  transition: opacity 0.3s;
}
.demo__meaning b {
  color: var(--gold-light);
  font-weight: 700;
}
.demo__preview {
  display: flex;
  justify-content: center;
  gap: 4px;
  min-height: 40px;
  margin-top: 4px;
}
.demo__preview span {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--gold);
  color: #241a00;
  font-weight: 700;
  font-size: 20px;
  animation: tile-pop 0.25s var(--ease) both;
}
.demo__preview.is-bonus span {
  background: var(--success);
  color: #05291a;
}
.demo__preview.is-wrong span {
  background: var(--error);
  color: #fff;
  animation: shake 0.4s;
}

.demo__wheel {
  position: relative;
  width: 78%;
  aspect-ratio: 1;
  margin: auto auto 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  touch-action: none;
}
.demo__lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.demo__lines polyline {
  fill: none;
  stroke: var(--gold);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(244, 196, 48, 0.7));
}
.demo__lines .hint-line {
  stroke-dasharray: 2 16;
  stroke-width: 6;
  opacity: 0.8;
  filter: none;
}
.demo__letter {
  position: absolute;
  display: grid;
  place-items: center;
  width: 30%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #262d5a;
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  color: #fff;
  font: 700 28px "IRANSans", system-ui, sans-serif;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: background 0.2s, transform 0.2s var(--ease), color 0.2s, left 0.5s var(--ease), top 0.5s var(--ease);
  touch-action: none;
}
.demo__letter.is-active {
  background: var(--gold);
  color: #241a00;
  transform: translate(-50%, -50%) scale(1.08);
}
.demo__letter.is-hint {
  animation: hint-pulse 0.9s var(--ease);
}
/* زرّ الخلط في مركز العجلة الفارغ: لا يغطّيه شيء في أي اتجاه للصفحة */
.demo__tool {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 20%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(38, 45, 90, 0.85);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  color: var(--gold);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform 0.4s var(--ease);
}
.demo__tool:hover {
  transform: translate(-50%, -50%) rotate(180deg);
}
.demo__tool svg {
  width: 52%;
  height: 52%;
}
.demo__hint-text {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.demo__win {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-content: center;
  gap: 14px;
  padding: 28px;
  background:
    radial-gradient(circle at 50% 32%, rgba(244, 196, 48, 0.22), transparent 60%),
    rgba(10, 14, 39, 0.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  /* الإخفاء بعد انتهاء التلاشي، والإظهار فوري — كي يقبل زرّ «العب مرة
     أخرى» التركيز في لحظة الفتح نفسها */
  transition: opacity 0.4s, visibility 0s linear 0.4s;
}
.demo__win.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s, visibility 0s;
}
.demo__win h3 {
  font-size: 30px;
}
.demo__win p {
  color: #d5d8ea;
  font-size: 15px;
}
.demo__win .btn {
  min-height: 46px;
  font-size: 15px;
}
.demo__win-stars {
  display: flex;
  justify-content: center;
  gap: 6px;
  color: var(--gold);
}
.demo__win-stars svg {
  width: 34px;
  height: 34px;
  animation: star-in 0.6s var(--ease) both;
}
.demo__win-stars svg:nth-child(2) {
  width: 44px;
  height: 44px;
  margin-top: -8px;
  animation-delay: 0.12s;
}
.demo__win-stars svg:nth-child(3) {
  animation-delay: 0.24s;
}

.sparkle {
  position: absolute;
  z-index: 5;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  pointer-events: none;
  animation: sparkle 0.9s ease-out forwards;
}

/* المرشد على الحافة الخارجية للهاتف وتحته قليلا — بعيدا عن حروف العجلة */
.hero__guide {
  position: absolute;
  bottom: -6%;
  inset-inline-end: -2%;
  width: 28%;
  max-width: 160px;
  z-index: 2;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.55));
}
.hero__guide img {
  border-radius: 50%;
  border: 4px solid var(--gold);
  background: #fff;
}
.bubble {
  position: absolute;
  bottom: 102%;
  inset-inline-end: 0;
  width: max-content;
  max-width: 150px;
  padding: 10px 14px;
  border-radius: 18px;
  border-end-end-radius: 4px;
  background: #fff;
  color: #1a1f3a;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: var(--shadow);
  animation: bob 3.5s ease-in-out infinite;
}

/* ─────────────────────────── Sections ─────────────────────────── */

.section {
  position: relative;
  padding: 110px 0;
}
.section--alt {
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
}
.section__head {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}
.section__head h2 {
  margin-top: 16px;
  font-size: clamp(30px, 4vw, 46px);
}
.section__head p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 18px;
}

/* ─────────────────────────── Stats ─────────────────────────── */

.stats {
  position: relative;
  z-index: 2;
  margin-top: -120px;
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
  border-radius: var(--radius-lg);
  background: rgba(23, 28, 54, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 0 0 1px var(--line-strong), var(--shadow);
}
.stats__grid li {
  padding: 28px 12px;
  text-align: center;
}
.stats__grid li + li {
  border-inline-start: 1px solid var(--line);
}
.stat__num {
  display: block;
  font-size: clamp(30px, 3.6vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  direction: ltr;
}
.stat__label {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
}

/* ─────────────────────────── How to play ─────────────────────────── */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 30px 28px 32px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
}
.step:hover {
  transform: translateY(-4px);
  box-shadow: inset 0 0 0 1px rgba(244, 196, 48, 0.3);
}
.step__art {
  width: 100%;
  height: 150px;
  margin-bottom: 22px;
  border-radius: 16px;
  background: radial-gradient(circle at 50% 40%, rgba(244, 196, 48, 0.12), transparent 70%), var(--bg);
  box-shadow: inset 0 0 0 1px var(--line);
}
.step h3 {
  font-size: 22px;
}
.step h3::before {
  counter-increment: step;
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-inline-end: 10px;
  border-radius: 10px;
  background: var(--gold-grad);
  color: #241a00;
  font-size: 17px;
  vertical-align: 2px;
}
.step p {
  margin-top: 10px;
  color: var(--muted);
}

/* ─────────────────────────── Worlds ─────────────────────────── */

.worlds {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.world {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 330px;
  padding: 22px;
  overflow: hidden;
  border-radius: var(--radius);
  isolation: isolate;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: transform 0.45s var(--ease), box-shadow 0.45s;
}
.world__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.world::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(10, 14, 39, 0.1) 0%, rgba(10, 14, 39, 0.55) 45%, rgba(10, 14, 39, 0.95) 100%);
}
.world:hover {
  transform: translateY(-6px);
  box-shadow: inset 0 0 0 2px var(--world-accent, var(--gold)), 0 30px 60px -30px var(--world-accent, var(--gold));
}
.world:hover .world__bg {
  transform: scale(1.07);
}
.world__num {
  position: absolute;
  top: 18px;
  inset-inline-end: 18px;
  padding: 2px 12px;
  border-radius: 999px;
  background: rgba(10, 14, 39, 0.6);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-light);
}
.world__guide {
  width: 74px;
  height: 74px;
  margin-bottom: 14px;
  border-radius: 50%;
  border: 3px solid var(--world-accent, var(--gold));
  background: #fff;
  object-fit: cover;
}
.world h3 {
  font-size: 24px;
}
.world p {
  color: #cdd0e3;
  font-size: 15px;
}
.world__mechanic {
  align-self: flex-start;
  margin-top: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(244, 196, 48, 0.14);
  color: var(--gold-light);
  font-size: 13px;
  font-weight: 700;
}

/* ─────────────────────────── Cinematic band ─────────────────────────── */

.cinema {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: end;
  min-height: 560px;
  padding: 80px 0;
  overflow: hidden;
}
.cinema__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
}
.cinema::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, var(--bg) 0%, rgba(10, 14, 39, 0.15) 22%, rgba(10, 14, 39, 0.2) 55%, var(--bg) 100%),
    linear-gradient(90deg, rgba(10, 14, 39, 0.75), transparent 60%);
}
html[dir="rtl"] .cinema::after {
  background:
    linear-gradient(180deg, var(--bg) 0%, rgba(10, 14, 39, 0.15) 22%, rgba(10, 14, 39, 0.2) 55%, var(--bg) 100%),
    linear-gradient(270deg, rgba(10, 14, 39, 0.75), transparent 60%);
}
.cinema__copy {
  max-width: 560px;
}
.cinema h2 {
  font-size: clamp(32px, 4.4vw, 54px);
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}
.cinema p {
  margin-top: 16px;
  color: #e4e5ef;
  font-size: 19px;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.8);
}

/* ─────────────────────────── Challenges ─────────────────────────── */

.challenges {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
}
.challenge-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.challenge-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.challenge-card img {
  width: 64px;
  height: 64px;
  flex: none;
}
.challenge-card h3 {
  font-size: 18px;
}
.challenge-card p {
  color: var(--muted);
  font-size: 14px;
}
.challenge-card .count {
  color: var(--gold);
  font-weight: 700;
}

.proverb {
  position: relative;
  margin: 0;
  padding: 34px 26px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 50% 0%, rgba(244, 196, 48, 0.16), transparent 60%),
    var(--surface);
  box-shadow: inset 0 0 0 1px rgba(244, 196, 48, 0.25), var(--shadow);
  text-align: center;
  direction: rtl;
}
.proverb__label {
  color: var(--gold);
  font-weight: 700;
  font-size: 15px;
}
.proverb__tiles {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin: 22px 0 14px;
}
.proverb__tiles span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 52px;
  border-radius: 12px;
  background: #2a2a2a;
  box-shadow: inset 0 0 0 2px rgba(201, 154, 16, 0.6);
  font-weight: 700;
  font-size: 24px;
  color: transparent;
  transition: all 0.4s var(--ease);
}
.proverb__tiles span.is-filled {
  background: var(--gold-grad);
  box-shadow: 0 6px 18px -6px rgba(244, 196, 48, 0.7);
  color: #241a00;
}
.proverb__line {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
}
.proverb__note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
  direction: inherit;
}
html[lang="en"] .proverb__note {
  direction: ltr;
}

/* ─────────────────────────── Characters ─────────────────────────── */

.cast {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cast li {
  text-align: center;
}
.cast img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 3px solid rgba(244, 196, 48, 0.55);
  background: #fff;
  object-fit: cover;
  transition: transform 0.35s var(--ease), border-color 0.35s;
}
.cast li:hover img {
  transform: translateY(-6px) rotate(-3deg);
  border-color: var(--gold);
}
.cast span {
  display: block;
  margin-top: 10px;
  font-weight: 700;
  font-size: 15px;
}

/* ─────────────────────────── Features ─────────────────────────── */

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.feature {
  padding: 26px 22px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: inset 0 0 0 1px var(--line);
}
.feature__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: rgba(244, 196, 48, 0.12);
  color: var(--gold);
}
.feature__icon svg {
  width: 26px;
  height: 26px;
}
.feature__icon img {
  width: 40px;
  height: 40px;
}
.feature h3 {
  font-size: 18px;
}
.feature p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
}

/* ─────────────────────────── Screenshots ─────────────────────────── */

.shots {
  display: flex;
  gap: 22px;
  margin: 0;
  padding: 10px var(--gutter) 30px;
  overflow-x: auto;
  list-style: none;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 196, 48, 0.4) transparent;
  /* حافتان تذوبان بدل قصّ حادّ للّقطة الأخيرة — إشارة أن الشريط يُمرَّر */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.shots li {
  flex: none;
  width: 236px;
  scroll-snap-align: center;
}
.shots figure {
  margin: 0;
}
.shots img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: 0 0 0 6px #1e2347, 0 0 0 7px var(--line-strong), var(--shadow);
}
.shots figcaption {
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

/* ─────────────────────────── FAQ ─────────────────────────── */

.faq {
  max-width: 820px;
  margin: 0 auto;
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 4px;
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(244, 196, 48, 0.12);
  color: var(--gold);
  font-size: 22px;
  line-height: 1;
  transition: transform 0.3s var(--ease);
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq details p {
  padding: 0 4px 22px;
  color: #c3c6da;
}

/* ─────────────────────────── Final CTA ─────────────────────────── */

.cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 0 auto;
  padding: 64px 56px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(600px 300px at 15% 0%, rgba(255, 224, 130, 0.35), transparent 60%),
    linear-gradient(135deg, #2a2f63, #151a3a 60%);
  box-shadow: inset 0 0 0 1px rgba(244, 196, 48, 0.3), var(--shadow);
}
.cta__grid {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 32px;
}
.cta h2 {
  font-size: clamp(30px, 3.8vw, 44px);
}
.cta p {
  margin-top: 12px;
  color: #d0d3e6;
  font-size: 18px;
}
.cta .btn {
  margin-top: 26px;
}
.cta__art {
  width: 230px;
  border-radius: 50%;
  border: 5px solid var(--gold);
  background: #fff;
  box-shadow: 0 0 60px -10px rgba(244, 196, 48, 0.6);
}
.cta .pattern {
  opacity: 0.08;
  -webkit-mask-image: none;
  mask-image: none;
}

/* ─────────────────────────── Footer ─────────────────────────── */

.footer {
  padding: 56px 0 40px;
  color: var(--muted);
  font-size: 15px;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.footer a {
  color: var(--muted);
  text-decoration: none;
}
.footer a:hover {
  color: var(--text);
}

/* ─────────────────────────── Reveal on scroll ─────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--delay, 0s);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
.no-js .reveal {
  opacity: 1;
  transform: none;
}

/* ─────────────────────────── Keyframes ─────────────────────────── */

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.15;
  }
  50% {
    opacity: 0.85;
  }
}
@keyframes float-up {
  0% {
    opacity: 0;
    transform: translateY(40px) rotate(0deg);
  }
  15% {
    opacity: var(--o, 0.5);
  }
  85% {
    opacity: var(--o, 0.5);
  }
  100% {
    opacity: 0;
    transform: translateY(-260px) rotate(var(--r, 20deg));
  }
}
@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}
@keyframes tile-pop {
  0% {
    transform: scale(0.6);
  }
  60% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes tile-wiggle {
  25% {
    transform: rotate(-6deg);
  }
  75% {
    transform: rotate(6deg);
  }
}
@keyframes shake {
  20%,
  60% {
    transform: translateX(-6px);
  }
  40%,
  80% {
    transform: translateX(6px);
  }
}
@keyframes hint-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(244, 196, 48, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  }
  100% {
    box-shadow: 0 0 0 18px rgba(244, 196, 48, 0), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  }
}
@keyframes sparkle {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) rotate(260deg) scale(0.4);
  }
}
@keyframes star-in {
  0% {
    opacity: 0;
    transform: scale(0) rotate(-90deg);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

/* ─────────────────────────── Responsive ─────────────────────────── */

@media (max-width: 1080px) {
  .worlds,
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
  .cast {
    grid-template-columns: repeat(5, 1fr);
  }
  .challenges {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .nav__links {
    position: fixed;
    inset: 72px 0 auto;
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 12px var(--gutter) 20px;
    background: rgba(10, 14, 39, 0.97);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, transform 0.25s var(--ease), visibility 0.25s;
  }
  .nav.is-open .nav__links {
    transform: none;
    opacity: 1;
    visibility: visible;
  }
  .nav.is-open {
    background: rgba(10, 14, 39, 0.97);
  }
  .nav__links a {
    padding: 12px 14px;
    font-size: 17px;
  }
  .nav__toggle {
    display: grid;
  }
  .nav__actions {
    margin-inline-start: auto;
  }
  .hero {
    padding-top: 108px;
  }
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 56px;
    text-align: center;
  }
  .hero__lead {
    margin-inline: auto;
  }
  .hero__ctas,
  .trust {
    justify-content: center;
  }
  /* خمسة أرقام: ثلاثة فوق واثنان تحت، بلا خانة فارغة */
  .stats__grid {
    grid-template-columns: repeat(6, 1fr);
  }
  .stats__grid li {
    grid-column: span 2;
  }
  .stats__grid li:nth-child(n + 4) {
    grid-column: span 3;
    border-top: 1px solid var(--line);
  }
  .stats__grid li:nth-child(4) {
    border-inline-start: 0;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .cta {
    padding: 48px 28px;
  }
  .cta__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .cta__art {
    order: -1;
    width: 160px;
    margin: 0 auto;
  }
}

@media (max-width: 600px) {
  :root {
    --gutter: 16px;
  }
  body {
    font-size: 16px;
  }
  .nav .btn {
    display: none;
  }
  .section {
    padding: 80px 0;
  }
  .section__head {
    margin-bottom: 40px;
  }
  .hero {
    padding-bottom: 150px;
  }
  .hero__ctas .btn {
    width: 100%;
  }
  .moon {
    top: 92px;
    width: 46px;
    height: 46px;
  }
  /* لا متّسع للمرشد بجانب الهاتف على الشاشة الضيّقة */
  .hero__guide {
    display: none;
  }
  .stats__grid li {
    padding: 20px 6px;
  }
  .stat__label {
    font-size: 13px;
  }
  .worlds {
    display: flex;
    margin-inline: calc(var(--gutter) * -1);
    padding: 6px var(--gutter) 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
  }
  .world {
    flex: none;
    width: 78%;
    scroll-snap-align: center;
  }
  .challenge-cards {
    grid-template-columns: 1fr;
  }
  .proverb__tiles span {
    width: 38px;
    height: 46px;
    font-size: 21px;
  }
  .cast {
    grid-template-columns: repeat(3, 1fr);
  }
  .features {
    gap: 12px;
  }
  .feature {
    padding: 18px 14px;
  }
  .feature__icon {
    width: 44px;
    height: 44px;
    margin-bottom: 12px;
  }
  .feature h3 {
    font-size: 16px;
  }
  .feature p {
    font-size: 14px;
  }
  .cinema {
    min-height: 480px;
  }
  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .floating-letters {
    display: none;
  }
}
