/*
 * صفّارة: ملاعب ليلية حقيقية (صور Higgsfield وفيديو Remotion)، خطوط طباشير، وأضواء كشافات.
 * العنصر المميز: الكورة تمشي على خط تكتيك عبر الصفحة كلها حتى تدخل المرمى (motion.js).
 */
:root {
  --turf: #1d5a31;        /* العشب */
  --turf-deep: #103a20;   /* العشب في الظل */
  --turf-stripe: #1a5229; /* شريط القص */
  --chalk: #f3f2e9;       /* خطوط الطباشير والنص */
  --flood: #ffd23f;       /* ضوء الكشافات */
  --ink: #0c2616;         /* الحبر على لوح التكتيك */
  --ink-soft: #3d5a47;
  --chalk-muted: #c4d4c6;
  --board: #f3f2e9;
  --line: rgba(243, 242, 233, .22);

  --display: "Lalezar", "Readex Pro", system-ui, sans-serif;
  --body: "Readex Pro", "Segoe UI", Tahoma, system-ui, sans-serif;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px; --s9: 112px;
  --pill: 999px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--turf-deep); }
body { margin: 0; direction: rtl; background: var(--turf); color: var(--chalk); font: 400 17px/1.75 var(--body); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 400; line-height: 1.15; text-wrap: balance; }
:focus-visible { outline: 3px solid var(--flood); outline-offset: 3px; border-radius: 8px; }
.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: var(--s5); }
@media (max-width: 600px) { .wrap { padding-inline: var(--s4); } }

