/* مدير إعلاناتي · صفحة الهبوط */

@font-face { font-family: "Thmanyah Display"; src: url("fonts/thmanyahserifdisplay-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Thmanyah Display"; src: url("fonts/thmanyahserifdisplay-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Thmanyah Text"; src: url("fonts/thmanyahseriftext-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Thmanyah Sans"; src: url("fonts/thmanyahsans-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Thmanyah Sans"; src: url("fonts/thmanyahsans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Thmanyah Sans"; src: url("fonts/thmanyahsans-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Thmanyah Sans"; src: url("fonts/thmanyahsans-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Thmanyah Sans"; src: url("fonts/thmanyahsans-Black.woff2") format("woff2"); font-weight: 900; font-display: swap; }

:root {
  /* ألوان الإضافة نفسها (popup.css)، مع ورقة دافئة للصفحة */
  --ink: #173c44;
  --muted: #4a6168;
  --brand: #0e6970;
  --brand-deep: #084e55;
  --brand-soft: #e6f2f2;
  --line: #d5e2e4;
  --paper: #f8f6f1;
  --paper-2: #efece4;
  --white: #fff;
  --danger: #9b2430;
  --sand: #b9822f;

  --font-heading: "Thmanyah Display", "Noto Naskh Arabic", serif;
  --font-reading: "Thmanyah Text", "Noto Naskh Arabic", serif;
  --font-ui: "Thmanyah Sans", "Segoe UI", Tahoma, system-ui, sans-serif;

  --lp-ease: cubic-bezier(.22, 1, .36, 1);
  --lp-expo: cubic-bezier(.16, 1, .3, 1);
  --wrap: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-reading); font-weight: 400; font-size: 1.09rem; line-height: 1.9;
  font-synthesis-weight: none; overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; margin: 0; line-height: 1.35; text-wrap: balance; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.6rem); }
h3 { font-size: 1.3rem; font-weight: 500; }
p { margin: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); }
:is(button, nav, label, .btn, .chips, .num, .eyebrow, .ba-label, summary, .flow, .early-facts, .site-foot, .brand) { font-family: var(--font-ui); }
:focus-visible { outline: 3px solid #177b83; outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.narrow { max-width: 820px; }
.section { padding-block: clamp(64px, 9vw, 112px); }
.section h2 { margin-bottom: 12px; }
.section-sub { color: var(--muted); margin-bottom: 36px; }
.tint { background: var(--paper-2); }

/* خيط القراءة */
.lp-progress { display: none; }
@supports (animation-timeline: scroll()) {
  .lp-progress { display: block; position: fixed; inset-inline: 0; top: 0; height: 3px; z-index: 30; background: var(--brand);
    transform-origin: right; transform: scaleX(0); animation: grow linear both; animation-timeline: scroll(root); }
}
@keyframes grow { to { transform: scaleX(1); } }

/* الرأس */
.site-head { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.15rem; }
.head-nav { display: flex; gap: 24px; margin-inline-start: auto; }
.head-nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: .98rem; }
.head-nav a:hover { color: var(--brand); }

/* الأزرار */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 24px; border-radius: 10px;
  font-weight: 700; font-size: 1.02rem; text-decoration: none; border: 1.5px solid transparent; transition: background .2s, transform .2s var(--lp-ease), box-shadow .2s; }
.btn-primary { background: var(--brand); color: var(--white); box-shadow: 0 8px 22px -10px rgba(14,105,112,.7); }
.btn-primary:hover { background: var(--brand-deep); transform: translateY(-1px); }
.btn-ghost { color: var(--brand); border-color: #a7c3c8; background: transparent; }
.btn-ghost:hover { background: var(--brand-soft); }
.btn-small { min-height: 44px; padding: 8px 16px; font-size: .95rem; background: var(--brand); color: #fff; }
.btn-light { background: var(--white); color: var(--brand-deep); }
.btn-light:hover { background: var(--brand-soft); }

/* الواجهة */
.hero { padding-block: clamp(40px, 6vw, 88px) clamp(56px, 7vw, 96px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.08fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.eyebrow { color: var(--brand); font-weight: 700; font-size: .95rem; margin-bottom: 14px; }
.lp-h1 { font-size: clamp(2.35rem, 1.3rem + 4.2vw, 4.2rem); line-height: 1.3; margin-bottom: 22px; }
.accent { font-style: normal; color: var(--brand); position: relative; z-index: 0; white-space: nowrap; }
.accent::after { content: ""; position: absolute; inset-inline: 0; bottom: .02em; height: .14em; z-index: -1; background: var(--sand); opacity: .4; border-radius: 2px;
  transform-origin: right; animation: underline .9s var(--lp-ease) 1s both; }
@keyframes underline { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.lead { font-size: clamp(1.08rem, 1rem + .35vw, 1.22rem); color: var(--muted); max-width: 36em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.chips { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--ink); font-size: .95rem; font-weight: 500; }
.chips li { display: flex; align-items: center; gap: 8px; }
.chips li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.indep { margin-top: 18px; font-family: var(--font-ui); font-size: .9rem; color: var(--muted); }

/* حركة الدخول (CSS وحده) */
.lp-w { display: inline-block; }
.lp-h1 .lp-w { animation: lp-word .9s var(--lp-expo) both; animation-delay: calc(80ms + var(--w) * 70ms); }
@keyframes lp-word { 0% { opacity: 0; filter: blur(12px); transform: translateY(.36em); } 35% { opacity: 1; } 100% { opacity: 1; filter: none; transform: none; } }
.lp-in { animation: lp-rise .8s var(--lp-ease) both; animation-delay: calc(560ms + var(--i, 0) * 110ms); }
@keyframes lp-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* مشهد الواجهة */
.hero-scene { position: relative; display: grid; justify-items: center; }
.popup-frame { margin: 0; width: min(100%, 420px); border-radius: 14px; overflow: hidden; background: var(--white);
  border: 1px solid var(--line); box-shadow: 0 30px 60px -30px rgba(23,60,68,.45), 0 2px 6px rgba(23,60,68,.06); }
.popup-frame img { width: 100%; aspect-ratio: 420 / 510; }
.hero-scene { justify-items: start; }
.scene-shot { width: min(86%, 420px); }
/* البطاقة تحت اللقطة فلا تحجب البطاقة العلوية ولا زر التشغيل والإيقاف أسفل النافذة */
.flow { position: relative; justify-self: end; margin-top: -20px; width: min(340px, 82%); background: var(--white); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px 18px 14px; box-shadow: 0 24px 48px -24px rgba(23,60,68,.5); }
.flow-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.flow-head > div { flex: 1; min-width: 0; }
.dial { width: 46px; height: 46px; flex: 0 0 auto; transform: rotate(-90deg) scaleY(-1); }
.dial circle { fill: none; stroke-width: 4; }
.dial-track { stroke: var(--line); }
.dial-fill { stroke: var(--brand); stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.flow-kicker { font-size: .85rem; color: var(--muted); font-weight: 500; line-height: 1.4; }
.flow-mode { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.mode { font: inherit; white-space: nowrap; font-size: .8rem; font-weight: 700; padding: 4px 11px; min-height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--muted); cursor: pointer; }
.mode.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-deep); }
.flow-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.flow-steps li { display: flex; align-items: center; gap: 10px; font-size: .92rem; line-height: 1.5; color: var(--ink); }
.tick { width: 20px; height: 20px; border-radius: 50%; flex: 0 0 auto; background: var(--brand); position: relative; }
.tick::after { content: ""; position: absolute; inset: 5px 6px 7px 6px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.replay { margin-top: 10px; font: inherit; font-size: .85rem; font-weight: 700; color: var(--brand); background: none; border: 0; padding: 4px 0; min-height: 44px; cursor: pointer; }

/* حالات المشهد حين يتحكم به JavaScript */
.flow[data-live] .flow-steps li { opacity: .32; transition: opacity .45s var(--lp-ease); }
.flow[data-live] .flow-steps li .tick { background: var(--line); transform: scale(.7); transition: transform .45s var(--lp-expo), background .3s; }
.flow[data-live] .flow-steps li .tick::after { opacity: 0; transition: opacity .2s .15s; }
.flow[data-live] .flow-steps li.done { opacity: 1; }
.flow[data-live] .flow-steps li.done .tick { background: var(--brand); transform: none; }
.flow[data-live] .flow-steps li.done .tick::after { opacity: 1; }
.flow[data-live] .dial-fill { stroke-dashoffset: var(--dial, 0); transition: stroke-dashoffset .25s linear; }

/* قبل وبعد */
.band { padding-block: clamp(56px, 8vw, 96px); background: var(--ink); color: #eaf2f3; }
.band h2 { color: var(--white); margin-bottom: 36px; max-width: 18em; }
.ba-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ba-col { border-radius: 16px; padding: 26px 28px; }
.ba-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ba-label { font-weight: 700; font-size: .95rem; margin-bottom: 14px; }
.before { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); color: #aebfc3; }
.before s { text-decoration: none; background: linear-gradient(currentColor, currentColor) right 58% / 100% 1.5px no-repeat; }
.after { background: var(--white); color: var(--ink); }
.after .ba-label { color: var(--brand); }
.after li { padding-inline-start: 28px; position: relative; }
.after li::before { content: ""; position: absolute; inset-inline-start: 0; top: .62em; width: 16px; height: 9px; border: solid var(--brand); border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg); }
.lp[data-motion] .before s { background-size: 0 1.5px; transition: background-size .8s var(--lp-ease); }
.lp[data-motion] .before[data-in] s { background-size: 100% 1.5px; }
.lp[data-motion] .before[data-in] li:nth-child(2) s { transition-delay: .25s; }
.lp[data-motion] .before[data-in] li:nth-child(3) s { transition-delay: .5s; }
.lp[data-motion] .after[data-in=""] { transition-delay: .9s; }

/* الخطوات: الخط يمر تحت دوائر معتمة من حافة إلى حافة */
.steps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; position: relative; }
.steps li { position: relative; }
.step-n { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; font-size: 1.35rem; position: relative; z-index: 1; margin-bottom: 18px; }
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 26px; inset-inline-start: 60px; inset-inline-end: -24px; height: 2px; background: repeating-linear-gradient(to left, var(--brand) 0 8px, transparent 8px 14px); opacity: .45; }
.steps h3 { margin-bottom: 8px; }
.steps p { color: var(--muted); }

/* الأكورديون */
.acc { display: grid; gap: 12px; }
.acc details { background: var(--white); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.acc summary, .faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 12px 22px; font-weight: 700; font-size: 1.08rem; }
.acc summary::-webkit-details-marker, .faq summary::-webkit-details-marker { display: none; }
.acc summary::after, .faq summary::after { content: ""; margin-inline-start: auto; width: 10px; height: 10px; border: solid var(--brand); border-width: 0 0 2px 2px; transform: rotate(-45deg); transition: transform .3s var(--lp-ease); flex: 0 0 auto; }
.acc details[open] summary::after, .faq details[open] summary::after { transform: rotate(135deg); }
.acc-n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-deep); font-size: .9rem; flex: 0 0 auto; }
.acc-body { display: grid; grid-template-columns: 1fr minmax(0, 420px); gap: 32px; align-items: start; padding: 4px 22px 24px; }
.acc-body p { color: var(--muted); max-width: 30em; padding-top: 6px; }
.acc details[open] .acc-body { animation: acc-open .5s var(--lp-ease); }
@keyframes acc-open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* الضمانات */
.guards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.guards li { padding: 28px 26px 30px 0; border-bottom: 1px solid var(--line); }
.guards li:not(:nth-child(3n)) { border-inline-end: 1px solid var(--line); padding-inline-end: 26px; }
.guards li:not(:nth-child(3n+1)) { padding-inline-start: 26px; }
.guards h3 { margin-bottom: 8px; color: var(--brand-deep); }
.guards p { color: var(--muted); }

/* التجربة المبكرة */
.early { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.early p { color: var(--muted); max-width: 34em; margin-top: 10px; }
.early-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.early-facts li { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 14px 20px; font-weight: 500; }
.early-facts .num { font-weight: 900; color: var(--brand); font-size: 1.2rem; }

/* الأسئلة */
.faq { margin-top: 28px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { padding-inline: 4px; }
.faq details p { padding: 0 4px 22px; color: var(--muted); max-width: 44em; }

/* الدعوة الأخيرة */
.final { background: var(--brand); color: #e3f1f1; padding-block: clamp(64px, 9vw, 104px); text-align: center; position: relative; overflow: hidden; }
.final::before { content: ""; position: absolute; width: 640px; height: 640px; border-radius: 50%; border: 1px solid rgba(255,255,255,.14); inset-inline-start: 50%; top: 50%; translate: 50% -50%; box-shadow: 0 0 0 70px rgba(255,255,255,.03), 0 0 0 140px rgba(255,255,255,.02); }
.final-inner { position: relative; display: grid; justify-items: center; gap: 16px; }
.final-inner img { border-radius: 16px; box-shadow: 0 10px 30px -10px rgba(0,0,0,.4); background: #fff; }
.final h2 { color: #fff; }
.final p { max-width: 32em; }
.final .btn { margin-top: 10px; }

/* التذييل */
.site-foot { padding-block: 32px 40px; font-size: .9rem; color: var(--muted); line-height: 1.8; }
.foot-grid { display: grid; gap: 8px; }
.placeholder { border: 1px dashed var(--sand); border-radius: 4px; padding: 0 6px; color: #7a5a20; }

/* الظهور عند التمرير: لا يُخفى شيء إلا إن فعّله JavaScript */
.lp[data-motion] [data-rv]:not([data-in]) { opacity: 0; transform: translateY(22px); }
.lp[data-motion] [data-rv][data-in=""] { transition: opacity .7s var(--lp-ease), transform .7s var(--lp-ease); transition-delay: calc(var(--i, 0) * 90ms); }

/* التجاوب */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-scene { max-width: 520px; width: 100%; margin-inline: auto; }
  .guards { grid-template-columns: 1fr 1fr; }
  .guards li, .guards li:not(:nth-child(3n)), .guards li:not(:nth-child(3n+1)) { padding: 24px 0; border-inline-end: 0; }
  .guards li:nth-child(odd) { border-inline-end: 1px solid var(--line); padding-inline-end: 22px; }
  .guards li:nth-child(even) { padding-inline-start: 22px; }
  .early { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 760px) {
  .head-nav { display: none; }
  .head-row { justify-content: space-between; }
  .ba-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 26px; }
  .steps li { display: grid; grid-template-columns: 52px 1fr; column-gap: 16px; }
  .step-n { grid-row: span 2; margin: 0; }
  .steps li:not(:last-child)::after { top: 60px; bottom: -22px; inset-inline-start: 25px; inset-inline-end: auto; width: 2px; height: auto;
    background: repeating-linear-gradient(to bottom, var(--brand) 0 8px, transparent 8px 14px); }
  .acc-body { grid-template-columns: 1fr; gap: 18px; padding-inline: 16px; }
  .acc summary { padding-inline: 16px; font-size: 1rem; }
  .guards { grid-template-columns: 1fr; }
  .guards li:nth-child(odd), .guards li:nth-child(even) { border-inline-end: 0; padding-inline: 0; }
  .hero-scene { justify-items: center; }
  .scene-shot { width: 88%; }
  .flow { justify-self: stretch; width: 100%; margin-top: -16px; }
  .cta-row .btn { flex: 1 1 100%; }
}
@media (max-width: 400px) {
  .brand span { font-size: 1rem; }
  .btn-small { padding-inline: 12px; font-size: .88rem; }
}

/* تقليل الحركة: كل شيء ثابت بحالته النهائية */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lp *, .lp *::before, .lp *::after { animation: none !important; transition: none !important; }
  .lp-progress { display: none; }
}
