* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  background-image: var(--hero-gradient);
  background-attachment: fixed;
}

.hq-transition {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(120, 170, 255, 0.25), rgba(4, 8, 18, 0.95));
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.4s ease;
  z-index: 1200;
}

html[data-from-71hq="true"] .hq-transition {
  opacity: 1;
}

html.hq-transition-out .hq-transition {
  opacity: 0;
}

.text-white-75 {
  color: rgba(255, 255, 255, 0.75) !important;
}

.text-white-65 {
  color: rgba(255, 255, 255, 0.65) !important;
}

html[dir="rtl"] body {
  font-family: "Cairo", "Inter", system-ui, sans-serif;
}

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

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

a:hover {
  color: var(--accent-1);
}

.text-secondary {
  color: var(--text-secondary) !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

[data-theme="dark"] .text-dark,
[data-theme="dark"] .text-black,
[data-theme="dark"] .text-body {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .text-body-secondary,
[data-theme="dark"] .text-body-tertiary,
[data-theme="dark"] .text-black-50 {
  color: var(--text-secondary) !important;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 8px;
}

main {
  overflow: hidden;
}

.section {
  padding: 90px 0;
}

.section-tight {
  padding: 60px 0;
}

.section-muted {
  background: var(--bg-section);
}

.section-title {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--accent-1);
}

.glass {
  background: var(--bg-glass);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.glass-strong {
  background: var(--bg-glass-strong);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(22px);
}

.glass-card {
  border-radius: 20px;
  padding: 24px;
  position: relative;
}

.glass-panel {
  border-radius: 16px;
  padding: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
}

.btn-primary,
.btn-cta {
  background: var(--btn-primary-bg);
  border: none;
  color: var(--btn-primary-text);
  font-weight: 600;
  box-shadow: var(--glow);
}

.btn-cta:hover,
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(59, 130, 246, 0.3);
}

.btn-outline-glass {
  border: 1px solid var(--btn-outline);
  color: var(--text-primary);
  background: transparent;
}

.btn-outline-glass:hover {
  border-color: var(--accent-1);
  color: var(--accent-1);
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 999;
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  --bs-navbar-color: var(--text-secondary);
  --bs-navbar-hover-color: var(--accent-1);
  --bs-navbar-active-color: var(--accent-1);
}

.navbar.glass-nav {
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--nav-border);
}

.navbar.scrolled {
  box-shadow: var(--shadow-soft);
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.navbar-toggler {
  border-color: var(--border-subtle);
}

[data-theme="dark"] .navbar-toggler-icon {
  filter: invert(1);
}

.navbar-brand .brand-pill {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  background: var(--accent-gradient);
  color: #0b1120;
  font-weight: 800;
  box-shadow: var(--shadow-soft);
}

.navbar-brand span:not(.brand-pill) {
  color: var(--text-primary);
}

.nav-link {
  font-weight: 500;
  color: var(--text-secondary);
}

.nav-link.active,
.nav-link:hover {
  color: var(--accent-1);
}

.navbar .navbar-nav .nav-link {
  color: var(--text-secondary);
}

.navbar .navbar-nav .nav-link.active,
.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link:focus {
  color: var(--accent-1);
}

.nav-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-glass);
  font-size: 0.85rem;
}

.hero {
  position: relative;
  padding: 120px 0 80px;
  color: #f8fafc;
  overflow: hidden;
  background: linear-gradient(130deg, rgba(11, 17, 32, 0.92), rgba(20, 31, 62, 0.85));
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-gradient);
  opacity: 0.8;
  animation: gradientShift 12s ease-in-out infinite;
  z-index: 0;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.3), transparent 40%);
  opacity: 0.6;
  z-index: 0;
}

@keyframes gradientShift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(-2%, 2%, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: rgba(255, 255, 255, 0.85);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
}

.hero-grid {
  display: grid;
  gap: 16px;
}

.lottie-holder {
  width: 52px;
  height: 52px;
}

.hero-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px);
  border-radius: 18px;
  padding: 18px;
  color: #f8fafc;
  box-shadow: 0 20px 50px rgba(5, 10, 24, 0.35);
}

.hero-card.mini {
  padding: 14px;
}

.hero-card .stat {
  font-weight: 700;
  font-size: 1.2rem;
}

