:root {
  --ink: #0b1b2e;
  --ink-2: #12304d;
  --ink-line: rgba(255, 255, 255, 0.1);
  --on-ink: #e8edf5;
  --on-ink-muted: #9fb0c8;
  --bg: #f7f7f4;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #566176;
  --line: #e2e5ea;
  --accent: #1a6d9a;
  --accent-bright: #3fc1de;
  --accent-soft: #e8f4fa;
  --line-strong: #c5ccd6;
  --nav-bg: rgba(255, 255, 255, .96);
  --field-focus: #ffffff;
  --danger: #dc2626;
  --shadow-soft: rgba(15, 23, 42, .07);
  --radius: 14px;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "IBM Plex Sans", Tahoma, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
html[lang="ar"] body { font-family: var(--font-ar); line-height: 1.8; }
img, svg { display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.015em; }
h1, h2 { text-wrap: balance; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { letter-spacing: 0; line-height: 1.4; }
p { margin: 0; }

.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 24px; }
.mono { font-family: var(--mono); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 22px; border-radius: 10px; font-weight: 600; font-size: 15px;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  font-family: inherit; white-space: nowrap; transition: background .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent-bright); color: var(--ink); }
.btn-primary:hover { background: #72d4ea; }
.btn-ghost { border-color: rgba(255,255,255,.25); color: var(--on-ink); }
.btn-ghost:hover { border-color: rgba(255,255,255,.55); }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn:focus-visible, .lang-btn:focus-visible, .theme-btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent-bright); outline-offset: 2px;
}

/* ---------- nav ---------- */
/* Light mode: white header with the full-colour logo. Dark mode: navy header with the white logo. */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); color: var(--text);
}
.nav-inner { display: flex; align-items: center; gap: 32px; height: 72px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; flex: none; }
.brand img { height: 38px; width: auto; }
.footer .brand img { height: 28px; }
.nav-links { display: flex; gap: 28px; margin-inline-start: auto; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.lang-btn {
  background: none; border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 7px 12px; font-size: 14px; cursor: pointer;
  font-family: var(--font-ar);
}
html[lang="ar"] .lang-btn { font-family: var(--font); }
a.lang-btn { display: inline-flex; align-items: center; text-decoration: none; line-height: 1.2; }
.lang-btn:hover, .theme-btn:hover { border-color: var(--line-strong); }
.theme-btn {
  display: grid; place-items: center; width: 38px; height: 38px; padding: 0;
  background: none; border: 1px solid var(--line); border-radius: 8px; color: var(--text); cursor: pointer;
}
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .icon-sun, .logo-on-dark { display: none; }
.menu-btn { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; padding: 10px; }
.menu-btn span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s; }
.menu-btn span + span { margin-top: 6px; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  background:
    radial-gradient(900px 420px at 85% 0%, rgba(63, 193, 222, .14), transparent 60%),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 44px 44px,
    var(--ink);
  color: var(--on-ink);
  padding: 96px 0 104px;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: center; }
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 500; margin-bottom: 16px; }
html[lang="ar"] .eyebrow { font-family: var(--font-ar); letter-spacing: 0; font-size: 14px; }
.eyebrow-light { color: var(--accent-bright); }
.hero h1 { font-size: clamp(36px, 5vw, 58px); font-weight: 700; max-width: 14ch; }
html[lang="ar"] .hero h1 { max-width: 16ch; }
.lead { font-size: 18px; color: var(--on-ink-muted); margin-top: 22px; max-width: 54ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.hero-card {
  background: linear-gradient(180deg, var(--ink-2), #0d2440);
  border: 1px solid var(--ink-line); border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
  font-family: var(--mono); font-size: 14px; overflow: hidden;
}
.hero-card-top { display: flex; align-items: center; gap: 6px; padding: 14px 18px; border-bottom: 1px solid var(--ink-line); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.18); }
.hero-card-title { margin-inline-start: 10px; color: var(--on-ink-muted); font-size: 13px; }
html[lang="ar"] .hero-card { font-family: var(--font-ar); }
.spec { margin: 0; padding: 8px 18px; }
.spec div { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px dashed var(--ink-line); }
.spec div:last-child { border-bottom: 0; }
.spec dt { color: var(--on-ink-muted); }
.spec dd { margin: 0; color: #fff; text-align: end; }
.spec dd.ok { color: var(--accent-bright); }
.hero-card-status { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--ink-line); color: var(--accent-bright); font-size: 13px; direction: ltr; }
html[dir="rtl"] .hero-card-status { justify-content: flex-end; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-bright); box-shadow: 0 0 0 0 rgba(63,193,222,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(63,193,222,0); } 100% { box-shadow: 0 0 0 0 rgba(63,193,222,0); } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } html { scroll-behavior: auto; } }

