/* ═══════════════════════════════════════════
   KAWKAB AL-TAQNIYA — Design System v2
   ═══════════════════════════════════════════ */

:root {
  --bg:         #06060a;
  --bg-raised:  #0c0c10;
  --bg-card:    rgba(14, 14, 20, .72);
  --bg-glass:   rgba(255, 255, 255, .03);
  --text:       #f4f4f5;
  --text-2:     #a1a1aa;
  --text-3:     #52525b;
  --border:     rgba(255, 255, 255, .07);
  --border-h:   rgba(255, 255, 255, .15);
  --purple:     #8e54e9;
  --blue:       #4776e6;
  --grad:       linear-gradient(135deg, var(--purple), var(--blue));
  --glow-p:     rgba(142, 84, 233, .35);
  --glow-b:     rgba(71, 118, 230, .25);
  --r-xl:       48px;
  --r-lg:       28px;
  --r-md:       18px;
  --r-sm:       12px;
  --r-pill:     9999px;
  --ease:       cubic-bezier(.4, 0, .2, 1);
  --dur:        260ms;
  --max-w:      1240px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: "Cairo", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
ul { list-style: none; padding: 0; }

/* ── Ambient BG ── */
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ambient-orb {
  position: absolute; border-radius: 50%; filter: blur(120px); opacity: .5;
  will-change: transform;
  animation: orbit 22s var(--ease) infinite alternate;
}
.ambient-orb--1 { width: 600px; height: 600px; top: -15%; right: -10%; background: var(--glow-p); }
.ambient-orb--2 { width: 500px; height: 500px; bottom: 10%; left: -12%; background: var(--glow-b); animation-delay: -8s; animation-duration: 28s; }
.ambient-orb--3 { width: 350px; height: 350px; top: 40%; left: 55%; background: rgba(142, 84, 233, .18); animation-delay: -14s; animation-duration: 34s; }
#grid-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .08; }

@keyframes orbit {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(40px, -30px) scale(1.08); }
  100% { transform: translate(-30px, 20px) scale(.95); }
}

/* ── Container ── */
.container { width: min(var(--max-w), calc(100% - 80px)); margin-inline: auto; position: relative; z-index: 1; }

/* ── Section ── */
.section { padding: 140px 0; position: relative; }
.section--dark { background: var(--bg-raised); }
.section--dark::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse at top right, rgba(142,84,233,.08), transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(71,118,230,.06), transparent 50%);
  pointer-events: none;
}
.section--dark > .container { position: relative; z-index: 1; }

.section-intro { text-align: center; max-width: 740px; margin: 0 auto 64px; }
.section-title {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  line-height: 1.25;
  margin: 20px 0 18px;
  letter-spacing: -.03em;
}
.section-desc { color: var(--text-2); font-size: 1.05rem; line-height: 1.8; }

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

/* ── Chip ── */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg-glass);
  color: var(--text-2);
  font-size: .82rem; font-weight: 600;
  backdrop-filter: blur(8px);
}
.chip--light { border-color: rgba(255,255,255,.18); color: var(--text); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 28px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-size: .92rem; font-weight: 700;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--white {
  background: #fff; color: #0a0a0c;
  box-shadow: 0 4px 30px rgba(255,255,255,.12);
}
.btn--white:hover { box-shadow: 0 8px 40px rgba(255,255,255,.22); }
.btn--outline {
  border-color: var(--border-h); color: var(--text);
  background: rgba(255,255,255,.02);
}
.btn--outline:hover { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.05); }
.btn--outline svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: .85rem; }

/* ── Glass Card shared ── */
.glass-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.glass-card::after {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(142,84,233,.14), transparent 60%);
  opacity: 0; transition: opacity .3s var(--ease);
  pointer-events: none;
}
.glass-card:hover { border-color: var(--border-h); }
.glass-card:hover::after { opacity: 1; }

/* ═══════════ NAVBAR ═══════════ */
.site-header {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  width: min(var(--max-w), calc(100% - 32px));
  z-index: 50;
}
.nav-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 12px 20px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: rgba(10, 10, 14, .65);
  backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}
