/* ============================================================
   واجهني — موقع الإطلاق
   ورق دافئ + خطوط شعرية. الذهبي للختم والتاج بس.
   الأحمر والأزرق = الخصمين (فصّين الختم).
   ============================================================ */

/* ---------- الخطوط (محلية) ---------- */
@font-face { font-family: 'Aref Ruqaa'; font-weight: 700; font-display: swap; src: url(../fonts/ArefRuqaa-700-arabic.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: 'Noto Kufi Arabic'; font-weight: 700; font-display: swap; src: url(../fonts/NotoKufiArabic-700-arabic.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: 'Noto Kufi Arabic'; font-weight: 800; font-display: swap; src: url(../fonts/NotoKufiArabic-800-arabic.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: 'Noto Kufi Arabic'; font-weight: 900; font-display: swap; src: url(../fonts/NotoKufiArabic-900-arabic.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: 'Noto Kufi Arabic'; font-weight: 800; font-display: swap; src: url(../fonts/NotoKufiArabic-800-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-weight: 400; font-display: swap; src: url(../fonts/IBMPlexSansArabic-400-arabic.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-weight: 400; font-display: swap; src: url(../fonts/IBMPlexSansArabic-400-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2212; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-weight: 500; font-display: swap; src: url(../fonts/IBMPlexSansArabic-500-arabic.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-weight: 500; font-display: swap; src: url(../fonts/IBMPlexSansArabic-500-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2212; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-weight: 600; font-display: swap; src: url(../fonts/IBMPlexSansArabic-600-arabic.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-weight: 600; font-display: swap; src: url(../fonts/IBMPlexSansArabic-600-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2212; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-weight: 700; font-display: swap; src: url(../fonts/IBMPlexSansArabic-700-arabic.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-weight: 700; font-display: swap; src: url(../fonts/IBMPlexSansArabic-700-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2212; }
@font-face { font-family: 'Big Shoulders Display'; font-weight: 700 900; font-display: swap; src: url(../fonts/BigShouldersDisplay-700-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+2212; }

/* ---------- الألوان: الفاتح (الافتراضي) ---------- */
:root {
  --bg: #f2efe7;
  --bg-2: #ebe7dc;
  --surface: #fbfaf6;
  --surface-2: #f5f2eb;
  --line: rgba(28, 25, 18, .11);
  --line-2: rgba(28, 25, 18, .18);
  --line-3: rgba(28, 25, 18, .32);
  --text: #1a1813;
  --text-2: #4d493f;
  --muted: #7b766a;
  --pri: #1a1813;
  --on-pri: #fbfaf6;
  --pri-hover: #34302a;
  --gold: #d99a12;
  --gold-ink: #95650a;
  --red: #e5484d;
  --blue: #2f8cf0;
  --green: #2bb673;
  --green-ink: #17804b;
  --red-ink: #bf2f35;
  --amber-ink: #a35f00;
  --grid: rgba(28, 25, 18, .045);
  --ring: rgba(28, 25, 18, .14);
  --shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 24px 48px -28px rgba(48, 38, 20, .28);
  --nav-bg: rgba(242, 239, 231, .86);
  /* اللوحة والتلفزيون: غامقة في الثيمين */
  --plate: #0b0b0d;
  --plate-2: #151518;
  --board-core: #1b1b1f;
  --f-ui: 'IBM Plex Sans Arabic', 'Geeza Pro', 'Segoe UI', Tahoma, sans-serif;
  --f-head: 'Noto Kufi Arabic', 'IBM Plex Sans Arabic', 'Geeza Pro', sans-serif;
  --f-num: 'Big Shoulders Display', 'IBM Plex Sans Arabic', sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

/* ---------- الغامق: يدوي من الزر، أو تلقائي من الجهاز ---------- */
:root[data-theme="dark"] {
  --bg: #0b0b0d; --bg-2: #101013; --surface: #151518; --surface-2: #1b1b1f;
  --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .14); --line-3: rgba(255, 255, 255, .26);
  --text: #f3f1ec; --text-2: #bdb9b1; --muted: #8b8881;
  --pri: #f3f1ec; --on-pri: #0b0b0d; --pri-hover: #ffffff;
  --gold: #e9b949; --gold-ink: #e9b949;
  --red: #f2555a; --green-ink: #3dd68c; --red-ink: #f2555a; --amber-ink: #ffb224;
  --grid: rgba(255, 255, 255, .025); --ring: rgba(255, 255, 255, .16);
  --shadow: 0 24px 48px -28px rgba(0, 0, 0, .8);
  --nav-bg: rgba(11, 11, 13, .82);
  --plate: #070708; --plate-2: #121215;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b0d; --bg-2: #101013; --surface: #151518; --surface-2: #1b1b1f;
    --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .14); --line-3: rgba(255, 255, 255, .26);
    --text: #f3f1ec; --text-2: #bdb9b1; --muted: #8b8881;
    --pri: #f3f1ec; --on-pri: #0b0b0d; --pri-hover: #ffffff;
    --gold: #e9b949; --gold-ink: #e9b949;
    --red: #f2555a; --green-ink: #3dd68c; --red-ink: #f2555a; --amber-ink: #ffb224;
    --grid: rgba(255, 255, 255, .025); --ring: rgba(255, 255, 255, .16);
    --shadow: 0 24px 48px -28px rgba(0, 0, 0, .8);
    --nav-bg: rgba(11, 11, 13, .82);
    --plate: #070708; --plate-2: #121215;
    color-scheme: dark;
  }
}

/* ---------- الأساس ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-ui);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background:
    linear-gradient(var(--grid) 1px, transparent 1px) 50% 0 / 48px 48px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 50% 0 / 48px 48px,
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: var(--pri); color: var(--on-pri); }
img, svg, video { max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-inline: 32px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 16px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: 10px; background: var(--pri); color: var(--on-pri); text-decoration: none; font-weight: 600; transition: top .2s; }
.skip:focus { top: 12px; }

/* أيقونات */
.i { width: 1.15em; height: 1.15em; flex: none; display: inline-block; vertical-align: -0.2em; stroke-width: 1.9; }

/* ---------- الختم ---------- */
.seal { display: block; width: auto; height: auto; overflow: visible; color: var(--text); }
.seal .sf { fill: none; stroke: var(--gold); stroke-linejoin: round; }
.seal .st { font-family: 'Aref Ruqaa', serif; font-weight: 700; font-size: 228px; fill: currentColor; }
.seal .se { font-family: 'Big Shoulders Display', sans-serif; font-weight: 800; font-size: 46px; letter-spacing: 14px; fill: var(--gold); }
.seal .sg { stroke: var(--bg); stroke-width: 6; stroke-linejoin: round; }
.seal .sg.r { fill: #e5484d; }
.seal .sg.b { fill: #2f8cf0; }

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 24px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background .15s, border-color .15s, transform .09s;
}
.btn:active { transform: translateY(1px) scale(.985); }
.btn.pri { background: var(--pri); color: var(--on-pri); }
.btn.pri:hover { background: var(--pri-hover); }
.btn.sec { background: transparent; border-color: var(--line-3); }
.btn.sec:hover { background: var(--surface); border-color: var(--text); }
.btn.sm { height: 42px; padding: 0 16px; font-size: 15px; gap: 8px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .55; cursor: progress; }
.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; flex: none;
  border-radius: 12px; border: 1px solid var(--line-2); background: transparent; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.icon-btn:hover { background: var(--surface); border-color: var(--line-3); }
.icon-btn .i { width: 18px; height: 18px; }
/* أيقونة الثيم: القمر بالفاتح والشمس بالغامق */
.when-dark { display: none; }
:root[data-theme="dark"] .when-dark { display: inline-block; }
:root[data-theme="dark"] .when-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .when-dark { display: inline-block; }
  :root:not([data-theme="light"]) .when-light { display: none; }
}

/* ---------- الشريط العلوي ---------- */
/* شريط علوي ثابت — يحترم حافة الجوال العلوية */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 21; background: var(--bg); }
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-in { display: flex; align-items: center; gap: 32px; height: 76px; }
.brand { display: inline-flex; text-decoration: none; flex: none; }
.nav .brand .seal { height: 50px; }
.links { display: flex; gap: 28px; font-size: 15px; font-weight: 500; }
.links a { text-decoration: none; color: var(--text-2); padding: 6px 0; border-bottom: 1px solid transparent; transition: color .15s, border-color .15s; }
.links a:hover { color: var(--text); border-color: var(--line-3); }
.nav-end { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }

/* ---------- الواجهة ---------- */
.hero { padding: 64px 0 96px; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: 56px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface);
  font-size: 14px; font-weight: 600; color: var(--text-2);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); flex: none; animation: live 1.6s ease-in-out infinite; }
@keyframes live { 50% { opacity: .25; } }
.hero-seal { margin: 26px 0 22px; line-height: 0; }
.hero-seal .seal { width: clamp(240px, 32vw, 400px); }
.lead { font-family: var(--f-head); font-weight: 800; font-size: clamp(23px, 2.5vw, 31px); line-height: 1.75; }
.lead em {
  font-style: normal;
  background: linear-gradient(90deg, var(--blue) 0 50%, var(--red) 50% 100%) 0 100% / 100% 3px no-repeat;
  padding-bottom: 6px; /* الخط تحت الحروف (حتى نقاط الياء) مب داخل عليها */
}
.sub { margin-top: 14px; font-size: 17.5px; line-height: 1.9; color: var(--text-2); max-width: 32em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.cta-note { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; color: var(--text-2); }
.cta-note svg { width: 16px; height: 16px; flex: none; }
.facts { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 0; margin: 40px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.facts div { display: flex; flex-direction: column-reverse; padding-inline-end: 28px; margin-inline-end: 28px; border-inline-end: 1px solid var(--line); }
.facts div:last-child { border: 0; margin: 0; padding: 0; }
.facts dd { margin: 0; font-family: var(--f-num); font-weight: 800; font-size: 40px; line-height: 1.05; direction: ltr; text-align: right; }
.facts dt { font-size: 13.5px; font-weight: 500; color: var(--muted); }

/* المسرح: لوحة غامقة مثل شاشة التلفزيون */
.stage { margin: 0; }
.stage-plate {
  position: relative; border-radius: 24px; padding: 26px;
  background:
    linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px) 50% 50% / 32px 32px,
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px) 50% 50% / 32px 32px,
    radial-gradient(120% 90% at 50% 40%, var(--plate-2), var(--plate));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06) inset, 0 40px 80px -40px rgba(20, 16, 8, .55);
}
.live {
  position: absolute; inset-block-start: 16px; inset-inline-start: 16px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 8px;
  background: rgba(255, 255, 255, .07); color: #e9e6df; font-size: 13px; font-weight: 600;
}
.board-box { aspect-ratio: 1 / .93; display: grid; place-items: center; }
.board-box .board { width: 100%; height: 100%; }
.stage figcaption { margin-top: 14px; font-size: 14px; color: var(--muted); text-align: center; }

/* ---------- لوحة الخلايا ---------- */
.board { overflow: visible; --mk-k: #f3f1ec; --mk-d: rgba(255, 255, 255, .13); --gold: #e9b949; }
.board .base { fill: var(--plate); stroke: var(--plate); stroke-width: 2.6; stroke-linejoin: round; }
.board .cell { stroke: var(--plate); stroke-width: 3; stroke-linejoin: round; }
.board .core-cell { fill: var(--board-core); stroke: var(--plate); stroke-width: 3; stroke-linejoin: round; }
.board .mk .k { fill: var(--mk-k); }
.board .mk .a { fill: var(--gold); }
.board .mk .d { fill: var(--mk-d); }
.board .mk .g { stroke: var(--plate); stroke-width: 3.2; stroke-linejoin: round; }
.board .cell.flip { transform-box: fill-box; transform-origin: center; animation: cellFlip .46s var(--d, 0ms) both cubic-bezier(.65, 0, .35, 1); }
@keyframes cellFlip { 0% { fill: var(--from); transform: scaleX(1); } 49% { fill: var(--from); transform: scaleX(.02); } 51% { fill: var(--to); transform: scaleX(.02); } 100% { fill: var(--to); transform: scaleX(1); } }
.board .hex { transition: filter .3s; }
.board .hex.lit { filter: brightness(1.12) saturate(1.1); }
.board .terr-edge { fill: none; stroke: var(--plate); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.board .hex-glow { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.board .hl { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-family: var(--f-ui); }
.board .tag {
  display: flex; flex-direction: column; align-items: center; gap: 1px; max-width: 100%;
  padding: 5px 12px 6px; border-radius: 7px; background: rgba(11, 11, 13, .88);
  border-top: 3px solid var(--pc); box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .55);
}
.board .hl-name { font-size: 21px; font-weight: 700; line-height: 1.35; color: #f6f4ef; white-space: nowrap; }
.board .hl-cat { display: flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; line-height: 1.3; color: rgba(246, 244, 239, .72); white-space: nowrap; }
.board .hl-cat .i { color: var(--pc); width: 13px; height: 13px; vertical-align: 0; }

/* ---------- الأقسام ---------- */
.block { padding: 112px 0; border-top: 1px solid var(--line); }
.block.alt { background: var(--bg-2); }
.sec-head { max-width: 640px; margin-bottom: 56px; }
.sec-head.center { margin-inline: auto; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.eyebrow b { font-family: var(--f-num); font-weight: 800; font-size: 15px; letter-spacing: .06em; padding: 2px 8px; border: 1px solid var(--line-3); border-radius: 6px; color: var(--text); }
h2 { font-family: var(--f-head); font-weight: 800; font-size: clamp(28px, 3.3vw, 42px); line-height: 1.55; margin: 16px 0 12px; text-wrap: balance; }
.lede { font-size: 17.5px; line-height: 1.9; color: var(--text-2); }

/* ١. اللعبة باختصار */
.play-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 64px; align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 24px 0; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps .n { font-family: var(--f-num); font-weight: 800; font-size: 30px; line-height: 1.2; color: var(--muted); }
.steps h3 { font-size: 20px; font-weight: 700; line-height: 1.5; margin-bottom: 6px; }
.steps p { font-size: 15.5px; line-height: 1.85; color: var(--text-2); }
.crown-word { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--gold-ink); white-space: nowrap; }

/* مبارزة تجريبية (شكل شاشة التلفزيون) */
.duel {
  position: sticky; top: 108px;
  border-radius: 24px; padding: 22px; color: #f3f1ec;
  background: radial-gradient(120% 90% at 50% 30%, var(--plate-2), var(--plate));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06) inset, 0 40px 80px -40px rgba(20, 16, 8, .55);
}
.duel-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.dcat { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 8px; background: rgba(255, 255, 255, .07); font-weight: 600; }
.dleft { color: rgba(243, 241, 236, .6); }
.dleft b { font-family: var(--f-num); font-weight: 800; font-size: 17px; color: #f3f1ec; }
.clocks { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 18px 0 16px; }
.clk {
  display: flex; flex-direction: column; align-items: center; padding: 10px 8px 8px; border-radius: 14px;
  background: rgba(255, 255, 255, .04); border-top: 3px solid var(--pc);
  transition: background .25s, box-shadow .25s, opacity .25s; opacity: .6;
}
.clk.on { opacity: 1; background: color-mix(in srgb, var(--pc) 18%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--pc) 55%, transparent) inset; }
.clk .who { font-size: 14px; font-weight: 600; }
.clk .t { font-family: var(--f-num); font-weight: 800; font-size: 44px; line-height: 1.05; direction: ltr; }
.clk.low .t { color: #ff6b70; }
.vs { font-family: var(--f-num); font-weight: 900; font-size: 18px; letter-spacing: .08em; color: rgba(243, 241, 236, .4); }
.frame {
  position: relative; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden;
  display: grid; place-items: center; background: #fbfaf6;
}
.frame .q { font-family: var(--f-head); font-weight: 900; font-size: clamp(90px, 10vw, 128px); line-height: 1; color: rgba(26, 24, 19, .16); transition: transform .3s var(--ease); }
.frame.swap .q { transform: scale(.85) rotate(-6deg); }
.corner { position: absolute; width: 22px; height: 22px; border: 0 solid rgba(26, 24, 19, .5); }
.corner.tl { top: 12px; left: 12px; border-top-width: 2px; border-left-width: 2px; border-top-left-radius: 6px; }
.corner.tr { top: 12px; right: 12px; border-top-width: 2px; border-right-width: 2px; border-top-right-radius: 6px; }
.corner.bl { bottom: 12px; left: 12px; border-bottom-width: 2px; border-left-width: 2px; border-bottom-left-radius: 6px; }
.corner.br { bottom: 12px; right: 12px; border-bottom-width: 2px; border-right-width: 2px; border-bottom-right-radius: 6px; }
.flash {
  position: absolute; inset-inline: 0; bottom: 18px; margin-inline: auto; width: max-content; max-width: 90%;
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 10px;
  font-weight: 700; font-size: 17px; color: #fff; opacity: 0; transform: translateY(8px);
  transition: opacity .2s, transform .2s var(--ease);
}
.flash.ok { background: var(--green); }
.flash.pass { background: #f2792e; }
.flash.on { opacity: 1; transform: none; }
.keys { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.key {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border-radius: 12px;
  font-weight: 700; font-size: 15px; background: rgba(255, 255, 255, .06); color: rgba(243, 241, 236, .85);
  transition: background .15s, transform .12s;
}
.key.ok.press { background: var(--green); color: #fff; transform: scale(.97); }
.key.pass.press { background: #f2792e; color: #fff; transform: scale(.97); }

.cats { display: flex; align-items: baseline; gap: 18px; margin-top: 56px; }
.cats-label { flex: none; font-size: 14px; font-weight: 600; color: var(--muted); }
.cats ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cats li { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: 14.5px; font-weight: 500; color: var(--text-2); }
.cats li.more { border-style: dashed; background: transparent; color: var(--text); font-weight: 600; }

/* ٢. المقطع التعريفي */
.player { max-width: 980px; margin: 0 auto; }
.screen {
  position: relative; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; isolation: isolate;
  background: radial-gradient(110% 90% at 50% 45%, #18181c, #070708);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06) inset, 0 50px 90px -50px rgba(20, 16, 8, .6);
}
.screen .corner { border-color: rgba(243, 241, 236, .35); z-index: 3; pointer-events: none; width: 28px; height: 28px; }
.screen .corner.tl, .screen .corner.tr { top: 18px; }
.screen .corner.bl, .screen .corner.br { bottom: 18px; }
.screen .corner.tl, .screen .corner.bl { left: 18px; }
.screen .corner.tr, .screen .corner.br { right: 18px; }
.screen video, .screen .embed, .screen .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.screen video { object-fit: contain; z-index: 1; }
.screen .embed { z-index: 1; }
.slate {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 24px; text-align: center;
  background:
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px) 50% 50% / 40px 40px,
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px) 50% 50% / 40px 40px;
}
.slate .seal { width: clamp(150px, 26%, 240px); color: #f3f1ec; --bg: #0f0f12; margin-bottom: 14px; }
.slate-t { font-size: clamp(17px, 2.2vw, 22px); font-weight: 700; color: #f3f1ec; }
.slate-s { font-size: 15px; color: rgba(243, 241, 236, .6); }
.player[data-state="ready"] .slate { background-color: rgba(7, 7, 8, .35); }
.player[data-state="ready"] .slate p { display: none; }
.player[data-state="playing"] .slate { display: none; }
.bigplay {
  position: absolute; z-index: 4; inset: 0; margin: auto; width: 92px; height: 92px; border-radius: 50%;
  border: 0; cursor: pointer; display: grid; place-items: center;
  background: #f3f1ec; color: #0b0b0d; box-shadow: 0 0 0 10px rgba(243, 241, 236, .12), 0 20px 40px -10px rgba(0, 0, 0, .6);
  transition: transform .15s var(--ease), box-shadow .2s;
}
.bigplay:hover { transform: scale(1.06); box-shadow: 0 0 0 14px rgba(243, 241, 236, .14), 0 20px 40px -10px rgba(0, 0, 0, .6); }
.bigplay .i { width: 34px; height: 34px; fill: currentColor; margin-left: 6px; }
.bigplay[hidden] { display: none; }
.player-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 6px 0; font-size: 14px; color: var(--muted); }
.rec { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-num); font-weight: 800; font-size: 15px; letter-spacing: .14em; color: var(--text-2); }
.meta { display: inline-flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.meta > span { display: inline-flex; align-items: center; gap: 6px; }
.status { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-2); font-weight: 600; color: var(--text-2); }
.player[data-state="ready"] .status, .player[data-state="playing"] .status { border-color: color-mix(in srgb, var(--green) 50%, transparent); color: var(--green-ink); }

/* ٣. التواصل */
.contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 72px; align-items: start; }
.contact-info .lede { margin-bottom: 32px; }
.mailcard {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line);
}
.mi { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--bg-2); flex: none; }
.mi .i { width: 20px; height: 20px; }
.mt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ml { font-size: 13px; color: var(--muted); font-weight: 500; }
.mv { font-size: 16.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv a { text-decoration: none; }
.mv a:hover { text-decoration: underline; text-underline-offset: 4px; }
.pill { flex: none; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--line-2); color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; }
.pill.pending::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #f2a30f; }
.pill.live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.reasons { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; }
.reasons li { display: flex; align-items: center; gap: 12px; font-size: 15.5px; color: var(--text-2); }
.reasons .i { color: var(--text); width: 18px; height: 18px; }

.form {
  position: relative; padding: 30px; border-radius: 22px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  display: grid; gap: 18px;
}
.form-note { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); border: 1px dashed var(--line-3); font-size: 14px; line-height: 1.7; color: var(--text-2); }
.form-note .i { margin-top: 3px; }
.form-note[hidden] { display: none; }
.types { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.types legend { padding: 0; margin-bottom: 10px; font-size: 14px; font-weight: 600; }
.types label { position: relative; cursor: pointer; }
.types input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.types span {
  display: flex; align-items: center; gap: 9px; height: 48px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--bg); font-size: 14.5px; font-weight: 600; color: var(--text-2);
  transition: border-color .15s, background .15s, color .15s;
}
.types label:hover span { border-color: var(--line-3); }
.types input:checked + span { border-color: var(--text); color: var(--text); background: var(--surface-2); box-shadow: 0 0 0 1px var(--text) inset; }
.types input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 2px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field label { font-size: 14px; font-weight: 600; }
.opt { font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  width: 100%; min-width: 0; padding: 0 14px; height: 50px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--bg); font-size: 16px;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { height: auto; min-height: 124px; padding: 12px 14px; resize: vertical; line-height: 1.7; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .8; }
.field input[dir="ltr"]::placeholder { text-align: right; }
.field input[dir="ltr"] { text-align: left; }
.field input:hover, .field textarea:hover { border-color: var(--line-3); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 4px var(--ring); }
.field [aria-invalid="true"] { border-color: var(--red-ink); }
.err { min-height: 0; font-size: 13px; color: var(--red-ink); }
.err:empty { display: none; }
/* فخ السبام: مخفي داخل النموذج نفسه (بدون إزاحة لبرّا الصفحة — تكسر الاتجاه العربي) */
.hp { position: absolute; top: 0; inset-inline-start: 0; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }
.status-line { font-size: 14.5px; line-height: 1.7; text-align: center; }
.status-line:empty { display: none; }
.status-line.ok { color: var(--green-ink); font-weight: 600; }
.status-line.bad { color: var(--red-ink); font-weight: 600; }
.status-line.info { color: var(--text-2); }

/* ---------- الفوتر ---------- */
.foot { border-top: 1px solid var(--line); padding: 44px 0 52px; }
.foot-in { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "brand tag links" "brand copy copy"; column-gap: 28px; row-gap: 6px; align-items: center; }
.foot .brand { grid-area: brand; }
.foot .brand .seal { height: 64px; }
.foot-tag { grid-area: tag; font-size: 15px; color: var(--text-2); }
.foot-links { grid-area: links; display: flex; flex-wrap: wrap; gap: 20px; font-size: 14.5px; }
.foot-links a { text-decoration: none; color: var(--text-2); }
.foot-links a:hover { color: var(--text); }
#socials { display: contents; }
.copy { grid-area: copy; font-size: 13px; color: var(--muted); }

/* ---------- ظهور تدريجي ---------- */
/* الأقسام ظاهرة من البداية (عشان لقطة الصفحة ومعاينة الرابط تطلع كاملة) — بس تتحرك حركة خفيفة لما توصلها */
.js .reveal { transition: transform .7s var(--ease); }
.js .reveal:not(.in) { transform: translateY(12px); }
.js .steps .reveal:nth-child(2) { transition-delay: .06s; }
.js .steps .reveal:nth-child(3) { transition-delay: .12s; }
.js .steps .reveal:nth-child(4) { transition-delay: .18s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .reveal:not(.in) { transform: none; transition: none; }
  .dot { animation: none; }
  .board .cell.flip { animation: none; }
}

/* ---------- الشاشات المتوسطة ---------- */
@media (max-width: 1020px) {
  .hero-in, .play-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .hero { padding: 48px 0 80px; }
  .hero-in { gap: 48px; }
  .stage { max-width: 620px; width: 100%; margin-inline: auto; }
  .duel { position: static; max-width: 560px; width: 100%; margin-inline: auto; }
  .play-grid, .contact-grid { gap: 48px; }
  .links { display: none; }
}

/* ---------- الجوال ---------- */
@media (max-width: 640px) {
  .wrap { padding-inline: 16px; }
  .nav-in { height: 64px; gap: 12px; }
  .nav .brand .seal { height: 42px; }
  .hero { padding: 32px 0 64px; }
  .hero-seal .seal { width: min(78vw, 300px); }
  .sub { font-size: 16.5px; }
  .cta .btn { flex: 1 1 100%; }
  .facts { grid-template-columns: 1fr 1fr; row-gap: 18px; }
  .facts div { margin: 0; padding-inline-end: 12px; border: 0; }
  .facts dd { font-size: 34px; }
  .stage-plate { padding: 14px; border-radius: 18px; }
  .live { inset-block-start: 10px; inset-inline-start: 10px; font-size: 12px; }
  .block { padding: 80px 0; }
  .sec-head { margin-bottom: 36px; }
  .steps li { grid-template-columns: 40px 1fr; gap: 10px; padding: 20px 0; }
  .steps .n { font-size: 24px; }
  .duel { padding: 16px; border-radius: 18px; }
  .clk .t { font-size: 36px; }
  .cats { flex-direction: column; gap: 12px; margin-top: 44px; }
  .screen { border-radius: 14px; }
  .screen .corner { width: 18px; height: 18px; }
  .screen .corner.tl, .screen .corner.tr { top: 10px; }
  .screen .corner.bl, .screen .corner.br { bottom: 10px; }
  .screen .corner.tl, .screen .corner.bl { left: 10px; }
  .screen .corner.tr, .screen .corner.br { right: 10px; }
  .slate .seal { margin-bottom: 6px; }
  .slate-s { display: none; }
  .bigplay { width: 72px; height: 72px; }
  .bigplay .i { width: 28px; height: 28px; }
  .form { padding: 20px; border-radius: 18px; }
  .row2 { grid-template-columns: 1fr; }
  .types span { font-size: 14px; padding: 0 12px; }
  .mailcard { flex-wrap: wrap; }
  .mv { white-space: normal; font-size: 15.5px; }
  .live { position: static; margin-bottom: 10px; }
  .foot-in { grid-template-columns: 1fr; grid-template-areas: "brand" "tag" "links" "copy"; row-gap: 14px; }
}
@media (max-width: 420px) {
  .nav-end .btn span { display: none; }
  .nav-end .btn { width: 42px; padding: 0; }
  .types { grid-template-columns: 1fr; }
}
