:root {
  --paper: #F1F4F3;
  --tint: #E6ECEB;
  --ink: #0E2B33;
  --muted: #475E66;
  --line: rgba(14, 43, 51, 0.16);
  --yellow: #F2B705;
  --green: #35C27A;
  --board-text: #A9C0C7;
  --font-display: "Readex Pro", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Readex Pro", "Segoe UI", Tahoma, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --wrap: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: inherit; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.board :focus-visible,
.contact :focus-visible { outline-color: var(--yellow); }

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

/* Header */
.site-header { padding-block: 1.1rem; }

.header-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  text-decoration: none;
  direction: ltr;
}

.nav {
  display: flex;
  gap: 1.6rem;
  margin-inline-start: auto;
  font-size: 0.98rem;
}

.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; }

.lang-toggle {
  font: inherit;
  font-size: 0.92rem;
  padding: 0.25rem 0.9rem;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.lang-toggle:hover { background: var(--ink); color: var(--paper); }

/* Hero */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 7vw, 6rem); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

h1 {
  font-size: clamp(2rem, 4.4vw, 3.3rem);
  line-height: 1.4;
  font-weight: 700;
  max-inline-size: 17em;
}

.lead {
  margin-top: 1.4rem;
  max-inline-size: 36em;
  color: var(--muted);
  font-size: 1.12rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--ink);
  border-radius: 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.4;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}

.btn-primary { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.btn-primary:hover { background: #FFC933; border-color: #FFC933; }

.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

.coverage { margin-top: 1.4rem; font-size: 0.95rem; color: var(--muted); }

/* Monitoring board: the one memorable element */
.board {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  border-radius: 12px;
  padding: 1.4rem 1.4rem 1.1rem;
  overflow: hidden;
}

.board::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 5px;
  background: var(--yellow);
}

.board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.board-title { font-family: var(--font-display); font-weight: 600; }

.board-badge {
  font-size: 0.82rem;
  padding: 0.05rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  color: var(--board-text);
}

.board-rows li {
  display: grid;
  grid-template-columns: 0.75rem 6.2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.9rem;
  padding-block: 0.7rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  line-height: 1.5;
}

.dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--green);
}

.name {
  direction: ltr;
  text-align: start;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--board-text);
}

.what { font-size: 0.97rem; }

.board-note {
  margin-top: 0.6rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
  color: var(--board-text);
  line-height: 1.6;
}

/* One orchestrated moment on load: the rows check in one by one */
@media (prefers-reduced-motion: no-preference) {
  .board-rows li {
    animation: row-in 0.45s ease-out both;
    animation-delay: calc(var(--i) * 0.38s + 0.3s);
  }
  .dot {
    animation: dot-ok 0.3s ease-out both;
    animation-delay: calc(var(--i) * 0.38s + 0.65s);
  }
}

@keyframes row-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes dot-ok {
  from { background: #5B7780; }
  to { background: var(--green); }
}

/* Sections */
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section-tint { background: var(--tint); }

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 12rem) minmax(0, 1fr);
  gap: 1.5rem clamp(2rem, 5vw, 4rem);
  align-items: start;
}

h2 {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  line-height: 1.5;
  font-weight: 700;
}

h3 {
  font-size: 1.12rem;
  line-height: 1.6;
  font-weight: 600;
}

/* Services as rack units */
.services > li {
  display: grid;
  grid-template-columns: minmax(0, 11.5rem) minmax(0, 1fr);
  gap: 0.5rem 2rem;
  padding-block: 1.4rem;
  border-top: 1px solid var(--line);
}
.services > li:last-child { border-bottom: 1px solid var(--line); }
.services > li:first-child { padding-top: 0.2rem; border-top: 0; }

.services p { max-inline-size: 38em; color: var(--muted); }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.7rem;
  direction: ltr;
}
html[dir="rtl"] .tags { justify-content: flex-end; }

.tags li {
  display: block;
  padding: 0 0.65rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 0.86rem;
  line-height: 1.7;
  background: var(--paper);
}

/* Process: a real sequence, joined by a patch cable */
.steps { display: grid; gap: 2rem; counter-reset: step; }

.steps > li {
  position: relative;
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  gap: 1.25rem;
}

.steps > li:not(:last-child)::before {
  content: "";
  position: absolute;
  inset-inline-start: calc(1.3rem - 1.5px);
  top: 2.8rem;
  bottom: -1.9rem;
  width: 3px;
  background: var(--yellow);
}

.step-num {
  counter-increment: step;
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--yellow);
  font-family: var(--font-display);
  font-weight: 600;
}
.step-num::before { content: counter(step, arabic-indic); }
html[lang="en"] .step-num::before { content: counter(step, decimal); }

.steps p { margin-top: 0.15rem; color: var(--muted); max-inline-size: 36em; }

/* About */
.about-text { display: grid; gap: 1.1rem; max-inline-size: 38em; }

/* Contact */
.contact {
  background: var(--ink);
  color: var(--paper);
  padding-block: clamp(3.5rem, 8vw, 5.5rem);
}

.contact-text { max-inline-size: 34em; color: var(--board-text); font-size: 1.1rem; }

.contact .btn-light { background: transparent; color: var(--paper); border-color: var(--paper); }
.contact .btn-light:hover { background: var(--paper); color: var(--ink); }

/* Footer */
.site-footer { padding-block: 1.6rem; font-size: 0.92rem; color: var(--muted); }
.footer-row { display: flex; justify-content: space-between; gap: 1rem; }
.footer-row a { text-underline-offset: 4px; }

/* Responsive */
@media (max-width: 860px) {
  .nav { display: none; }
  .lang-toggle { margin-inline-start: auto; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .section-grid { grid-template-columns: minmax(0, 1fr); }
  .services > li { grid-template-columns: minmax(0, 1fr); gap: 0.2rem; }
  .services > li:first-child { padding-top: 0.4rem; }
}

@media (max-width: 420px) {
  .board-rows li { grid-template-columns: 0.7rem 5.4rem minmax(0, 1fr); gap: 0.7rem; }
  .btn { width: 100%; justify-content: center; }
}