.brand { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-icon {
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  border-radius: 14px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
}
.brand-icon svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.brand-icon--sm { width: 36px; height: 36px; border-radius: 10px; }
.brand-icon--sm svg { width: 18px; height: 18px; }
.brand-text { font-size: .95rem; font-weight: 800; white-space: nowrap; }

.nav-links { display: flex; align-items: center; gap: 28px; flex: 1; justify-content: center; }
.nav-links a {
  position: relative; color: var(--text-2); font-size: .88rem; font-weight: 600;
  transition: color var(--dur) var(--ease);
}
.nav-links a::after {
  content: ""; position: absolute; right: 0; bottom: -6px;
  width: 100%; height: 2px; border-radius: 999px;
  background: var(--grad);
  transform: scaleX(0); transform-origin: center;
  transition: transform var(--dur) var(--ease);
}
.nav-links a:hover, .nav-links a.is-active { color: #fff; }
.nav-links a:hover::after, .nav-links a.is-active::after { transform: scaleX(1); }

.nav-end { display: flex; align-items: center; gap: 12px; }
.nav-burger {
  display: none; position: relative; width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--border); border-radius: 50%;
  background: rgba(255,255,255,.04); color: #fff;
}
.nav-burger span {
  position: absolute; right: 50%; width: 16px; height: 2px;
  background: currentColor; border-radius: 999px;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav-burger span:nth-child(1) { top: 15px; transform: translateX(50%); }
.nav-burger span:nth-child(2) { top: 21px; transform: translateX(50%); }
.nav-burger span:nth-child(3) { top: 27px; transform: translateX(50%); }
.site-header.is-open .nav-burger span:nth-child(1) { transform: translateX(50%) translateY(6px) rotate(45deg); }
.site-header.is-open .nav-burger span:nth-child(2) { opacity: 0; }
.site-header.is-open .nav-burger span:nth-child(3) { transform: translateX(50%) translateY(-6px) rotate(-45deg); }

/* ═══════════ HERO ═══════════ */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 160px 0 0;
}
.hero__inner { text-align: center; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 22px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r-pill);
  background: rgba(255,255,255,.04);
  color: var(--text-2); font-size: .88rem; font-weight: 600;
  backdrop-filter: blur(8px);
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 12px rgba(52,211,153,.6);
  animation: pulse 2s ease infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(1.4); } }

.hero__title {
  max-width: 900px; margin: 32px auto 28px;
  font-size: clamp(2.8rem, 7vw, 4.5rem);
  font-weight: 900; line-height: 1.12;
  letter-spacing: -.04em;
}
.hero__sub {
  max-width: 680px; margin: 0 auto;
  color: var(--text-2); font-size: 1.1rem; line-height: 1.8;
}
.hero__cta { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 40px; }

/* Stats bar */
.hero__stats { margin-top: auto; padding-bottom: 48px; }
.stats-bar {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0;
  padding: 28px 36px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-card);
  backdrop-filter: blur(20px);
}
.stat { flex: 1; min-width: 160px; text-align: center; padding: 8px 16px; }
.stat strong { display: block; font-size: 1.35rem; font-weight: 800; margin-bottom: 4px; }
.stat span { color: var(--text-2); font-size: .85rem; }
.stat-divider { width: 1px; height: 40px; background: var(--border-h); flex-shrink: 0; }

/* ═══════════ BENTO GRID ═══════════ */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.bento__card { padding: 36px; }
.bento__card--wide { grid-column: span 2; }
.bento__card--accent {
  background:
    radial-gradient(circle at 20% 80%, var(--glow-b), transparent 50%),
    radial-gradient(circle at 80% 20%, var(--glow-p), transparent 50%),
    var(--bg-card);
  border-color: rgba(142,84,233,.2);
}
.bento__accent-inner { position: relative; z-index: 1; }
.bento__icon {
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, rgba(142,84,233,.15), rgba(71,118,230,.1));
  border: 1px solid rgba(142,84,233,.2);
  margin-bottom: 22px;
}
.bento__icon svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.bento__card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 10px; }
.bento__card p { color: var(--text-2); font-size: .95rem; line-height: 1.7; }

