/*
  Theme colours — change these to re-skin the whole site. Same palette as the
  developer portfolio, so the two read as one family.
*/
:root {
  --bg: #0f1020;
  --bg-soft: #16172c;
  --card: #1b1c34;
  --text: #f4f3fb;
  --text-dim: #b6b4d6;
  --primary: #2563eb;
  --secondary: #7c3aed;
  --accent: #f59e0b;
  --accent-2: #10b981;
  --radius: 18px;
  --max-width: 1100px;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
  --section-y: clamp(44px, 6vw, 68px);
  --section-x: 24px;
  --head-gap: clamp(18px, 2.2vw, 28px);
  --grid-gap: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  position: relative;
}

/* Soft blurred colour shapes fixed behind the content — purely decorative */
.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  z-index: 0;
  pointer-events: none;
}
.blob-1 { width: 420px; height: 420px; background: var(--primary); top: -120px; left: -120px; }
.blob-2 { width: 500px; height: 500px; background: var(--secondary); top: 30%; right: -180px; }
.blob-3 { width: 380px; height: 380px; background: var(--accent-2); bottom: -150px; left: 20%; }

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin-top: 0; }

/* Visually hidden but still read by screen readers — used for form labels */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Keyboard focus — visible on every interactive element */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(15, 16, 32, 0.75);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo { font-weight: 700; font-size: 1.3rem; letter-spacing: 0.5px; white-space: nowrap; }
.logo span { color: var(--primary); }
.logo small {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-left: 4px;
}
.nav-links { display: flex; gap: 26px; }
.nav-links a { font-weight: 500; color: var(--text-dim); transition: color 0.2s; font-size: 0.95rem; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.lang-toggle {
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50px;
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 3px;
  cursor: pointer;
  display: inline-flex;
  gap: 2px;
  transition: border-color 0.2s;
}
.lang-option { padding: 2px 9px; border-radius: 50px; color: var(--text-dim); transition: background 0.2s, color 0.2s; }
.lang-option.is-active { background: var(--primary); color: #fff; }
.lang-toggle:hover { border-color: var(--primary); }
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; }

/* Hero */
.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 110px) var(--section-x) var(--section-y);
  position: relative;
  z-index: 1;
}
.hero-content { max-width: 760px; }
.eyebrow {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin: 0 0 14px;
}
.hero h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
  line-height: 1.1;
  margin: 0 0 22px;
  background: linear-gradient(90deg, #7aa2ff, #b794f6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-text { color: var(--text-dim); font-size: 1.1rem; line-height: 1.75; margin-bottom: 30px; max-width: 62ch; }
.hero-actions { display: flex; gap: 16px; margin-bottom: 30px; flex-wrap: wrap; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-facts li {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-dim);
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 6px 14px;
}

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
  font-size: 0.95rem;
}
.btn:hover { transform: translateY(-3px); }
.btn-primary {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
}
.btn-outline { background: transparent; color: var(--text); border: 2px solid rgba(255,255,255,0.25); }
.btn-outline:hover { border-color: var(--accent); }

/* Shared section layout */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--section-y) var(--section-x);
  position: relative;
  z-index: 1;
}
/* Anchor jumps would otherwise park a section's label behind the sticky navbar */
section[id] { scroll-margin-top: 80px; }
.section-head { margin-bottom: var(--head-gap); }
.tag {
  display: inline-block;
  background: var(--card);
  color: var(--accent-2);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 10px;
}
.section-head h2, .about-body h2 { font-size: clamp(1.7rem, 3.8vw, 2.5rem); line-height: 1.2; margin: 0; }
.section-intro { color: var(--text-dim); max-width: 70ch; margin: 10px 0 0; line-height: 1.7; }

/* Services */
.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--grid-gap); }
.service-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 30px 28px;
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.25s, box-shadow 0.25s;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.service-icon { font-size: 2.2rem; margin-bottom: 14px; }
.service-card h3 { margin: 0 0 8px; font-size: 1.2rem; }
.service-card p { color: var(--text-dim); margin: 0; font-size: 0.95rem; line-height: 1.7; }

/* Work */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--grid-gap); }
.work-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
}
.work-card h3 { margin: 0 0 10px; font-size: 1.2rem; }
.work-card p { color: var(--text-dim); font-size: 0.95rem; line-height: 1.7; margin: 0 0 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.chips li {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 4px 11px;
}
.work-link { margin-top: auto; color: var(--accent-2); font-weight: 600; font-size: 0.9rem; text-decoration: underline; text-underline-offset: 4px; }
.work-link:hover { color: var(--accent); }
.work-more { margin: 22px 0 0; }
.work-more a { color: var(--text-dim); font-size: 0.92rem; border-bottom: 1px solid rgba(255,255,255,0.25); }
.work-more a:hover { color: var(--text); border-color: var(--accent); }

/* Process */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--grid-gap); }
.step {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid rgba(255,255,255,0.06);
}
.step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  font-weight: 700;
  margin-bottom: 14px;
}
.step h3 { margin: 0 0 8px; font-size: 1.15rem; }
.step p { color: var(--text-dim); margin: 0; font-size: 0.93rem; line-height: 1.7; }

