:root {
  --bg: #111013;
  --panel: #1b1a1f;
  --card: #232228;
  --line: #34323b;
  --text: #e5e5e5;
  --muted: #a9a7b0;
  --white: #fff;
  --purple: #b349f4;
  --grad: linear-gradient(180deg, #ac55e0 0%, #712cef 100%);
  --head: "Sora", "IBM Plex Sans Arabic", sans-serif;
  --body: "Manrope", "IBM Plex Sans Arabic", sans-serif;
  --btn: "Montserrat", "IBM Plex Sans Arabic", sans-serif;
  --r: 18px;
}
html[lang="ar"] { --head: "IBM Plex Sans Arabic", "Sora", sans-serif; --body: "IBM Plex Sans Arabic", "Manrope", sans-serif; --btn: "IBM Plex Sans Arabic", sans-serif; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 300 16px/1.75 var(--body); -webkit-font-smoothing: antialiased; }
html[lang="ar"] body { font-weight: 400; line-height: 1.9; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 500; line-height: 1.2; margin: 0 0 .6em; color: var(--white); }
p { margin: 0 0 1em; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: -999px; top: 8px; background: var(--white); color: #000; padding: 8px 12px; z-index: 100; }
.skip:focus { inset-inline-start: 8px; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; font: 500 16px/1 var(--btn); color: var(--white); text-decoration: none;
  background: var(--grad); border: 1px solid transparent; border-radius: 4px; padding: 13px 22px; cursor: pointer; transition: filter .2s, transform .2s; }
.btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: #cfcfd4; }
.btn-ghost:hover { background: rgba(255,255,255,.06); }
.btn-sm { padding: 10px 16px; font-size: 15px; }
.arr { width: 16px; height: 16px; }
html[dir="rtl"] .arr { transform: scaleX(-1); }
.row { display: flex; flex-wrap: wrap; gap: 16px; }

/* header */
.top { position: sticky; top: 0; z-index: 50; background: rgba(17,16,19,.85); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255,255,255,.06); }
.bar { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.logo img { height: 24px; width: auto; }
#nav { margin-inline-start: auto; }
#nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
#nav a { text-decoration: none; font-size: 15px; font-weight: 400; color: var(--text); display: inline-flex; align-items: center; gap: 8px; }
#nav a::before { content: ""; width: 9px; height: 9px; border: 2px solid var(--purple); border-radius: 50%; }
#nav a:hover { color: var(--white); }
.actions { display: flex; align-items: center; gap: 14px; }
.lang { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-size: 15px; padding: 6px 10px; border-radius: 4px; background: #2a2930; }
.lang img { width: 18px; height: 18px; filter: invert(1); }
.menu-btn { display: none; margin-inline-start: auto; background: none; border: 0; padding: 8px; cursor: pointer; }
.menu-btn span { display: block; width: 24px; height: 2px; background: var(--white); margin: 5px 0; transition: .2s; }

/* hero */
.hero { position: relative; min-height: calc(100vh - 72px); display: flex; align-items: center;
  background: linear-gradient(90deg, rgba(10,8,25,.85) 0%, rgba(10,8,25,.35) 70%), url("/assets/img/hero.webp") center/cover no-repeat; }
html[dir="rtl"] .hero { background: linear-gradient(270deg, rgba(10,8,25,.85) 0%, rgba(10,8,25,.35) 70%), url("/assets/img/hero.webp") center/cover no-repeat; }
.hero h1 { font-size: clamp(36px, 6vw, 65px); max-width: 15ch; }
html[lang="ar"] .hero h1 { max-width: 18ch; line-height: 1.35; }
.hero .lead { font-size: 17px; margin-bottom: 28px; }

/* sections */
.sec { padding: 96px 0 0; }
.kicker { font: 400 clamp(26px, 3vw, 36px)/1.2 var(--head); color: var(--purple); text-transform: uppercase; margin-bottom: 8px; }
html[lang="ar"] .kicker { text-transform: none; }
h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 400; color: var(--purple); margin-bottom: 32px; }
.panel { background: var(--panel); border-radius: var(--r); padding: clamp(24px, 5vw, 56px); }

/* about */
.about { display: grid; grid-template-columns: 1fr 1.6fr .6fr; gap: 48px; align-items: center; }
.about-img { border-radius: var(--r); aspect-ratio: 3/4; object-fit: cover; width: 100%; }
.about h2 { color: var(--white); }
.about .kicker { font-size: 20px; text-transform: none; }
.stats { display: grid; gap: 32px; text-align: center; }
.stat .num, .stat .suf { font: 500 64px/1 var(--head); color: #f1d3ff; }
.stat p { margin: 8px 0 0; font-weight: 400; }

/* services */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-bottom: 32px; }
.card { position: relative; overflow: hidden; background: var(--card); border-radius: var(--r); padding: 32px; min-height: 420px;
  display: flex; flex-direction: column; justify-content: flex-end; isolation: isolate; }
.card.has-bg::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8,10,30,.55), rgba(8,10,30,.92) 65%), var(--img) center/cover; }
.card h3 { font-size: 24px; }
.card p { color: var(--text); margin: 0; }
.card .pattern { position: absolute; top: 32px; inset-inline-start: 32px; width: 120px; opacity: .8; }
.card.wide { min-height: 300px; }
.card.wide p { max-width: 60ch; }

