:root {
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface-muted: #E9EFF8;
  --ink: #1E293B;
  --ink-muted: #475569;
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --secondary: #3B82F6;
  --accent-cta: #EA580C;
  --accent-cta-bg: #C2410C;
  --accent-cta-hover: #9A3412;
  --border: #E2E8F0;
  --success: #16A34A;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 56px rgba(15, 23, 42, 0.14);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --font-ltr: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-rtl: "Almarai", "Segoe UI", Tahoma, Arial, sans-serif;
  --font-mono: "JetBrains Mono", Consolas, ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% 0%, rgba(37, 99, 235, 0.07), transparent 36%),
    radial-gradient(circle at 88% 8%, rgba(234, 88, 12, 0.05), transparent 30%);
  color: var(--ink);
  font-family: var(--font-ltr);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

html[dir="rtl"] body {
  font-family: var(--font-rtl);
}

img {
  display: block;
  max-width: 100%;
}

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

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.container {
  width: min(1200px, calc(100% - 2rem));
  margin-inline: auto;
}

.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;
}

/* Sticky Glassmorphic Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(248, 250, 252, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.24);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.brand-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-nav a {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink-muted);
  transition: color 0.16s ease;
  white-space: nowrap;
}

.header-nav a:hover {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.locale-switcher {
  display: inline-flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  box-shadow: var(--shadow-sm);
}

.locale-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border: none;
  background: transparent;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ink-muted);
  min-height: 36px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.locale-btn:hover {
  color: var(--ink);
  background: var(--surface-muted);
}

.locale-btn.is-active {
  background: var(--primary);
  color: #FFFFFF;
}

.flag-svg {
  width: 18px;
  height: 13px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
  flex-shrink: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 0.14s ease, background-color 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  text-align: center;
}

.btn-sm {
  min-height: 40px;
  padding: 0 0.95rem;
  font-size: 0.875rem;
}

.btn-lg {
  min-height: 52px;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
}

.btn-cta {
  background: var(--accent-cta-bg);
  color: #FFFFFF;
  border-color: var(--accent-cta);
  box-shadow: 0 10px 24px rgba(194, 65, 12, 0.26);
}

.btn-cta:hover {
  background: var(--accent-cta-hover);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(154, 52, 18, 0.3);
}

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.22);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-outline {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #F8FBFF;
}

/* Hero Section */
.hero-section {
  padding: 3.5rem 0 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 2.75rem;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--primary);
  font-size: 0.84rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.15rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.16);
}

.hero-title {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 3.6vw, 3.05rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.hero-lead {
  margin: 0 0 1.65rem;
  max-width: 62ch;
  font-size: 1.0625rem;
  color: var(--ink-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
}

.hero-sublinks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.25rem;
  font-size: 0.875rem;
  color: var(--ink-muted);
  margin-bottom: 1.35rem;
}

.mirror-link {
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mirror-link:hover {
  color: var(--primary-hover);
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.trust-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.trust-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.trust-value {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ink);
}

.checksum-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.copy-hash-btn {
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--ink);
  border-radius: 6px;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  min-height: 28px;
}

.copy-hash-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Mockup Window Card */
.app-window {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.app-window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  background: #F1F5F9;
  border-bottom: 1px solid var(--border);
}

.window-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.window-dots span:nth-child(1) { background: #EF4444; }
.window-dots span:nth-child(2) { background: #F59E0B; }
.window-dots span:nth-child(3) { background: #10B981; }

.window-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.24rem 0.65rem;
  border-radius: 999px;
}

.aspect-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #0F172A;
  overflow: hidden;
}

.aspect-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
}

.hero-window-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
  font-size: 0.84rem;
  color: var(--ink-muted);
}

.release-notes-bar {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--ink-muted);
}

/* Section Headers */
.section {
  padding: 4.25rem 0;
}

.section-alt {
  background: #FFFFFF;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  max-width: 68ch;
  margin-bottom: 2.25rem;
}

