/* ============================================================
   Dynom LTD — shared stylesheet
   Brand: #2E9BFF on #060A13 · Fonts: Sora + Manrope
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { background: #060A13; }
body {
  color: #E8EDF5;
  font-family: 'Manrope', sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
}
::selection { background: rgba(46,155,255,0.35); }
img { max-width: 100%; }

@keyframes floatGlow { 0% { transform: translate(0,0); } 50% { transform: translate(0,-26px); } 100% { transform: translate(0,0); } }
@keyframes pulseDot { 0%,100% { opacity: 0.5; } 50% { opacity: 1; } }

/* ---- Hero (video background) ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
/* Ambient backdrop — visible before the video paints, and if it never loads */
.hero-fallback { position: absolute; inset: 0; pointer-events: none; }

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.hero-video.is-ready { opacity: 1; }
/* Mirror the hero loop on RTL pages so its motion reads right-to-left */
[dir="rtl"] .hero-video { transform: scaleX(-1); }

.hero-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(100deg,
    rgba(6,10,19,0.92) 0%,
    rgba(6,10,19,0.72) 38%,
    rgba(6,10,19,0.25) 70%,
    rgba(6,10,19,0.15) 100%);
}
.hero-fade {
  position: absolute;
  inset: auto 0 0 0;
  height: 160px;
  pointer-events: none;
  background: linear-gradient(to top, #060A13, transparent);
}

.hero-copy {
  position: relative;
  z-index: 2;
  text-align: left;
  max-width: 760px;
  padding: 0 24px 0 96px;
}

.hero-badge {
  position: absolute;
  right: 2.5%;
  bottom: 13%;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 220px;
  padding: 24px 34px;
  border: 1px solid rgba(46,155,255,0.3);
  border-radius: 16px;
  background: rgba(6,10,19,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #5B6B84;
  font-size: 11px;
  letter-spacing: 2.5px;
}

@media (max-width: 960px) {
  .hero-copy { padding: 0 !important; }
  .hero-badge { right: 50%; bottom: 96px; transform: translateX(50%); padding: 16px 24px; }
  .hero-scroll { display: none; }
  .hero-scrim {
    background: linear-gradient(180deg, rgba(6,10,19,0.82) 0%, rgba(6,10,19,0.7) 55%, rgba(6,10,19,0.9) 100%);
  }
}

/* ---- Interactive hover states (replace design-canvas style-hover) ---- */
.navlink { transition: color 0.2s; }
.navlink:hover { color: #FFFFFF; }

.btn-pri { transition: transform 0.2s, box-shadow 0.2s; }
.btn-pri:hover { transform: translateY(-2px); box-shadow: 0 14px 44px rgba(46,155,255,0.55); }

.btn-pill { transition: transform 0.2s, box-shadow 0.2s; }
.btn-pill:hover { transform: translateY(-1px); box-shadow: 0 0 34px rgba(46,155,255,0.55); }

.btn-ghost { transition: background 0.2s, border-color 0.2s; }
.btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.28); }

.card-hover { transition: transform 0.3s, border-color 0.3s, background 0.3s; }
.card-hover:hover { transform: translateY(-6px); border-color: rgba(46,155,255,0.45); background: rgba(46,155,255,0.05); }

.backlink { transition: color 0.2s; }
.backlink:hover { color: #2E9BFF; }

.arrow-link { transition: gap 0.2s; }
.arrow-link:hover { gap: 12px; }

.field { transition: border-color 0.2s; }
.field:focus { border-color: #2E9BFF; }

/* ---- Reveal-on-scroll base (JS adds .is-visible) ---- */
[data-reveal] { opacity: 0; transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1), transform 0.9s cubic-bezier(0.16,1,0.3,1); }
[data-reveal="up"]    { transform: translateY(36px); }
[data-reveal="left"]  { transform: translateX(-36px); }
[data-reveal="right"] { transform: translateX(36px); }
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none; }
}

/* ---- Responsive grids ---- */
.grid-2, .grid-3, .grid-4 { display: grid; }

@media (max-width: 960px) {
  .grid-2 { grid-template-columns: 1fr !important; gap: 40px !important; }
  .grid-3 { grid-template-columns: 1fr 1fr !important; }
  .grid-4 { grid-template-columns: 1fr 1fr !important; }
  .stack-order > * { order: 0 !important; }
  .nav-links { display: none !important; }
  section, header, footer { padding-left: 22px !important; padding-right: 22px !important; }
  nav { padding-left: 20px !important; padding-right: 20px !important; }
  .pipeline-line { display: none !important; }
}
@media (max-width: 620px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr !important; }
  footer { flex-direction: column; gap: 14px; text-align: center; }
  .hero-stats { flex-wrap: wrap; gap: 22px !important; }
}

/* ---- Language switcher (stays visible on mobile, unlike the rest of the nav) ---- */
.lang-switch {
  flex-shrink: 0;
  color: #AEB9CC;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 8px 16px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.lang-switch:hover { color: #FFFFFF; border-color: rgba(46,155,255,0.5); background: rgba(46,155,255,0.1); }

@media (max-width: 960px) {
  .nav-links:has(.lang-switch) { display: flex !important; }
  .nav-links:has(.lang-switch) > *:not(.lang-switch) { display: none !important; }
}

/* ============================================================
   Arabic / RTL  (pages under /ar/ set <html lang="ar" dir="rtl">)
   The pages are built from the same inline-styled markup as the
   English ones, so the overrides below re-point typography and
   flip the handful of directional values baked into those styles.
   ============================================================ */
html[dir="rtl"] body { font-family: 'IBM Plex Sans Arabic', sans-serif; }

/* Swap the Latin display/body faces wherever they appear inline */
html[dir="rtl"] [style*="Sora"]    { font-family: 'Noto Kufi Arabic', sans-serif !important; }
html[dir="rtl"] [style*="Manrope"] { font-family: 'IBM Plex Sans Arabic', sans-serif !important; }

/* Arabic is cursive — tracking pulls the joins apart and reads as broken text */
html[dir="rtl"] [style*="letter-spacing"] { letter-spacing: 0 !important; }

/* Latin runs (brand names, addresses, phone, email) inside RTL prose */
html[dir="rtl"] .ltr { direction: ltr; unicode-bidi: isolate; }

html[dir="rtl"] .hero-copy { text-align: right; padding: 0 96px 0 24px; }
html[dir="rtl"] .hero-scrim {
  background: linear-gradient(260deg,
    rgba(6,10,19,0.92) 0%,
    rgba(6,10,19,0.72) 38%,
    rgba(6,10,19,0.25) 70%,
    rgba(6,10,19,0.15) 100%);
}
html[dir="rtl"] .hero-badge { right: auto; left: 2.5%; }

html[dir="rtl"] [data-reveal="left"]  { transform: translateX(36px); }
html[dir="rtl"] [data-reveal="right"] { transform: translateX(-36px); }
html[dir="rtl"] [data-reveal].is-visible { transform: none; }

@media (max-width: 960px) {
  html[dir="rtl"] .hero-copy { padding: 0 !important; text-align: right; }
  html[dir="rtl"] .hero-badge { left: 50%; right: auto; transform: translateX(-50%); }
  html[dir="rtl"] .hero-scrim {
    background: linear-gradient(180deg, rgba(6,10,19,0.82) 0%, rgba(6,10,19,0.7) 55%, rgba(6,10,19,0.9) 100%);
  }
}