/* why */
.why { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; }
.why h2 { color: var(--white); }
.why-img { border-radius: var(--r); aspect-ratio: 2/3; object-fit: cover; width: 100%; max-height: 640px; }
.ticks { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 18px; }
.ticks h4 { font: 500 16px/1.4 var(--body); color: var(--purple); margin: 0 0 4px; display: flex; align-items: center; gap: 12px; }
html[lang="ar"] .ticks h4 { font-weight: 600; }
.ticks h4::before { content: ""; flex: none; width: 12px; height: 12px; border: 2px solid var(--purple); border-radius: 50%; }
.ticks p { margin: 0; padding-inline-start: 28px; }

/* steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.steps li { display: grid; grid-template-columns: 120px 1fr; gap: 24px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); }
.steps .n { font: 200 72px/1 var(--head); color: transparent; -webkit-text-stroke: 1px #6f6c78; }
.steps h4 { font-size: 22px; margin-bottom: 4px; }
.steps p { margin: 0; }

/* cta */
.cta { position: relative; overflow: hidden; isolation: isolate; text-align: center; border-radius: var(--r); padding: 72px 24px; background: #000; }
.cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(rgba(0,0,0,.6), rgba(0,0,0,.6)), var(--img) center/cover; }
.cta h2 { margin-bottom: 12px; }

/* contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.contact.no-form { grid-template-columns: 1fr; }
.contact h2 { text-transform: uppercase; }
html[lang="ar"] .contact h2 { text-transform: none; }
dl { margin: 24px 0 0; }
dt { font: 500 18px/1.4 var(--head); color: var(--white); margin-top: 16px; }
dd { margin: 0; }
form { display: grid; gap: 16px; }
form label { display: grid; gap: 6px; font-size: 14px; font-weight: 400; color: var(--muted); }
input, textarea { font: 400 16px/1.5 var(--body); color: var(--white); background: #2a2930; border: 1px solid #4a4852; border-radius: 6px; padding: 11px 14px; width: 100%; }
html[dir="rtl"] input[dir="ltr"] { text-align: right; }
input:focus, textarea:focus { outline: 2px solid var(--purple); outline-offset: 1px; border-color: transparent; }
form .btn { justify-self: start; }
form .btn[disabled] { opacity: .6; cursor: wait; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status { margin: 0; min-height: 1.5em; font-weight: 400; }
.status.ok { color: #7ee2a8; }
.status.err { color: #ff8a8a; }

/* footer */
.foot { margin-top: 96px; padding: 56px 0 24px; border-top: 1px solid var(--line); background: #0c0b0e; }
.cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.foot img { height: 24px; width: auto; margin-bottom: 16px; }
.foot h3 { font-size: 18px; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.foot a { text-decoration: none; color: var(--muted); }
.foot a:hover { color: var(--white); }
.legal { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.legal p { margin: 0; }

/* reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .js .reveal { opacity: 1; transform: none; transition: none; } }

/* responsive */
@media (max-width: 1000px) {
  .about { grid-template-columns: 1fr 1.4fr; }
  .stats { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .grid3 { grid-template-columns: 1fr; }
  .card { min-height: 320px; }
}
@media (max-width: 860px) {
  .menu-btn { display: block; order: 3; margin-inline-start: 0; }
  .actions { margin-inline-start: auto; }
  #nav { position: absolute; top: 72px; inset-inline: 0; background: var(--bg); border-bottom: 1px solid var(--line); display: none; margin: 0; }
  #nav.open { display: block; }
  #nav ul { flex-direction: column; gap: 0; padding: 8px 16px 16px; }
  #nav a { padding: 12px 0; }
  .actions .btn-sm { display: none; }
  .about, .why, .contact { grid-template-columns: 1fr; }
  .about-img { max-height: 420px; }
  .why-img { max-height: 420px; order: -1; }
  .cols { grid-template-columns: 1fr 1fr; }
  .cols > :first-child { grid-column: 1 / -1; }
  .steps li { grid-template-columns: 72px 1fr; gap: 16px; }
  .steps .n { font-size: 48px; }
  .sec { padding-top: 72px; }
}
@media (max-width: 480px) {
  .stat .num, .stat .suf { font-size: 48px; }
  .legal { flex-direction: column; }
}
