/* ==========================================================================
   NEXORA — تصميم وبرمجة مواقع
   Single stylesheet. Vanilla CSS, RTL-first, dark premium theme.
   ========================================================================== */

/* ---- Design tokens ---- */
:root {
  --bg:            #080912;
  --bg-2:          #0c0e1c;
  --bg-3:          #10132a;
  --surface:       rgba(255, 255, 255, 0.04);
  --surface-2:     rgba(255, 255, 255, 0.06);
  --border:        rgba(255, 255, 255, 0.09);
  --border-soft:   rgba(255, 255, 255, 0.06);

  --text:          #eef0fa;
  --text-soft:     #c3c7dc;
  --text-dim:      #8b90ab;

  --primary:       #4f7cff;
  --primary-600:   #3b63e6;
  --purple:        #8b5cf6;
  --cyan:          #22d3ee;

  --grad:          linear-gradient(130deg, #4f7cff 0%, #8b5cf6 52%, #22d3ee 100%);
  --grad-soft:     linear-gradient(130deg, rgba(79,124,255,.16), rgba(139,92,246,.14) 55%, rgba(34,211,238,.12));
  --glow:          0 0 0 1px rgba(255,255,255,.05), 0 24px 60px -18px rgba(79,124,255,.35);

  --r-sm: 12px;
  --r:    18px;
  --r-lg: 26px;

  --shadow:      0 20px 50px -24px rgba(0, 0, 0, .7);
  --shadow-card: 0 14px 40px -20px rgba(0, 0, 0, .6);

  --maxw: 1180px;
  --pad:  clamp(20px, 5vw, 40px);

  --font: "Tajawal", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 90px;
  overflow-x: clip;
}

/* Grid/flex children must be allowed to shrink below their content's
   min-content width, otherwise unbreakable strings (Arabic words, "Core Web
   Vitals", prices) blow the track wider than 1fr and overflow the page. */
.grid > *,
.steps > *,
.why-wrap > *,
.nav > *,
.footer-top > * { min-width: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Ambient background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 50% at 82% -8%, rgba(79, 124, 255, .22), transparent 60%),
    radial-gradient(50% 45% at 10% 8%, rgba(139, 92, 246, .18), transparent 60%),
    radial-gradient(45% 40% at 50% 108%, rgba(34, 211, 238, .12), transparent 60%),
    var(--bg);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(70% 60% at 50% 30%, #000 0%, transparent 85%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000 0%, transparent 85%);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

section { padding-block: clamp(64px, 9vw, 120px); position: relative; }

.section-head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head.center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--text-soft);
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  margin-bottom: 20px;
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 12px var(--primary);
}

h1, h2, h3 { line-height: 1.25; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5.4vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.15rem; font-weight: 700; }

.lead { color: var(--text-soft); font-size: clamp(1rem, 1.6vw, 1.15rem); }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
  font-size: .98rem;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 12px 30px -10px rgba(79, 124, 255, .6);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -12px rgba(79, 124, 255, .75); }
.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, .22); background: var(--surface-2); }
.btn-block { width: 100%; }
.btn-sm { padding: 11px 20px; font-size: .9rem; }

