/* urflix.app — صفحة تحميل التطبيق.
 *
 * ثابتة بالكامل: لا بناء ولا إطار عمل. ملف واحد للأنماط حتى تبقى الصفحة
 * قابلة للقراءة والتعديل بعد سنة.
 *
 * ملاحظتان في الكتابة العربية تُحترمان في كل هذا الملف:
 *   - لا `letter-spacing` على نصٍّ عربي أبداً: الحروف تتصل، وتفريقها يكسر
 *     الكلمة بصرياً. التفريق للاتينية وحدها (الشعار، العناوين الصغيرة).
 *   - الأرقام والإصدارات تُغلّف بـ dir="ltr" حتى لا تنقلب 1.0.28.
 */

:root {
  --ink: #07070a;           /* الخلفية: أسود مائل للأزرق لا أسود تام */
  --raise: #0f0f16;         /* سطح أعلى قليلاً */
  --line: rgba(242, 239, 233, 0.09);
  --text: #f2efe9;          /* أبيض دافئ: الأبيض التام يُتعب العين على أسود */
  --muted: #8b8b97;
  --brand: #d81f34;         /* نفس أحمر التطبيق */
  --brand-dim: #a3121f;
  --radius: 14px;
  --gap: clamp(56px, 9vw, 112px);   /* إيقاع رأسي يتنفّس مع عرض الشاشة */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  font-size: 16.5px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* حُبيبات خفيفة فوق كل شيء: تكسر نظافة التدرّجات الرقمية. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: clamp(18px, 5vw, 32px);
}

/* ─────────── الشعار ─────────── */

/* شعار التطبيق نفسه (apps/mobile/assets/logo.png) — علامة واحدة في
 * التطبيق والموقع، لا نسخة مرسومة من جديد تختلف عنها بشعرة. */
.logo { display: inline-flex; text-decoration: none; }
.logo img {
  height: 24px;
  width: auto;
  display: block;
}
footer .logo img { height: 19px; opacity: 0.75; }

/* ─────────── الترويسة ─────────── */

header {
  position: sticky;
  top: 0;
  z-index: 10;
  transition: background 0.25s, border-color 0.25s;
  border-bottom: 1px solid transparent;
}
header.stuck {
  background: rgba(7, 7, 10, 0.82);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
}
header nav { display: flex; align-items: center; gap: 26px; }
header nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14.5px;
  transition: color 0.15s;
}
header nav a:hover { color: var(--text); }
header .nav-cta {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 7px 15px;
  color: var(--text);
}
header .nav-cta:hover { border-color: rgba(242, 239, 233, 0.28); }

/* ─────────── الواجهة ─────────── */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  padding-block: clamp(40px, 7vw, 86px) var(--gap);
}

