/* الصفحة الرئيسية لأدواتي — التصميم المعتمد ج١ «عرض حي» (2026-11-08).
   الألوان من ../Adawati/design/README.md فقط، والوضع الداكن يتبع الجهاز. */
:root {
  --bg: #eef1ef; --bg-top: #f7f9f7;
  --fg: #10201d; --fg2: #5b6b68; --surface: #ffffff;
  --line: rgba(16,32,29,.09);
  --haze: rgba(18,128,111,.32); --haze2: rgba(212,168,83,.34);
  --gold: #d4a853; --gold-ink: #2a1d05; --gold-text: #b8862e;
  --emerald: #12806f;
  --card-shadow: 0 30px 60px -20px rgba(16,32,29,.35), inset 0 2px 0 rgba(255,255,255,.08);
  --pdf-grad: linear-gradient(160deg, #12806f 0%, #0a4a44 55%, #06302f 100%);
  --arc-grad: linear-gradient(160deg, #4c9bc7 0%, #22618a 55%, #0e2f47 100%);
  --scr-grad: linear-gradient(160deg, #6d4dff 0%, #3d27b8 55%, #1e1160 100%);
  --font-display: "Reem Kufi", "Tajawal", Tahoma, sans-serif;
  --font-body: "Tajawal", "Segoe UI", Tahoma, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1211; --bg-top: #121c1a;
    --fg: #edf2f0; --fg2: #8fa19d; --surface: #151f1d;
    --line: rgba(255,255,255,.09);
    --haze: rgba(18,128,111,.22); --haze2: rgba(212,168,83,.12);
    --emerald: #2fb5a0;
    --card-shadow: 0 30px 60px -20px rgba(0,0,0,.5), inset 0 2px 0 rgba(255,255,255,.08);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh; color: var(--fg); font-family: var(--font-body); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  background:
    radial-gradient(55% 45% at 100% 0%, var(--haze), transparent 70%),
    radial-gradient(45% 40% at 0% 100%, var(--haze2), transparent 70%),
    linear-gradient(180deg, var(--bg-top), var(--bg));
  background-color: var(--bg); background-attachment: fixed;
}
h1, h2 { font-family: var(--font-display); font-weight: 600; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }

/* الترويسة والشعار: ثلاث بطاقات متراكبة مثل أيقونة التطبيق، ونقطة ذهبية للعدسة */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; }
.top nav { display: flex; gap: 6px; }
.top nav a { padding: 8px 14px; border-radius: 999px; text-decoration: none; font-weight: 700; font-size: 14px; color: var(--fg2); }
.top nav a:hover { background: var(--line); color: var(--fg); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-name { display: block; font-family: var(--font-display); font-weight: 600; font-size: 26px; letter-spacing: -.3px; line-height: 1; }
.brand-latin { display: block; font-size: 12px; color: var(--fg2); letter-spacing: 2px; font-weight: 700; margin-top: 4px; direction: ltr; text-align: right; }

/* حالات الأدوات */
.status { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.live { background: var(--gold); color: var(--gold-ink); box-shadow: 0 8px 18px -8px rgba(212,168,83,.9); }
.status.soon { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.28); }

/* البلاطات */
/* PDF يمينًا على صفين، والأرشفة وتسجيل الشاشة ثم التطبيق يسارًا، والمبادئ بعرض الصفحة */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding-bottom: 28px; }
.tile { position: relative; overflow: hidden; border-radius: 32px; padding: 26px; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 20px 50px -34px rgba(0,0,0,.45); text-decoration: none; }
.tile p { color: var(--fg2); margin-top: 6px; font-size: 15px; }

/* عنوان الصفحة لقارئات الشاشة ومحركات البحث فقط */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.t-tool { color: #fff; border-color: rgba(255,255,255,.14); }
.t-tool::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(70% 55% at 85% 0%, var(--glow), transparent 70%); }
.t-tool > * { position: relative; }
.t-tool p { color: rgba(255,255,255,.84); }
.t-tool h2 { font-size: 22px; line-height: 1.2; margin-top: 16px; }
.t-pdf { grid-column: span 2; grid-row: span 2; background: var(--pdf-grad); --glow: rgba(212,168,83,.45); box-shadow: var(--card-shadow); }
.t-arc { background: var(--arc-grad); --glow: rgba(140,210,245,.5); }
.t-scr { background: var(--scr-grad); --glow: rgba(160,130,255,.6); }
.head { display: flex; align-items: center; gap: 14px; }
.t-pdf .head h2 { font-size: clamp(26px, 2.6vw, 34px); margin-top: 0; }
.head .status { margin-inline-start: auto; }
.ibox { width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; flex: none;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); box-shadow: 0 12px 30px -14px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.35); }
.ibox svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.t-pdf .ibox { width: 64px; height: 64px; border-radius: 22px; }
.t-pdf .ibox svg { width: 32px; height: 32px; }

