:root {
  --nx-primary: #ff6600;
  --nx-primary-hover: #e65c00;
  --nx-charcoal: #0f1115;
  --nx-dark: #14161b;
  --nx-muted: #8e95a5;
  --nx-surface: #1b1f27;
  --nx-light: #f7f7f9;
  --nx-white: #ffffff;
  --nx-border: #20242d;
  --nx-shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.35);
}

/* Local Montserrat Arabic (hosted in static/fonts) */
@font-face {
  font-family: 'Montserrat Arabic';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/Montserrat-Arabic/Montserrat-Arabic Regular/Montserrat-Arabic Regular.d20cf3a804bb.ttf") format("truetype");
}

@font-face {
  font-family: 'Montserrat Arabic';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/Montserrat-Arabic/Montserrat-Arabic Medium/Montserrat-Arabic Medium.2e471ff4c0f2.ttf") format("truetype");
}

@font-face {
  font-family: 'Montserrat Arabic';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/Montserrat-Arabic/Montserrat-Arabic Bold/Montserrat-Arabic Bold.b58d9f69d019.ttf") format("truetype");
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--nx-charcoal);
  color: var(--nx-white);
  margin: 0;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  letter-spacing: -0.015em;
  font-weight: 700;
}

p {
  color: var(--nx-muted);
}

.page-content {
  margin-top: 84px;
  background: linear-gradient(140deg, #0f1115 0%, #11141a 45%, #0e0f13 100%);
}

.container {
  max-width: 1180px;
}

/* Arabic typography */
body.lang-ar,
body.lang-ar h1,
body.lang-ar h2,
body.lang-ar h3,
body.lang-ar h4,
body.lang-ar h5,
body.lang-ar h6,
body.lang-ar p,
body.lang-ar .btn,
body.lang-ar .nav-link,
body.lang-ar .navbar-brand,
body.lang-ar .chip,
body.lang-ar .badge-soft,
body.lang-ar .tagline,
body.lang-ar .label,
body.lang-ar .lang-btn,
body.lang-ar button,
body.lang-ar input,
body.lang-ar select,
body.lang-ar textarea,
body.lang-ar .solution-badge,
body.lang-ar .stat-label,
body.lang-ar .stat-note,
body.lang-ar .footer,
body.lang-ar .footer-link,
body.lang-ar .footer-contact {
  font-family: 'Montserrat Arabic', 'Montserrat', sans-serif;
  letter-spacing: 0;
}

/* Navbar */
.nx-navbar {
  background: rgba(15, 17, 21, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding: 1rem 0.5rem;
}

.navbar-brand {
  color: var(--nx-white);
}

.navbar-brand span {
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

.nx-navbar .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  background-color: transparent;
}

.nav-link {
  color: var(--nx-muted);
  font-weight: 600;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--nx-primary);
}

/* Buttons */
.btn {
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.btn-nx-primary {
  background: linear-gradient(120deg, var(--nx-primary), #ff8733);
  color: var(--nx-white);
  border: none;
  box-shadow: 0 15px 30px rgba(255, 102, 0, 0.25);
}

.btn-nx-primary:hover {
  color: var(--nx-white);
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(255, 102, 0, 0.3);
}

.btn-nx-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--nx-white);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-nx-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--nx-white);
}

.btn-nx-outline {
  background: transparent;
  color: var(--nx-white);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

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

.btn-sm {
  padding: 0.5rem 1rem;
}

.btn-lg {
  padding: 0.9rem 1.5rem;
}

.lang-dropdown {
  position: relative;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--nx-white);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 8px 12px;
  border-radius: 12px;
  font-weight: 700;
}

.lang-flag {
  font-size: 1.05rem;
  line-height: 1;
}

.lang-toggle:focus,
.lang-toggle:hover {
  color: var(--nx-white);
  border-color: rgba(255, 255, 255, 0.3);
}

.lang-toggle::after {
  margin-left: 6px;
  vertical-align: middle;
}

.lang-toggle .lang-label {
  color: var(--nx-muted);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.lang-toggle .lang-current {
  color: var(--nx-white);
}

.lang-dropdown .dropdown-menu {
  min-width: 180px;
  padding: 8px;
  background: #14171e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}

.lang-dropdown .dropdown-item {
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--nx-white);
  font-weight: 600;
}

.lang-dropdown .dropdown-item:hover,
.lang-dropdown .dropdown-item:focus {
  background: rgba(255, 255, 255, 0.06);
}

.lang-dropdown .dropdown-item.selected,
.lang-dropdown .dropdown-item.active {
  background: rgba(255, 102, 0, 0.18);
  color: var(--nx-white);
}

.rtl {
  direction: rtl;
}

/* Chips */
.chip,
.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--nx-muted);
  font-size: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.badge-soft {
  padding: 7px 12px;
  background: rgba(255, 102, 0, 0.12);
  color: #ffc7a3;
  border: 1px solid rgba(255, 102, 0, 0.2);
}

.tagline {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.06);
  color: var(--nx-primary);
}

/* Hero */
.hero-section {
  padding: 64px 24px 32px;
}

.hero-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: center;
}

.hero-visual {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--nx-shadow-lg);
  min-height: 320px;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.glass-chip {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: rgba(15, 17, 21, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--nx-white);
  padding: 10px 14px;
  border-radius: 12px;
  backdrop-filter: blur(12px);
  font-weight: 600;
}

.hero-copy h1 {
  color: var(--nx-white);
}