/* ---- Header / Navbar ---- */
.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(8, 9, 18, .78);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom-color: var(--border-soft);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 72px;
}
.brand {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: .12em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand .dot {
  width: 12px; height: 12px;
  border-radius: 4px;
  background: var(--grad);
  box-shadow: 0 0 16px rgba(79, 124, 255, .8);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a {
  padding: 9px 14px;
  border-radius: 10px;
  font-weight: 500;
  color: var(--text-soft);
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  font-weight: 700;
  font-size: .85rem;
  transition: color .2s, border-color .2s, background .2s;
}
.lang-switch:hover { color: var(--text); border-color: rgba(255, 255, 255, .22); background: var(--surface-2); }
.lang-switch svg { width: 15px; height: 15px; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  align-items: center;
  justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: "";
  display: block;
  width: 20px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s;
}
.nav-toggle span::before { transform: translateY(-6px); }
.nav-toggle span::after  { transform: translateY(6px); position: relative; }
.nav-toggle span::before, .nav-toggle span::after { position: absolute; }
body.menu-open .nav-toggle span { background: transparent; }
body.menu-open .nav-toggle span::before { transform: rotate(45deg); }
body.menu-open .nav-toggle span::after  { transform: rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(8, 9, 18, .96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s var(--ease), visibility .3s;
}
body.menu-open .mobile-menu { opacity: 1; visibility: visible; }
.mobile-menu a {
  font-size: 1.4rem;
  font-weight: 700;
  padding: 14px 28px;
  color: var(--text-soft);
  transform: translateY(12px);
  opacity: 0;
  transition: transform .4s var(--ease), opacity .4s var(--ease), color .2s;
}
.mobile-menu a:hover { color: var(--text); }
body.menu-open .mobile-menu a { transform: translateY(0); opacity: 1; }
body.menu-open .mobile-menu a:nth-child(1) { transition-delay: .06s; }
body.menu-open .mobile-menu a:nth-child(2) { transition-delay: .12s; }
body.menu-open .mobile-menu a:nth-child(3) { transition-delay: .18s; }
body.menu-open .mobile-menu a:nth-child(4) { transition-delay: .24s; }

/* ---- Hero ---- */
.hero { padding-block: clamp(120px, 18vw, 190px) clamp(64px, 9vw, 110px); text-align: center; }
.hero h1 { margin-bottom: 22px; }
.hero .lead { max-width: 620px; margin: 0 auto 34px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-badges {
  display: flex;
  gap: 26px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 46px;
  color: var(--text-dim);
  font-size: .9rem;
  font-weight: 600;
}
.hero-badges span { display: inline-flex; align-items: center; gap: 8px; }
.hero-badges svg { width: 16px; height: 16px; color: var(--cyan); }

/* ---- Glass card ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 26px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
  transition: transform .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, .18); background: var(--surface-2); }

.icon-badge {
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  color: var(--cyan);
}
.icon-badge svg { width: 22px; height: 22px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-dim); font-size: .95rem; }

/* ---- Grids ---- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* ---- Steps ---- */
.steps { display: grid; gap: 16px; grid-template-columns: repeat(5, 1fr); counter-reset: step; }
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px 20px;
  position: relative;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 11px;
  font-weight: 800;
  background: var(--grad);
  color: #fff;
  margin-bottom: 14px;
}
.step h3 { font-size: 1rem; }
.step p { color: var(--text-dim); font-size: .9rem; margin-top: 4px; }

/* ---- Why us ---- */
.why-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.why-list { display: grid; gap: 14px; }
.why-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.why-list .tick {
  flex: none;
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--grad-soft);
  color: var(--cyan);
}
.why-list .tick svg { width: 15px; height: 15px; }
.why-list strong { display: block; font-weight: 700; }
.why-list span { color: var(--text-dim); font-size: .9rem; }
.why-visual {
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background:
    radial-gradient(80% 60% at 30% 20%, rgba(79,124,255,.25), transparent 60%),
    radial-gradient(70% 60% at 80% 80%, rgba(34,211,238,.18), transparent 60%),
    var(--bg-2);
  min-height: 340px;
  display: grid;
  place-items: center;
  padding: 30px;
  position: relative;
  overflow: hidden;
}
.why-visual .glass-stat {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px 26px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-align: center;
}
.why-visual .glass-stat b { font-size: 2.2rem; font-weight: 800; display: block; direction: ltr; }
.why-visual .glass-stat span { color: var(--text-dim); font-size: .85rem; }
.float-chip {
  position: absolute;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: .8rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: floaty 6s ease-in-out infinite;
}
.float-chip.a { inset-block-start: 26px; inset-inline-start: 26px; }
.float-chip.b { inset-block-end: 30px; inset-inline-end: 24px; animation-delay: -3s; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ---- Big CTA ---- */
.cta-band { text-align: center; }
.cta-inner {
  background: var(--grad-soft);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(40px, 7vw, 72px);
  position: relative;
  overflow: hidden;
  box-shadow: var(--glow);
}
.cta-inner h2 { margin-bottom: 14px; }
.cta-inner p { color: var(--text-soft); max-width: 520px; margin: 0 auto 28px; }

/* ---- Price range ---- */
.range-card {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(30px, 5vw, 52px) clamp(22px, 5vw, 48px);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
}
.range-note {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 18px;
}
.range-labels {
  direction: ltr;
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1;
}
.range-bar {
  direction: ltr;
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: var(--grad);
  margin: 20px 6px 0;
  box-shadow: 0 0 34px -6px rgba(79, 124, 255, .6);
}
.range-dot {
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .55), 0 0 0 4px rgba(255, 255, 255, .08);
}
.range-dot.start { left: 0; }
.range-dot.end   { left: 100%; }
.range-sub {
  color: var(--text-dim);
  font-size: .95rem;
  margin: 26px auto 28px;
  max-width: 560px;
}

/* ---- FAQ ---- */
.faq { display: grid; gap: 12px; max-width: 780px; margin-inline: auto; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: none;
  border: 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  text-align: start;
}
.faq-q svg { width: 18px; height: 18px; flex: none; transition: transform .3s var(--ease); color: var(--cyan); }
.faq-item.open .faq-q svg { transform: rotate(180deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s var(--ease);
}
.faq-a p { padding: 0 20px 20px; color: var(--text-dim); font-size: .95rem; }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding-block: 48px 32px;
  background: rgba(8, 9, 18, .5);
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.footer-brand { max-width: 300px; }
.footer-brand p { color: var(--text-dim); font-size: .9rem; margin-top: 10px; }
.footer-links { display: flex; gap: 40px; flex-wrap: wrap; }
.footer-col h4 { font-size: .8rem; letter-spacing: .08em; color: var(--text-dim); margin-bottom: 12px; text-transform: uppercase; }
.footer-col a { display: block; color: var(--text-soft); font-size: .92rem; padding: 5px 0; transition: color .2s; }
.footer-col a:hover { color: var(--text); }
.social-row { display: flex; gap: 12px; }
.social-row a {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  transition: transform .25s var(--ease), color .25s, border-color .25s;
}
.social-row a:hover { transform: translateY(-3px); color: var(--text); border-color: rgba(255, 255, 255, .22); }
.social-row svg { width: 19px; height: 19px; }
.footer-bottom {
  border-top: 1px solid var(--border-soft);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--text-dim);
  font-size: .85rem;
}

/* ---- Breadcrumb ---- */
.breadcrumb { font-size: .85rem; color: var(--text-dim); margin-bottom: 12px; }
.breadcrumb a:hover { color: var(--text-soft); }

/* ---- Scroll reveal ---- */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  will-change: opacity, transform;
}
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: .08s; }
[data-reveal][data-delay="2"] { transition-delay: .16s; }
[data-reveal][data-delay="3"] { transition-delay: .24s; }
[data-reveal][data-delay="4"] { transition-delay: .32s; }

/* ---- Responsive ---- */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .nav-links, .nav-actions .btn, .nav-actions .lang-switch { display: none; }
  .nav-toggle { display: flex; }
  .why-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; }
}
