/* ===== الألوان: أسود، أحمر، كحلي ===== */
:root {
  --black: #06070b;
  --navy: #0f1d4a;
  --navy-2: #16296a;
  --navy-3: #0a1433;
  --red: #e8202a;
  --red-2: #ff4a52;
  --white: #f3f4f8;
  --soft: #c7cddd;
  --mute: #9aa3bb;
  --line: #1c2542;
  color-scheme: dark;
}

/* ===== الأساس ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--black); color: var(--white);
  font-family: "IBM Plex Sans Arabic", system-ui, sans-serif;
  font-size: 18px; line-height: 1.75; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.h { font-family: "Alexandria", sans-serif; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: -999px; }
.skip:focus { inset-inline-start: 16px; top: 16px; z-index: 99; background: var(--white); color: var(--black); padding: 8px 14px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ===== الشريط العلوي ===== */
.nav { position: sticky; top: 0; z-index: 20; transition: background .3s, border-color .3s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: rgba(6, 7, 11, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: var(--line); }
.nav .wrap { display: flex; justify-content: space-between; align-items: center; height: 72px; }
.logo { font-family: "Alexandria", sans-serif; font-weight: 800; font-size: 22px; }
.logo b { color: var(--red); }
.nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.nav ul a { font-size: 16px; color: var(--mute); transition: color .2s; }
.nav ul a:hover { color: var(--white); }

/* ===== البداية السينمائية ===== */
.hero { position: relative; min-height: min(760px, 92vh); display: flex; align-items: center; overflow: hidden; margin-top: -72px; }
.hero-photo { position: absolute; inset-block: 0; inset-inline-end: 0; width: 58%; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; filter: grayscale(1) contrast(1.12) brightness(.92); }
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to right, transparent 35%, var(--black) 98%),
    linear-gradient(to top, var(--black), transparent 35%),
    linear-gradient(to bottom, var(--black), transparent 22%),
    linear-gradient(135deg, rgba(232, 32, 42, .5), transparent 52%);
}
.hero .wrap { position: relative; z-index: 2; }
.hero-text { max-width: 580px; padding: 120px 0 80px; }
.kicker { color: var(--red); font-weight: 700; font-size: 15px; letter-spacing: .3px; margin: 0 0 16px; }
.hero h1 { font-family: "Alexandria", sans-serif; font-size: clamp(60px, 8.6vw, 118px); line-height: 1.05; margin: 0 0 24px; font-weight: 800; letter-spacing: -1.5px; }
.hero h1 b { color: var(--red); }
.hero .sub { font-size: clamp(19px, 1.8vw, 22px); color: var(--soft); max-width: 30ch; margin: 0 0 36px; }
.facts { display: flex; gap: 36px; flex-wrap: wrap; color: var(--mute); font-size: 15px; margin-bottom: 40px; }
.facts b { display: block; color: var(--white); font-family: "Alexandria", sans-serif; font-size: 28px; line-height: 1.3; }
.btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 26px; border-radius: 999px; font-weight: 700; font-size: 16px; transition: transform .2s, background .2s; }
.btn:hover { transform: translateY(-2px); }
.btn.red { background: var(--red); color: #fff; box-shadow: 0 12px 30px -12px rgba(232, 32, 42, .8); }
.btn.line { border: 1.5px solid rgba(243, 244, 248, .25); }
.btn.line:hover { background: rgba(243, 244, 248, .08); }

/* ===== شريط القصة ===== */
.story { background: var(--navy-3); border-block: 1px solid var(--line); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; margin: 0 auto; padding: 0; }
.steps li { padding: 44px 26px; border-inline-start: 1px solid var(--line); position: relative; }
.steps li:first-child { border-inline-start: 0; }
.steps li::before { content: ""; position: absolute; top: -1px; inset-inline: 26px; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: right; transition: transform .6s; }
.steps li.in::before { transform: scaleX(1); }
.steps .y { font-family: "Alexandria", sans-serif; font-size: 40px; font-weight: 800; color: var(--red); line-height: 1.2; display: block; }
.steps h3 { margin: 10px 0 4px; font-size: 20px; }
.steps p { margin: 0; color: var(--mute); font-size: 15px; line-height: 1.65; }

/* ===== عناوين الأقسام ===== */
section.block { padding: clamp(80px, 11vw, 140px) 0 0; }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.sec-head h2 { font-family: "Alexandria", sans-serif; font-size: clamp(38px, 5vw, 60px); line-height: 1.15; margin: 0; font-weight: 800; }
.sec-head h2 b { color: var(--red); }
.sec-head p { color: var(--mute); margin: 0; max-width: 40ch; }
.label { color: var(--red); font-weight: 700; font-size: 15px; display: block; margin-bottom: 10px; }

/* ===== بنفسي ===== */
.solo { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.solo .lead { font-family: "Alexandria", sans-serif; font-weight: 700; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.35; margin: 0; }
.solo .lead b { color: var(--red); }
.solo .txt p { color: var(--soft); margin: 0 0 18px; font-size: 19px; }
.roles { list-style: none; margin: 32px 0 0; padding: 0; counter-reset: r; }
.roles li { display: grid; grid-template-columns: 52px 1fr; align-items: baseline; padding: 16px 0; border-top: 1px solid var(--line); counter-increment: r; }
.roles li:last-child { border-bottom: 1px solid var(--line); }
.roles li::before { content: "٠" counter(r, arabic-indic); font-family: "Alexandria", sans-serif; color: var(--red); font-weight: 700; font-size: 15px; }
.roles b { font-size: 19px; }
.roles span { color: var(--mute); font-size: 15px; display: block; }

/* ===== التطبيقات ===== */
.app-row {
  display: grid; grid-template-columns: 72px 1fr auto auto 44px; gap: 24px; align-items: center;
  padding: 24px 16px; border-top: 1px solid var(--line); border-radius: 4px;
  transition: background .25s;
}
.apps-list .app-row:last-child { border-bottom: 1px solid var(--line); }
.app-row:hover { background: linear-gradient(to left, rgba(15, 29, 74, .7), transparent); }
.app-row img { width: 72px; height: 72px; border-radius: 18px; }
.app-row h3 { margin: 0; font-family: "Alexandria", sans-serif; font-size: 24px; }
.app-row p { margin: 0; color: var(--mute); font-size: 16px; }
.app-row .rt { font-size: 15px; color: var(--soft); white-space: nowrap; }
.app-row .rt span { color: #ffc940; }
.app-row .rt small { color: var(--mute); display: block; font-size: 13px; }
.app-row .yr { color: var(--mute); font-family: "Alexandria", sans-serif; font-size: 18px; }
.app-row .arr { width: 44px; height: 44px; border-radius: 50%; background: var(--red); display: grid; place-items: center; transition: transform .25s; }
.app-row .arr svg { width: 18px; height: 18px; }
.app-row:hover .arr { transform: translateX(-4px); }

/* ===== الشاشات ===== */
.screens { display: flex; gap: 18px; overflow-x: auto; padding: 8px 16px 24px; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.screens::before, .screens::after { content: ""; flex: 0 0 max(0px, (100vw - 1180px) / 2 - 16px); }
.phone { flex: 0 0 auto; width: 220px; border-radius: 34px; padding: 7px; background: #0b0d14; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9), inset 0 0 0 1.5px #2a3150; scroll-snap-align: start; }
.phone img { border-radius: 28px; aspect-ratio: 9 / 19.5; object-fit: cover; object-position: top; width: 100%; }
.screens-note { color: var(--mute); font-size: 14px; text-align: center; margin: 4px 0 0; }

/* ===== التواصل ===== */
.contact {
  margin-top: clamp(80px, 11vw, 140px);
  background: radial-gradient(60% 90% at 15% 100%, rgba(232, 32, 42, .25), transparent 60%), linear-gradient(160deg, var(--navy-2), var(--navy));
  border-radius: 36px; padding: clamp(36px, 6vw, 80px);
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px;
}
.contact h2 { font-family: "Alexandria", sans-serif; font-weight: 800; font-size: clamp(36px, 5vw, 58px); line-height: 1.15; margin: 0 0 14px; }
.contact h2 b { color: var(--red-2); }
.contact > div > p { color: var(--soft); margin: 0 0 28px; }
.socials { display: flex; gap: 12px; flex-wrap: wrap; }
.socials a { display: inline-flex; align-items: center; gap: 10px; border: 1.5px solid rgba(243, 244, 248, .25); padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 16px; transition: background .2s, color .2s; }
.socials a:hover { background: var(--white); color: var(--navy); }
.socials svg { width: 18px; height: 18px; }
.news { background: rgba(6, 7, 11, .35); border: 1px solid rgba(243, 244, 248, .1); border-radius: 24px; padding: 28px; align-self: start; }
.news h3 { font-family: "Alexandria", sans-serif; font-size: 23px; margin: 0 0 6px; }
.news p { font-size: 15px; color: var(--soft); margin: 0 0 18px; }
.news .row { display: flex; gap: 8px; }
.news input[type=email] { flex: 1; min-width: 0; padding: 14px 18px; border-radius: 999px; font: inherit; font-size: 16px; border: 1.5px solid rgba(243, 244, 248, .2); background: transparent; color: var(--white); text-align: left; }
.news input:focus { outline: none; border-color: var(--red-2); }
.news input::placeholder { color: rgba(243, 244, 248, .4); }
.news button { border: 0; border-radius: 999px; padding: 0 22px; font: inherit; font-weight: 700; font-size: 16px; background: var(--red); color: #fff; cursor: pointer; white-space: nowrap; }
.news small { display: block; font-size: 13px; color: var(--mute); margin-top: 12px; line-height: 1.6; }
.news small a { text-decoration: underline; }
.hp { position: absolute; inset-inline-start: -5000px; }

/* ===== التذييل ===== */
footer { padding: 48px 0 40px; color: var(--mute); font-size: 15px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer nav { display: flex; gap: 24px; }
footer a:hover { color: var(--white); }

/* ===== الظهور ===== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.hero .reveal { transition-duration: 1.1s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .steps li::before { transform: none; transition: none; }
}

/* ===== الشاشات الصغيرة ===== */
@media (max-width: 900px) {
  .hero { flex-direction: column; align-items: stretch; min-height: 0; }
  .hero-photo { position: relative; width: 100%; height: 440px; }
  .hero-photo::after { background: linear-gradient(to top, var(--black), transparent 50%), linear-gradient(to bottom, var(--black), transparent 25%), linear-gradient(135deg, rgba(232, 32, 42, .45), transparent 52%); }
  .hero-text { padding: 0 0 56px; margin-top: -90px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li:nth-child(3) { border-inline-start: 0; }
  .steps li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .solo, .contact { grid-template-columns: 1fr; }
  .app-row { grid-template-columns: 56px 1fr 40px; gap: 16px; padding: 20px 4px; }
  .app-row img { width: 56px; height: 56px; border-radius: 14px; }
  .app-row .yr { display: none; }
  .app-row .rt { grid-column: 2; grid-row: 2; margin-top: -8px; }
  .app-row .arr { grid-column: 3; grid-row: 1 / span 2; width: 40px; height: 40px; }
  .phone { width: 180px; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .nav ul { gap: 18px; }
  .nav ul li.hide-sm { display: none; }
  .hero-photo { height: 380px; }
  .steps li { padding: 30px 18px; }
  .steps .y { font-size: 32px; }
  .facts { gap: 24px; }
  .contact { border-radius: 28px; }
  .news .row { flex-direction: column; }
  .news button { padding: 14px; }
}

/* ===== الصفحات القانونية ===== */
.legal { padding: 40px 0 40px; }
.legal .wrap { width: min(780px, 100% - 32px); }
.legal .crumb { color: var(--mute); font-size: 15px; margin-bottom: 14px; }
.legal h1 { font-family: "Alexandria", sans-serif; font-weight: 800; font-size: clamp(40px, 7vw, 64px); line-height: 1.15; margin: 0 0 12px; }
.legal .intro { font-size: 20px; color: var(--soft); margin: 0 0 12px; }
.legal .meta { font-size: 14px; color: var(--mute); margin: 0 0 32px; display: flex; gap: 18px; flex-wrap: wrap; }
.legal .toc { background: var(--navy-3); border: 1px solid var(--line); border-radius: 20px; padding: 20px 24px; margin-bottom: 48px; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.legal .toc a { font-size: 15px; padding: 6px 14px; border-radius: 999px; background: rgba(243, 244, 248, .06); }
.legal .toc a:hover { background: var(--red); }
.legal section { padding-top: 12px; margin-bottom: 36px; scroll-margin-top: 84px; }
.legal h2 { font-family: "Alexandria", sans-serif; font-size: 26px; margin: 0 0 14px; }
.legal h3 { font-size: 19px; margin: 22px 0 6px; }
.legal p, .legal li { color: var(--soft); }
.legal p a, .legal li a { color: var(--red-2); text-decoration: underline; }
.legal strong { color: var(--white); }