/* ═══════════ SHOWCASE (Projects) ═══════════ */
.showcase {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border: 1px solid var(--border); border-radius: var(--r-xl);
  overflow: hidden; background: var(--bg-card);
  margin-bottom: 32px;
  transition: border-color var(--dur) var(--ease);
}
.showcase:hover { border-color: var(--border-h); }
.showcase__visual {
  position: relative; min-height: 380px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.showcase__visual--purple {
  background:
    radial-gradient(circle at 30% 40%, rgba(142,84,233,.35), transparent 55%),
    radial-gradient(circle at 70% 70%, rgba(71,118,230,.2), transparent 50%),
    var(--bg-raised);
}
.showcase__visual--blue {
  background:
    radial-gradient(circle at 70% 40%, rgba(71,118,230,.35), transparent 55%),
    radial-gradient(circle at 30% 80%, rgba(142,84,233,.15), transparent 50%),
    var(--bg-raised);
}
.showcase__logo-wrap { text-align: center; position: relative; z-index: 1; }
.showcase__logo-text {
  display: block;
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 900; letter-spacing: -.04em;
  background: linear-gradient(180deg, #fff 30%, rgba(255,255,255,.4));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.showcase__url {
  display: block; margin-top: 8px;
  color: var(--text-2); font-size: .9rem; font-weight: 600; letter-spacing: .02em;
}
.showcase__body { padding: 48px; display: flex; flex-direction: column; justify-content: center; }
.showcase__body .chip { align-self: flex-start; margin-bottom: 16px; }
.showcase__body h3 { font-size: 1.75rem; font-weight: 800; margin-bottom: 14px; }
.showcase__body p { color: var(--text-2); line-height: 1.8; margin-bottom: 20px; }
.showcase--flip .showcase__visual { order: 2; }

.check-list { display: grid; gap: 12px; margin-bottom: 28px; }
.check-list li {
  position: relative; padding-right: 26px;
  color: var(--text-2); line-height: 1.7;
}
.check-list li::before {
  content: ""; position: absolute; right: 0; top: 8px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 16px var(--glow-p);
}

/* ═══════════ PILLARS (Services) ═══════════ */
.pillars {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.pillar { padding: 36px 28px; text-align: center; }
.pillar__num {
  display: block; font-size: 2.5rem; font-weight: 900;
  background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 18px; line-height: 1;
}
.pillar__icon {
  display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; margin: 0 auto 20px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
}
.pillar__icon svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pillar h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.pillar p { color: var(--text-2); font-size: .9rem; line-height: 1.7; }

/* ═══════════ TIMELINE ═══════════ */
.timeline { position: relative; max-width: 720px; margin: 0 auto; padding-right: 60px; }
.timeline__line {
  position: absolute; top: 0; right: 22px; bottom: 0; width: 2px;
  background: var(--border);
}
.timeline__progress {
  width: 100%; height: 0%;
  background: var(--grad); border-radius: 999px;
  transition: height 1s var(--ease);
}
.timeline__step { position: relative; padding-bottom: 48px; }
.timeline__step:last-child { padding-bottom: 0; }
.timeline__dot {
  position: absolute; right: -60px; top: 0;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border);
  z-index: 2;
  transition: border-color .4s var(--ease), box-shadow .4s var(--ease);
}
.timeline__dot span { font-size: .8rem; font-weight: 800; color: var(--text-2); }
.timeline__step.is-visible .timeline__dot {
  border-color: var(--purple);
  box-shadow: 0 0 20px var(--glow-p);
}
.timeline__step.is-visible .timeline__dot span { color: #fff; }
.timeline__content { padding: 28px 32px; }
.timeline__content h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 10px; }
.timeline__content p { color: var(--text-2); font-size: .95rem; line-height: 1.7; }

/* ═══════════ CTA BANNER ═══════════ */
.cta-banner {
  padding: 64px;
  display: grid; grid-template-columns: 1.3fr .7fr; gap: 40px; align-items: center;
  border-radius: var(--r-xl);
  overflow: hidden;
}
.cta-banner__glow {
  position: absolute; inset: -40%;
  background:
    radial-gradient(circle at 25% 70%, var(--glow-p), transparent 40%),
    radial-gradient(circle at 75% 30%, var(--glow-b), transparent 40%);
  opacity: .5; filter: blur(60px);
  animation: orbit 20s var(--ease) infinite alternate;
}
.cta-banner__content { position: relative; z-index: 1; }
.cta-banner__content h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800; line-height: 1.3;
  margin: 20px 0 16px;
}
.cta-banner__content p { color: var(--text-2); line-height: 1.8; margin-bottom: 28px; }
.cta-banner__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.cta-banner__info {
  position: relative; z-index: 1;
  display: grid; gap: 20px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: rgba(0,0,0,.3);
}
.cta-banner__info span { display: block; color: var(--text-3); font-size: .82rem; margin-bottom: 4px; }
.cta-banner__info strong { font-size: .95rem; }

/* ═══════════ FOOTER ═══════════ */
.site-footer { position: relative; z-index: 1; padding: 0 0 40px; }
.footer__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.footer__brand { display: flex; align-items: center; gap: 12px; }
.footer__brand p { color: var(--text-2); font-size: .88rem; }
.footer__copy { color: var(--text-3); font-size: .85rem; }

/* ═══════════ REVEAL ANIMATIONS ═══════════ */
.reveal {
  opacity: 0; transform: translateY(32px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal[data-delay="1"] { transition-delay: .12s; }
.reveal[data-delay="2"] { transition-delay: .24s; }
.reveal[data-delay="3"] { transition-delay: .36s; }
.reveal[data-delay="4"] { transition-delay: .48s; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 1100px) {
  .container { width: min(var(--max-w), calc(100% - 48px)); }
  .bento { grid-template-columns: 1fr 1fr; }
  .bento__card--wide { grid-column: 1 / -1; }
  .pillars { grid-template-columns: 1fr 1fr; }
  .showcase { grid-template-columns: 1fr; }
  .showcase__visual { min-height: 260px; }
  .showcase--flip .showcase__visual { order: 0; }
  .cta-banner { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .section { padding: 100px 0; }
  .nav-links {
    position: absolute; top: calc(100% + 14px); right: 0; left: 0;
    flex-direction: column; gap: 16px; padding: 24px;
    border: 1px solid var(--border); border-radius: var(--r-lg);
    background: rgba(10,10,14,.94); backdrop-filter: blur(24px);
    opacity: 0; pointer-events: none; transform: translateY(-10px);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  }
  .site-header.is-open .nav-links { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .nav-burger { display: inline-flex; }
  .nav-end .btn { display: none; }
  .hero { min-height: auto; padding: 140px 0 40px; }
  .hero__title { font-size: clamp(2.2rem, 8vw, 3.2rem); }
  .stats-bar { flex-direction: column; gap: 16px; }
  .stat-divider { width: 60px; height: 1px; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { width: 100%; }
  .cta-banner { padding: 40px 28px; }
  .cta-banner__actions { flex-direction: column; }
  .cta-banner__actions .btn { width: 100%; }
}

@media (max-width: 640px) {
  .container { width: calc(100% - 32px); }
  .section { padding: 80px 0; }
  .bento { grid-template-columns: 1fr; }
  .bento__card--wide { grid-column: auto; }
  .pillars { grid-template-columns: 1fr; }
  .showcase__body { padding: 28px; }
  .timeline { padding-right: 48px; }
  .timeline__dot { right: -48px; width: 36px; height: 36px; }
  .timeline__line { right: 16px; }
  .timeline__content { padding: 24px; }
  .footer__inner { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .ambient-orb { animation: none; }
}