.hero-copy .lead {
  color: #c5cad6;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--nx-muted);
  font-weight: 700;
  font-size: 0.85rem;
}

/* Sections */
.section-padding {
  padding: 80px 0;
}

.bg-surface {
  background: #11151c;
}

.section-title h2 {
  color: var(--nx-white);
  margin-bottom: 12px;
}

.section-title p {
  margin-bottom: 0;
}

/* Cards & Panels */
.stacked-cards {
  display: grid;
  gap: 12px;
}

.pill-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pill-card .label {
  color: var(--nx-white);
  font-weight: 700;
}

.icon-dot {
  color: var(--nx-primary);
}

.layered-panel {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--nx-shadow-lg);
}

.layered-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.panel-floating {
  position: absolute;
  bottom: 18px;
  left: 18px;
  right: 18px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(15, 17, 21, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.persona-card {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.2s ease, border-color 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.persona-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 102, 0, 0.4);
}

.persona-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.persona-content {
  padding: 16px;
}

.solution-card {
  background: #0f1218;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: var(--nx-shadow-lg);
  position: relative;
}

.solution-visual {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.solution-badge {
  position: absolute;
  margin: 14px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(15, 17, 21, 0.85);
  color: var(--nx-primary);
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.08);
  top: 14px;
  left: 14px;
}

.solution-body {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.solution-body.solution-body-text {
  padding-top: 64px;
}

.status-dot {
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--nx-muted);
  font-size: 0.85rem;
}

.status-dot.live {
  color: #34e0a1;
}

.feature-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 18px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 102, 0, 0.4);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: rgba(255, 102, 0, 0.14);
  color: var(--nx-white);
  border-radius: 12px;
  font-size: 20px;
}

.feature-visual {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
  height: 140px;
  object-fit: cover;
  margin-top: auto;
}

.command-card {
  background: linear-gradient(145deg, #11141a, #0b0c10);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 28px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  align-items: center;
}

.command-stats {
  display: grid;
  gap: 12px;
}

.stat-block {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 14px;
}

.stat-label {
  color: var(--nx-muted);
  font-size: 0.9rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--nx-white);
}

.stat-note {
  font-size: 0.9rem;
}

/* Stats section */
.stats-section {
  position: relative;
  padding: 80px 0;
  background: #0e1016;
  overflow: hidden;
}

.stats-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.16;
  filter: grayscale(1);
}

.stats-section .stat-value {
  color: var(--nx-primary);
  font-size: 3rem;
}

.stats-section .stat-label {
  color: #c8ccd7;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

/* CTA */
.cta-section {
  padding: 72px 0 96px;
}

.cta-card {
  background: linear-gradient(120deg, #1a1d25, #0f1116);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: var(--nx-shadow-lg);
}

/* Footer */
.footer {
  background: #0b0c10;
  padding: 64px 0 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-brand {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--nx-white);
}

.footer-links h5 {
  color: var(--nx-white);
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-link {
  display: block;
  color: var(--nx-muted);
  margin-bottom: 8px;
  text-decoration: none;
}

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

.footer-contact {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--nx-white);
  text-decoration: none;
  margin-bottom: 8px;
}

.footer-contact .icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

/* Utilities */
.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.letter-spacing-1 {
  letter-spacing: 0.08em;
}

.tracking-tight {
  letter-spacing: 0.06em;
}

/* Mockups & devices */
.hero-mockups {
  position: absolute;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  bottom: 18px;
  right: 18px;
  padding: 12px;
  background: rgba(15, 17, 21, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: var(--nx-shadow-lg);
  backdrop-filter: blur(10px);
}

.mockup-frame {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  background: #0d0f14;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mockup-frame.desktop {
  width: 240px;
  aspect-ratio: 16 / 10;
}

.mockup-frame.mobile {
  width: 110px;
  aspect-ratio: 9 / 19;
}

.mockup-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.feature-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.feature-mockup {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--nx-shadow-lg);
}

.feature-mockup img {
  width: 100%;
  aspect-ratio: 16 / 10;
  height: auto;
  object-fit: contain;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.08), rgba(15, 17, 21, 0.9));
  border-radius: 12px;
}

.devices-section .device-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.device-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  box-shadow: var(--nx-shadow-lg);
}

.device-card img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 10px;
}

.device-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--nx-muted);
  font-size: 0.9rem;
}

@media (max-width: 992px) {
  .nx-navbar .navbar-collapse {
    padding: 12px 0 6px;
  }

  .nx-navbar .navbar-nav {
    width: 100%;
    margin-bottom: 12px;
    gap: 6px;
  }

  .nx-navbar .nav-item {
    width: 100%;
  }

  .nx-navbar .nav-link {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
  }

  .nav-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: center;
  }

  .nav-actions .lang-dropdown {
    grid-column: 1 / -1;
    width: 100%;
  }

  .nav-actions .lang-toggle {
    width: 100%;
    justify-content: space-between;
  }

  .nav-actions .btn {
    width: 100%;
    text-align: center;
  }

  .command-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .page-content {
    margin-top: 76px;
  }
  .hero-section {
    padding-top: 32px;
  }
  .section-padding {
    padding: 60px 0;
  }
  .hero-mockups {
    position: static;
    margin-top: 12px;
    justify-content: flex-start;
  }
  .mockup-frame.desktop {
    width: 200px;
  }
  .mockup-frame.mobile {
    width: 96px;
  }
  .feature-mockup img {
    aspect-ratio: 4 / 3;
  }
}