/* Markets */
.markets-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--grid-gap); }
.market-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid rgba(255,255,255,0.06);
}
.market-card h3 { margin: 0 0 14px; font-size: 1.2rem; }
.market-flag { margin-right: 6px; }
.market-points li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.6;
}
.market-points li::before { content: "✓"; position: absolute; left: 0; color: var(--accent-2); font-weight: 700; }
.arabic {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.9;
}

/* About */
.about-wrap { display: flex; align-items: center; gap: clamp(24px, 5vw, 56px); }
.about-photo {
  flex-shrink: 0;
  width: 220px; height: 220px;
  border-radius: 36px;
  padding: 5px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: var(--shadow);
  overflow: hidden;
}
.about-photo picture { display: block; height: 100%; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 31px; display: block; }
.about-body .tag { margin-bottom: 12px; }
.about-text { color: var(--text-dim); line-height: 1.85; font-size: 1.02rem; margin: 14px 0 0; max-width: 62ch; }

/* Contact */
.contact-wrap { display: flex; gap: 40px; flex-wrap: wrap; }
.contact-info { flex: 1; min-width: 260px; }
.contact-text { color: var(--text-dim); line-height: 1.8; font-size: 1.05rem; margin: 0 0 22px; }
.call-btn { margin-bottom: 26px; }
.contact-details { display: flex; flex-direction: column; gap: 14px; }
.contact-details li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 20px;
  border: 1px solid rgba(255,255,255,0.06);
  flex-wrap: wrap;
}
.detail-label { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--accent-2); }
.contact-details a, .contact-details span:last-child { color: var(--text); font-weight: 500; }
.contact-details a:hover { color: var(--accent); }
.contact-form { flex: 2; min-width: 280px; display: flex; flex-direction: column; gap: 16px; }
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row input { flex: 1; min-width: 200px; }
.contact-form input, .contact-form textarea {
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 14px 18px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--secondary); }
.contact-form button { align-self: flex-start; }
.contact-form button:disabled { opacity: 0.6; cursor: progress; }
.form-note { color: var(--text-dim); font-size: 0.9rem; margin: 0; min-height: 1.2em; }
.form-note.is-success { color: var(--accent-2); }
.form-note.is-error { color: #f87171; }

/* Off-screen rather than display:none — bots skip fields that aren't rendered */
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Scroll reveal — script.js sets the hidden state inline, then adds .in-view */
.section.in-view { opacity: 1 !important; transform: translateY(0) !important; }

/* Footer */
.footer {
  text-align: center;
  padding: clamp(28px, 4vw, 40px) var(--section-x);
  margin-top: var(--section-y);
  border-top: 1px solid rgba(255,255,255,0.06);
  color: var(--text-dim);
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
}
.footer p { margin: 0 0 8px; }
.footer-links { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.footer-links a { border-bottom: 1px solid rgba(255,255,255,0.2); }
.footer-links a:hover { color: var(--text); border-color: var(--accent); }

/* Legal page */
.legal { max-width: 780px; margin: 0 auto; padding: clamp(40px, 6vw, 80px) var(--section-x); position: relative; z-index: 1; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 6px; }
.legal h2 { font-size: 1.25rem; margin: 34px 0 10px; }
.legal h3 { font-size: 1.02rem; margin: 22px 0 6px; }
.legal p, .legal li { color: var(--text-dim); line-height: 1.8; font-size: 0.98rem; }
.legal ul { list-style: disc; padding-left: 22px; }
.legal a { color: var(--accent-2); border-bottom: 1px solid rgba(16,185,129,0.4); }
.legal .updated { font-size: 0.85rem; font-style: italic; }
.legal .back { display: inline-block; margin-bottom: 26px; color: var(--text-dim); border: 0; }
.legal .back:hover { color: var(--text); }

/* Responsive */
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-soft);
    flex-direction: column;
    padding: 20px 24px;
    gap: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .logo small { display: none; }
  .services-grid, .work-grid, .markets-grid { grid-template-columns: 1fr; }
  .about-wrap { flex-direction: column; align-items: flex-start; }
  .about-photo { width: 160px; height: 160px; border-radius: 28px; }
  .about-photo img { border-radius: 23px; }
  .contact-details li { flex-direction: column; align-items: flex-start; }
}

/* Respect the visitor's system setting: no hover lift, no smooth scrolling */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .btn:hover, .service-card:hover { transform: none; }
}
