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

:root {
  --bg: #0f172a;
  --bg2: #1e293b;
  --bg3: #0d1424;
  --accent: #5B9CF0;
  --accent-dim: rgba(91,156,240,0.15);
  --accent-glow: rgba(91,156,240,0.25);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --border: rgba(255,255,255,0.07);
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

[dir="rtl"] { font-family: -apple-system, 'SF Arabic', 'Segoe UI', system-ui, sans-serif; }

a { color: inherit; text-decoration: none; }

/* ── ANNOUNCEMENT BAR ── */
.announcement-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(120, 53, 15, 0.95);
  border-bottom: 1px solid rgba(245,158,11,0.4);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 1.5rem;
  height: 36px;
  font-size: 0.78rem;
  color: #fcd34d;
  white-space: nowrap;
}
.ann-icon { flex-shrink: 0; }
.ann-text { overflow: hidden; text-overflow: ellipsis; }
.ann-link {
  color: #fde68a;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  flex-shrink: 0;
}
.ann-link:hover { color: #fff; }

/* ── NAV ── */
.nav {
  position: fixed;
  top: 36px; left: 0; right: 0;
  z-index: 100;
  padding: 0 2rem;
  transition: background 0.3s, backdrop-filter 0.3s, border-bottom 0.3s;
}
.nav.scrolled {
  background: rgba(15,23,42,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-icon { width: 32px; height: 32px; border-radius: 8px; }
.nav-name { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.02em; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-links a {
  font-size: 0.9rem;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  font-family: inherit;
}
.lang-toggle:hover { background: #263348; border-color: var(--accent); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-family: inherit;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 24px rgba(91,156,240,0.35);
}
.btn-primary:hover {
  background: #4a88dd;
  box-shadow: 0 0 36px rgba(91,156,240,0.5);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg2); border-color: rgba(255,255,255,0.15); }
.btn-sponsor {
  background: linear-gradient(135deg, #ea4899, #f97316);
  color: #fff;
}
.btn-sponsor:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-lg { padding: 14px 28px; font-size: 1rem; }

/* ── HERO ── */
.hero {
  position: relative;
  padding: 176px 2rem 100px; /* 36px bar + 64px nav + 76px breathing room */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(91,156,240,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-icon {
  width: 128px;
  height: 128px;
  border-radius: 28px;
  margin-bottom: 28px;
  box-shadow: 0 12px 48px rgba(91,156,240,0.35);
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-dim);
  border: 1px solid rgba(91,156,240,0.3);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 20px;
  font-weight: 600;
}
.badge-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.hero-title {
  font-size: clamp(3.5rem, 8vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #fff 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.05;
  margin-bottom: 20px;
}
.hero-tagline {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--text);
  font-weight: 500;
  margin-bottom: 12px;
}
.hero-sub {
  font-size: 1rem;
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 36px;
  line-height: 1.7;
}
.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 20px;
}
.hero-platform {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── MOCKUP CHROME (shared by hero + screenshots section) ── */
.hero-mockup {
  position: relative;
  z-index: 2;
  margin-top: 72px;
  width: 100%;
  max-width: 900px;
}
.mockup-chrome {
  background: #111827;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 40px 80px rgba(0,0,0,0.6),
    0 0 60px rgba(91,156,240,0.08);
}
.mockup-bar {
  background: #1a2332;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-red { background: #ff5f57; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #28ca41; }
.mockup-title {
  flex: 1;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  margin-left: -60px;
}
.mockup-screenshot {
  display: block;
  width: 100%;
  height: auto;
}

/* ── SCREENSHOTS SECTION ── */
.screenshots-section {
  padding: 100px 0;
  background: linear-gradient(180deg, transparent 0%, rgba(30,41,59,0.25) 50%, transparent 100%);
}
.screenshots-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.ss-tab {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.ss-tab:hover { color: var(--text); border-color: rgba(255,255,255,0.15); }
.ss-tab.active {
  background: var(--accent-dim);
  border-color: rgba(91,156,240,0.4);
  color: var(--accent);
  font-weight: 600;
}
.screenshots-viewer .mockup-chrome {
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 32px 64px rgba(0,0,0,0.5),
    0 0 80px rgba(91,156,240,0.06);
}
#ssImage {
  transition: opacity 0.15s ease;
}

/* ── SECTIONS SHARED ── */
.section-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 2rem;
}
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px;
}
.section-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 14px;
}
.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}
.section-header p { color: var(--muted); font-size: 1.05rem; }

/* ── FEATURES ── */
.features {
  padding: 100px 0;
  background: linear-gradient(180deg, transparent 0%, rgba(30,41,59,0.3) 50%, transparent 100%);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.feature-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
  border-color: rgba(91,156,240,0.25);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}
.feature-icon {
  width: 48px; height: 48px;
  background: color-mix(in srgb, var(--c) 15%, transparent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--c);
}
.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.feature-card p { font-size: 0.88rem; color: var(--muted); line-height: 1.65; }

/* ── BILINGUAL ── */
.bilingual-section {
  padding: 100px 0;
}
.bilingual-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.bilingual-text h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  margin-top: 12px;
}
.bilingual-text p { color: var(--muted); margin-bottom: 28px; line-height: 1.7; }
.bilingual-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bilingual-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text);
}
.bilingual-list li::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}
.bilingual-demo {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.lang-demo-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.demo-card-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 14px;
}
.demo-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
.demo-row:last-child { border-bottom: none; }
.demo-label { color: var(--muted); }
.demo-value { font-weight: 600; }
.demo-value.accent { color: var(--accent); }
.highlight-row .demo-label, .highlight-row .demo-value { font-weight: 700; }