/* ---------- الأزرار ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 14px 26px; border-radius: var(--pill); font: 700 16px/22px var(--body); text-decoration: none; white-space: nowrap; transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease; }
.btn-lg { padding: 18px 34px; font-size: 18px; }
.btn-sm { padding: 9px 20px; font-size: 15px; }
.btn-flood { background: var(--flood); color: var(--ink); box-shadow: 0 0 0 0 rgba(255, 210, 63, 0); }
.btn-flood:hover { box-shadow: 0 10px 40px rgba(255, 210, 63, .45); transform: translateY(-2px); }
.btn-light { background: var(--chalk); color: var(--ink); }
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.btn-ink { background: var(--ink); color: var(--chalk); }
.btn-ink:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(12, 38, 22, .35); }

/* ---------- الرأس ---------- */
.top { position: sticky; top: 0; z-index: 30; background: rgba(16, 58, 32, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding-block: 10px; }
.brand { display: flex; align-items: center; gap: var(--s3); text-decoration: none; }
.brand img { border-radius: 11px; }
.brand span { font: 400 28px/1 var(--display); padding-top: 6px; }
.nav { display: flex; align-items: center; gap: var(--s5); }
.nav-link { text-decoration: none; font-weight: 600; font-size: 15px; color: var(--chalk-muted); }
.nav-link:hover { color: var(--chalk); }
@media (max-width: 720px) { .nav-link { display: none; } }

/* ---------- الملعب (الحاوية) ومسار الكورة ---------- */
.field { position: relative; overflow-x: clip; }
/* طبقات: خلفيات الأقسام ← خط الطباشير ← نصوص الأقسام ← الكورة فوق الكل */
.play { position: absolute; inset: 0; pointer-events: none; }
.trail { position: absolute; inset: 0; z-index: 6; width: 100%; height: 100%; overflow: visible; }
.players > .wrap, .owners > .wrap, .final > .wrap, .goal { position: relative; z-index: 7; }
.trail path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.trail-reveal { stroke: #fff; stroke-width: 40; }
.trail-shadow { stroke: rgba(12, 38, 22, .45); stroke-width: 9; stroke-dasharray: 0 18; }
.trail-dots { stroke: var(--chalk); stroke-width: 5; stroke-dasharray: 0 18; }
.ball { position: absolute; z-index: 8; top: 0; left: 0; width: 64px; height: 64px; margin: -32px 0 0 -32px; display: none; will-change: transform; }
.ball svg { width: 100%; height: 100%; filter: drop-shadow(0 10px 8px rgba(0, 0, 0, .35)); }
html.motion .ball { display: block; visibility: hidden; }
@media (max-width: 600px) { .ball { width: 40px; height: 40px; margin: -20px 0 0 -20px; } }
/* على الشاشات الضيقة تنزل الكورة في الهامش الأيمن: نحجزله مكان قبل طرق الشحن وفي قسم أصحاب الملاعب */
@media (max-width: 940px) { .wallet, .owners > .wrap { padding-inline-start: 72px; } }
@media (max-width: 600px) { .wallet, .owners > .wrap { padding-inline-start: 56px; } .owners > .wrap { padding-inline-end: var(--s4); } }

/* ---------- البداية: فيديو الملعب الليلي ---------- */
.hero { position: relative; min-height: calc(100svh - 61px); display: flex; align-items: center; padding-block: var(--s8) var(--s9); isolation: isolate; overflow: hidden; background: #000; }
/* صورة ثابتة من الفيديو تظهر فوراً، والفيديو يحل محلها لما يشتغل */
.hero-media { position: absolute; inset: 0; z-index: -2; background: #000 url("../media/hero-wide.jpg") center / cover no-repeat; }
.hero-film { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s ease; }
.hero-film.on { opacity: 1; }
/* ظل من جهة النص يخلي العنوان مقروء فوق أي لقطة */
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(270deg, rgba(6, 22, 12, .9) 0%, rgba(6, 22, 12, .62) 38%, rgba(6, 22, 12, 0) 66%), linear-gradient(0deg, var(--turf-deep) 0%, rgba(16, 58, 32, 0) 22%); }
/* الكورة تنزل في آخر خط «انزل مع الكورة»، ومع التمرير تطلع لقرب نص الشاشة (trackY في motion.js) */
.spot { position: absolute; left: 50%; bottom: 30px; width: 10px; height: 10px; margin: 0 0 -5px -5px; border-radius: 50%; background: var(--chalk); box-shadow: 0 0 0 6px rgba(243, 242, 233, .18); }
.hero-copy { position: static; }
.headline { font-size: clamp(46px, 7.4vw, 96px); max-width: 9.5em; text-shadow: 0 4px 40px rgba(0, 0, 0, .45); }
.lead { margin-top: var(--s5); max-width: 30em; font-size: 19px; line-height: 1.85; color: #dfe7df; }
.ctas { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s6); }
.scroll-cue { position: absolute; bottom: 62px; left: 50%; translate: -50% 0; font-size: 14px; font-weight: 600; color: var(--chalk-muted); text-decoration: none; padding-bottom: 34px; }
.scroll-cue::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 2px; height: 26px; translate: -1px 0; background: linear-gradient(var(--chalk-muted) 50%, transparent 0) 0 0 / 2px 8px; }
@media (max-aspect-ratio: 4/5) {
  .hero-media { background-image: url("../media/hero-tall.jpg"); }
}
@media (max-width: 760px) {
  /* على الجوال: الشعار في أعلى الفيديو، والنص تحت فوق ظل من الأسفل */
  .hero { align-items: flex-end; padding-block: 28vh 150px; }
  .hero::after { background: linear-gradient(0deg, var(--turf-deep) 0%, rgba(6, 22, 12, .84) 36%, rgba(6, 22, 12, 0) 64%); }
  /* على الجوال الكورة تنزل في الفراغ تحت زر الحجز */
}

/* ---------- اللاعبون ---------- */
.players { position: relative; padding-block: var(--s9); background: var(--turf-deep); }
.title { font-size: clamp(36px, 5.2vw, 64px); }
.players-grid { display: grid; grid-template-columns: 1fr minmax(320px, 440px); gap: var(--s8); align-items: center; margin-top: var(--s8); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s8); }
.step { display: flex; align-items: flex-start; gap: var(--s5); max-width: 520px; }
/* الخطوة الوسطى تميل للداخل، والكورة تمر بالثلاث */
.step:nth-child(2) { margin-inline-start: var(--s8); }

/* صورة اللاعب وجواله: الجوال يعرض خطوات الحجز (فيديو Remotion) */
.stage { position: relative; margin: 0; padding-bottom: var(--s7); }
.stage-photo { display: block; width: 100%; height: auto; aspect-ratio: 900 / 1117; object-fit: cover; border-radius: 28px; }
.phone { position: absolute; left: -36px; bottom: 0; width: 46%; aspect-ratio: 390 / 820; padding: 7px; border-radius: 34px; background: #050c08; box-shadow: 0 0 0 1.5px rgba(243, 242, 233, .22), 0 30px 60px rgba(0, 0, 0, .55); }
.phone-film { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 27px; background: #06120c; }
@media (max-width: 900px) {
  .players-grid { grid-template-columns: 1fr; gap: var(--s7); }
  .stage { max-width: 420px; width: 100%; margin-inline: auto; }
  .phone { left: -8px; }
}
.step h3 { font: 700 24px/1.4 var(--body); }
.step p { margin-top: var(--s2); color: var(--chalk-muted); }
.marker { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--chalk); font: 400 30px/1 var(--display); padding-top: 4px; transition: background-color .35s ease, color .35s ease, transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.marker.hit { background: var(--flood); border-color: var(--flood); color: var(--ink); transform: scale(1.12); }
.wallet { margin-top: var(--s9); padding-top: var(--s6); border-top: 2px dashed var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s4); }
.wallet p { font-weight: 600; }
.methods { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.methods li { padding: 6px 16px; border-radius: var(--pill); border: 1px solid var(--line); font-size: 15px; font-weight: 600; color: var(--chalk-muted); }
@media (max-width: 700px) { .steps { gap: var(--s7); } .step:nth-child(2) { margin-inline-start: 0; } }
@media (max-width: 480px) { .phone { width: 52%; border-radius: 28px; padding: 6px; } .phone-film { border-radius: 22px; } }

/* ---------- أصحاب الملاعب: لوح التكتيك ---------- */
.owners { position: relative; padding-block: var(--s9); color: var(--ink);
  background: radial-gradient(circle at 15% 20%, rgba(29, 90, 49, .06), transparent 40%), var(--board); }
.owners-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: var(--s8); align-items: center; }
@media (max-width: 940px) { .owners-grid { grid-template-columns: 1fr; gap: var(--s7); } }
.lead-dark { margin-top: var(--s4); font-size: 19px; color: var(--ink-soft); max-width: 30em; }
.feats { list-style: none; margin: var(--s6) 0 var(--s6); padding: 0; display: grid; gap: var(--s3); }
.feats li { position: relative; padding-inline-start: 34px; font-weight: 500; }
.feats li::before { content: ""; position: absolute; inset-inline-start: 0; top: .55em; width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--turf); }

.owners-art { position: relative; padding-top: 0; }
.owner-photo { display: block; width: 78%; margin-inline-start: auto; height: auto; aspect-ratio: 900 / 1117; object-fit: cover; object-position: 50% 30%; border-radius: 28px; border: 2px solid var(--ink); }
/* جدول الأسبوع فوق أسفل الصورة */
.owners-art .board { position: relative; margin-top: -42%; width: 92%; }
@media (max-width: 520px) { .owner-photo { width: 100%; } .owners-art .board { width: 100%; margin-top: -30%; } }
.board { margin: 0; padding: var(--s5); border-radius: 22px; background: #fff; border: 2px solid var(--ink); box-shadow: 10px 10px 0 var(--ink); }
.board-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.board-head b { font: 700 18px/1.4 var(--body); }
.board-head span { font-weight: 600; color: var(--ink-soft); }
.board-head output { font: 400 26px/1 var(--display); color: var(--turf); }
.grid { display: grid; grid-template-columns: 52px repeat(7, 1fr); gap: 5px; font-size: 12px; }
.grid .h { text-align: center; font-weight: 600; color: var(--ink-soft); padding-bottom: 2px; }
.grid .t { font-weight: 600; color: var(--ink-soft); display: flex; align-items: center; }
.grid .c { aspect-ratio: 1.35; border-radius: 6px; background: #edf0e8; }
.grid .c[data-k="app"] { background: var(--turf); }
.grid .c[data-k="phone"] { background: var(--flood); }
.grid .c[data-k="sub"] { background: repeating-linear-gradient(135deg, var(--ink) 0 4px, #2b4a37 4px 8px); }
.legend { list-style: none; margin: var(--s4) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s4); font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.legend li { display: flex; align-items: center; gap: var(--s2); }
.legend i { width: 14px; height: 14px; border-radius: 4px; }
.k-app { background: var(--turf); }
.k-phone { background: var(--flood); }
.k-sub { background: repeating-linear-gradient(135deg, var(--ink) 0 3px, #2b4a37 3px 6px); }
@media (max-width: 520px) { .board { padding: var(--s4); box-shadow: 6px 6px 0 var(--ink); } .grid { grid-template-columns: 40px repeat(7, 1fr); gap: 3px; font-size: 10px; } }

/* ---------- المدن ---------- */
.cities { position: relative; z-index: 7; overflow: hidden; background: var(--flood); color: var(--ink); border-block: 3px solid var(--ink); }
.cities-track { display: flex; width: max-content; animation: drift 30s linear infinite; }
.cities span { display: inline-flex; align-items: center; gap: var(--s6); padding: 16px var(--s6) 10px 0; font: 400 34px/1.2 var(--display); white-space: nowrap; }
.cities span::after { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--ink); }
@keyframes drift { to { transform: translateX(50%); } }
.cities-track.js-velocity { animation: none; }

/* ---------- النهاية: المرمى ---------- */
.final { position: relative; padding-block: var(--s8) var(--s9); text-align: center; overflow: hidden; isolation: isolate; background: var(--turf-deep); }
/* صورة الشباب يحتفلوا، مغمّقة تحت المرمى والعنوان */
.final-photo img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.final::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(16, 58, 32, .96) 0%, rgba(8, 28, 15, .72) 45%, rgba(8, 28, 15, .9) 100%); }
.goal { position: relative; width: min(420px, 82vw); margin: 0 auto var(--s7); aspect-ratio: 420 / 180; }
.goal svg { width: 100%; height: 100%; overflow: visible; }
.goal .net path { stroke: rgba(243, 242, 233, .35); stroke-width: 1.4; }
.goal .net { transform-origin: 50% 0; }
.goal .posts { fill: none; stroke: var(--chalk); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.goal-target { position: absolute; left: 50%; top: 58%; width: 1px; height: 1px; }
.final .title { font-size: clamp(42px, 6.5vw, 84px); }
.final .ctas { justify-content: center; }
.final.scored .title { color: var(--flood); transition: color .4s ease; }

/* ---------- التذييل ---------- */
footer { background: var(--turf-deep); padding-block: var(--s7); border-top: 1px solid var(--line); }
footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s5); }
footer img { border-radius: 18px; }
.flinks { display: flex; flex-wrap: wrap; gap: var(--s5); }
.flinks a { color: var(--chalk-muted); text-decoration: none; font-weight: 600; }
.flinks a:hover { color: var(--chalk); }
footer small { color: var(--chalk-muted); }

/* ---------- الحركة (motion.js) ---------- */
html.motion-pending .headline, html.motion-pending .hero .lead, html.motion-pending .hero .ctas { visibility: hidden; }
.split-word { will-change: transform; }
.magnet { display: inline-block; }
.magnet-inner { display: inline-block; will-change: transform; }

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