/* توأم · Tawam — موقع المنتج. بلا خطوط أو مكتبات خارجية، ومتوافق مع CSP: default-src 'self'. */

@font-face { font-family: "Kufam"; src: url("fonts/Kufam-ExtraBold.woff") format("woff"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Readex Pro"; src: url("fonts/ReadexPro-Regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Readex Pro"; src: url("fonts/ReadexPro-Medium.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Readex Pro"; src: url("fonts/ReadexPro-SemiBold.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  color-scheme: light dark;
  --nila: #3A3FC4;
  --nila-strong: #2A2E96;
  --nila-soft: #E9EAFB;
  --hinna: #E2662B;
  --hinna-bright: #FF9A5C;
  --hinna-soft: #FCE9DE;
  --zaytoon: #4F7A34;
  --kohl: #14152B;

  --bg: #F7F7FC;
  --surface: #FFFFFF;
  --surface-2: #EFF0F8;
  --line: #DFE1EE;
  --ink: #14152B;
  --muted: #5C5F7E;
  --primary: #3A3FC4;
  --on-primary: #FFFFFF;
  --accent-text: #A3400F;   /* الحنّاء نصًّا على الفاتح */
  --ok-text: #3E6528;
  --tint: #E9EAFB;
  --tint-2: #FCE9DE;
  --header: rgba(247, 247, 252, .82);
  --shadow: 0 1px 2px rgba(20, 21, 43, .06), 0 10px 30px rgba(20, 21, 43, .07);

  --panel: #14152B;          /* لوحة الخصوصية داكنة في الوضعين */
  --panel-2: #22254A;
  --panel-ink: #EEEFFA;
  --panel-muted: #B4B6D2;

  --display: "Kufam", "Readex Pro", system-ui, sans-serif;
  --text: "Readex Pro", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --r-btn: 14px;
  --r-card: 22px;
  --r-panel: 32px;
  --wrap: 1160px;
  --gutter: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0C0D1A;
    --surface: #171933;
    --surface-2: #22254A;
    --line: #2E3158;
    --ink: #EEEFFA;
    --muted: #A9ABC8;
    --primary: #9EA6FF;
    --on-primary: #14152B;
    --accent-text: #F08A57;
    --ok-text: #9CC47F;
    --tint: #1B1D3D;
    --tint-2: #2A1E26;
    --header: rgba(12, 13, 26, .78);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
    --panel: #171933;
    --panel-2: #22254A;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
html[lang="en"] body { line-height: 1.6; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--primary); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
bdi, .ltr { unicode-bidi: isolate; direction: ltr; }

.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 50; background: var(--primary); color: var(--on-primary); padding: 8px 14px; border-radius: 10px; text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.narrow { width: min(100% - 2 * var(--gutter), 780px); margin-inline: auto; }

/* ───────── الرأس ───────── */
.top {
  position: sticky; top: 0; z-index: 20;
  background: var(--header);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.top__in { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; padding-block: 10px; }
.brand { display: inline-flex; align-items: center; margin-inline-end: auto; border-radius: 8px; }
.brand img { height: 38px; width: auto; }
html[lang="en"] .brand img { height: 26px; }
.nav { display: flex; gap: 4px; order: 3; flex-basis: 100%; justify-content: center; }
.nav a, .lang {
  color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500;
  padding: 6px 12px; border-radius: 999px; line-height: 1.5;
}
.nav a:hover { background: var(--surface-2); }
.lang { border: 1px solid var(--line); background: var(--surface); }
.lang:hover { border-color: var(--primary); color: var(--primary); }
@media (min-width: 640px) {
  .nav { order: 0; flex-basis: auto; }
}

/* ───────── عناصر عامة ───────── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 600; color: var(--primary); letter-spacing: 0;
  margin-block-end: 14px;
}
html[lang="en"] .eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 13px; }
.twin { position: relative; width: 26px; height: 16px; flex: none; }
.twin::before, .twin::after { content: ""; position: absolute; top: 2px; width: 12px; height: 12px; border-radius: 28%; }
.twin::before { inset-inline-start: 0; background: var(--nila); }
.twin::after { inset-inline-start: 14px; background: var(--hinna); }
@media (prefers-color-scheme: dark) { .twin::before { background: var(--primary); } .twin::after { background: var(--hinna-bright); } }

.h2 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(30px, 5.4vw, 48px); line-height: 1.3; letter-spacing: -.005em;
  text-wrap: balance;
}
html[lang="en"] .h2 { line-height: 1.15; letter-spacing: -.02em; }
.lead { margin-block-start: 16px; font-size: clamp(17px, 2.1vw, 20px); color: var(--muted); max-width: 36em; text-wrap: pretty; }
.sec { padding-block: clamp(72px, 11vw, 136px); scroll-margin-top: 72px; }
.sec + .sec { padding-block-start: 0; }
.sec__head { max-width: 760px; }
.sec__head--center { margin-inline: auto; text-align: center; }
.sec__head--center .lead { margin-inline: auto; }

.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 920px) {
  .split { grid-template-columns: 1fr 1fr; gap: clamp(48px, 6vw, 96px); }
  .split--rev > .media { order: -1; }
}

.points { list-style: none; display: grid; gap: 22px; margin-block-start: 32px; }
.points > li { position: relative; padding-inline-start: 34px; }
.points > li::before, .points > li::after { content: ""; position: absolute; top: .55em; width: 10px; height: 10px; border-radius: 28%; }
.points > li::before { inset-inline-start: 0; background: var(--hinna); opacity: .9; }
.points > li::after { inset-inline-start: 6px; top: calc(.55em + 5px); background: var(--nila); box-shadow: 0 0 0 2px var(--bg); }
@media (prefers-color-scheme: dark) { .points > li::after { background: var(--primary); } }
.points h3 { font-size: 18px; font-weight: 600; line-height: 1.5; }
.points p { color: var(--muted); font-size: 16px; margin-block-start: 2px; }

/* ───────── الهواتف ───────── */
.media { display: flex; justify-content: center; }
.phone { width: min(100%, 360px); }
.phone img { width: 100%; }
.duo {
  display: grid; grid-template-columns: repeat(12, 1fr);
  width: min(100%, 560px); margin-inline: auto;
}
.duo .ph { grid-row: 1; }
.duo .ph--a { grid-column: 1 / span 8; z-index: 2; }
.duo .ph--b { grid-column: 5 / span 8; margin-block-start: 14%; z-index: 1; }
.duo img { width: 100%; }

/* ───────── البطل ───────── */
.hero { position: relative; overflow: hidden; padding-block: clamp(40px, 7vw, 96px) clamp(56px, 8vw, 112px); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 55% at 80% 30%, var(--tint) 0%, transparent 70%),
    radial-gradient(45% 45% at 15% 85%, var(--tint-2) 0%, transparent 70%);
}
html[dir="rtl"] .hero::before {
  background:
    radial-gradient(60% 55% at 20% 30%, var(--tint) 0%, transparent 70%),
    radial-gradient(45% 45% at 85% 85%, var(--tint-2) 0%, transparent 70%);
}
.hero__grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero__grid { grid-template-columns: 1.05fr 1fr; gap: 48px; } }
.badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 14px; font-weight: 500; color: var(--muted);
  margin-block-end: 22px;
}
h1 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(40px, 8.6vw, 76px); line-height: 1.22; letter-spacing: -.01em;
  text-wrap: balance;
}
html[lang="en"] h1 { line-height: 1.04; letter-spacing: -.03em; font-size: clamp(42px, 8.4vw, 80px); }
h1 .l1 { display: block; color: var(--primary); }
h1 .l2 { display: block; }
.hero__sub { margin-block-start: 22px; font-size: clamp(18px, 2.3vw, 21px); color: var(--muted); max-width: 30em; text-wrap: pretty; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-block-start: 32px; }
.store {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 8px 20px 8px 18px; border-radius: var(--r-btn);
  background: var(--kohl); color: #FFFFFF; cursor: default;
  border: 1px solid transparent;
}
.store svg { width: 24px; height: 24px; fill: currentColor; flex: none; }
.store span { display: grid; line-height: 1.25; }
.store small { font-size: 12px; opacity: .85; font-weight: 400; }
.store b { font-size: 17px; font-weight: 600; }
.store--alt { background: var(--surface); color: var(--ink); border-color: var(--line); }
@media (prefers-color-scheme: dark) {
  .store { background: #FFFFFF; color: var(--kohl); }
  .store--alt { background: var(--surface); color: var(--ink); border-color: var(--line); }
}
.hero__note { margin-block-start: 18px; font-size: 15px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.hero__art { position: relative; }
.hero__art::before, .hero__art::after {
  content: ""; position: absolute; z-index: -1; border-radius: 28%;
  width: 58%; aspect-ratio: 1;
}
.hero__art::before { background: var(--tint-2); inset-inline-end: 4%; top: 6%; }
.hero__art::after { background: var(--tint); inset-inline-start: 4%; bottom: 4%; }
.hero .duo { width: min(100%, 600px); }

/* ───────── الحقائق ───────── */
.facts {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 0;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden;
}
.facts > div { background: var(--surface); padding: 22px 18px; text-align: center; }
.facts dt {
  font-family: var(--display); font-weight: 800; color: var(--primary);
  font-size: clamp(26px, 4vw, 38px); line-height: 1.3; font-variant-numeric: tabular-nums;
}
.facts dt .dot { color: var(--hinna); padding-inline: .15em; }
.facts dd { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
@media (min-width: 820px) { .facts { grid-template-columns: 1.4fr 1fr 1fr 1fr; } .facts > div { padding: 30px 20px; } }

/* ───────── البطاقات ───────── */
.cards { display: grid; gap: 16px; margin-block-start: 40px; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards--3 { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 24px;
}
.card h3 { font-size: 18px; font-weight: 600; line-height: 1.5; }
.card p { margin-block-start: 6px; color: var(--muted); font-size: 16px; }
.card__ico {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: var(--tint); color: var(--primary); margin-block-end: 16px;
}
.card__ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sub-h { margin-block-start: clamp(56px, 8vw, 88px); font-family: var(--display); font-weight: 800; font-size: clamp(22px, 3vw, 28px); line-height: 1.4; }

/* درجات التطابق */
.scores { display: grid; gap: 12px; margin-block-start: 28px; }
@media (min-width: 560px) { .scores { grid-template-columns: 1fr 1fr; } }
.score { border-radius: 18px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); }
.score b {
  display: inline-block; font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1.3;
}
.score--exact b { color: var(--accent-text); }
.score--near b { color: var(--primary); }
.score h3 { font-size: 16px; font-weight: 600; margin-block-start: 2px; }
.score p { color: var(--muted); font-size: 15px; margin-block-start: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 10px; list-style: none; }
.chips li { font-size: 14px; padding: 4px 12px; border-radius: 999px; background: var(--tint); color: var(--ink); }

/* ───────── الخصوصية ───────── */
.panel {
  background: var(--panel); color: var(--panel-ink);
  border-radius: var(--r-panel); padding: clamp(28px, 5vw, 72px);
  position: relative; overflow: hidden;
}
.panel a { color: #C9CDFF; }
.panel .eyebrow { color: #C9CDFF; }
.panel .lead, .panel .points p { color: var(--panel-muted); }
.panel .twin::before, .panel .points > li::after { background: #9EA6FF; }
.panel .twin::after { background: var(--hinna-bright); }
.panel .points > li::after { box-shadow: 0 0 0 2px var(--panel); }
.panel .points > li::before { background: var(--hinna-bright); }
.panel__ill { width: 120px; margin-block-end: 20px; }
.nos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-block-start: 28px; list-style: none; }
@media (min-width: 560px) { .nos { grid-template-columns: repeat(4, 1fr); } }
.nos li {
  background: var(--panel-2); border-radius: 16px; padding: 14px 12px; text-align: center;
  font-family: var(--display); font-weight: 800; font-size: 19px; line-height: 1.4;
}
.honest {
  margin-block-start: 28px; padding: 18px 20px; border-radius: 16px;
  border: 1px solid rgba(255, 154, 92, .45); background: rgba(255, 154, 92, .08);
  color: var(--panel-ink); font-size: 15px;
}
.honest b { color: var(--hinna-bright); }
.panel .phone { width: min(100%, 340px); }

/* ───────── الخطوات ───────── */
.steps { list-style: none; display: grid; gap: 16px; margin-block-start: 48px; counter-reset: s; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 28px 24px 26px; display: flex; flex-direction: column; }
.step picture { display: grid; place-items: center; height: 150px; margin-block-end: 22px; }
.step picture img { max-height: 150px; width: auto; }
.step__n {
  counter-increment: s; display: inline-grid; place-items: center;
  width: 32px; height: 32px; border-radius: 28%; background: var(--primary); color: var(--on-primary);
  font-family: var(--display); font-weight: 800; font-size: 15px; margin-block-end: 12px;
}
.step__n::before { content: counter(s); }
.step h3 { font-size: 20px; font-weight: 600; }
.step p { color: var(--muted); font-size: 16px; margin-block-start: 6px; }

/* ───────── السعر ───────── */
.price { display: grid; gap: 16px; margin-block-start: 40px; }
@media (min-width: 760px) { .price { grid-template-columns: 1fr 1fr; } }
.plan { border-radius: var(--r-card); padding: 30px 28px; background: var(--surface); border: 1px solid var(--line); }
.plan--pro { background: var(--nila); color: #FFFFFF; border-color: var(--nila); }
@media (prefers-color-scheme: dark) { .plan--pro { background: #2A2E96; border-color: #3A3FC4; } }
.plan__tag { display: inline-block; font-size: 13px; font-weight: 600; padding: 3px 12px; border-radius: 999px; background: var(--tint); color: var(--primary); }
.plan--pro .plan__tag { background: rgba(255, 255, 255, .16); color: #FFFFFF; }
.plan h3 { font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1.4; margin-block-start: 14px; }
.plan p { margin-block-start: 8px; color: var(--muted); }
.plan--pro p { color: #E4E5FB; }
.plan ul { list-style: none; margin-block-start: 16px; display: grid; gap: 8px; }
.plan li { display: flex; gap: 10px; align-items: baseline; }
.plan li::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 28%; background: var(--hinna-bright); transform: translateY(-1px); }
.price__note { margin-block-start: 18px; text-align: center; color: var(--muted); font-size: 15px; }

/* ───────── الأسئلة ───────── */
.faq { margin-block-start: 36px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 2px; font-size: 18px; font-weight: 600; line-height: 1.5;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 12px; height: 12px;
  border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary);
  transform: translateY(-3px) rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.faq summary:hover { color: var(--primary); }
.faq details p { padding: 0 2px 22px; color: var(--muted); max-width: 44em; }
.faq details p + p { margin-block-start: -10px; }

/* ───────── التذييل ───────── */
.foot { border-top: 1px solid var(--line); padding-block: 40px 48px; margin-block-start: clamp(72px, 10vw, 120px); }
.foot__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.foot__brand { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.foot__brand img { height: 30px; width: auto; }
html[lang="en"] .foot__brand img { height: 22px; }
.foot__by { color: var(--muted); font-size: 15px; }
.foot__by a { color: var(--ink); font-weight: 600; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot nav a { color: var(--ink); text-decoration: none; font-size: 15px; }
.foot nav a:hover { color: var(--primary); text-decoration: underline; }
.foot small { display: block; margin-block-start: 20px; color: var(--muted); font-size: 14px; }

/* ───────── صفحة المستند (الخصوصية) ───────── */
.doc-head { padding-block: clamp(48px, 8vw, 96px) 24px; }
.doc-head h1 { font-size: clamp(36px, 6vw, 56px); }
.doc-head .meta { margin-block-start: 12px; color: var(--muted); font-size: 15px; }
.doc { padding-block-end: 24px; }
.doc .intro { font-size: 19px; color: var(--ink); }
.doc h2 { font-family: var(--display); font-weight: 800; font-size: clamp(22px, 3vw, 26px); line-height: 1.45; margin-block: 44px 10px; }
.doc p, .doc li { color: var(--muted); }
.doc p + p { margin-block-start: 12px; }
.doc ul, .doc ol { padding-inline-start: 22px; display: grid; gap: 8px; margin-block-start: 12px; }
.doc li b, .doc p b { color: var(--ink); font-weight: 600; }
.doc code { font-size: 14px; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; direction: ltr; unicode-bidi: isolate; }
.doc .box { margin-block-start: 28px; padding: 20px 22px; border-radius: 18px; background: var(--tint); }
.doc .box p { color: var(--ink); }

/* ───────── 404 ───────── */
.nf { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 48px var(--gutter); }
.nf__in { max-width: 560px; }
.nf__mark { width: 96px; margin: 0 auto 28px; }
.nf h1 { font-size: clamp(30px, 6vw, 44px); line-height: 1.35; }
.nf p { color: var(--muted); margin-block-start: 10px; }
.nf .en { margin-block-start: 32px; padding-block-start: 28px; border-top: 1px solid var(--line); }
.nf .en h2 { font-family: var(--display); font-weight: 800; font-size: clamp(24px, 4.5vw, 32px); line-height: 1.25; letter-spacing: -.02em; }
.btns { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-block-start: 22px; }
.btn {
  display: inline-flex; align-items: center; min-height: 46px; padding: 8px 20px; border-radius: var(--r-btn);
  background: var(--primary); color: var(--on-primary); text-decoration: none; font-weight: 600;
}
.btn--ghost { background: transparent; color: var(--primary); border: 1px solid var(--line); }

/* ───────── الحركة: تُفعّل فقط عند وجود .motion على <html> (site.js) ───────── */
.motion .rv { opacity: 0; transform: translate3d(0, 28px, 0); }
.motion .rv.in {
  opacity: 1; transform: none;
  transition: opacity .8s ease, transform 1s var(--ease);
  transition-delay: var(--d, 0ms);
}
.motion .hero__copy > * { animation: rise .9s var(--ease) both; }
.motion .hero__copy > :nth-child(2) { animation-delay: .06s; }
.motion .hero__copy > :nth-child(3) { animation-delay: .14s; }
.motion .hero__copy > :nth-child(4) { animation-delay: .22s; }
.motion .hero__copy > :nth-child(5) { animation-delay: .3s; }
.motion .hero .ph img { animation: rise 1.1s var(--ease) both; }
.motion .hero .ph--a img { animation-delay: .15s; }
.motion .hero .ph--b img { animation-delay: .32s; }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 36px, 0); } to { opacity: 1; transform: none; } }

.motion .tilt {
  transform: perspective(1400px) rotateX(calc(var(--ty, 0) * -4deg)) rotateY(calc(var(--tx, 0) * 6deg));
  transition: transform .6s var(--ease);
}
.motion .par .ph--a { transform: translate3d(0, calc((var(--p, .5) - .5) * -36px), 0); }
.motion .par .ph--b { transform: translate3d(0, calc((var(--p, .5) - .5) * 44px), 0); }
.motion .par.phone, .motion .par > .phone { transform: translate3d(0, calc((var(--p, .5) - .5) * -28px), 0); }

@media (prefers-reduced-motion: reduce) {
  .motion .rv { opacity: 1; transform: none; }
  .motion .hero__copy > *, .motion .hero .ph img { animation: none; }
  .motion .tilt, .motion .par .ph--a, .motion .par .ph--b, .motion .par > .phone { transform: none; }
}