/* ── OPEN SOURCE ── */
.opensource-section {
  padding: 100px 0;
  background: linear-gradient(180deg, transparent, rgba(91,156,240,0.04) 50%, transparent);
}
.opensource-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.os-icon-wrap {
  width: 72px; height: 72px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  margin-bottom: 28px;
}
.opensource-inner h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.opensource-inner p {
  color: var(--muted);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 36px;
}
.os-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-bottom: 60px; }
.os-stats {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.os-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 36px;
  gap: 4px;
  flex: 1;
}
.os-stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.os-stat-label { font-size: 0.82rem; color: var(--muted); }
.os-stat-divider { width: 1px; height: 60px; background: var(--border); }

/* ── DOWNLOAD ── */
.download-section {
  padding: 80px 0 120px;
}
.download-header {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 48px;
}
.download-header h2 { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 8px; }
.download-header p { color: var(--muted); font-size: 0.95rem; margin-bottom: 14px; }
.download-icon { width: 72px; height: 72px; border-radius: 18px; flex-shrink: 0; }
.download-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.meta-pill {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 0.78rem;
  color: var(--muted);
}
.beta-pill {
  background: rgba(245,158,11,0.1);
  border-color: rgba(245,158,11,0.3);
  color: #fbbf24;
}
.download-platforms {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}
.platform-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s;
}
.platform-card:hover { border-color: rgba(91,156,240,0.25); }
.platform-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.platform-icon { width: 22px; height: 22px; color: var(--muted); flex-shrink: 0; }
.platform-name { font-weight: 700; font-size: 1rem; }
.platform-downloads { display: flex; flex-direction: column; gap: 10px; }
.dl-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s;
  font-size: 0.88rem;
}
.dl-btn:hover { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.15); }
.dl-btn-primary {
  background: var(--accent-dim);
  border-color: rgba(91,156,240,0.35);
  color: var(--accent);
}
.dl-btn-primary:hover { background: rgba(91,156,240,0.2); border-color: rgba(91,156,240,0.5); }
.dl-btn svg { flex-shrink: 0; }
.dl-btn div { display: flex; flex-direction: column; gap: 2px; }
.dl-btn small { font-size: 0.72rem; opacity: 0.6; }
.platform-note { font-size: 0.72rem; color: var(--muted); margin-top: 10px; opacity: 0.7; }

/* ── Download counter ── */
.dl-counter {
  display: flex;
  align-items: center;
  gap: 28px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 28px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.dl-counter-total {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.dl-counter-num {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.dl-counter-label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}
.dl-counter-breakdown {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  border-left: 1px solid var(--border);
  padding-left: 28px;
}
[dir="rtl"] .dl-counter-breakdown {
  border-left: none;
  border-right: 1px solid var(--border);
  padding-left: 0;
  padding-right: 28px;
}
.dl-platform-stat {
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.dl-platform-stat strong {
  color: var(--text);
  font-weight: 600;
}

.download-releases-link { text-align: center; }
.download-releases-link a {
  font-size: 0.88rem;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}
.download-releases-link a:hover { opacity: 0.8; }

/* ── FOOTER ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 2rem;
  background: var(--bg3);
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 12px; flex: 1; }
.footer-icon { width: 36px; height: 36px; border-radius: 9px; }
.footer-name { font-weight: 700; font-size: 0.95rem; }
.footer-tagline { font-size: 0.8rem; color: var(--muted); }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 0.85rem; color: var(--muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 0.78rem; color: var(--muted); width: 100%; margin-top: 8px; }

/* ── RTL OVERRIDES ── */
[dir="rtl"] .mockup-title { margin-left: 0; margin-right: -60px; }
[dir="rtl"] .bilingual-list li::before { margin-left: 0; }
[dir="rtl"] .screenshots-tabs { direction: rtl; }

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  .bilingual-inner { grid-template-columns: 1fr; gap: 48px; }
  .download-platforms { grid-template-columns: 1fr; }
  .download-header { flex-direction: column; align-items: flex-start; gap: 16px; }
  .screenshots-tabs { gap: 6px; }
  .ss-tab { font-size: 0.78rem; padding: 6px 12px; }
}
@media (max-width: 600px) {
  .announcement-bar { font-size: 0.72rem; gap: 6px; }
  .ann-text { display: none; } /* show icon + link only on very small screens */
  .nav-links a:not(.lang-toggle) { display: none; }
  .hero { padding: 156px 1.25rem 60px; } /* 36px bar + 64px nav + 56px */
  .hero-mockup { display: none; }
  .os-stat { padding: 20px 28px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
}
