:root {
  --bg: #ffffff;
  --bg-soft: #f6f8fa;
  --bg-mute: #eef1f5;
  --text: #1a1a1a;
  --text-soft: #4a5568;
  --muted: #7a8290;
  --border: #e5e9f0;
  --accent: #2b8cff;
  --accent-2: #15c4c4;
  --accent-soft: rgba(43, 140, 255, 0.12);
  --shadow: 0 10px 30px rgba(20, 40, 80, 0.06);
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html[data-theme="dark"] {
  --bg: #0b1020;
  --bg-soft: #121830;
  --bg-mute: #1a2140;
  --text: #e8ecf4;
  --text-soft: #b4bcce;
  --muted: #8890a6;
  --border: #22294a;
  --accent: #59a7ff;
  --accent-2: #2fe1d6;
  --accent-soft: rgba(89, 167, 255, 0.14);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s, color 0.2s;
}
a { color: var(--accent); text-decoration: none; }
a:hover { opacity: 0.85; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.6em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p  { margin: 0 0 1em; color: var(--text-soft); }
.accent { color: var(--accent); }
.muted  { color: var(--muted); font-size: 0.92rem; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--text); font-size: 1.1rem; font-weight: 600;
}
.brand strong { color: var(--accent); font-weight: 800; }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  color: var(--text-soft); font-weight: 500; font-size: 0.95rem;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); border-bottom-color: var(--accent); }
.theme-toggle {
  background: transparent; border: 1px solid var(--border);
  color: var(--text-soft); width: 36px; height: 36px;
  border-radius: 8px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch {
  display: inline-flex; border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden; background: var(--bg);
}
.lang-switch button {
  background: transparent; border: none; color: var(--text-soft);
  padding: 7px 10px; font-size: 0.8rem; font-weight: 600;
  cursor: pointer; font-family: inherit;
  border-right: 1px solid var(--border);
  transition: background 0.15s, color 0.15s;
}
.lang-switch button:last-child { border-right: none; }
.lang-switch button:hover { color: var(--text); }
.lang-switch button.active { background: var(--accent); color: #fff; }

/* RTL */
html[dir="rtl"] body { font-family: "Segoe UI", "Tahoma", "Arial", sans-serif; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3 { letter-spacing: 0; }
html[dir="rtl"] .nav-links a.active { /* underline ok either direction */ }
html[dir="rtl"] .bullet li { padding: 10px 26px 10px 0; }
html[dir="rtl"] .bullet li::before { left: auto; right: 0; }
html[dir="rtl"] .service-row { grid-template-columns: 80px 1fr; }
html[dir="rtl"] .tags { padding-right: 0; }
html[dir="rtl"] .btn-primary, html[dir="rtl"] .btn-ghost { direction: rtl; }

/* HERO */
.hero {
  position: relative; overflow: hidden;
  padding: 96px 24px 80px;
  text-align: center;
}
.hero-inner { max-width: 820px; margin: 0 auto; position: relative; z-index: 1; }
.hero h1 {
  background: linear-gradient(135deg, var(--text) 40%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { font-size: 1.15rem; color: var(--text-soft); max-width: 640px; margin: 1.2em auto 2em; }
.cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: 0.98rem;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 20px var(--accent-soft); }
.btn-primary:hover { transform: translateY(-1px); opacity: 1; }
.btn-ghost { background: var(--bg-mute); color: var(--text); }
.btn-ghost:hover { background: var(--border); opacity: 1; }
.hero-glow {
  position: absolute; inset: -10% 10% auto 10%; height: 420px;
  background: radial-gradient(ellipse at center, var(--accent-soft), transparent 60%);
  filter: blur(40px); pointer-events: none;
}

/* FEATURES */
.features { padding: 80px 24px; background: var(--bg-soft); }
.section-title { text-align: center; }
.section-sub { text-align: center; color: var(--text-soft); margin-bottom: 3rem; }
.grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent); }
.card .icon { font-size: 1.8rem; margin-bottom: 12px; }
.card p { margin: 0; font-size: 0.95rem; }

/* CALLOUT */
.callout { padding: 80px 24px; }
.callout-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: linear-gradient(135deg, var(--accent-soft), transparent);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 40px; flex-wrap: wrap;
}
.callout h2 { margin: 0 0 6px; }
.callout p  { margin: 0; }

/* PAGE HEADER */
.page-header { padding: 90px 24px 40px; text-align: center; }
.page-header .lede { margin-top: 0.8em; }

/* SERVICES */
.services { padding: 40px 24px 100px; }
.service-row {
  display: grid; grid-template-columns: 80px 1fr; gap: 28px;
  padding: 40px 0; border-top: 1px solid var(--border);
}
.service-row:last-child { border-bottom: 1px solid var(--border); }
.service-num {
  font-size: 2rem; font-weight: 800; color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.tags { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  background: var(--bg-mute); color: var(--text-soft);
  padding: 5px 12px; border-radius: 999px; font-size: 0.82rem;
}

/* ABOUT */
.about { padding: 40px 24px 60px; }
.two-col {
  display: grid; gap: 40px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.bullet { list-style: none; padding: 0; margin: 0; }
.bullet li {
  padding: 10px 0 10px 26px; position: relative; color: var(--text-soft);
}
.bullet li::before {
  content: "✓"; position: absolute; left: 0; top: 10px;
  color: var(--accent); font-weight: 800;
}
.stats { padding: 40px 24px 100px; }
.stats-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  text-align: center;
}
.stats-grid > div {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px 20px;
}
.stat-num { font-size: 2.6rem; font-weight: 800; line-height: 1; }

/* CONTACT */
.contact { padding: 40px 24px 100px; }
.contact-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.contact-card {
  display: block; background: var(--bg-soft);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px; color: var(--text);
  transition: transform 0.2s, border-color 0.2s;
}
.contact-card:hover { transform: translateY(-3px); border-color: var(--accent); opacity: 1; }
.contact-card .icon { font-size: 1.8rem; margin-bottom: 10px; }
.contact-card h3 { margin-bottom: 6px; }
.contact-card p { margin: 0 0 6px; font-weight: 500; color: var(--text); }

/* FOOTER */
.footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 60px 24px 20px; }
.footer-inner {
  display: grid; gap: 32px;
  grid-template-columns: 2fr 1fr 1fr;
}
.footer h4 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.footer a, .footer span { display: block; color: var(--text-soft); padding: 4px 0; font-size: 0.95rem; }
.footer a:hover { color: var(--accent); opacity: 1; }
.copyright {
  max-width: 1120px; margin: 40px auto 0; padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center; color: var(--muted); font-size: 0.88rem;
}

/* RESPONSIVE */
@media (max-width: 720px) {
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 0.88rem; }
  .hero { padding: 60px 20px 50px; }
  .service-row { grid-template-columns: 1fr; gap: 8px; }
  .service-num { font-size: 1.4rem; }
  .footer-inner { grid-template-columns: 1fr; }
  .callout-inner { padding: 28px; }
}
@media (max-width: 620px) {
  .nav-links { display: none; }
  .lang-switch button { padding: 6px 8px; font-size: 0.75rem; }
}
