/* site.css — هوية موقع الأستاذ معاذ دراغمة (SIM3). داكن سينمائي كالفيديوهات، ذهبي للعلامة،
   وألوان الفيزياء (أحمر/أزرق/أخضر/برتقالي) للمحتوى العلمي وحده. الهاتف أولاً، RTL أولاً. */
:root {
  --bg: #050b1f; --bg-2: #081232; --ink: #eef3ff; --ink-2: #b9c4ea; --ink-3: #8592bd;
  --line: rgba(255,255,255,.12); --glass: rgba(14,22,58,.62); --glass-2: rgba(10,16,44,.86);
  --brand: #ffcb45; --brand-ink: #1a1203; --brand-2: #5b8cff;
  --red: #ff5a6e; --blue: #5b8cff; --green: #3ddc84; --orange: #ff8a3d;
  --r: 22px; --r-lg: 30px; --wrap: 1180px;
  --shadow: 0 24px 70px rgba(0,0,0,.45);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.7;
  -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 8px; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* خلفية حيّة: شبكة طاولة هوائية وغبار (لوحة واحدة ثابتة خلف كل شيء) */
#bgfx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; }
.bg-glow { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(900px 600px at 80% -10%, rgba(91,140,255,.22), transparent 70%),
              radial-gradient(700px 500px at 0% 30%, rgba(124,92,252,.14), transparent 70%),
              radial-gradient(800px 600px at 50% 110%, rgba(255,203,69,.07), transparent 70%); }

/* ── الأزرار ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: 999px;
  font: 800 17px/1 var(--font); border: 0; cursor: pointer; transition: transform .18s, box-shadow .18s, background .18s; white-space: nowrap; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-gold { background: linear-gradient(135deg, #ffe08a, var(--brand) 55%, #f5a524); color: var(--brand-ink);
  box-shadow: 0 10px 34px rgba(255,203,69,.35), inset 0 1px 0 rgba(255,255,255,.6); }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 16px 44px rgba(255,203,69,.45), inset 0 1px 0 rgba(255,255,255,.6); }
.btn-ghost { background: rgba(255,255,255,.06); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { background: rgba(255,255,255,.1); transform: translateY(-2px); }
.btn-wa { background: #1fae5b; color: #fff; box-shadow: 0 10px 30px rgba(31,174,91,.35); }
.btn-wa:hover { transform: translateY(-2px); }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 15px; }
.btn[aria-disabled="true"] { opacity: .45; filter: grayscale(.6); cursor: not-allowed; box-shadow: none; transform: none; }

/* ── الشريط العلوي ── */
.top { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(5,11,31,.88), rgba(5,11,31,.6)); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 46px; height: 46px; flex: none; }
.brand-name { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name b { font-size: 19px; font-weight: 900; }
.brand-name small { font-size: 12.5px; color: var(--ink-3); font-weight: 700; }
.nav { display: none; gap: 4px; }
.nav a { padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 15.5px; color: var(--ink-2); }
.nav a:hover { color: var(--ink); background: rgba(255,255,255,.06); }
@media (min-width: 768px) { .nav { display: flex; } }
@media (min-width: 768px) and (max-width: 1060px) { .nav a { padding: 8px 9px; font-size: 14.5px; } .brand-name small { display: none; } }
@media (max-width: 420px) { .brand-name small { display: none; } }

/* ── البطل ── */
.hero { position: relative; padding: 40px 0 70px; overflow-x: clip; }
.hero .wrap { display: grid; gap: 40px; align-items: center; }
@media (min-width: 980px) { .hero { padding: 70px 0 100px; } .hero .wrap { grid-template-columns: 1.15fr .85fr; gap: 56px; } }
.who { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; font-weight: 800; color: var(--ink-2); }
.who b { color: var(--ink); }
.avatar { width: 48px; height: 48px; border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden; color: var(--ink-3);
  background: linear-gradient(160deg, #1b2560, #0a0f2a); box-shadow: 0 0 0 2px var(--brand), 0 0 0 5px rgba(255,203,69,.18); }
.avatar svg { width: 60%; height: 60%; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.kicker { display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px; border-radius: 999px; font-weight: 800; font-size: 14.5px;
  color: var(--brand); background: rgba(255,203,69,.1); border: 1px solid rgba(255,203,69,.42); }
.kicker i { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 12px var(--brand); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.hero h1 { margin: 22px 0 0; font-size: clamp(36px, 8vw, 56px); line-height: 1.2; font-weight: 900; letter-spacing: 0; text-wrap: balance; }
.hero h1 em { font-style: normal; background: linear-gradient(120deg, #ffe08a, var(--brand) 40%, #ff9f43); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { margin: 20px 0 0; font-size: clamp(17px, 2.2vw, 20.5px); color: var(--ink-2); max-width: 36em; }
.hero .lead b { color: var(--ink); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 28px; color: var(--ink-3); font-weight: 700; font-size: 14.5px; }
.hero-tags span { display: inline-flex; align-items: center; gap: 8px; }
.hero-tags svg { width: 18px; height: 18px; color: var(--brand); }

/* الهاتف: فيديو س٨ يعمل داخله */
.phone-stage { position: relative; display: grid; place-items: center; padding: 10px 0 20px; }
.phone { position: relative; width: min(300px, 74vw); aspect-ratio: 9 / 19.2; border-radius: 46px; padding: 12px;
  background: linear-gradient(160deg, #2a3358, #0c1130 40%, #1d2448); box-shadow: 0 50px 100px rgba(0,0,0,.6), 0 0 0 1.5px rgba(255,255,255,.14), inset 0 0 0 1px rgba(255,255,255,.08);
  transform: rotate(-4deg); }
.phone video, .phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 36px; background: #050b1f; }
.phone::before { content: ''; position: absolute; top: 22px; left: 50%; width: 86px; height: 24px; margin-left: -43px; border-radius: 99px; background: #02040c; z-index: 2; }
.phone-glow { position: absolute; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(255,203,69,.25), transparent 65%); filter: blur(10px); z-index: -1; }
.float { position: absolute; padding: 10px 18px; border-radius: 18px; background: var(--glass-2); border: 1.5px solid var(--c, var(--line));
  box-shadow: var(--shadow); font-size: 22px; color: var(--c, #fff); animation: bob 6s ease-in-out infinite; white-space: nowrap; z-index: 3; }
.float small { display: block; font-family: var(--font); font-size: 12px; font-weight: 800; color: var(--ink-3); margin-bottom: 2px; }
.f1 { --c: var(--brand); top: 12%; inset-inline-start: -2%; }
.f2 { --c: var(--green); bottom: 22%; inset-inline-end: -4%; animation-delay: -2s; }
.f3 { --c: var(--orange); bottom: 4%; inset-inline-start: 4%; animation-delay: -4s; font-family: var(--font); font-weight: 900; font-size: 18px; }
@keyframes bob { 50% { transform: translateY(-12px); } }
@media (max-width: 420px) { .f1 { inset-inline-start: 0; } .f2 { inset-inline-end: 0; } }

/* ── الأقسام ── */
section { position: relative; }
.sec { padding: 80px 0; }
.sec-head { max-width: 760px; margin-bottom: 36px; }
.sec-head .eyebrow { color: var(--brand); font-weight: 900; font-size: 15px; }
.sec-head h2 { margin: 8px 0 0; font-size: clamp(30px, 5vw, 46px); line-height: 1.25; font-weight: 900; }
.sec-head p { margin: 12px 0 0; color: var(--ink-2); font-size: 18px; }

/* شريط القيم */
.values { display: grid; gap: 14px; grid-template-columns: 1fr; margin-top: -20px; }
@media (min-width: 720px) { .values { grid-template-columns: repeat(3, 1fr); } }
.value { display: flex; gap: 16px; align-items: flex-start; padding: 22px; border-radius: var(--r); background: var(--glass); border: 1px solid var(--line); }
.value .ic { width: 50px; height: 50px; flex: none; border-radius: 16px; display: grid; place-items: center; background: rgba(255,203,69,.12); color: var(--brand); }
.value .ic svg { width: 26px; height: 26px; }
.value h3 { margin: 0; font-size: 19px; font-weight: 900; }
.value p { margin: 4px 0 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.6; }

/* بطاقات المحتوى */
.grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid.g3 { grid-template-columns: repeat(3, 1fr); } }
.card { position: relative; border-radius: var(--r-lg); background: var(--glass); border: 1px solid var(--line); overflow: hidden;
  transition: transform .25s, border-color .25s, box-shadow .25s; }
.card:hover { transform: translateY(-4px); border-color: rgba(255,203,69,.4); box-shadow: var(--shadow); }
.vid-card { display: grid; grid-template-columns: 132px 1fr; gap: 0; }
.vid-card .thumb { position: relative; aspect-ratio: 9/16; background: #02040c; }
.vid-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.vid-card .thumb .play { position: absolute; inset: 0; display: grid; place-items: center; }
.vid-card .thumb .play span { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,203,69,.92); color: var(--brand-ink);
  box-shadow: 0 0 0 8px rgba(255,203,69,.18); }
.vid-card .thumb .play svg { width: 22px; height: 22px; margin-inline-start: -3px; }
.vid-card .body { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.chip { display: inline-flex; align-self: flex-start; padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; background: rgba(255,255,255,.07); color: var(--ink-2); }
.chip.free { background: rgba(255,203,69,.14); color: var(--brand); }
.chip.pro { background: rgba(255,203,69,.13); color: var(--brand); }
.vid-card h3 { margin: 0; font-size: 19px; font-weight: 900; line-height: 1.45; }
.vid-card p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.6; }
.vid-card .eqn { color: var(--brand); font-size: 18px; white-space: nowrap; }
@media (max-width: 560px) { .vid-card .eqn { display: none; } }
.card.soon.rv.in { opacity: .6; }
.grid.one { grid-template-columns: 1fr; max-width: 640px; }
.roadmap { padding: 22px 24px; }
.roadmap h3 { margin: 0; font-size: 20px; font-weight: 900; }
.roadmap > p { margin: 4px 0 12px; color: var(--ink-3); font-size: 15px; }
.roadmap ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: u; }
.roadmap li { counter-increment: u; display: grid; grid-template-columns: 34px 1fr; gap: 2px 12px; align-items: start; }
.roadmap li::before { content: counter(u, arabic-indic); grid-row: span 2; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(255,255,255,.06); color: var(--ink-2); font-weight: 900; }
.roadmap li:first-child::before { background: rgba(255,203,69,.16); color: var(--brand); }
.roadmap li b { font-size: 16px; }
.roadmap li span { color: var(--ink-3); font-size: 14px; line-height: 1.6; }
.roadmap em { font-style: normal; color: var(--brand); font-weight: 800; }
.tiktok { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 18px; padding: 16px 20px; border-radius: var(--r);
  background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--ink-2); font-size: 15.5px; }
.tiktok > svg { width: 26px; height: 26px; color: #fff; flex: none; }
.tiktok > span { flex: 1; min-width: 200px; }
.tiktok b { color: var(--ink); }
.card.soon { opacity: .62; }
.card.soon:hover { transform: none; border-color: var(--line); box-shadow: none; }
.soon-thumb { display: grid; place-items: center; color: var(--ink-3); background: repeating-linear-gradient(135deg, rgba(255,255,255,.03) 0 12px, transparent 12px 24px); }
.soon-thumb svg { width: 34px; height: 34px; }

/* المختبر */
.lab { display: grid; gap: 22px; align-items: stretch; }
@media (min-width: 980px) { .lab { grid-template-columns: 1.2fr .8fr; } }
.lab-stage { border-radius: var(--r-lg); background: rgba(3,7,22,.78); border: 1px solid var(--line); padding: 14px; box-shadow: var(--shadow); }
.lab-stage canvas { width: 100%; height: auto; display: block; }
.lab-panel { border-radius: var(--r-lg); background: var(--glass); border: 1px solid var(--line); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.lab-panel h3 { margin: 0; font-size: 22px; font-weight: 900; }
.lab-panel p { margin: 0; color: var(--ink-2); font-size: 15.5px; }
.slider { display: grid; gap: 8px; }
.slider label { display: flex; justify-content: space-between; align-items: baseline; font-weight: 800; }
.slider label .mx { color: var(--blue); font-size: 22px; }
.slider input { width: 100%; accent-color: var(--blue); direction: ltr; height: 30px; }
.readouts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ro { padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.ro small { display: block; color: var(--ink-3); font-weight: 800; font-size: 13px; }
.ro b { display: block; font-family: var(--math); font-weight: 400; font-size: clamp(20px, 5.4vw, 26px); white-space: nowrap; direction: ltr; text-align: right; unicode-bidi: isolate; }
.ro.gold b { color: var(--brand); }
.verdict { padding: 12px 16px; border-radius: 16px; font-weight: 900; text-align: center; font-size: 18px; transition: background .3s, color .3s; }
.verdict.inel { background: rgba(255,138,61,.14); color: var(--orange); box-shadow: inset 0 0 0 1.5px rgba(255,138,61,.5); }
.verdict.el { background: rgba(61,220,132,.14); color: var(--green); box-shadow: inset 0 0 0 1.5px rgba(61,220,132,.5); }
.lab-law { text-align: center; color: var(--ink-2); font-size: 17px; }

/* الملخصات */
.doc-card { padding: 22px; display: flex; gap: 16px; align-items: center; }
.doc-card .ic { width: 56px; height: 68px; flex: none; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(160deg, rgba(255,203,69,.2), rgba(255,203,69,.06)); color: var(--brand); border: 1px solid rgba(255,203,69,.35); }
.doc-card .ic svg { width: 28px; height: 28px; }
.doc-card h3 { margin: 0; font-size: 18px; font-weight: 900; }
.doc-card p { margin: 2px 0 0; color: var(--ink-3); font-size: 14.5px; }

/* الاشتراك */
.plans { display: grid; gap: 18px; grid-template-columns: 1fr; align-items: stretch; }
@media (min-width: 640px) and (max-width: 899px) { .plans { grid-template-columns: 1fr 1fr; } .plan.best { grid-column: 1 / -1; order: -1; } }
.plan li .chip { margin-inline-start: 6px; font-size: 12px; padding: 1px 8px; }
@media (min-width: 900px) { .plans { grid-template-columns: repeat(3, 1fr); } }
.plan { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 28px 24px; border-radius: var(--r-lg); background: var(--glass); border: 1px solid var(--line); }
.plan.best { background: linear-gradient(180deg, rgba(255,203,69,.12), rgba(14,22,58,.7) 40%); border: 2px solid rgba(255,203,69,.6); box-shadow: 0 0 60px rgba(255,203,69,.15); }
.plan .badge { position: absolute; top: -14px; inset-inline-start: 24px; padding: 4px 14px; border-radius: 999px; background: var(--brand); color: var(--brand-ink); font-weight: 900; font-size: 13px; }
.plan h3 { margin: 0; font-size: 22px; font-weight: 900; }
.plan .price { font-size: 34px; font-weight: 900; }
.plan .price small { font-size: 15px; color: var(--ink-3); font-weight: 700; }
.plan .price.tbd { font-size: 17px; color: var(--ink-3); font-weight: 800; }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; flex: 1; }
.plan li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); font-size: 15.5px; }
.plan li svg { width: 20px; height: 20px; flex: none; color: var(--brand); margin-top: 3px; }
.plan .btn { width: 100%; }
.steps { display: grid; gap: 14px; grid-template-columns: 1fr; margin-top: 30px; counter-reset: st; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { padding: 20px; border-radius: var(--r); background: rgba(255,255,255,.035); border: 1px dashed rgba(255,255,255,.18); counter-increment: st; }
.step::before { content: counter(st, arabic-indic); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; margin-bottom: 10px;
  background: rgba(255,203,69,.14); color: var(--brand); font-weight: 900; font-size: 20px; }
.step h4 { margin: 0; font-size: 17px; font-weight: 900; }
.step p { margin: 4px 0 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.6; }
.pay-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pay-row span { padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.07); font-size: 13px; font-weight: 800; color: var(--ink-2); }

/* عنّي */
.about { display: grid; gap: 30px; align-items: center; }
@media (min-width: 900px) { .about { grid-template-columns: .8fr 1.2fr; } }
.portrait { position: relative; aspect-ratio: 4/5; max-width: 380px; width: 100%; margin-inline: auto; border-radius: 36px; overflow: hidden;
  background: linear-gradient(160deg, #18214a, #0a0f2a); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-3); box-shadow: var(--shadow); }
.portrait svg { width: 40%; height: 40%; opacity: .5; }
.portrait .ph { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; font-weight: 800; font-size: 14px; }
.placeholder { color: var(--brand); background: rgba(255,203,69,.08); border: 1px dashed rgba(255,203,69,.5); border-radius: 10px; padding: 1px 8px; font-weight: 800; font-size: .92em; }

/* الحجز */
.book { border-radius: 36px; padding: 44px 26px; text-align: center; overflow: hidden; position: relative;
  background: radial-gradient(700px 300px at 50% 0%, rgba(255,203,69,.22), transparent 70%), linear-gradient(160deg, #141c48, #0a0f2c); border: 1px solid rgba(255,203,69,.35); }
.book h2 { margin: 0; font-size: clamp(30px, 5vw, 44px); font-weight: 900; line-height: 1.3; }
.book p { margin: 12px auto 0; max-width: 34em; color: var(--ink-2); font-size: 18px; }
.book .cta-row { justify-content: center; }

/* التذييل */
footer { padding: 40px 0 50px; border-top: 1px solid var(--line); margin-top: 60px; color: var(--ink-3); font-size: 14.5px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
.made { display: inline-flex; align-items: center; gap: 10px; direction: ltr; }
.made img { height: 26px; }

/* شريط الحجز الثابت على الهاتف */
.mbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; display: flex; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(5,11,31,.92); backdrop-filter: blur(12px); border-top: 1px solid var(--line); transform: translateY(110%); transition: transform .3s; }
.mbar.on { transform: none; }
.mbar .btn { flex: 1; min-height: 48px; }
@media (min-width: 980px) { .mbar { display: none; } }
@media (max-width: 979px) { body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); } }

/* ظهورٌ عند التمرير */
.rv { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.rv.in { opacity: 1; transform: none; }
.hero .rv { transition-duration: .9s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  .float, .kicker i { animation: none; }
}

/* الهاتف: الفيديو فوق الطيّ — أصغر وقبل النص */
@media (max-width: 979px) {
  .hero { padding-top: 22px; }
  .hero .wrap { gap: 18px; }
  .phone-stage { order: -1; padding: 4px 0 6px; }
  .phone { width: min(210px, 54vw); border-radius: 34px; padding: 9px; }
  .phone video, .phone img { border-radius: 26px; }
  .phone::before { top: 15px; width: 60px; height: 17px; margin-left: -30px; }
  .phone-glow { width: 300px; height: 300px; }
  .float { font-size: 17px; padding: 7px 12px; border-radius: 14px; }
  .float small { font-size: 11px; }
  .f3 { font-size: 14px; }
  .hero h1 { margin-top: 14px; font-size: clamp(30px, 8.2vw, 40px); }
  .phone { width: min(196px, 50vw); }
  .hero-tags { display: none; }
}