/* مسرح العرض داخل البلاطة. الحالة الثابتة (بدون حركة) مقروءة أيضًا. */
.demo { position: relative; margin-top: 18px; border-radius: 20px; background: rgba(0,0,0,.16); border: 1px solid rgba(255,255,255,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08); overflow: hidden; }
.t-pdf .demo { flex: 1; min-height: 220px; }
.t-arc .demo, .t-scr .demo { height: 150px; }
.caption { position: absolute; bottom: 10px; inset-inline: 0; text-align: center; font-size: 12.5px; font-weight: 700; color: rgba(255,255,255,.8); }

/* PDF: ثلاث صفحات تتجمع في ملف واحد */
.pg { position: absolute; top: 50%; left: 50%; width: 74px; height: 96px; margin: -60px 0 0 -37px; border-radius: 10px; background: #fff;
  box-shadow: 0 14px 26px -12px rgba(0,0,0,.6); animation: gather 6s cubic-bezier(.22,1,.36,1) infinite both;
  transform: translateX(var(--x)) rotate(var(--r)); }
.pg::before, .pg::after { content: ""; position: absolute; inset-inline: 12px; height: 4px; border-radius: 2px; background: var(--c); opacity: .55; }
.pg::before { top: 18px; } .pg::after { top: 30px; inset-inline-end: 26px; }
.pg i { position: absolute; inset-inline: 12px; bottom: 14px; height: 30px; border-radius: 5px; background: var(--c); opacity: .18; }
.pg.p1 { --c: #22618a; --x: 150px; --r: -8deg; }
.pg.p2 { --c: #c2432f; --x: 0px; --r: 3deg; animation-delay: .08s; }
.pg.p3 { --c: #3d27b8; --x: -150px; --r: 9deg; animation-delay: .16s; }
@keyframes gather {
  0%, 12% { transform: translateX(var(--x)) rotate(var(--r)); opacity: 1; }
  42% { transform: translateX(0) rotate(0) scale(.92); opacity: 1; }
  50%, 100% { transform: translateX(0) rotate(0) scale(.9); opacity: 0; }
}
.merged { position: absolute; top: 50%; left: 50%; width: 92px; height: 120px; margin: -72px 0 0 -46px; opacity: 0; animation: merged 6s cubic-bezier(.22,1,.36,1) infinite both; }
.merged span { position: absolute; inset: 0; border-radius: 12px; background: #fff; box-shadow: 0 0 0 3px rgba(212,168,83,.7), 0 18px 34px -12px rgba(0,0,0,.65); }
.merged span:nth-child(1) { transform: translate(8px, -8px); opacity: .45; }
.merged span:nth-child(2) { transform: translate(4px, -4px); opacity: .7; }
.merged b { position: absolute; top: -12px; inset-inline-start: -14px; width: 30px; height: 30px; border-radius: 50%; background: var(--gold); display: grid; place-items: center; box-shadow: 0 6px 14px -4px rgba(0,0,0,.5); }
.merged b svg { width: 16px; height: 16px; fill: none; stroke: var(--gold-ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
@keyframes merged { 0%, 44% { opacity: 0; transform: scale(.8); } 54% { opacity: 1; transform: scale(1.04); } 60%, 90% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1); } }

.feat { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.feat span { padding: 10px 6px; border-radius: 14px; text-align: center; font-weight: 700; font-size: 14px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); }
.pdf-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.btn-main { height: 50px; padding-inline: 22px; border-radius: 16px; display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15.5px;
  background: var(--gold); color: var(--gold-ink); box-shadow: 0 14px 28px -12px var(--gold), inset 0 1px 0 rgba(255,255,255,.35); transition: transform .2s; }
a.t-tool:hover .btn-main, a.t-tool:hover .btn-sm { transform: translateX(-4px); }
/* زر صغير لبلاطتي الأرشفة وتسجيل الشاشة */
.tool-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; }
.tool-foot .btn-sm { flex: none; }
.tool-foot .domain { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-sm { height: 40px; padding-inline: 16px; border-radius: 13px; display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 14px;
  background: var(--gold); color: var(--gold-ink); box-shadow: 0 10px 20px -10px var(--gold), inset 0 1px 0 rgba(255,255,255,.35); transition: transform .2s; }
.btn-sm svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tool-foot .domain { font-size: 12px; }
.btn-main svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.domain { font-size: 13px; opacity: .75; direction: ltr; }

/* الأرشفة: مسح الكتاب ثم تعبئة الحقول */
.letter { position: absolute; top: 16px; inset-inline-end: 18px; width: 86px; height: 112px; border-radius: 8px; background: #fff; box-shadow: 0 12px 24px -10px rgba(0,0,0,.55); overflow: hidden; }
.letter i { position: absolute; inset-inline: 10px; height: 3px; border-radius: 2px; background: rgba(14,47,71,.3); }
.letter i:nth-child(1) { top: 14px; inset-inline-end: 40px; } .letter i:nth-child(2) { top: 26px; } .letter i:nth-child(3) { top: 34px; } .letter i:nth-child(4) { top: 42px; inset-inline-end: 24px; }
.letter i:nth-child(5) { top: 58px; } .letter i:nth-child(6) { top: 66px; inset-inline-end: 30px; }
.letter .scan { position: absolute; inset-inline: 0; top: 0; height: 3px; background: #8cd2f5; box-shadow: 0 0 12px 3px rgba(140,210,245,.9); opacity: 0; animation: scan 5s ease-in-out infinite both; }
@keyframes scan { 0% { top: 0; opacity: 0; } 5% { opacity: 1; } 40% { top: 108px; opacity: 1; } 45%, 100% { top: 108px; opacity: 0; } }
.fields { position: absolute; top: 18px; inset-inline-start: 18px; inset-inline-end: 122px; display: grid; gap: 7px; }
.fields span { display: flex; justify-content: space-between; gap: 6px; padding: 6px 9px; border-radius: 9px; font-size: 11.5px; font-weight: 700;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); animation: fill 5s ease-out infinite both; }
.fields span em { font-style: normal; opacity: .7; font-weight: 400; }
.fields span:nth-child(2) { animation-delay: .25s; } .fields span:nth-child(3) { animation-delay: .5s; }
@keyframes fill { 0%, 40% { opacity: 0; transform: translateX(-10px); } 50%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* تسجيل الشاشة: نافذة يتحرك فيها المؤشر، وشارة تسجيل تنبض، وموجة صوت */
.win { position: absolute; inset: 14px 16px; border-radius: 10px; background: rgba(255,255,255,.92); overflow: hidden; }
.win::before { content: ""; position: absolute; inset: 0 0 auto; height: 16px; background: rgba(30,17,96,.12); }
.win i { position: absolute; height: 4px; border-radius: 2px; background: rgba(30,17,96,.22); inset-inline-start: 14px; }
.win i:nth-child(1) { top: 30px; width: 40%; } .win i:nth-child(2) { top: 42px; width: 62%; } .win i:nth-child(3) { top: 54px; width: 50%; }
.win u { position: absolute; top: 72px; inset-inline-start: 14px; width: 44%; height: 34px; border-radius: 6px; background: rgba(109,77,255,.2); }
.win s { position: absolute; top: 30px; inset-inline-end: 14px; width: 34%; height: 76px; border-radius: 6px; background: rgba(255,122,61,.22); }
.cursor { position: absolute; top: 40px; left: 30%; width: 0; height: 0; border-style: solid; border-width: 0 0 14px 9px;
  border-color: transparent transparent transparent #1e1160; transform: rotate(-20deg); filter: drop-shadow(0 2px 2px rgba(0,0,0,.3));
  animation: cursor 6s ease-in-out infinite both; }
@keyframes cursor { 0%, 100% { top: 40px; left: 30%; } 30% { top: 80px; left: 62%; } 60% { top: 52px; left: 70%; } 80% { top: 88px; left: 22%; } }
.rec { position: absolute; top: 22px; left: 24px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 800; background: rgba(16,32,29,.82); color: #fff; box-shadow: 0 6px 14px -6px rgba(0,0,0,.5); }
.rec b { width: 8px; height: 8px; border-radius: 50%; background: #e0355b; animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.wave { position: absolute; bottom: 22px; left: 24px; display: flex; align-items: flex-end; gap: 3px; height: 18px; padding: 4px 7px; border-radius: 8px; background: rgba(16,32,29,.82); }
.wave i { width: 3px; height: 40%; border-radius: 2px; background: #a082ff; animation: wave 1s ease-in-out infinite; }
.wave i:nth-child(2) { animation-delay: .15s; } .wave i:nth-child(3) { animation-delay: .3s; } .wave i:nth-child(4) { animation-delay: .45s; } .wave i:nth-child(5) { animation-delay: .6s; }
@keyframes wave { 0%, 100% { height: 30%; } 50% { height: 100%; } }

/* التطبيق والمبادئ */
.t-app { grid-column: span 2; flex-direction: row; align-items: center; gap: 20px; background: #0b1211; color: #edf2f0; border-color: rgba(255,255,255,.08); }
.t-app::before { content: ""; position: absolute; width: 340px; height: 340px; left: -60px; top: -80px; border-radius: 50%; background: radial-gradient(circle, rgba(18,128,111,.45), transparent 62%); filter: blur(12px); }
.t-app > * { position: relative; }
.t-app h2 { font-size: 22px; }
.t-app p { color: #8fa19d; }
.t-app .status { margin-inline-start: auto; align-self: flex-start; }
.app-mark { width: 64px; height: 64px; flex: none; }
.t-priv { grid-column: span 4; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px; }
.t-priv div { padding: 14px; border-radius: 20px; background: var(--bg); font-weight: 700; font-size: 14.5px; line-height: 1.35; }
.t-priv svg { width: 24px; height: 24px; margin-bottom: 8px; fill: none; stroke: var(--emerald); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.t-priv .mark { color: var(--gold-text); font-size: 1.15em; margin-inline-start: 2px; }
.t-priv .note { grid-column: 1 / -1; margin: 0; padding: 2px 8px 4px; font-size: 13px; color: var(--fg2); }
.t-priv .note .mark { margin-inline: 0 4px; }

footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 4px 40px; color: var(--fg2); font-size: 14px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--fg); }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.t-priv .note a { color: var(--emerald); font-weight: 700; text-decoration: none; }
.t-priv .note a:hover { text-decoration: underline; }

/* صفحة شروط الاستخدام */
.doc { max-width: 820px; margin: 0 auto 32px; padding: 40px 44px; border-radius: 32px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 20px 50px -34px rgba(0,0,0,.45); }
.doc h1 { font-size: clamp(30px, 4vw, 42px); line-height: 1.2; }
.doc .updated { color: var(--fg2); font-size: 14px; margin-top: 6px; }
.doc section { margin-top: 30px; scroll-margin-top: 20px; }
.doc h2 { font-size: 21px; line-height: 1.3; }
.doc p, .doc li { font-size: 16px; line-height: 1.85; }
.doc p { margin-top: 10px; }
.doc ul { margin: 10px 0 0; padding-inline-start: 22px; }
.doc li + li { margin-top: 6px; }
.doc li::marker { color: var(--emerald); }
.doc .summary { margin-top: 24px; padding: 20px 24px; border-radius: 22px; background: var(--bg); border-inline-start: 4px solid var(--gold); }
.doc .summary h2 { font-size: 18px; }
.doc .summary p { font-size: 13.5px; color: var(--fg2); }
#ai h2::before { content: "*"; color: var(--gold-text); margin-inline-end: 6px; }

/* صفحة 404 */
.lost { min-height: 70vh; display: grid; place-content: center; justify-items: center; text-align: center; gap: 14px; }
.lost h1 { font-size: clamp(28px, 4vw, 40px); }
.lost p { color: var(--fg2); }
.lost a { display: inline-flex; margin-top: 8px; padding: 12px 22px; border-radius: 16px; background: var(--gold); color: var(--gold-ink); font-weight: 800; text-decoration: none; }

@media (max-width: 1040px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .t-pdf { grid-row: auto; }
  .t-priv { grid-column: span 2; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; gap: 12px; }
  .t-pdf, .t-app, .t-priv { grid-column: auto; }
  .tile { padding: 22px; border-radius: 28px; }
  .feat { grid-template-columns: repeat(2, 1fr); }
  .t-priv { grid-template-columns: 1fr; }
  .top nav { display: none; }
  .top nav.back { display: flex; }
  .doc { padding: 26px 20px; border-radius: 26px; }
  .pg.p1 { --x: 100px; } .pg.p3 { --x: -100px; }
  .head { flex-wrap: wrap; }
  .t-pdf .head h2 { order: 3; flex-basis: 100%; margin-top: 4px; }
  .t-app { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
