/* ===================== Design Tokens ===================== */
:root {
  --blue-900: #0b2545;
  --blue-700: #14559a;
  --blue-600: #1d6fc4;
  --blue-500: #2b8ae6;
  --blue-100: #e7f1fb;
  --blue-50: #f2f8fd;

  --white: #ffffff;
  --bg: #f6f9fc;
  --surface: #ffffff;

  --text: #12233b;
  --muted: #5b6b7f;
  --border: #e2e9f2;

  --whatsapp: #25d366;
  --whatsapp-dark: #1ebe5a;

  --radius: 16px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 8px rgba(13, 42, 79, 0.06);
  --shadow-md: 0 12px 30px rgba(13, 42, 79, 0.10);
  --shadow-lg: 0 24px 60px rgba(13, 42, 79, 0.14);

  --maxw: 1160px;
  --nav-h: 72px;
}

/* ===================== Base ===================== */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  font-family: "Tajawal", "Cairo", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand-text { font-family: "Cairo", "Tajawal", sans-serif; }

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}

.section { padding: 84px 0; }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.eyebrow {
  display: inline-block;
  color: var(--blue-600);
  background: var(--blue-100);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.section-title { font-size: clamp(1.6rem, 3.4vw, 2.4rem); color: var(--blue-900); }
.section-desc { color: var(--muted); margin-top: 12px; }

/* ===================== Buttons ===================== */
.btn {
  --btn-pad: 13px 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: var(--btn-pad);
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn .icon { width: 22px; height: 22px; }

.btn-whatsapp { background: var(--whatsapp); color: #fff; box-shadow: 0 8px 20px rgba(37, 211, 102, .32); }
.btn-whatsapp:hover { background: var(--whatsapp-dark); }

.btn-outline { background: var(--white); color: var(--blue-700); border-color: var(--blue-500); }
.btn-outline:hover { background: var(--blue-50); }

.btn-ghost { background: var(--blue-50); color: var(--muted); cursor: not-allowed; }
.btn-ghost:hover { transform: none; }

/* ===================== Navbar ===================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .25s ease;
}
.navbar.scrolled { box-shadow: var(--shadow-sm); }

.nav-inner { display: flex; align-items: center; justify-content: space-between; }

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 12px;
}
.brand-text {
  color: var(--blue-900);
  font-size: 1.2rem;
  font-weight: 800;
  white-space: nowrap;
}

.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 10px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  transition: color .22s ease, background .22s ease, transform .22s ease, box-shadow .22s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  inset-inline: 14px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--blue-500);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .25s ease;
}
.nav-link:hover {
  color: var(--blue-600);
  background: var(--blue-50);
  transform: translateY(-2px);
}
.nav-link:hover::after { transform: scaleX(1); }
.nav-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
.nav-link:hover .nav-icon { transform: translateY(-2px) scale(1.14) rotate(-4deg); }

.btn-login {
  margin-inline-start: 6px;
  background: var(--blue-600);
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(29, 111, 196, .28);
}
.btn-login::after { background: rgba(255, 255, 255, .75); }
.btn-login:hover {
  background: var(--blue-700);
  box-shadow: 0 9px 22px rgba(29, 111, 196, .36);
}

.nav-actions { display: none; align-items: center; gap: 8px; }
.mobile-login {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--blue-50);
  color: var(--blue-700);
  transition: color .2s ease, background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.mobile-login svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mobile-login:hover {
  color: #fff;
  background: var(--blue-600);
  transform: translateY(-2px);
  box-shadow: 0 7px 16px rgba(29, 111, 196, .25);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin-inline: auto;
  background: var(--blue-900);
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===================== Hero ===================== */
.hero {
  position: relative;
  padding: 64px 0 80px;
  background:
    radial-gradient(1100px 500px at 80% -10%, var(--blue-100), transparent 60%),
    radial-gradient(900px 500px at 0% 10%, #eef6ff, transparent 55%),
    var(--bg);
}
.hero-inner { text-align: center; max-width: 900px; margin: 0 auto; }
.hero-badge {
  display: inline-block;
  background: var(--white);
  color: var(--blue-700);
  border: 1px solid var(--border);
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
}
.hero-title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1.15;
  color: var(--blue-900);
  margin-bottom: 18px;
}
.hero-sub {
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 34px;
}

.ratio-16-9 { position: relative; width: 100%; aspect-ratio: 16 / 9; }
.ratio-16-9 > img,
.ratio-16-9 > iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-image {
  margin: 0 auto 36px;
  max-width: 900px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  background: var(--white);
}

.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ===================== About ===================== */
.about {
  background:
    radial-gradient(circle at 8% 18%, rgba(43, 138, 230, .07), transparent 26%),
    var(--surface);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.about-text p { color: var(--muted); font-size: 1.08rem; margin-bottom: 16px; }
.about-text strong { color: var(--blue-700); }

.about-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.feature-card {
  --accent: #2b8ae6;
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  align-items: start;
  min-height: 150px;
  padding: 24px 20px;
  overflow: hidden;
  border: 1px solid #e5edf6;
  border-radius: 18px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 8px 24px rgba(13, 42, 79, .06);
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.feature-card:nth-child(2) { --accent: #6366f1; }
.feature-card:nth-child(3) { --accent: #08a88a; }
.feature-card:nth-child(4) { --accent: #e58a25; }
.feature-card::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 4px;
  background: var(--accent);
  transform: scaleY(.45);
  border-radius: 4px;
  transition: transform .28s ease;
}
.feature-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--accent) 30%, #e5edf6);
  box-shadow: 0 16px 34px rgba(13, 42, 79, .12);
}
.feature-card:hover::before { transform: scaleY(1); }
.feature-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 11%, white);
  transition: transform .28s ease, color .28s ease, background .28s ease;
}
.feature-icon svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.feature-card:hover .feature-icon {
  transform: rotate(-5deg) scale(1.08);
  color: #fff;
  background: var(--accent);
}
.feature-number {
  position: absolute;
  top: 10px;
  inset-inline-end: 12px;
  color: var(--accent);
  font-family: "Cairo", sans-serif;
  font-size: .72rem;
  font-weight: 800;
  opacity: .5;
}
.feature-content { padding-top: 2px; }
.feature-card h3 { color: var(--blue-900); font-size: 1.05rem; margin-bottom: 6px; }
.feature-card p { color: var(--muted); font-size: 0.9rem; line-height: 1.6; }

/* ===================== Works ===================== */
.works-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.work-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.work-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--blue-500);
}
.work-logo {
  display: block;
  width: min(100%, 150px);
  aspect-ratio: 1;
  margin-inline: auto;
  object-fit: contain;
  border-radius: 14px;
}

/* ===================== Plans ===================== */
.plans { background: var(--surface); }
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 340px));
  gap: 26px;
  justify-content: center;
}
.plan-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.plan-card.featured {
  border: 2px solid var(--blue-500);
  box-shadow: var(--shadow-md);
}
.plan-flag {
  position: absolute;
  top: -14px;
  inset-inline-start: 24px;
  background: var(--blue-600);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.plan-name { font-size: 1.5rem; color: var(--blue-900); margin-bottom: 6px; }
.plan-tag { color: var(--muted); font-size: 0.95rem; margin-bottom: 20px; }
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px dashed var(--border);
}
.plan-price .amount { font-size: 2.6rem; font-weight: 800; color: var(--blue-700); font-family: "Cairo", sans-serif; }
.plan-price .currency { font-size: 1.1rem; color: var(--muted); font-weight: 700; }
.plan-price.soon-price { font-size: 1.6rem; font-weight: 800; color: var(--muted); border-bottom: 1px dashed var(--border); }