/* ---------- pillars ---------- */
.pillars { background: var(--surface); border-bottom: 1px solid var(--line); }
.pillars-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.pillar { padding: 40px 32px; border-inline-start: 1px solid var(--line); }
.pillar:first-child { border-inline-start: 0; padding-inline-start: 0; }
.pillar svg, .service-icon svg, .contact-list svg {
  width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.pillar svg { color: var(--accent); margin-bottom: 16px; }
.pillar h3 { font-size: 17px; margin-bottom: 8px; }
.pillar p { color: var(--muted); font-size: 15px; }

/* ---------- sections ---------- */
.section { padding: 104px 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); }
.section-lead { color: var(--muted); font-size: 17px; margin-top: 16px; }

/* services */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; transition: border-color .2s, box-shadow .2s, transform .2s;
}
@media (hover: hover) {
  .service:hover { border-color: var(--line-strong); box-shadow: 0 12px 40px var(--shadow-soft); transform: translateY(-2px); }
}
.service-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 22px; }
.service h3 { font-size: 21px; margin-bottom: 10px; }
.service > p { color: var(--muted); font-size: 15px; }
.service ul, .sec-list { list-style: none; padding: 0; margin: 22px 0 0; border-top: 1px solid var(--line); }
.service li, .sec-list li { position: relative; padding: 11px 0 11px 0; padding-inline-start: 22px; font-size: 15px; border-bottom: 1px solid var(--line); }
.service li:last-child, .sec-list li:last-child { border-bottom: 0; }
.service li::before, .sec-list li::before {
  content: ""; position: absolute; inset-inline-start: 2px; top: 20px;
  width: 8px; height: 8px; border-radius: 2px; background: var(--accent); transform: rotate(45deg);
}
html[lang="ar"] .service li::before, html[lang="ar"] .sec-list li::before { top: 23px; }

.service-more { display: inline-block; margin-top: 18px; color: var(--accent); font-weight: 600; font-size: 15px; text-decoration: none; }
.service-more::after { content: " \2192"; }
html[dir="rtl"] .service-more::after { content: " \2190"; }
.service-more:hover { text-decoration: underline; }

