:root {
  --ink: #0A0D14;
  --navy: #141B2D;
  --blue: #0058A1;
  --blue-hi: #1F7FD8;
  --slate: #B8C1CC;
  --paper: #F5F7FA;
  --text: #F5F7FA;
  --muted: #A8B2C1;
  --faint: #667184;
  --surface: rgba(20, 27, 45, 0.42);
  --surface-strong: rgba(20, 27, 45, 0.76);
  --line: rgba(184, 193, 204, 0.16);
  --line-strong: rgba(184, 193, 204, 0.28);
  --radius: 8px;
  --font-sans: "Satoshi", "IBM Plex Sans Arabic", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "Satoshi", system-ui, sans-serif;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html[lang="ar"] {
  direction: rtl;
}

html[lang="en"] {
  direction: ltr;
}

body {
  min-height: 100vh;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

[data-ar],
[data-en] {
  display: inline;
}

html[lang="ar"] [data-en],
html[lang="en"] [data-ar] {
  display: none !important;
}

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

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

button {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.wrap {
  width: min(100%, 1360px);
  margin: 0 auto;
  padding: 0 40px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  color: var(--text);
  font-weight: 500;
  letter-spacing: 0;
}

h1 {
  max-width: 12.5ch;
  font-size: clamp(52px, 8.3vw, 116px);
  line-height: 0.96;
}

h2 {
  font-size: clamp(34px, 4.8vw, 70px);
  line-height: 1.04;
}

h3 {
  font-size: clamp(24px, 2.3vw, 36px);
  line-height: 1.12;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  padding: 20px 0;
  border-bottom: 1px solid transparent;
  transition: background 220ms ease, border-color 220ms ease, backdrop-filter 220ms ease;
}

.site-header.scrolled {
  border-bottom-color: var(--line);
  background: rgba(10, 13, 20, 0.78);
  backdrop-filter: blur(16px) saturate(140%);
}

.header-inner,
.brand,
.nav-links,
.header-actions,
.lang-toggle {
  display: flex;
  align-items: center;
}

.header-inner {
  justify-content: space-between;
  gap: 24px;
}

.brand {
  min-width: 0;
  gap: 12px;
}

.brand-mark {
  width: 46px;
  height: 36px;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.08;
}

.brand-name {
  color: var(--paper);
  font-family: "Satoshi", var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  direction: ltr;
  text-align: left;
  unicode-bidi: isolate;
}

.brand-sub {
  margin-top: 5px;
  color: var(--slate);
  font-family: "Satoshi", var(--font-sans);
  font-size: 12px;
  direction: ltr;
  text-align: left;
  unicode-bidi: isolate;
}

.nav-links {
  gap: 2px;
}

.nav-links a {
  border-radius: 999px;
  padding: 9px 15px;
  color: var(--muted);
  font-size: 14px;
  transition: color 160ms ease, background 160ms ease;
}

.nav-links a:hover {
  background: rgba(245, 247, 250, 0.06);
  color: var(--paper);
}

.header-actions {
  gap: 12px;
}

.lang-toggle {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(20, 27, 45, 0.36);
}

.lang-toggle button {
  min-width: 40px;
  padding: 8px 10px;
  color: var(--muted);
  font-family: "Satoshi", var(--font-sans);
  font-size: 12px;
}

.lang-toggle button.active {
  background: var(--paper);
  color: var(--ink);
}

.menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.menu-btn span,
.menu-btn span::before,
.menu-btn span::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--paper);
}

.menu-btn span {
  position: relative;
}

.menu-btn span::before,
.menu-btn span::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
}

.menu-btn span::before {
  top: -6px;
}

.menu-btn span::after {
  top: 6px;
}

.mobile-sheet {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 96px 28px 40px;
  background: rgba(10, 13, 20, 0.98);
  transform: translateY(-100%);
  transition: transform 260ms ease;
}

.mobile-sheet.open {
  transform: translateY(0);
}

.mobile-sheet a {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  color: var(--paper);
  font-size: 26px;
  font-weight: 500;
}

.mobile-sheet .close {
  position: absolute;
  top: 24px;
  inset-inline-end: 24px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: "Satoshi", var(--font-sans);
  font-size: 28px;
  line-height: 1;
}

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 168px 0 88px;
  background: var(--ink);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 220px;
  background: linear-gradient(180deg, transparent, var(--ink));
  pointer-events: none;
}

.hero-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-field::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 13, 20, 0.3), rgba(10, 13, 20, 0.62) 62%, rgba(10, 13, 20, 0.78)),
    linear-gradient(180deg, rgba(10, 13, 20, 0.18), rgba(10, 13, 20, 0.2) 58%, var(--ink));
  z-index: 1;
}

.hero-field img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  opacity: 0.86;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 80px;
  align-items: end;
}

.hero-copy p {
  max-width: 700px;
  margin-top: 34px;
  color: var(--paper);
  font-size: clamp(18px, 1.8vw, 26px);
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 42px;
}

.hero-actions a,
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  font-size: 16px;
  font-weight: 600;
}

.hero-actions a::after,
.contact-link::after {
  content: "";
  width: 42px;
  height: 1px;
  background: var(--blue-hi);
}

