/* الخطوط */
@font-face { font-family: 'Plex Arabic'; font-weight: 300; font-display: swap; src: url(/assets/fonts/plex-arabic-300.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'Plex Arabic'; font-weight: 400; font-display: swap; src: url(/assets/fonts/plex-arabic-400.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'Plex Arabic'; font-weight: 600; font-display: swap; src: url(/assets/fonts/plex-arabic-600.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'Plex Arabic'; font-weight: 700; font-display: swap; src: url(/assets/fonts/plex-arabic-700.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'Plex Arabic'; font-weight: 300; font-display: swap; src: url(/assets/fonts/plex-latin-300.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Plex Arabic'; font-weight: 400; font-display: swap; src: url(/assets/fonts/plex-latin-400.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Plex Arabic'; font-weight: 600; font-display: swap; src: url(/assets/fonts/plex-latin-600.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Plex Arabic'; font-weight: 700; font-display: swap; src: url(/assets/fonts/plex-latin-700.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Plex Mono'; font-weight: 400; font-display: swap; src: url(/assets/fonts/plex-mono-400.woff2) format('woff2'); }
@font-face { font-family: 'Plex Mono'; font-weight: 500; font-display: swap; src: url(/assets/fonts/plex-mono-500.woff2) format('woff2'); }

/* الألوان */
:root {
  --bg: #12051C;
  --bg-2: #180826;
  --surface: #1E0C2E;
  --line: #34204A;
  --text: #F4EEF9;
  --muted: #B7A6C6;
  --accent: #02C8F0;
  --accent-2: #FFF200;
  --brand: #3A0057;
  --dot: #3A2550;
  --glyph: #6B5585;
  --glyph-boost: 1;
  --dev-bezel: #2B2633;
  --dev-rim: #8E86A0;
  --dev-rim-2: #4A4458;
  --dev-shadow: 0 24px 50px rgba(0, 0, 0, .5), 0 0 40px rgba(2, 200, 240, .07);
  --field-dim: .25;
  --glyph-dot: #FFF200;
  --wa: #25D366;
  --vivid: #02C8F0;
  --mark-dot: #FFF200;
  --shadow: 0 18px 50px rgba(0, 0, 0, .35);
  --sans: 'Plex Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #F6F2F9;
  --bg-2: #EEE6F4;
  --surface: #FFFFFF;
  --line: #E0D4EA;
  --text: #1E0B2C;
  --muted: #625273;
  --accent: #7A2DB8;
  --accent-2: #8A4FB8;
  --brand: #3A0057;
  --dot: #D9CBE5;
  --glyph: #8F78A9;
  --glyph-boost: 2;
  --dev-bezel: #17131C;
  --dev-rim: #B9B2C4;
  --dev-rim-2: #E9E5EE;
  --dev-shadow: 0 18px 36px rgba(58, 0, 87, .2);
  --field-dim: .5;
  --glyph-dot: #D9B800;
  --vivid: #00B4DB;
  --mark-dot: #FFD400;
  --shadow: 0 18px 50px rgba(58, 0, 87, .10);
  color-scheme: light;
}

/* مقاييس المسافات: كل الأقسام تاخذ منها عشان تبقى متناسقة على كل الشاشات */
:root {
  --gutter: 24px;
  --sec: clamp(56px, 7vw, 96px);
  --block: clamp(36px, 4.4vw, 56px);
  --head-gap: clamp(18px, 2vw, 26px);
  --nav-bg: #2A0D42;
  --nav-line: #4A2A66;
}
:root[data-theme="light"] { --nav-bg: #FFFFFF; --nav-line: #DCCDE8; }
@media (max-width: 720px) { :root { --gutter: 20px; } }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.9;
  transition: background-color .3s, color .3s;
}
:root[lang="en"] body { line-height: 1.65; }

img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--accent); color: #06121a; padding: 8px 14px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 12px; }

/* الشريط العلوي: شريط عائم بزوايا دائرية فوق الصفحة */
:root { --nav-h: 62px; --nav-top: 12px; --nav-space: calc(var(--nav-h) + var(--nav-top)); }
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 45; padding: var(--nav-top) 16px 0; pointer-events: none; }
/* يغطي الفراغ الصغير فوق الشريط بس، عشان ما يبان الكلام وهو يمر فوقه */
.nav::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: calc(var(--nav-top) + var(--nav-h) / 2);
  pointer-events: none; opacity: 0; transition: opacity .25s; background: var(--bg);
}
.nav.scrolled::before, .nav.open::before { opacity: 1; }
.nav-bar, .menu { max-width: 1180px; margin: 0 auto; pointer-events: auto; }
.menu { position: absolute; top: calc(100% + 8px); left: 16px; right: 16px; }
@media (max-width: 720px) { .menu { left: 12px; right: 12px; } }
.nav-bar {
  position: relative; display: flex; align-items: center; gap: 20px; height: var(--nav-h);
  padding-inline: 18px 10px; border-radius: 18px;
  background: color-mix(in srgb, var(--nav-bg) 94%, transparent);
  border: 1px solid var(--nav-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 6px 18px rgba(0, 0, 0, .22);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
:root[data-theme="light"] .nav-bar { box-shadow: 0 6px 18px rgba(58, 0, 87, .08); }
.brand { display: block; flex: none; }
.brand img { height: 30px; width: auto; }
.on-light { display: none; }
:root[data-theme="light"] .on-dark { display: none; }
:root[data-theme="light"] .on-light { display: block; }

.links { position: relative; display: flex; gap: 2px; margin-inline: auto; padding: 4px; }
.links a {
  position: relative; z-index: 1; display: flex; align-items: baseline; gap: 7px;
  padding: 7px 14px; border-radius: 11px; text-decoration: none;
  color: var(--muted); font-size: 15px; font-weight: 600; line-height: 1.6; transition: color .2s;
}
.links a i, .menu-links a i { font: 500 11px/1 var(--mono); font-style: normal; color: var(--accent); opacity: .75; letter-spacing: .02em; }
.links a:hover, .links a[aria-current] { color: var(--text); }
.links .ind {
  position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 11px; opacity: 0;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  transition: transform .35s cubic-bezier(.3, .8, .3, 1), width .35s cubic-bezier(.3, .8, .3, 1), opacity .25s;
}
@media (prefers-reduced-motion: reduce) { .links .ind { transition: none; } }

.tools { display: flex; gap: 6px; margin-inline-start: auto; }
.links + .tools { margin-inline-start: 0; }
.tool {
  width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--nav-line);
  background: transparent; color: var(--text); cursor: pointer;
  display: grid; place-items: center; font: 600 15px/1 var(--sans);
  transition: border-color .2s, background-color .2s;
}
@media (hover: hover) { .tool:hover { border-color: var(--accent); } }
.tool svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.i-moon { display: none; }
:root[data-theme="light"] .i-sun { display: none; }
:root[data-theme="light"] .i-moon { display: block; }

/* زر القائمة: خطين يتحولون علامة إغلاق */
.menu-btn { display: none; }
.bars { position: relative; width: 18px; height: 12px; }
.bars i { position: absolute; inset-inline: 0; height: 2px; border-radius: 2px; background: currentColor; transition: transform .25s, top .25s, width .25s; }
.bars i:first-child { top: 1px; }
.bars i:last-child { top: 9px; width: 12px; }
.nav.open .bars i:first-child { top: 5px; transform: rotate(45deg); }
.nav.open .bars i:last-child { top: 5px; width: 18px; transform: rotate(-45deg); }
.nav.open .menu-btn { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }

.menu {
  padding: 8px; border-radius: 18px;
  background: color-mix(in srgb, var(--nav-bg) 97%, transparent);
  border: 1px solid var(--nav-line); box-shadow: 0 24px 60px rgba(0, 0, 0, .4);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98); transform-origin: top center;
  transition: opacity .22s, transform .22s, visibility 0s .22s;
}
:root[data-theme="light"] .menu { box-shadow: 0 24px 60px rgba(58, 0, 87, .14); }
.nav.open .menu { opacity: 1; visibility: visible; transform: none; transition: opacity .22s, transform .22s; }
.menu-links { display: grid; }
.menu-links a {
  display: flex; align-items: center; gap: 14px; padding: 15px 14px; border-radius: 12px;
  text-decoration: none; font-size: 20px; font-weight: 700; line-height: 1.4;
}
.menu-links a + a { border-top: 1px solid color-mix(in srgb, var(--nav-line) 60%, transparent); }
.menu-links a i { font-size: 12px; min-width: 18px; }
.menu-links a .arrow { width: 20px; height: 20px; margin-inline-start: auto; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:root[dir="rtl"] .menu-links a .arrow { transform: scaleX(-1); }
.menu-links a[aria-current] { color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.menu-links a[aria-current] .arrow { stroke: var(--accent); }
.menu-foot { margin-top: 6px; padding: 14px 6px 6px; border-top: 1px solid var(--nav-line); }
.menu-foot .btn { width: 100%; justify-content: center; }
.scrim {
  position: fixed; inset: 0; z-index: 44; background: rgba(8, 2, 14, .45);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden; transition: opacity .22s, visibility 0s .22s;
}
:root[data-theme="light"] .scrim { background: rgba(30, 11, 44, .22); }
.scrim.on { opacity: 1; visibility: visible; transition: opacity .22s; }

/* حالة التوفر: نقطة خضراء تنبض */
.status { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; color: var(--muted); font-weight: 600; }
.status b { position: relative; width: 9px; height: 9px; border-radius: 50%; background: #3ddc84; flex: none; }
:root[data-theme="light"] .status b { background: #1aa85a; }
@media (prefers-reduced-motion: no-preference) {
  .status b::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: pulse 2.2s ease-out infinite; }
}
@keyframes pulse { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(2.6); opacity: 0; } }

@media (max-width: 860px) {
  .links { display: none; }
  .menu-btn { display: grid; }
  .nav-bar { padding-inline: 16px 9px; }
  .nav-bar .tools { margin-inline-start: auto; }

}
@media (min-width: 861px) { .menu, .scrim { display: none; } }

/* الأزرار: طبقتين داخليتين تعطي حافة مضيئة، توهج سماوي من الأسفل، نقاط ضوء تصعد، وزاوية مطوية تنفرد عند المرور */
:root {
  --btn-base: #4E1484;
  --btn-glow: rgba(2, 200, 240, .55);
  --btn-round: 12px;
}
:root[data-theme="light"] { --btn-base: #3A0057; --btn-glow: rgba(2, 200, 240, .45); }

.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 50px; padding: 10px 22px; border-radius: var(--btn-round); text-decoration: none;
  font: 600 16px/1.3 var(--sans); border: 0; cursor: pointer;
  transition: transform .2s ease, background-color .2s, color .2s;
}
.btn > * { position: relative; z-index: 2; }
.btn svg { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn:active { transform: scale(.96); }

.btn.primary {
  color: #fff;
  background: radial-gradient(65% 65% at 50% 100%, var(--btn-glow) 0%, transparent 100%), var(--btn-base);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
  transition: transform .2s ease, clip-path .45s ease-in-out;
}
.btn.primary::before, .btn.primary::after {
  content: ''; position: absolute; z-index: 0; border-radius: calc(var(--btn-round) - var(--sp)); inset: var(--sp);
  transition: opacity .5s ease-in-out;
}
.btn.primary::before { --sp: 1px; background: linear-gradient(178deg, rgba(255, 255, 255, .24) 0%, rgba(255, 255, 255, 0) 100%); }
.btn.primary::after { --sp: 2px; background: radial-gradient(65% 65% at 50% 100%, var(--btn-glow) 0%, transparent 100%), var(--btn-base); }

/* الزاوية المطوية */
.btn .fold {
  position: absolute; z-index: 1; top: 0; right: 0; width: 14px; height: 14px;
  background: linear-gradient(225deg, transparent 50%, #7fe6fb 50%, #02C8F0);
  border-bottom-left-radius: 5px; transition: transform .45s ease-in-out, opacity .45s;
}

/* نقاط ضوء تصعد ببطء */
.btn .pts { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.btn .pts i { position: absolute; bottom: -6px; width: 2px; height: 2px; border-radius: 50%; background: #fff; opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .btn .pts i { animation: pt-rise 2.3s ease-in-out infinite; }
  .btn .pts i:nth-child(1) { left: 10%; animation-duration: 2.35s; animation-delay: .2s; }
  .btn .pts i:nth-child(2) { left: 30%; animation-duration: 2.5s; animation-delay: .5s; }
  .btn .pts i:nth-child(3) { left: 25%; animation-duration: 2.2s; animation-delay: .1s; }
  .btn .pts i:nth-child(4) { left: 44%; animation-duration: 2.05s; }
  .btn .pts i:nth-child(5) { left: 52%; animation-duration: 1.9s; }
  .btn .pts i:nth-child(6) { left: 75%; animation-duration: 1.6s; animation-delay: 1.4s; }
  .btn .pts i:nth-child(7) { left: 88%; animation-duration: 2.2s; animation-delay: .2s; }
  .btn .pts i:nth-child(8) { left: 63%; animation-duration: 2.5s; animation-delay: .3s; }
}
@keyframes pt-rise {
  0% { transform: translateY(0); opacity: .9; }
  85% { opacity: 0; }
  100% { transform: translateY(-48px); opacity: 0; }
}

/* الزر الثانوي: إطار رفيع بلون الهوية وسهم يتحرك */
.btn.ghost {
  color: var(--text); background: color-mix(in srgb, var(--surface) 70%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--vivid) 45%, var(--line));
}
.btn.ghost::before {
  content: ''; position: absolute; inset: 1px; z-index: 0; border-radius: calc(var(--btn-round) - 1px);
  background: linear-gradient(178deg, rgba(255, 255, 255, .07), transparent 60%);
}
:root[data-theme="light"] .btn.ghost::before { background: linear-gradient(178deg, #fff, transparent 70%); }
.btn.ghost::after {
  content: ''; position: relative; z-index: 2; width: 15px; height: 15px; flex: none; background: currentColor; opacity: .7;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .25s ease, opacity .2s;
}
:root[dir="rtl"] .btn.ghost::after { transform: scaleX(-1); }
.btn.ghost:has(> svg:first-child)::after { display: none; }
.btn.ghost > svg { color: var(--accent); }

@media (hover: hover) {
  .btn.primary:hover { clip-path: polygon(0 0, 100% 0, 100% 0, 100% 100%, 0 100%); }
  .btn.primary:hover .fold { transform: translate(14px, -14px); opacity: 0; }
  .btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--vivid); }
  .btn.ghost:hover::after { opacity: 1; transform: translateX(4px); }
  :root[dir="rtl"] .btn.ghost:hover::after { transform: scaleX(-1) translateX(4px); }
}
/* الأيقونة ترسم نفسها عند المرور */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .btn:hover svg [pathLength] { animation: ic-draw .9s ease forwards; }
}
@keyframes ic-draw { from { stroke-dasharray: 0 100; } to { stroke-dasharray: 100 0; } }

/* الواجهة */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
#field {
  position: absolute; inset: 0; width: 100%; height: 100%; --fade: rgba(0, 0, 0, .18);
  /* النمط يخف خلف النص عشان القراءة تبقى مريحة */
  -webkit-mask-image: linear-gradient(to left, var(--fade) 0%, var(--fade) 38%, #000 72%);
  mask-image: linear-gradient(to left, var(--fade) 0%, var(--fade) 38%, #000 72%);
}
:root[data-theme="light"] #field { --fade: rgba(0, 0, 0, .4); }
:root[dir="ltr"] #field {
  -webkit-mask-image: linear-gradient(to right, var(--fade) 0%, var(--fade) 38%, #000 72%);
  mask-image: linear-gradient(to right, var(--fade) 0%, var(--fade) 38%, #000 72%);
}
@media (max-width: 960px) {
  #field, :root[dir="ltr"] #field { -webkit-mask-image: none; mask-image: none; opacity: var(--field-dim); }
}
.hero-in {
  position: relative; display: grid; grid-template-columns: 1.2fr .8fr; gap: 56px; align-items: center;
  min-height: min(92vh, 880px); padding-top: calc(var(--nav-space) + clamp(36px, 5vw, 64px)); padding-bottom: var(--sec); pointer-events: none;
}
.hero-in > * { pointer-events: auto; }

.mark { display: block; width: 64px; height: auto; margin-bottom: 26px; overflow: visible; }
.mark .dot { fill: var(--mark-dot); transform-box: fill-box; transform-origin: center; }
.mark .brace { fill: none; stroke: var(--vivid); stroke-width: 13; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 420; stroke-dashoffset: 0; }

.name { margin: 0; font-size: clamp(46px, 7.4vw, 92px); line-height: 1.08; font-weight: 700; letter-spacing: -.01em; }
:root[lang="en"] .name { letter-spacing: -.025em; }
.headline { margin: 18px 0 0; font-size: clamp(22px, 2.6vw, 30px); font-weight: 600; line-height: 1.5; color: var(--text); max-width: 28ch; }
:root[lang="en"] .headline { max-width: 26ch; }
.sub { margin: 16px 0 0; color: var(--muted); max-width: 54ch; font-size: 17.5px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* حركة البداية: مرة وحدة عند فتح الصفحة */
@media (prefers-reduced-motion: no-preference) {
  .mark .brace { animation: draw 1.1s cubic-bezier(.6, 0, .2, 1) both; }
  .mark .d1 { animation: pop .45s .55s cubic-bezier(.3, 1.6, .5, 1) both; }
  .mark .d2 { animation: pop .45s .7s cubic-bezier(.3, 1.6, .5, 1) both; }
  .hero-text > :not(.mark) { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
  .hero-text > .name { animation-delay: .25s; }
  .hero-text > .headline { animation-delay: .38s; }
  .hero-text > .sub { animation-delay: .48s; }
  .hero-text > .cta { animation-delay: .58s; }
  .term { animation: rise .8s .5s cubic-bezier(.2, .7, .2, 1) both; }
}
@keyframes draw { from { stroke-dashoffset: 420; } }
@keyframes pop { from { transform: scale(0); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* الطرفية */
.term {
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  overflow: hidden; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.term-bar i:first-child { background: #ff5f57; }
.term-bar i:nth-child(2) { background: #febc2e; }
.term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-inline-start: auto; font: 400 12.5px var(--mono); color: var(--muted); }
.term-body { margin: 0; padding: 18px 20px 22px; min-height: 250px; font: 400 14px/1.85 var(--mono); color: var(--text); white-space: pre-wrap; overflow-wrap: break-word; text-align: left; }
.term-body .ln + .ln:not(.out) { margin-top: 10px; }
.term-body .ln { display: block; }
.term-body .ln[dir="rtl"] { font-family: var(--sans); text-align: left; unicode-bidi: plaintext; }
.term-body .pr { color: var(--accent); }
.term-body .out { color: var(--muted); }
.term-body .ok { color: #3ddc84; }
.term-body .nw { white-space: nowrap; }
.caret { display: inline-block; width: 8px; height: 1.05em; vertical-align: -2px; background: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .caret { animation: none; } }

/* الأقسام */
section { scroll-margin-top: 0; }
h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.3; margin: 0 0 var(--head-gap); font-weight: 700; }
.lead { color: var(--muted); max-width: 62ch; margin: 0 0 clamp(24px, 3vw, 36px); }
h2 + .lead { margin-top: calc(var(--head-gap) * -.5); }

.about, .work, .fields, .contact { padding-block: var(--sec); }
.about-in { display: grid; grid-template-columns: 200px 1fr 280px; gap: 48px; align-items: start; }
.about-text p { margin: 0 0 18px; max-width: 62ch; }
.facts { margin: 0; display: grid; gap: 18px; border-inline-start: 2px solid var(--accent); padding-inline-start: 22px; }
.facts dt { font-size: 14px; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }

.work { background: var(--bg-2); border-block: 1px solid var(--line); }
.group-title { font-size: 22px; margin: 0 0 6px; font-weight: 700; color: var(--accent); }
.work h2 + .group-title { margin-top: 0; }

.own-list { display: grid; gap: var(--sec); margin-bottom: var(--sec); }
.feature { display: grid; grid-template-columns: 1.05fr .95fr; gap: 44px; align-items: center; }
.feature.flip .shot { order: 2; }
.shot {
  display: block; text-decoration: none; color: inherit; border-radius: 18px; overflow: hidden; border: 1px solid var(--line);
  background: var(--surface); box-shadow: var(--shadow); aspect-ratio: 16 / 10;
}
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.shot:hover img { transform: scale(1.03); }
.ftitle { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.ftitle h4 { margin: 0; font-size: 26px; font-weight: 700; }
.picon { width: 44px; height: 44px; border-radius: 12px; flex: none; }
.picon.glyph { display: grid; place-items: center; background: var(--brand); color: #fff; }
.picon.glyph svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.picon.glyph.big { width: 56px; height: 56px; border-radius: 15px; }
.feature-text p { margin: 0 0 12px; max-width: 58ch; }
.feature-text .problem { color: var(--muted); font-size: 16px; }
.more { display: inline-block; margin-top: 6px; font-weight: 600; color: var(--accent); text-decoration: none; border-bottom: 1.5px solid currentColor; padding-bottom: 1px; }
.more:hover { color: var(--text); }

/* بيت تبيان */
.verse {
  height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 6px;
  padding: 36px 40px; background:
    radial-gradient(circle at 85% 15%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 55%),
    var(--surface);
  font-family: var(--sans); text-align: center; position: relative;
}
.verse-line { margin: 0; font-size: clamp(20px, 2.3vw, 28px); line-height: 1.9; font-weight: 600; }
.gloss-word { position: relative; background: transparent; color: var(--accent); border-bottom: 2px dashed var(--accent); }
.gloss {
  position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%);
  background: var(--accent-2); color: #1a0a26; font-size: 14px; font-weight: 600; line-height: 1.4;
  padding: 6px 12px; border-radius: 8px; white-space: nowrap;
}
:root[data-theme="light"] .gloss { color: #fff; }
.gloss::after { content: ''; position: absolute; bottom: 100%; left: 50%; margin-left: -6px; border: 6px solid transparent; border-bottom-color: var(--accent-2); }
.verse-by { color: var(--muted); font-size: 14px; margin-top: 46px; }

/* مشاريع العملاء */
.clients { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.clients li { display: flex; align-items: stretch; border-bottom: 1px solid var(--line); }
.clients li:nth-child(odd) { border-inline-end: 1px solid var(--line); }
.client { flex: 1; display: flex; gap: 16px; align-items: flex-start; padding: 22px 20px; text-decoration: none; transition: background-color .2s; }
.client:hover { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.client:hover .ctitle { color: var(--accent); }
.cicon { flex: none; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--accent); }
.cicon svg, .visit svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ctext { display: flex; flex-direction: column; gap: 2px; }
.ctitle { font-weight: 700; font-size: 18px; transition: color .2s; }
.csum { color: var(--muted); font-size: 15px; line-height: 1.7; }
.visit { flex: none; align-self: center; width: 40px; height: 40px; margin-inline-end: 14px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); border: 1px solid transparent; }
.visit:hover { color: var(--accent); border-color: var(--line); }
:root[dir="rtl"] .ic-out { transform: scaleX(-1); }

/* المجالات */
.field-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 10px; }
.field-col { padding: 6px 28px 6px 28px; border-inline-start: 1px solid var(--line); }
.field-col:first-child { padding-inline-start: 0; border-inline-start: 0; }
.field-col h3 { margin: 0 0 10px; font-size: 21px; }
.field-col p { margin: 0; color: var(--muted); font-size: 16px; }

/* التواصل */
.contact { background: var(--bg-2); border-top: 1px solid var(--line); }
/* الفوتر */

.foot { padding-block: 26px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14.5px; background: var(--bg); }
.foot-in { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.foot .brand img { height: 26px; }
.foot-copy { margin: 0; text-align: center; }
.foot-links { display: flex; gap: 8px; justify-self: end; }
.foot-ic {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--muted); transition: color .2s, border-color .2s, transform .2s;
}
.foot-ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .foot-ic:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); } }
/* في الإنجليزي الأزرار على اليمين فنبعدها عن زر الواتساب العائم */
@media (min-width: 721px) and (max-width: 1320px) { :root[dir="ltr"] .foot-links { margin-right: 76px; } }


/* زر الواتساب العائم: دائما على اليمين وبألوان الهوية */
.wa-float {
  position: fixed; bottom: 22px; right: 22px; left: auto; z-index: 50;
  width: 60px; height: 60px; border-radius: 50%;
  background: #3A0057; color: #02C8F0; border: 2px solid #02C8F0;
  display: grid; place-items: center; box-shadow: 0 10px 30px rgba(2, 200, 240, .28);
  transition: transform .15s, box-shadow .2s;
}
.wa-float::before {
  content: ''; position: absolute; top: 6px; right: 6px; width: 10px; height: 10px; border-radius: 50%;
  background: #FFF200; box-shadow: 0 0 0 2px #3A0057;
}
.wa-float:hover { transform: scale(1.06); box-shadow: 0 12px 34px rgba(2, 200, 240, .42); }
.wa-float svg { width: 30px; height: 30px; }
@media (prefers-reduced-motion: no-preference) {
  .wa-float::after { content: ''; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid #02C8F0; animation: ring 1.6s 1.8s ease-out 2; opacity: 0; }
}
@keyframes ring { 0% { opacity: .8; transform: scale(1); } 100% { opacity: 0; transform: scale(1.6); } }

/* صفحة دراسة المشروع */
.case-head { padding: calc(var(--nav-space) + clamp(28px, 4vw, 48px)) 0 var(--block); border-bottom: 1px solid var(--line); background: var(--bg-2); }
.back { display: inline-block; color: var(--muted); text-decoration: none; font-size: 15px; margin-bottom: 26px; }
.back::before { content: '‹ '; }
:root[dir="rtl"] .back::before { content: '› '; }
.back:hover { color: var(--accent); }
.case-title { display: flex; align-items: center; gap: 18px; }
.case-title .picon { width: 56px; height: 56px; border-radius: 15px; }
.kind { color: var(--accent); font-weight: 600; font-size: 15px; }
.case-title h1 { margin: 0; font-size: clamp(32px, 5vw, 54px); line-height: 1.2; }
.case-sum { font-size: clamp(18px, 2vw, 21px); color: var(--muted); max-width: 60ch; margin: 18px 0 0; }
.case-body { padding-block: var(--block) var(--sec); }
.case-shot { margin: 0 0 56px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface); }
.case-shot.verse-wrap .verse { padding: 70px 40px; }
.case-block { display: grid; grid-template-columns: 220px 1fr; gap: 40px; padding: clamp(24px, 3vw, 34px) 0; border-top: 1px solid var(--line); }
.case-block h2 { font-size: 22px; margin: 0; color: var(--accent); }
.case-block p { margin: 0; max-width: 64ch; font-size: 18px; }
.solved { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.solved li { position: relative; padding-inline-start: 30px; max-width: 64ch; }
.solved li::before {
  content: ''; position: absolute; inset-inline-start: 0; top: .45em; width: 18px; height: 18px; background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
:root[lang="en"] .solved li::before { top: .2em; }
.case-block.result p { font-weight: 600; font-size: 20px; }
.case-end { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 30px; }
.case-cta, .next { border: 1px solid var(--line); border-radius: 18px; padding: 26px 28px; background: var(--surface); }
.case-cta p { margin: 0 0 16px; font-size: 20px; font-weight: 600; }
.next { text-decoration: none; display: flex; flex-direction: column; justify-content: center; gap: 4px; transition: border-color .2s; }
.next span { color: var(--muted); font-size: 15px; }
.next strong { font-size: 22px; }
.next:hover { border-color: var(--accent); }
.case-missing { padding: calc(var(--nav-space) + 80px) var(--gutter) var(--sec); text-align: center; }
.case-missing p { font-size: 20px; margin-bottom: 24px; }

/* الشاشات الصغيرة */
@media (max-width: 960px) {
  .hero-in { grid-template-columns: 1fr; gap: 40px; min-height: 0; }
  .about-in { grid-template-columns: 1fr; gap: 24px; }
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 22px; }
  .feature.flip .shot { order: 0; }
  .clients { grid-template-columns: 1fr; }
  .clients li:nth-child(odd) { border-inline-end: 0; }
  .field-grid { grid-template-columns: 1fr; gap: 28px; }
  .field-col, .field-col:first-child { padding: 0 0 0 0; border: 0; }
  .case-block { grid-template-columns: 1fr; gap: 12px; }
  .case-end { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  :root { --nav-h: 58px; --nav-top: 10px; }
  .nav { padding-inline: 12px; }
  .hero-in { gap: 40px; }
  .mark { width: 50px; margin-bottom: 22px; }
  .headline { margin-top: 14px; }
  .cta { margin-top: 28px; }
  .hero .cta { flex-direction: column; align-items: stretch; }
  .hero .cta .btn { justify-content: center; }
  .foot { padding-block: 28px 30px; }
  .foot-in { grid-template-columns: 1fr; justify-items: center; gap: 14px; }
  .foot-links { justify-self: center; }
  .term-body { min-height: 0; font-size: 13px; }
  .verse { padding: 30px 20px; }
  .wa-float { bottom: 16px; right: 16px; width: 54px; height: 54px; }
}

/* النمط في قسم التواصل */
.contact { position: relative; overflow: hidden; }
.field-soft { position: absolute; inset: 0; width: 100%; height: 100%; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 45%); mask-image: linear-gradient(to bottom, transparent, #000 45%); }
.contact-in { position: relative; }

/* أزرار أصغر */
.btn.small { min-height: 42px; padding: 8px 16px; font-size: 14.5px; gap: 8px; --btn-round: 10px; }
.btn.small svg { width: 17px; height: 17px; }
.btn.small.ghost::after { width: 13px; height: 13px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* إطارات الأجهزة */
.shot { aspect-ratio: auto; border: 0; background: none; box-shadow: none; overflow: visible; position: relative; padding: 4% 0 0; }
.shot:hover img { transform: none; }
.devices { position: relative; padding-bottom: 2.5%; }
.laptop { width: 82%; position: relative; margin-inline-start: 3%; }
.lid {
  background: var(--dev-bezel); border-radius: 16px 16px 0 0; padding: 2.4% 2.4% 0;
  box-shadow: 0 0 0 1.5px var(--dev-rim), 0 0 0 3px var(--dev-rim-2), var(--dev-shadow);
}
.screen { aspect-ratio: 16 / 10; overflow: hidden; background: #000; border-radius: 6px 6px 0 0; container-type: inline-size; position: relative; }
.screen > img, .phone-screen > img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.base {
  position: relative; height: 0; padding-bottom: 3.2%; width: 108%; margin-inline-start: -4%;
  background: linear-gradient(#d9d4e0, #a39cae 70%, #7d7689);
  border-radius: 2px 2px 18px 18px;
}
.base::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 15%; height: 38%; background: #8b8497; border-radius: 0 0 8px 8px; }
.phone {
  position: absolute; inset-inline-end: 0; bottom: 0; width: 22%;
  padding: 1.1%;
  background: var(--dev-bezel); border-radius: 15% / 7%;
  box-shadow: 0 0 0 1.5px var(--dev-rim), 0 0 0 3px var(--dev-rim-2), var(--dev-shadow);
}
/* الجزيرة السوداء أعلى الشاشة */
.phone::before { content: ''; position: absolute; top: 3%; left: 50%; transform: translateX(-50%); width: 28%; height: 2.6%; background: #000; border-radius: 99px; z-index: 2; }
.phone-screen { width: 100%; aspect-ratio: 9 / 19.5; border-radius: 12.5% / 5.8%; overflow: hidden; background: #000; container-type: inline-size; position: relative; }
.popup-frame {
  position: absolute; inset-inline-end: 0; top: 10%; width: 27%;
  border-radius: 12px; overflow: hidden; border: 1px solid var(--line);
  box-shadow: 0 24px 50px rgba(0, 0, 0, .45); background: var(--surface);
}
.popup-frame img { width: 100%; display: block; }

/* شاشة الهوية للمشاريع اللي ما وصلت صورها */
.ph {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4cqw;
  background:
    radial-gradient(circle at 80% 15%, rgba(2, 200, 240, .22), transparent 50%),
    radial-gradient(circle at 15% 90%, rgba(255, 242, 0, .10), transparent 45%),
    #3A0057;
  color: #fff; text-align: center; padding: 6cqw;
}
.ph-mark { width: 12cqw; height: auto; }
.ph-mark circle { fill: #FFF200; }
.ph-mark path { fill: none; stroke: #02C8F0; stroke-width: 13; stroke-linecap: round; stroke-linejoin: round; }
.ph-title { font-family: var(--sans); font-weight: 700; font-size: 5.2cqw; line-height: 1.35; }
.phone-screen .ph-mark { width: 24cqw; }
.phone-screen .ph-title { font-size: 10cqw; }

/* بيت تبيان داخل الشاشات */
.screen .verse, .phone-screen .verse { position: absolute; inset: 0; padding: 4cqw; gap: 1cqw; }
.screen .verse-line { font-size: 4.2cqw; }
.screen .gloss { font-size: 2.2cqw; padding: 1cqw 2cqw; top: calc(100% + 2cqw); }
.screen .verse-by { font-size: 2.2cqw; margin-top: 7cqw; }
.phone-screen .verse { padding: 4cqw 3cqw; }
.phone-screen .verse-line { font-size: 7cqw; white-space: nowrap; line-height: 2.2; }
/* الشاشة صغيرة فنكتفي بتمييز الكلمة بدون شرحها */
.phone-screen .gloss { display: none; }
.phone-screen .verse-by { font-size: 5cqw; margin-top: 6cqw; }

/* إشارة شاهد المشروع فوق المعاينة */
.view-hint {
  position: absolute; z-index: 3; top: 44%; left: 44%; transform: translate(-50%, -50%) scale(.94);
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 12px;
  color: #fff; font-weight: 600; font-size: 15px; white-space: nowrap; pointer-events: none; opacity: 0;
  background: radial-gradient(65% 65% at 50% 100%, var(--btn-glow) 0%, transparent 100%), var(--btn-base);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), 0 8px 22px rgba(0, 0, 0, .3);
  transition: opacity .25s, transform .25s;
}
.view-hint svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:root[dir="rtl"] .view-hint { left: 56%; }
/* شاشة الجهاز تتعتم عند المرور عشان يبان الزر فوقها */
.screen::after {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: rgba(18, 5, 28, .55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
:root[data-theme="light"] .screen::after { background: rgba(246, 242, 249, .5); }
.phone, .popup-frame { z-index: 4; }
.shot:hover .screen::after, .shot:focus-visible .screen::after, .ccard-shot:hover .screen::after, .ccard-shot:focus-visible .screen::after { opacity: 1; }
.shot:hover .view-hint, .shot:focus-visible .view-hint, .ccard-shot:hover .view-hint, .ccard-shot:focus-visible .view-hint { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.shot:hover .lid, .ccard-shot:hover .lid { box-shadow: 0 0 0 1.5px var(--vivid), 0 0 0 3px var(--dev-rim-2), var(--dev-shadow); }

/* بطاقات مشاريع العملاء */
.ccards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.ccard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.ccard-shot { display: block; position: relative; padding: 26px; background: var(--bg); border-bottom: 1px solid var(--line); text-decoration: none; }
.ccard-body { padding: 20px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.ccard-body p { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.8; }
.ccard-body .actions { margin-top: auto; padding-top: 16px; }
.ftitle.small { margin-bottom: 6px; gap: 12px; }
.ftitle.small h4 { font-size: 19px; }

/* المعاينة في صفحة المشروع */
.case-devices {
  margin: 0 0 var(--block); padding: clamp(22px, 4.5vw, 52px) clamp(18px, 6vw, 96px);
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 22px;
}

@media (max-width: 960px) {
  .ccards { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .ccard-shot { padding: 20px; }
  .view-hint { display: none; }
}

/* نمط الدوائر الإلكترونية خلف قسم الأعمال: يظهر في الأعلى ويخف، وضوء هادئ يمشي على المسارات */
.work { position: relative; overflow: hidden; }
.work > .wrap { position: relative; z-index: 1; }
.work::before, .work::after {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 620px; pointer-events: none;
  -webkit-mask: url(/assets/img/circuit.svg) 0 0 / 240px 240px repeat, linear-gradient(to bottom, #000 0%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask: url(/assets/img/circuit.svg) 0 0 / 240px 240px repeat, linear-gradient(to bottom, #000 0%, transparent 100%);
  mask-composite: intersect;
}
.work::before { background: var(--trace); }
.work::after {
  background: linear-gradient(105deg, transparent 42%, var(--accent) 50%, transparent 58%) 0 0 / 300% 100% no-repeat;
  opacity: .8;
}
@media (prefers-reduced-motion: no-preference) {
  .work::after { animation: trace-sweep 10s linear infinite; }
}
@media (prefers-reduced-motion: reduce) {
  .work::after { display: none; }
}
@keyframes trace-sweep {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}
:root { --trace: rgba(183, 166, 198, .16); }
:root[data-theme="light"] { --trace: rgba(58, 0, 87, .10); }

/* لابتوب لحاله لما ما عندنا صورة جوال */
.devices.solo { padding-bottom: 0; }
.devices.solo .laptop { width: 86%; margin-inline: auto; }

/* تصفح الصفحة كاملة في صفحة المشروع */
.fullpage { padding: clamp(28px, 4vw, 44px) 0 0; border-top: 1px solid var(--line); }
.fp-head h2 { font-size: 22px; margin: 0 0 6px; color: var(--accent); }
.fp-head p { margin: 0 0 20px; color: var(--muted); font-size: 16px; }
.fp-win { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.fp-bar { display: flex; align-items: center; gap: 7px; padding: 11px 16px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.fp-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.fp-bar i:first-child { background: #ff5f57; }
.fp-bar i:nth-child(2) { background: #febc2e; }
.fp-bar i:nth-child(3) { background: #28c840; }
.fp-bar span {
  margin: 0 auto; padding: 4px 14px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line);
  font: 400 13px var(--mono); color: var(--muted); max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fp-scroll { height: min(72vh, 760px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; background: #fff; }
.fp-scroll img { width: 100%; display: block; }
@media (max-width: 720px) { .fp-scroll { height: 64vh; } }

.case-devices figcaption { text-align: center; margin-top: 14px; font-size: 13.5px; color: var(--muted); }

/* نافذة طلب المشروع */
html.rq-lock { overflow: hidden; }
.rq {
  width: min(760px, calc(100vw - 32px)); max-height: min(88vh, 860px); padding: 0; border: 0; border-radius: 22px;
  background: transparent; color: var(--text); overflow: visible;
}
.rq::backdrop { background: rgba(8, 2, 14, .62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
:root[data-theme="light"] .rq::backdrop { background: rgba(30, 11, 44, .35); }
.rq[open] { animation: rq-in .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes rq-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .rq[open] { animation: none; } }
.rq-box {
  display: flex; flex-direction: column; max-height: min(88vh, 860px); border-radius: 22px; overflow: hidden;
  background:
    radial-gradient(120% 60% at 100% 0%, color-mix(in srgb, var(--vivid) 10%, transparent), transparent 60%),
    var(--surface);
  border: 1px solid var(--nav-line); box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}
:root[data-theme="light"] .rq-box { box-shadow: 0 30px 80px rgba(58, 0, 87, .2); }
.rq-head { position: relative; padding: 20px 26px 0; }
.rq-eyebrow { display: flex; flex-direction: column; gap: 2px; }
.rq-eyebrow b { color: var(--accent); font-size: 14px; }
.rq-eyebrow span { color: var(--muted); font-size: 13px; }
.rq-close {
  position: absolute; top: 18px; inset-inline-end: 20px; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 50%, transparent); color: var(--muted); cursor: pointer;
}
.rq-close:hover { color: var(--text); border-color: var(--accent); }
.rq svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.rq-bar { height: 3px; margin-top: 16px; border-radius: 3px; background: var(--line); overflow: hidden; }
.rq-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--vivid), #c084fc); transition: width .35s ease; }
:root[dir="rtl"] .rq-bar i { margin-inline-start: 0; background: linear-gradient(270deg, var(--vivid), #c084fc); }
.rq-body { padding: 22px 26px 8px; overflow-y: auto; overscroll-behavior: contain; }
.rq-body h2 { margin: 0; font-size: clamp(21px, 2.6vw, 26px); outline: none; }
.rq-desc { margin: 4px 0 18px; color: var(--muted); font-size: 15px; }
.rq-field { margin-bottom: 18px; }
.rq-label { font-weight: 600; font-size: 15px; margin-bottom: 8px; }
.rq-label small { color: var(--muted); font-weight: 400; font-size: 13px; }
.rq-label:empty { display: none; }
.rq-err { color: #ff6b81; font-size: 13.5px; margin-top: 6px; min-height: 0; }
:root[data-theme="light"] .rq-err { color: #c0264a; }
.rq-err:empty { display: none; }
.rq-in {
  width: 100%; font: 400 16px/1.6 var(--sans); color: var(--text); background: color-mix(in srgb, var(--bg) 55%, transparent);
  border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; transition: border-color .2s, box-shadow .2s;
}
textarea.rq-in { resize: vertical; min-height: 96px; }
.rq-in::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.rq-in:focus { outline: none; border-color: var(--vivid); box-shadow: 0 0 0 3px color-mix(in srgb, var(--vivid) 20%, transparent); }
.rq-field.bad .rq-in { border-color: #ff6b81; }
.rq-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rq-other { margin: -6px 0 16px; }

/* بطاقات الخيارات */
.rq-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rq-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rq-opt { position: relative; cursor: pointer; }
.rq-opt input { position: absolute; opacity: 0; pointer-events: none; }
.rq-cards .rq-opt {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 14px;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 45%, transparent); transition: border-color .2s, background-color .2s;
}
.rq-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; font-style: normal;
  background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.rq-opt span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rq-opt b { font-size: 15px; font-weight: 600; line-height: 1.5; }
.rq-opt small { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.rq-chips .rq-opt {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 45%, transparent);
  font-size: 14.5px; transition: border-color .2s, background-color .2s;
}
.rq-chips .rq-opt b { font-size: 14.5px; }
@media (hover: hover) { .rq-opt:hover { border-color: color-mix(in srgb, var(--vivid) 55%, var(--line)); } }
.rq-opt.on { border-color: var(--vivid); background: color-mix(in srgb, var(--vivid) 10%, transparent); }
.rq-cards .rq-opt.on .rq-ic { background: var(--vivid); color: #05131a; }
.rq-chips .rq-opt.on { background: linear-gradient(135deg, color-mix(in srgb, var(--vivid) 85%, #000), #8b5cf6); color: #fff; border-color: transparent; }
.rq-opt:has(input:focus-visible) { outline: 2px solid var(--vivid); outline-offset: 2px; }

/* الروابط والصور */
.rq-links { display: grid; gap: 8px; }
.rq-link { display: flex; gap: 8px; }
.rq-x { flex: none; width: 46px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.rq-add { margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--accent); font: 600 14px var(--sans); cursor: pointer; padding: 4px 0; }
.rq-drop {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px; border-radius: 14px; cursor: pointer; text-align: center;
  border: 1.5px dashed color-mix(in srgb, var(--vivid) 45%, var(--line)); background: color-mix(in srgb, var(--vivid) 5%, transparent); transition: background-color .2s;
}
.rq-drop.over { background: color-mix(in srgb, var(--vivid) 14%, transparent); }
.rq-drop svg { width: 26px; height: 26px; color: var(--accent); }
.rq-drop b { font-size: 15px; font-weight: 600; }
.rq-drop small { color: var(--muted); font-size: 13px; }
.rq-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.rq-thumbs:empty { display: none; }
.rq-thumb { position: relative; width: 84px; height: 84px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.rq-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rq-thumb button { position: absolute; top: 4px; inset-inline-end: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .65); color: #fff; display: grid; place-items: center; cursor: pointer; }
.rq-thumb button svg { width: 14px; height: 14px; }
.rq-privacy { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.rq-hp { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; inset-inline-start: -9999px; }

/* التذييل */
.rq-foot { display: flex; align-items: center; gap: 12px; padding: 14px 26px 18px; border-top: 1px solid var(--line); }
.rq-back { background: none; border: 0; color: var(--muted); font: 600 15px var(--sans); cursor: pointer; padding: 8px 4px; }
.rq-back:hover { color: var(--text); }
.rq-note { flex: 1; text-align: center; color: var(--muted); font-size: 13px; }
.rq-next { min-width: 130px; }
.rq-next.busy { opacity: .8; pointer-events: none; }

/* رسالة النجاح والفشل */
.rq-msg { position: relative; align-items: center; text-align: center; padding: 48px 28px 34px; }
.rq-msg > svg { width: 58px; height: 58px; color: #3ddc84; }
.rq-msg.fail > svg { color: var(--accent-2); }
:root[data-theme="light"] .rq-msg.fail > svg { color: #d99a00; }
.rq-msg h2 { margin: 14px 0 6px; font-size: 24px; outline: none; }
.rq-msg p { margin: 0 auto 22px; color: var(--muted); max-width: 44ch; }
.rq-msg-act { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

@media (max-width: 720px) {
  .rq { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; }
  .rq-box { max-height: 100dvh; height: 100dvh; border-radius: 0; border: 0; }
  .rq-head { padding: 16px 18px 0; }
  .rq-close { top: 14px; inset-inline-end: 14px; }
  .rq-body { padding: 18px 18px 8px; flex: 1; }
  .rq-cards, .rq-row { grid-template-columns: 1fr; }
  .rq-foot { padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); }
  .rq-note { display: none; }
  .rq-next { margin-inline-start: auto; }
}

/* زر طلب المشروع في الشريط العلوي */
.nav-cta { margin-inline-end: 4px; }
@media (max-width: 1100px) { .nav-cta { display: none; } }

/* قسم التواصل: لوحة وحدة، الطلب أساسي والتواصل المباشر جانبي */
.cpanel {
  display: grid; grid-template-columns: 1.35fr 1fr; border-radius: 24px; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--vivid) 28%, var(--line));
  background: radial-gradient(80% 120% at 100% 0%, color-mix(in srgb, var(--vivid) 12%, transparent), transparent 60%), var(--surface);
  box-shadow: var(--shadow);
}
:root[dir="ltr"] .cpanel { background: radial-gradient(80% 120% at 0% 0%, color-mix(in srgb, var(--vivid) 12%, transparent), transparent 60%), var(--surface); }
.cp-main { padding: clamp(26px, 4vw, 48px); }
.cp-main h2 { margin-bottom: 10px; }
.cp-main .lead { margin-bottom: 22px; }
.cp-steps { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 12px; }
.cp-steps li { display: flex; align-items: center; gap: 12px; font-size: 16px; }
.cp-steps b {
  width: 30px; height: 30px; border-radius: 9px; flex: none; display: grid; place-items: center; font: 500 14px var(--mono);
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.cp-side {
  padding: clamp(26px, 4vw, 48px); display: flex; flex-direction: column; justify-content: center; gap: 12px;
  border-inline-start: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 35%, transparent);
}
.cp-side-t { margin: 0 0 4px; color: var(--muted); font-size: 14.5px; font-weight: 600; }
.channel {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; text-decoration: none;
  border: 1px solid var(--line); background: var(--surface); transition: border-color .2s, transform .2s;
}
@media (hover: hover) { .channel:hover { border-color: var(--vivid); transform: translateY(-2px); } }
.ch-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent);
}
.channel.wa .ch-icon { background: #3A0057; color: #02C8F0; }
.ch-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ch-text { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.ch-label { color: var(--muted); font-size: 13px; }
.ch-value { font-weight: 700; font-size: 16.5px; line-height: 1.5; max-width: 100%; overflow-wrap: anywhere; }
.cp-loc { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.cp-loc svg { width: 17px; height: 17px; fill: none; stroke: var(--accent); stroke-width: 1.7; flex: none; }
@media (max-width: 860px) {
  .cpanel { grid-template-columns: 1fr; }
  .cp-side { border-inline-start: 0; border-top: 1px solid var(--line); }
  .cp-main .btn { width: 100%; }
}
@media (max-width: 420px) {
  .channel { padding: 12px 14px; gap: 12px; }
  .ch-icon { width: 40px; height: 40px; }
  .ch-value { font-size: 14.5px; overflow-wrap: normal; }
}

/* شريط التمرير داخل النافذة ونافذة تصفح الصفحة: رفيع وبتدرج ألوان الهوية */
.rq-body::-webkit-scrollbar, .fp-scroll::-webkit-scrollbar { width: 10px; }
.rq-body::-webkit-scrollbar-button, .fp-scroll::-webkit-scrollbar-button { display: none; height: 0; }
.rq-body::-webkit-scrollbar-track, .fp-scroll::-webkit-scrollbar-track { background: transparent; margin-block: 12px; }
.rq-body::-webkit-scrollbar-track { background: linear-gradient(transparent, transparent) padding-box; }
.rq-body::-webkit-scrollbar-thumb, .fp-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--vivid), #8b5cf6) padding-box;
  border-radius: 99px; border: 3px solid transparent;
}
.rq-body::-webkit-scrollbar-thumb:hover, .fp-scroll::-webkit-scrollbar-thumb:hover { border-width: 2px; }
.rq-body::-webkit-scrollbar-corner { background: transparent; }
/* فايرفوكس ما يدعم الشكل أعلاه، فنعطيه شريطا رفيعا بلون الهوية */
@supports not selector(::-webkit-scrollbar) {
  .rq-body, .fp-scroll { scrollbar-width: thin; scrollbar-color: #8b5cf6 transparent; }
}
