/* فطنار — نظام تصميم صفحة الهبوط (بهوية التطبيق: ذهبي ← مرجاني على خلفية دافئة داكنة) */
@font-face {
  font-family: 'KOMedia';
  src: url('/assets/KOMedia-Black.otf') format('opentype');
  font-weight: 900;
  font-display: swap;
}

:root {
  --gold: #F4C75D;
  --gold-soft: #FFDD93;
  --gold-deep: #E0A63C;
  --coral: #FF6B5C;
  --coral-deep: #E24A3B;
  --ink0: #101218;

  --bg: #17120C;
  --bg-top: #221810;
  --surface: #241B12;
  --surface-hi: #31251A;
  --surface-input: #2A2015;
  --line: #453620;
  --line-soft: #342819;
  --ink: #FBF4EA;
  --ink-muted: #C7B499;
  --ink-faint: #8C7A61;

  --aqua: #F08A3C;
  --mint: #41B487;
  --plum: #B06BDB;
  --rose: #F06E86;

  --brand: linear-gradient(135deg, var(--gold), var(--coral));
  --maxw: 1140px;
  --r-card: 22px;
  --r-lg: 28px;
  --shadow: 0 24px 60px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'SF Arabic', 'Segoe UI', 'Noto Sans Arabic', 'Tahoma', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* توهّجات خلفية دافئة */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1100px 620px at 82% -8%, rgba(244, 199, 93, .16), transparent 60%),
    radial-gradient(900px 560px at 8% 8%, rgba(255, 107, 92, .12), transparent 58%),
    linear-gradient(180deg, var(--bg-top), var(--bg) 42%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
section { padding: 84px 0; }
.eyebrow {
  color: var(--gold);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 2px;
}
h2.title { font-family: 'KOMedia', sans-serif; font-size: clamp(28px, 5vw, 44px); line-height: 1.12; }
.sec-head { text-align: center; max-width: 640px; margin: 0 auto 46px; }
.sec-head p { color: var(--ink-muted); margin-top: 12px; font-size: 17px; }

/* ===== شارة الهوية «؟» ===== */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: var(--ink0);
  font-family: 'KOMedia', sans-serif;
  border-radius: 30%;
  box-shadow: 0 10px 26px rgba(244, 199, 93, .34);
  flex: none;
}