.system-index {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.system-index a {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px 18px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.system-index a:last-child {
  border-bottom: 0;
}

.system-index span {
  color: var(--faint);
  font-family: "Satoshi", var(--font-sans);
  font-size: 13px;
}

.system-index strong {
  color: var(--paper);
  font-family: "Satoshi", var(--font-sans);
  font-size: 20px;
  font-weight: 600;
}

.system-index em {
  grid-column: 2;
  color: var(--muted);
  font-style: normal;
  font-size: 15px;
}

.systems-section,
.company-section,
.lab-section,
.contact-section {
  position: relative;
  padding: 120px 0;
}

.systems-section {
  background: var(--ink);
}

.section-heading,
.lab-header {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  margin-bottom: 70px;
}

.section-heading > span,
.company-title > span,
.lab-header > span,
.contact-panel span,
.system-kicker,
.lab-grid article > span {
  color: var(--slate);
  font-family: "Satoshi", var(--font-sans);
  font-size: 13px;
  font-weight: 700;
}

.section-heading h2,
.lab-header h2 {
  max-width: 920px;
}

.system-stack {
  display: grid;
  gap: 24px;
}

.system-panel {
  display: grid;
  grid-template-columns: minmax(320px, 0.7fr) minmax(0, 1fr);
  min-height: 440px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
}

.system-panel:nth-child(even) {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.7fr);
}

.system-panel:nth-child(even) .system-media {
  order: 2;
}

.system-media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 340px;
  padding: 52px;
  background:
    linear-gradient(135deg, rgba(20, 27, 45, 0.68), rgba(10, 13, 20, 0.96)),
    repeating-linear-gradient(45deg, rgba(245, 247, 250, 0.035) 0 1px, transparent 1px 16px);
}

.system-panel:nth-child(even) .system-media {
  border-inline: 0;
}

.system-media img {
  width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.28));
}

.quickdash-logo {
  max-width: 230px;
  max-height: 220px;
}

.waniso-logo {
  max-width: 260px;
  max-height: 250px;
}

.veyron-logo {
  max-width: 360px;
  max-height: 180px;
}

.system-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 58px;
}

.system-content h3 {
  margin-top: 14px;
  font-family: "Satoshi", var(--font-sans);
}

.system-content p {
  max-width: 720px;
  margin-top: 22px;
  color: var(--paper);
  font-size: 20px;
  line-height: 1.75;
}

.system-content ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 40px 0 0;
  padding: 8px 0 0;
  list-style: none;
}

.system-content li {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.company-section {
  background:
    linear-gradient(180deg, var(--ink), #080b11);
}

.company-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 90px;
  align-items: start;
}

.company-title h2 {
  margin-top: 18px;
}

.company-copy {
  display: grid;
  gap: 28px;
  padding-top: 46px;
}

.company-copy p {
  color: var(--paper);
  font-size: 22px;
  line-height: 1.82;
}

.lab-section {
  background: #080b11;
}

.lab-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.lab-grid article {
  min-height: 300px;
  padding: 32px;
  background: rgba(14, 18, 28, 0.96);
}

.lab-grid h3 {
  margin-top: 50px;
  font-size: 24px;
}

.lab-grid p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.contact-section {
  padding-bottom: 130px;
  background: var(--ink);
}

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 50px;
  align-items: end;
  padding-top: 70px;
  border-top: 1px solid var(--line-strong);
}

.contact-panel h2 {
  margin-top: 16px;
}

.contact-panel p {
  max-width: 760px;
  margin-top: 22px;
  color: var(--paper);
  font-size: 21px;
  line-height: 1.75;
}

.contact-link {
  white-space: nowrap;
}

.footer {
  border-top: 1px solid var(--line);
  background: #07090f;
  padding: 40px 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 40px;
  align-items: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a,
.copyright {
  color: var(--muted);
  font-size: 14px;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 620ms ease, transform 620ms ease;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.reveal[data-delay="1"] {
  transition-delay: 80ms;
}

@media (max-width: 1120px) {
  .hero-inner,
  .section-heading,
  .lab-header,
  .company-grid,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    gap: 64px;
  }

  .system-index {
    max-width: 720px;
  }

  .system-panel,
  .system-panel:nth-child(even) {
    grid-template-columns: 1fr;
  }

  .system-panel:nth-child(even) .system-media {
    order: 0;
  }

  .system-media,
  .system-panel:nth-child(even) .system-media {
    border-inline: 0;
    border-bottom: 0;
  }

  .system-content ul,
  .lab-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .wrap {
    padding: 0 24px;
  }

  .site-header {
    padding: 18px 0;
  }

  .nav-links {
    display: none;
  }

  .menu-btn {
    display: inline-flex;
  }

  .brand-sub {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: 136px 0 78px;
  }

  .hero-field img { object-position: 58% center; }

  .systems-section,
  .company-section,
  .lab-section,
  .contact-section {
    padding: 84px 0;
  }

  .section-heading,
  .lab-header {
    gap: 24px;
    margin-bottom: 46px;
  }

  .system-content {
    padding: 34px 28px;
  }

  .system-content p,
  .company-copy p,
  .contact-panel p {
    font-size: 18px;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 46px;
    line-height: 1.05;
  }

  h2 {
    font-size: 34px;
    line-height: 1.12;
  }

  .brand-mark {
    width: 42px;
    height: 32px;
  }

  .brand-name {
    font-size: 13px;
  }

  .hero-copy p {
    font-size: 17px;
  }

  .hero-actions {
    gap: 16px;
  }

  .system-media {
    min-height: 260px;
    padding: 38px;
  }

  .quickdash-logo {
    max-width: 190px;
  }

  .waniso-logo {
    max-width: 210px;
  }

  .veyron-logo {
    max-width: 280px;
  }

  .system-content ul,
  .lab-grid {
    grid-template-columns: 1fr;
  }

  .lab-grid article {
    min-height: auto;
  }

  .lab-grid h3 {
    margin-top: 36px;
  }

  .footer-links {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