/* security in depth */
.sec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.sec-card { display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.sec-kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
html[lang="ar"] .sec-kicker { font-family: var(--font-ar); letter-spacing: 0; font-size: 13px; }
.sec-card h3 { font-size: 20px; margin-bottom: 10px; }
.sec-card > p:not(.sec-kicker) { color: var(--muted); font-size: 15px; }
.sec-list { margin-bottom: 0; }
.sec-meta { margin-top: auto; padding-top: 22px; }
.sec-meta-label { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font-family: var(--mono); font-size: 12.5px; line-height: 1.4; padding: 5px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
html[lang="ar"] .chips li:not([dir="ltr"]) { font-family: var(--font-ar); }

/* commitment */
.commit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.commit { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.commit-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 18px; }
.commit-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.commit h3 { font-size: 17px; margin-bottom: 8px; }
.commit p { color: var(--muted); font-size: 15px; }

/* why band */
.why { background: var(--ink); color: var(--on-ink); padding: 88px 0; }
.why-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.why h2 { font-size: clamp(26px, 3vw, 36px); }
.why p { color: var(--on-ink-muted); font-size: 18px; }

/* industries */
.industries-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.industry { grid-column: span 2; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.industry:nth-child(4), .industry:nth-child(5) { grid-column: span 3; }
.num { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.industry h3 { font-size: 18px; margin: 12px 0 8px; }
.industry p { color: var(--muted); font-size: 15px; }

/* steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: s; }
.step { position: relative; padding-inline-end: 28px; }
.step::after {
  content: ""; position: absolute; top: 20px; inset-inline-start: 52px; inset-inline-end: 0;
  height: 1px; background: var(--line);
}
.step:last-child::after { display: none; }
.step-num {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--ink); color: var(--accent-bright); font-family: var(--mono); font-weight: 500; margin-bottom: 22px;
}
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 15px; }

/* contact */
.contact { background: var(--ink); color: var(--on-ink); }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; }
.contact h2 { font-size: clamp(28px, 3.4vw, 40px); }
.contact-list { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 16px; }
.contact-list li { display: flex; align-items: center; gap: 12px; color: var(--on-ink-muted); }
.contact-list svg { color: var(--accent-bright); flex: none; width: 22px; height: 22px; }
.contact-list a { color: var(--on-ink); text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }
html[dir="rtl"] .contact-list a[dir="ltr"] { unicode-bidi: isolate; }

.contact-form {
  background: var(--surface); color: var(--text); border-radius: var(--radius);
  padding: 32px; display: grid; gap: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.3);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact-form label { display: grid; gap: 7px; font-size: 14px; font-weight: 500; }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%; font: inherit; font-size: 15px; font-weight: 400; color: var(--text);
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg);
}
html[dir="rtl"] .contact-form input[type="email"] { text-align: right; }
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { border-color: var(--accent); background: var(--field-focus); }
.contact-form .invalid { border-color: var(--danger); }
.form-status { font-size: 14px; min-height: 1.4em; color: var(--accent); text-align: center; }
.form-status.error { color: var(--danger); }

/* footer */
.footer { background: #081422; color: var(--on-ink-muted); padding: 28px 0; font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .hero-grid, .why-inner, .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .services-grid, .sec-grid { grid-template-columns: 1fr; }
  .commit-grid { grid-template-columns: 1fr 1fr; }
  .industries-grid { grid-template-columns: 1fr 1fr; }
  .industry, .industry:nth-child(4), .industry:nth-child(5) { grid-column: span 1; }
  .industry:nth-child(5) { grid-column: span 2; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .step::after { display: none; }
}

@media (max-width: 900px) {
  .nav-links {
    display: none; position: absolute; top: 72px; inset-inline: 0;
    flex-direction: column; gap: 0; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px var(--shadow-soft);
    padding: 8px 16px 16px; margin: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 8px; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav-cta { display: none; }
  .menu-btn { display: block; }
  .nav-actions { margin-inline-start: auto; }
}

@media (max-width: 640px) {
  .wrap { padding-inline: 16px; }
  .brand img { height: 32px; }
  .nav-inner { gap: 12px; }
  .nav-actions { gap: 6px; }
  .hero { padding: 64px 0 72px; }
  .lead { font-size: 17px; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .pillars-grid { grid-template-columns: 1fr; }
  .pillar, .pillar:first-child { padding: 28px 0; border-inline-start: 0; border-top: 1px solid var(--line); }
  .pillar:first-child { border-top: 0; }
  .section { padding: 72px 0; }
  .section-head { margin-bottom: 36px; }
  .service, .sec-card { padding: 24px; }
  .commit-grid { grid-template-columns: 1fr; }
  .commit { padding: 22px; }
  .industries-grid { grid-template-columns: 1fr; }
  .industry, .industry:nth-child(5) { grid-column: span 1; }
  .steps { grid-template-columns: 1fr; }
  .why { padding: 64px 0; }
  .contact-form { padding: 22px; }
  .field-row { grid-template-columns: 1fr; }
  .spec div { flex-direction: column; gap: 2px; }
  .spec dd { text-align: start; }
  .footer-inner { flex-direction: column; text-align: center; }
}

/* ---------- tablets ---------- */
/* Services: title and description on one side, the list on the other,
   so wide single-column cards don't leave empty space. */
@media (min-width: 641px) and (max-width: 1000px) {
  .service { display: grid; grid-template-columns: 1fr 1.25fr; grid-template-rows: auto auto auto 1fr; column-gap: 40px; align-items: start; }
  .service-icon, .service h3, .service > p, .service-more { grid-column: 1; }
  .service ul { grid-column: 2; grid-row: 1 / span 4; margin-top: 0; border-top: 0; }
  .sec-list { columns: 2; column-gap: 32px; }
  .sec-list li { break-inside: avoid; }
  .service li:first-child { padding-top: 0; }
  html[lang="ar"] .service li:first-child::before { top: 12px; }
  .service li:first-child::before { top: 9px; }
  .hero-card { max-width: 560px; }
}

/* Touchscreens: comfortable tap targets */
@media (pointer: coarse) {
  .lang-btn { min-height: 44px; padding-inline: 14px; }
  .theme-btn { width: 44px; height: 44px; }
  .menu-btn { width: 44px; height: 44px; padding: 11px; }
  .contact-form input, .contact-form select, .contact-form textarea { font-size: 16px; }
}

/* ---------- dark mode ---------- */
/* Follows the device setting unless the visitor picks a mode with the toggle (data-theme on <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #07111e;
    --ink-2: #102843;
    --bg: #0e1a2b;
    --surface: #132338;
    --text: #e6edf6;
    --muted: #9aabc2;
    --line: #24364f;
    --line-strong: #3a5070;
    --accent: #5cc9e3;
    --accent-soft: rgba(63, 193, 222, .12);
    --nav-bg: rgba(14, 26, 43, .94);
    --field-focus: #0b1626;
    --danger: #f87171;
    --shadow-soft: rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
  :root:not([data-theme="light"]) .logo-on-light, :root:not([data-theme="light"]) .theme-btn .icon-moon { display: none; }
  :root:not([data-theme="light"]) .logo-on-dark, :root:not([data-theme="light"]) .theme-btn .icon-sun { display: block; }
}
:root[data-theme="dark"] {
  --ink: #07111e;
  --ink-2: #102843;
  --bg: #0e1a2b;
  --surface: #132338;
  --text: #e6edf6;
  --muted: #9aabc2;
  --line: #24364f;
  --line-strong: #3a5070;
  --accent: #5cc9e3;
  --accent-soft: rgba(63, 193, 222, .12);
  --nav-bg: rgba(14, 26, 43, .94);
  --field-focus: #0b1626;
  --danger: #f87171;
  --shadow-soft: rgba(0, 0, 0, .35);
  color-scheme: dark;
}
:root[data-theme="dark"] .logo-on-light, :root[data-theme="dark"] .theme-btn .icon-moon { display: none; }
:root[data-theme="dark"] .logo-on-dark, :root[data-theme="dark"] .theme-btn .icon-sun { display: block; }
@media (max-width: 400px) { .brand img { height: 28px; } }