.section-title {
  margin: 0 0 0.6rem;
  font-size: clamp(1.55rem, 2.5vw, 2.2rem);
  font-weight: 800;
  line-height: 1.24;
  color: var(--ink);
}

.section-subtitle {
  margin: 0;
  font-size: 1rem;
  color: var(--ink-muted);
}

/* 4-Market Cards */
.markets-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.market-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: start;
  gap: 0.55rem;
  padding: 1.2rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.market-card:hover {
  border-color: var(--secondary);
  box-shadow: var(--shadow-sm);
}

.market-card.is-active {
  background: #EFF6FF;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.14);
}

.market-card-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.market-code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
}

.market-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
}

.market-meta {
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.market-sample {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--primary);
}

/* Interactive 12-Screen Tour */
.tour-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.screen-tabs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
}

.screen-tab {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  min-height: 44px;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: start;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink-muted);
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.screen-tab:hover {
  border-color: var(--secondary);
  color: var(--ink);
}

.screen-tab.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
}

.screen-tab-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  opacity: 0.82;
  min-width: 1.5rem;
}

.tour-stage-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.tour-stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: #F8FAFC;
}

.tour-stage-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--ink);
}

.tour-stage-desc {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-muted);
  max-width: 65ch;
}

.tour-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
}

.icon-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.feature-card {
  padding: 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface-muted);
  color: var(--primary);
  margin-bottom: 0.95rem;
}

.feature-title {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
}

.feature-desc {
  margin: 0;
  font-size: 0.93rem;
  color: var(--ink-muted);
}

/* Installation & Requirements */
.install-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 1.5rem;
}

.steps-list {
  display: grid;
  gap: 0.9rem;
}

.step-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.step-title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 800;
}

.step-desc {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-muted);
}

.specs-card {
  padding: 1.45rem;
  background: #0F172A;
  color: #F8FAFC;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.2rem;
}

.specs-title {
  margin: 0 0 0.8rem;
  font-size: 1.125rem;
  font-weight: 800;
}

.specs-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.65rem;
}

.specs-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  font-size: 0.9rem;
}

.specs-key {
  color: #94A3B8;
}

.specs-val {
  font-weight: 700;
  color: #FFFFFF;
  text-align: end;
}

/* Bottom CTA Band */
.cta-band {
  padding: 3.5rem 0;
}

.cta-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2.25rem 2.5rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #1E3A8A, #2563EB);
  color: #FFFFFF;
  box-shadow: var(--shadow-lg);
}

.cta-box h2 {
  margin: 0 0 0.45rem;
  font-size: clamp(1.45rem, 2.3vw, 2rem);
  font-weight: 800;
}

.cta-box p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  max-width: 58ch;
}

.cta-box-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  flex-shrink: 0;
}

.btn-white-outline {
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-white-outline:hover {
  background: rgba(255, 255, 255, 0.24);
}

/* Footer */
.site-footer {
  padding: 2.25rem 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-links a:hover {
  color: var(--primary);
}

/* Lightbox Modal */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.86);
  backdrop-filter: blur(8px);
}

.lightbox.is-open {
  display: flex;
}

.lightbox-dialog {
  width: min(1160px, 100%);
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.2rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.lightbox-caption {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--ink);
}

.lightbox-stage {
  aspect-ratio: 16 / 10;
  background: #0F172A;
}

.lightbox-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Responsive Breakpoints */
@media (max-width: 1040px) {
  .header-nav {
    display: none;
  }
  .hero-grid,
  .install-grid {
    grid-template-columns: 1fr;
  }
  .markets-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tour-layout {
    grid-template-columns: 1fr;
  }
  .screen-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .features-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cta-box {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 0.65rem 0;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  .header-cta {
    display: none;
  }
  .trust-strip,
  .markets-grid,
  .features-grid {
    grid-template-columns: 1fr;
  }
  .screen-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cta-box {
    padding: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