/* ضوء أحمر واحد خلف الهاتف، مقصوص لا دائرة متوهّجة في المنتصف */
.hero::after {
  content: "";
  position: absolute;
  inset-inline-start: -8%;
  top: 4%;
  width: 46%;
  height: 78%;
  background: radial-gradient(45% 50% at 50% 50%, rgba(216, 31, 52, 0.26), transparent 70%);
  filter: blur(10px);
  z-index: -1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 13px 5px 11px;
  margin-bottom: 22px;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #35c759;
  box-shadow: 0 0 0 3px rgba(53, 199, 89, 0.16);
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(30px, 5.1vw, 56px);
  font-weight: 700;
  line-height: 1.18;
}
h1 .thin { font-weight: 300; color: #cfccc6; }

.lede {
  margin: 0 0 32px;
  color: var(--muted);
  font-size: clamp(15.5px, 1.5vw, 18px);
  max-width: 44ch;
}

/* زر التحميل: الشيء الوحيد الممتلئ بالأحمر في الصفحة */
.cta-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 17px;
  padding: 15px 26px;
  border-radius: 12px;
  box-shadow: 0 10px 30px -12px rgba(216, 31, 52, 0.75);
  transition: transform 0.12s, background 0.15s;
}
.btn:hover { background: #e62238; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 19px; height: 19px; }
.btn .size { font-weight: 400; opacity: 0.72; font-size: 14.5px; }

.btn-text {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}
.btn-text:hover { color: var(--text); border-bottom-color: currentColor; }

/* شريط الحقائق: أرقام حقيقية بدل كلام */
.facts {
  display: flex;
  flex-wrap: wrap;
  margin-top: 34px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  gap: 0;
}
.facts div {
  padding-inline: 20px;
  border-inline-start: 1px solid var(--line);
}
.facts div:first-child { padding-inline-start: 0; border-inline-start: 0; }
.facts dt {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 2px;
}
.facts dd {
  margin: 0;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

/* ─────────── الهاتف ─────────── */

/* هاتف مرسوم بالـ CSS لا لقطة حقيقية: الصفحة عامة، ولا داعي أن تعرض
 * عناوين المكتبة وملصقاتها لمن لم يفتح التطبيق بعد. */
.phone {
  position: relative;
  width: min(300px, 76vw);
  margin-inline: auto;
  aspect-ratio: 9 / 19;
  border-radius: 40px;
  padding: 9px;
  background: linear-gradient(160deg, #26262f, #0b0b10 60%);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.06) inset,
    0 50px 90px -30px rgba(0, 0, 0, 0.9);
  transform: rotate(-3.2deg);
}
.phone .screen {
  height: 100%;
  border-radius: 32px;
  overflow: hidden;
  background: #08080c;
  display: flex;
  flex-direction: column;
}
/* الحافة العلوية: ساعة وشقّ الكاميرا */
.phone .notch {
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  font-size: 9.5px;
  color: #cfccc6;
  position: relative;
}
.phone .notch::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 7px;
  margin-inline: auto;
  width: 48px; height: 13px;
  border-radius: 999px;
  background: #000;
}
.phone .notch .bars { display: inline-flex; gap: 2px; align-items: flex-end; }
.phone .notch .bars i {
  width: 2.5px;
  background: #cfccc6;
  border-radius: 1px;
}
.phone .notch .bars i:nth-child(1) { height: 4px; }
.phone .notch .bars i:nth-child(2) { height: 6px; }
.phone .notch .bars i:nth-child(3) { height: 8px; }
.phone .poster {
  height: 41%;
  position: relative;
  background:
    radial-gradient(90% 70% at 20% 15%, rgba(216, 31, 52, 0.5), transparent 60%),
    linear-gradient(200deg, #3a1a20, #101016 70%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
}
.phone .poster b { font-size: 15px; line-height: 1.35; }
.phone .poster .meta { font-size: 9.5px; color: #b9b6b0; }
.phone .poster .play {
  align-self: flex-start;
  margin-bottom: 9px;
  background: #fff;
  color: #000;
  font-size: 9px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 6px;
}
.phone .rail { padding: 11px 12px 0; }
.phone .rail p {
  margin: 0 0 7px;
  font-size: 9.5px;
  color: #b9b6b0;
}
.phone .tiles { display: flex; gap: 6px; }
.phone .tiles i {
  flex: 1;
  aspect-ratio: 2 / 3;
  border-radius: 5px;
  background: linear-gradient(170deg, #22222c, #15151c);
}
.phone .tiles i:nth-child(2) { background: linear-gradient(170deg, #2b1c20, #16161d); }
.phone .tabs {
  margin-top: auto;
  display: flex;
  justify-content: space-around;
  padding: 9px 0 13px;
  border-top: 1px solid rgba(242, 239, 233, 0.07);
}
.phone .tabs i {
  width: 15px; height: 15px;
  border-radius: 4px;
  background: #2c2c36;
}
.phone .tabs i:first-child { background: var(--brand); }

/* ─────────── الأقسام ─────────── */

section { padding-block: var(--gap); border-top: 1px solid var(--line); }

.label {
  font-family: "Archivo", sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 14px;
}
h2 {
  margin: 0 0 10px;
  font-size: clamp(23px, 3vw, 33px);
  font-weight: 700;
  line-height: 1.3;
}
.sub { margin: 0; color: var(--muted); max-width: 56ch; }
.head { margin-bottom: clamp(30px, 4vw, 52px); }

/* خطوات التثبيت: قائمة تحريرية بأرقام كبيرة، لا بطاقات متساوية */
.steps { display: grid; gap: 0; }
.step {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: clamp(14px, 3vw, 34px);
  padding-block: 26px;
  border-top: 1px solid var(--line);
  align-items: start;
}
.step:first-child { border-top: 0; padding-top: 0; }
.step .n {
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 300;
  color: #51515f;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}
.step h3 { margin: 0 0 6px; font-size: 18px; font-weight: 600; }
.step p { margin: 0; color: var(--muted); max-width: 62ch; }
.step .hint {
  margin-top: 10px;
  font-size: 14px;
  color: #6f6f7b;
  border-inline-start: 2px solid var(--line);
  padding-inline-start: 12px;
}

/* التلفاز */
.tv-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(22px, 4vw, 48px);
  align-items: center;
}
.tv {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(200deg, #14141b, #0a0a0f);
  aspect-ratio: 16 / 9;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  position: relative;
  box-shadow: 0 40px 70px -40px #000;
}
.tv::after {
  content: "";
  position: absolute;
  inset-inline: 38%;
  bottom: -9px;
  height: 9px;
  border-radius: 0 0 6px 6px;
  background: #1a1a22;
}
.tv .code {
  position: absolute;
  inset-inline-end: 16px;
  top: 16px;
  font-family: "Archivo", monospace;
  font-size: 19px;
  letter-spacing: 0.22em;
  color: var(--text);
  border: 1px dashed var(--line);
  padding: 6px 12px;
  border-radius: 8px;
}
/* لمعة البانر في أعلى شاشة التلفاز: تجعل الإطار يُقرأ كواجهة لا كمستطيل */
.tv::before {
  content: "";
  position: absolute;
  inset: 0 0 42% 0;
  border-radius: 10px 10px 0 0;
  background:
    radial-gradient(70% 90% at 78% 10%, rgba(216, 31, 52, 0.22), transparent 62%),
    linear-gradient(190deg, #1b1119, transparent 70%);
}
.tv > * { position: relative; }
.tv .tiles { display: flex; gap: 9px; }
.tv .tiles i {
  flex: 1;
  aspect-ratio: 16 / 10;
  border-radius: 5px;
  background: #1e1e27;
}
.tv .tiles i:first-child { outline: 2px solid var(--brand); outline-offset: 2px; }
.tv p { margin: 0; font-size: 11.5px; color: #b9b6b0; }

.notes { display: grid; gap: 22px; }
/* شبكة الملاحظات في قسم «ماذا يوجد في التطبيق» */
.grid-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 38px) clamp(24px, 4vw, 48px);
}
.note { border-inline-start: 2px solid var(--brand-dim); padding-inline-start: 16px; }
.note h3 { margin: 0 0 5px; font-size: 17px; font-weight: 600; }
.note p { margin: 0; color: var(--muted); font-size: 15px; }

/* الأسئلة */
.faq { max-width: 820px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 19px 0;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
/* سهم لأسفل عند الإغلاق ولأعلى عند الفتح. الحدود هنا فيزيائية (right/bottom)
 * لا منطقية: في الاتجاه من اليمين لليسار تنقلب المنطقية فيصير السهم جانبياً. */
.faq summary::after {
  content: "";
  flex: none;
  width: 9px; height: 9px;
  margin-bottom: 4px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-bottom: 0; }
.faq details p {
  margin: 0 0 20px;
  color: var(--muted);
  max-width: 68ch;
}

/* البصمة */
.hash {
  margin-top: 28px;
  background: var(--raise);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.hash .k { font-size: 13px; color: var(--muted); }
.hash code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 12.5px;
  color: #cfccc6;
  word-break: break-all;
}
.hash button {
  margin-inline-start: auto;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 7px 14px;
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
}
.hash button:hover { border-color: rgba(242, 239, 233, 0.3); }

/* ─────────── صفحتا الخصوصية والشروط ─────────── */

.doc { max-width: 74ch; padding-block: clamp(40px, 6vw, 72px) var(--gap); }
.doc h1 {
  font-size: clamp(27px, 4vw, 40px);
  margin: 0 0 10px;
}
.doc .updated { color: var(--muted); font-size: 14px; margin: 0 0 clamp(28px, 4vw, 46px); }
.doc h2 {
  font-size: 20px;
  margin: 40px 0 10px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.doc h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.doc p { margin: 0 0 14px; color: #cfccc6; }
.doc ul { margin: 0 0 16px; padding-inline-start: 20px; color: #cfccc6; }
.doc li { margin-bottom: 8px; }
.doc li::marker { color: var(--brand); }
.doc strong { color: var(--text); font-weight: 600; }
.doc a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--brand); }
.doc a:hover { color: var(--brand); }
/* إخلاء المسؤولية أعلى صفحة حقوق النشر: الصندوق الوحيد الكهرماني في
 * الموقع، فلا يُقرأ كفقرة عادية ولا يُخلط بالأحمر الذي للعلامة. */
.disclaimer {
  border: 1px solid rgba(245, 166, 35, 0.26);
  background: rgba(245, 166, 35, 0.05);
  border-radius: 16px;
  padding: clamp(22px, 3vw, 30px);
  margin: 0 0 clamp(30px, 4vw, 46px);
  text-align: center;
}
.disclaimer svg { width: 34px; height: 34px; color: #f5a623; }
.doc .disclaimer h2 {
  border-top: 0;
  padding-top: 0;
  margin: 12px 0 16px;
  font-size: 19px;
}
.doc .disclaimer p { color: var(--muted); margin: 0 0 12px; }
.doc .disclaimer p:last-child { margin-bottom: 0; }

.doc .callout {
  border-inline-start: 2px solid var(--brand-dim);
  padding: 2px 16px;
  margin: 0 0 16px;
}

/* الشريط الختامي */
.closing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  background: var(--raise);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(24px, 4vw, 40px);
}
.closing h2 { margin: 0; }
.closing p { margin: 6px 0 0; color: var(--muted); }

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

/* ─────────── الهاتف ─────────── */

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; }
  /* على الهاتف يأتي العنوان وزر التحميل أولاً، والصورة بعدهما: الزائر جاء
   * ليحمّل، فلا يُسأل أن يمرّر شاشة كاملة قبل أن يرى الزر. */
  .hero .phone { transform: rotate(-2deg) scale(0.95); margin-top: 14px; }
  /* بلا translate هنا: الإزاحة فيزيائية دائماً، ففي اتجاه RTL تدفع الضوء
   * خارج الحافة اليسرى وتفتح تمريراً أفقياً يُزيح الصفحة كلها. */
  .hero::after { inset-inline: 5%; width: auto; top: -2%; height: 46%; }
  header nav a:not(.nav-cta) { display: none; }
  .tv-grid { grid-template-columns: 1fr; }
  .grid-notes { grid-template-columns: 1fr; }
  .step { grid-template-columns: 46px 1fr; }
  .facts div { padding-inline: 14px; }
  .facts div:first-child { padding-inline-start: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover { transform: none; }
}