.plan-features { display: grid; gap: 12px; margin-bottom: 26px; flex: 1; }
.plan-features li {
  position: relative;
  padding-inline-start: 28px;
  color: var(--text);
}
.plan-features li::before {
  content: "✓";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 20px;
  height: 20px;
  background: var(--blue-100);
  color: var(--blue-600);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
}
.plan-btn { width: 100%; }
.plan-card.soon { background: var(--blue-50); }

/* ===================== CTA ===================== */
.cta {
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  color: #fff;
}
.cta-inner { text-align: center; padding: 66px 0; }
.cta h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); margin-bottom: 10px; }
.cta p { opacity: .92; margin-bottom: 26px; font-size: 1.1rem; }

/* ===================== Footer ===================== */
.footer { background: var(--blue-900); color: #cdd8e6; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px;
  padding: 56px 20px 40px;
}
.footer-logo { width: 76px; height: 76px; }
.footer-brand .brand-text { color: #fff; }
.footer-brand p { margin-top: 14px; color: #9fb2c9; max-width: 320px; }
.footer-col h4 { color: #fff; margin-bottom: 16px; font-size: 1.05rem; }
.footer-col ul { display: grid; gap: 10px; }
.footer-col a { color: #b9c7d9; transition: color .18s ease; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); }
.footer-bottom .container { padding-block: 20px; }
.footer-bottom p { text-align: center; color: #8ea0b8; font-size: 0.9rem; }

/* ===================== Responsive ===================== */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .work-card { padding: 12px; }
  .work-logo { width: min(100%, 120px); }

  .nav-actions { display: flex; }
  .mobile-login { display: inline-flex; }
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    background: var(--white);
    padding: 16px 20px 24px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform .25s ease, opacity .25s ease, visibility .25s;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav-link {
    padding: 12px 14px;
    opacity: 0;
    transform: translateX(18px);
    transition: color .22s ease, background .22s ease, transform .3s ease, opacity .3s ease;
  }
  .nav-links.open .nav-link { opacity: 1; transform: translateX(0); }
  .nav-links.open .nav-link:nth-child(1) { transition-delay: .04s; }
  .nav-links.open .nav-link:nth-child(2) { transition-delay: .08s; }
  .nav-links.open .nav-link:nth-child(3) { transition-delay: .12s; }
  .nav-links.open .nav-link:nth-child(4) { transition-delay: .16s; }
  .nav-links.open .nav-link:nth-child(5) { transition-delay: .2s; }
  .nav-links .btn-login {
    justify-content: center;
    margin: 6px 0 0;
  }
}

@media (max-width: 560px) {
  .section { padding: 60px 0; }
  .brand-logo { width: 46px; height: 46px; }
  .brand-text { font-size: 1rem; }
  .about-cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .hero-actions .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