.sample-panel {
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(5, 10, 24, 0.35);
}

.sample-pill {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8rem;
}

.sample-frame {
  position: relative;
  border-radius: 20px;
  padding: 18px;
  background: rgba(8, 12, 24, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.sample-frame > * {
  position: relative;
  z-index: 1;
}

.sample-frame::after {
  content: attr(data-sample-label);
  position: absolute;
  bottom: 14px;
  left: 16px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: 0.35em;
  color: rgba(255, 255, 255, 0.08);
  font-weight: 700;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 0;
}

.sample-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.sample-title {
  font-weight: 600;
  font-size: 1.1rem;
}

.sample-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.sample-metric {
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.sample-grid {
  display: grid;
  gap: 12px;
}

.sample-block {
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.sample-block-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.sample-block-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 992px) {
  .sample-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sample-block-compact {
    grid-column: span 2;
  }
}

.hero-visual {
  position: relative;
  z-index: 2;
}

.hero-orb {
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  filter: blur(0.2px);
  opacity: 0.5;
}

.hero-orb.blue {
  background: radial-gradient(circle, rgba(59, 130, 246, 0.55), transparent 70%);
  top: -20px;
  right: 20px;
}

.hero-orb.purple {
  background: radial-gradient(circle, rgba(139, 92, 246, 0.5), transparent 70%);
  bottom: 0;
  left: 10px;
}

.hero-orb.aqua {
  background: radial-gradient(circle, rgba(34, 212, 192, 0.5), transparent 70%);
  bottom: 40px;
  right: 80px;
}

#particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.capability-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
}

.capability-card:hover {
  transform: translateY(-6px) rotateZ(-0.6deg);
  box-shadow: var(--shadow-strong);
}

.icon-pill {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-1);
}

.feature-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-6px) rotateZ(0.4deg);
}

.badge-glass {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--accent-1);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
}

.carousel-card {
  border-radius: 20px;
  padding: 24px;
  min-height: 240px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
}

.testimonial-card {
  border-radius: 20px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
}

.stats-grid {
  display: grid;
  gap: 16px;
}

.cta-panel {
  padding: 36px;
  border-radius: 24px;
  background: var(--accent-gradient);
  color: #f8fafc;
  box-shadow: var(--shadow-strong);
}

.form-control,
.form-select {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--accent-1);
  box-shadow: var(--focus-ring);
}

.form-feedback {
  font-size: 0.9rem;
}

.footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 60px 0 30px;
}

.footer a {
  color: inherit;
}

.footer .footer-title {
  font-weight: 600;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  margin-top: 40px;
  padding-top: 20px;
}

.visitor-counter {
  font-weight: 600;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reduced-motion * {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

.swiper-pagination-bullet {
  background: var(--accent-1);
}

.glow-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.5), transparent);
}

.space-bg {
  position: fixed;
  inset: 0;
  background: var(--space-bg);
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.space-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-gradient);
  opacity: 0.85;
  animation: gradientShift 14s ease-in-out infinite;
  z-index: 0;
}

.space-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--space-glow);
  opacity: 0.6;
  z-index: 0;
}

body.space-page {
  background: var(--bg-page);
  color: var(--text-primary);
  --bg-section: rgba(247, 247, 251, 0.74);
}

body.space-page header,
body.space-page main,
body.space-page footer {
  position: relative;
  z-index: 1;
}

[data-theme="dark"] body.space-page {
  --bg-section: rgba(15, 23, 42, 0.48);
}

.service-card {
  cursor: pointer;
}

.service-card:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.service-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.service-modal.is-open {
  display: flex;
}

.service-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 11, 20, 0.6);
  backdrop-filter: blur(8px);
}

.service-modal-card {
  position: relative;
  z-index: 1;
  width: min(92vw, 720px);
  padding: 28px;
  border-radius: 22px;
  background: var(--bg-glass-strong);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-strong);
}

.service-modal-card ul {
  padding-left: 18px;
  margin-bottom: 0;
}

.service-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 1.4rem;
}

body.modal-open {
  overflow: hidden;
}

body.modal-open header,
body.modal-open main,
body.modal-open footer {
  filter: blur(6px);
}

@media (min-width: 992px) {
  .hero-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 991px) {
  .navbar .nav-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hq-transition {
    transition-duration: 0.01ms;
  }
}