/* ===== الأزرار ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 16px;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--brand);
  color: var(--ink0);
  box-shadow: 0 14px 34px rgba(244, 199, 93, .34);
}
.btn-primary:hover { box-shadow: 0 18px 44px rgba(244, 199, 93, .46); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink-muted); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--ink); }

/* ===== شريط علوي ===== */
header.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(23, 18, 12, .72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav .wrap { display: flex; align-items: center; gap: 16px; height: 66px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand .badge { width: 38px; height: 38px; font-size: 21px; }
.brand b { font-family: 'KOMedia', sans-serif; font-size: 21px; font-weight: 900; }
.nav nav { display: flex; gap: 26px; margin-inline-start: auto; }
.nav nav a { color: var(--ink-muted); font-weight: 700; font-size: 15px; transition: color .15s; }
.nav nav a:hover { color: var(--gold); }
.nav .cta { margin-inline-start: 8px; }
@media (max-width: 860px) { .nav nav { display: none; } .nav .cta { margin-inline-start: auto; } }

/* ===== البطل (Hero) ===== */
.hero { padding-top: 60px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 44px; align-items: center; }
.hero h1 {
  font-family: 'KOMedia', sans-serif;
  font-size: clamp(56px, 10vw, 108px);
  line-height: .98;
  margin: 14px 0 0;
  background: var(--brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lead { font-size: clamp(17px, 2.4vw, 20px); color: var(--ink-muted); margin: 20px 0 0; max-width: 34ch; }
.hero .lead b { color: var(--ink); font-weight: 800; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: 999px; padding: 9px 15px; font-size: 14px; font-weight: 700; color: var(--ink);
}
.pill i { color: var(--gold); font-style: normal; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 30px; }

/* أزرار المتجر */
.store {
  display: inline-flex; align-items: center; gap: 11px;
  background: #000; color: #fff; border: 1px solid #2a2a2a;
  border-radius: 15px; padding: 11px 18px; position: relative; transition: transform .16s, border-color .16s;
}
.store:hover { transform: translateY(-2px); border-color: #444; }
.store svg { width: 26px; height: 26px; flex: none; }
.store .s-sub { font-size: 11px; opacity: .8; line-height: 1; }
.store .s-main { font-size: 17px; font-weight: 800; line-height: 1.2; }

/* إطار الجهاز */
.device-wrap { display: flex; justify-content: center; position: relative; }
.device-wrap::after {
  content: ''; position: absolute; width: 74%; height: 74%; inset: 12% auto auto 13%;
  background: radial-gradient(circle, rgba(244, 199, 93, .3), transparent 66%); filter: blur(46px); z-index: -1;
}
.device {
  width: 300px;
  max-width: 82%;
  border-radius: 42px;
  padding: 11px;
  background: linear-gradient(160deg, #3a2c1c, #17120c);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.device img { border-radius: 32px; width: 100%; height: auto; aspect-ratio: 294 / 640; object-fit: cover; }
.device.tilt { transform: rotate(-3deg); }

/* ===== شريط الأرقام ===== */
.stats { padding: 40px 0; border-block: 1px solid var(--line-soft); }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; text-align: center; }
.stat b { font-family: 'KOMedia', sans-serif; font-size: clamp(28px, 5vw, 40px); display: block; background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--ink-muted); font-size: 14px; font-weight: 700; }
@media (max-width: 620px) { .stats .wrap { grid-template-columns: repeat(2, 1fr); gap: 26px 16px; } }

/* ===== بطاقات الأوضاع ===== */
.modes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.mode {
  position: relative; border-radius: var(--r-card); padding: 26px;
  background: var(--surface); border: 1px solid var(--line-soft);
  display: flex; gap: 18px; align-items: flex-start; overflow: hidden;
  transition: transform .18s, border-color .18s;
}
.mode:hover { transform: translateY(-3px); }
.mode .ic { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; flex: none; }
.mode h3 { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 9px; }
.mode p { color: var(--ink-muted); margin-top: 6px; font-size: 15px; }
.mode .tag { background: var(--gold); color: var(--ink0); font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 999px; }
@media (max-width: 720px) { .modes { grid-template-columns: 1fr; } }

/* ===== شبكة المزايا ===== */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-card); padding: 26px; transition: border-color .18s, transform .18s; }
.feature:hover { border-color: var(--line); transform: translateY(-2px); }
.feature .fic { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; font-size: 25px; background: rgba(244, 199, 93, .12); margin-bottom: 15px; }
.feature h3 { font-size: 18px; font-weight: 800; }
.feature p { color: var(--ink-muted); margin-top: 8px; font-size: 15px; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

/* ===== المعرض ===== */
.gallery { display: flex; gap: 20px; overflow-x: auto; padding: 6px 22px 18px; scroll-snap-type: x mandatory; }
.gallery .device { flex: none; scroll-snap-align: center; width: 250px; }
.gallery::-webkit-scrollbar { height: 8px; }
.gallery::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }

/* ===== المجالات ===== */
.cats { display: flex; flex-wrap: wrap; gap: 11px; justify-content: center; max-width: 900px; margin: 0 auto; }
.cat { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 999px; padding: 10px 16px; font-weight: 700; font-size: 15px; transition: border-color .15s, transform .15s; }
.cat:hover { border-color: var(--gold); transform: translateY(-2px); }
.cat span { font-size: 19px; }

/* ===== الأسئلة الشائعة ===== */
.faq { max-width: 760px; margin: 0 auto; }
details.q { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 16px; margin-bottom: 12px; overflow: hidden; }
details.q summary { list-style: none; cursor: pointer; padding: 20px 22px; font-weight: 800; font-size: 17px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
details.q summary::-webkit-details-marker { display: none; }
details.q summary::after { content: '+'; color: var(--gold); font-size: 24px; font-weight: 400; transition: transform .2s; }
details.q[open] summary::after { transform: rotate(45deg); }
details.q .a { padding: 0 22px 20px; color: var(--ink-muted); font-size: 15.5px; }

/* ===== نداء ختامي ===== */
.cta-band { text-align: center; }
.cta-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 54px 28px; position: relative; overflow: hidden; }
.cta-card::before { content: ''; position: absolute; inset: -40% 30% auto; height: 60%; background: radial-gradient(circle, rgba(244, 199, 93, .22), transparent 65%); filter: blur(40px); }
.cta-card h2 { position: relative; }
.cta-card .hero-cta { justify-content: center; position: relative; }

/* ===== التذييل ===== */
footer.foot { border-top: 1px solid var(--line-soft); padding: 46px 0 34px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.foot .links { display: flex; flex-wrap: wrap; gap: 22px; }
.foot .links a { color: var(--ink-muted); font-weight: 700; font-size: 15px; }
.foot .links a:hover { color: var(--gold); }
.foot .cp { color: var(--ink-faint); font-size: 13.5px; width: 100%; text-align: center; margin-top: 22px; border-top: 1px solid var(--line-soft); padding-top: 20px; }

/* ===== ظهور تدريجي ===== */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ===== صفحات المستندات (خصوصية/شروط/دعم) ===== */
.doc { max-width: 780px; margin: 0 auto; padding: 40px 0 90px; }
.doc h1 { font-family: 'KOMedia', sans-serif; font-size: clamp(30px, 6vw, 44px); margin-bottom: 6px; }
.doc .updated { color: var(--ink-faint); font-size: 14px; margin-bottom: 30px; }
.doc h2 { font-size: 21px; margin: 32px 0 10px; color: var(--gold); }
.doc p, .doc li { color: var(--ink-muted); font-size: 16px; margin-bottom: 10px; }
.doc ul { padding-inline-start: 22px; }
.doc li { margin-bottom: 8px; }
.doc a.inline { color: var(--gold); font-weight: 700; }
.doc .card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 16px; padding: 22px; margin: 18px 0; }
.doc .back { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-muted); font-weight: 700; margin-bottom: 26px; }
.doc .back:hover { color: var(--gold); }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; gap: 34px; }
  .hero .lead, .pills, .hero-cta { margin-inline: auto; justify-content: center; }
  .hero .lead { max-width: 46ch; }
  section { padding: 62px 0; }
}
