/* Steps4Host — temporary homepage
   Order: fonts · tokens · base · layout · components · sections · motion · media */

/* ---------- Fonts (self-hosted, split by script; all SIL OFL 1.1) ----------
   Approved typography "B2" (owner approval 2026-11-07, see docs/TYPOGRAPHY.md):
   Latin: Manrope 400 / 500 / 600 / 700 (Mikhail Sharanda).
   Arabic: Almarai 400 / 700 (Boutros Fonts). Its Latin file is used only for spaces and punctuation
   inside Arabic text, so they match the Arabic letters.
   Mono: IBM Plex Mono for small technical labels only. */
@font-face { font-family: "S4H Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/manrope-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "S4H Sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(../fonts/manrope-latin-500-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "S4H Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../fonts/manrope-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "S4H Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/manrope-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "S4H Arabic"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/almarai-arabic-400-normal.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "S4H Arabic"; font-style: normal; font-weight: 400; font-display: swap; /* spaces and punctuation in Arabic text */
  src: url(../fonts/almarai-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0020-0021, U+0028-0029, U+002C-002E, U+003A, U+00A0, U+00AB, U+00BB, U+2013-2014, U+2026; }
@font-face { font-family: "S4H Arabic"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/almarai-arabic-700-normal.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "S4H Arabic"; font-style: normal; font-weight: 700; font-display: swap; /* spaces and punctuation in Arabic text */
  src: url(../fonts/almarai-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0020-0021, U+0028-0029, U+002C-002E, U+003A, U+00A0, U+00AB, U+00BB, U+2013-2014, U+2026; }
@font-face { font-family: "S4H Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F, U+2190-2193; }
@font-face { font-family: "S4H Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(../fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F, U+2190-2193; }

/* ---------- Tokens ---------- */
:root {
  /* Brand hues sampled from the official logo:
     wordmark #011647→#01306E, server #004DA3→#021D59, cloud #01A6EC, swoosh #E98F05→#D45A06 */
  --surface: #f6f8fc;
  --surface-alt: #edf2f9;
  --surface-raised: #ffffff;
  --surface-inverse: #08173d;
  --surface-inverse-2: #0c2152;

  --heading: #0b1c47;
  --text: #2a3a60;
  --text-muted: #4f5f87;
  --border: #dae2ee;
  --border-strong: #c3cfe2;

  --brand: #0a4aa0;
  --sky: #0598dc;
  --sky-ink: #0567a0;
  --signal: #e8820f;
  --signal-ink: #a84a05;
  --focus: #0577c2;

  --on-inverse: #f1f5ff;
  --on-inverse-muted: #aebbda;
  --border-inverse: rgb(255 255 255 / 0.14);
  --signal-on-inverse: #f3a03a;

  /* illustration */
  --art-front-a: #1059b5; --art-front-b: #0a2463;
  --art-side-a: #0a2c70;  --art-side-b: #061a47;
  --art-top-a: #ffffff;   --art-top-b: #e2eaf6;
  --art-edge: #c7d3e6;    --art-edge-dark: rgb(4 18 52 / 0.55);
  --art-highlight: rgb(255 255 255 / 0.55);
  --art-bezel: rgb(255 255 255 / 0.13); --art-vent: rgb(255 255 255 / 0.12);
  --art-led: #ffffff;
  --art-orbit-a: #f2a21c; --art-orbit-b: #d9590a; --art-orbit-back: rgb(217 89 10 / 0.5);
  --art-shadow: #0b1c47;  --art-grid: rgb(11 28 71 / 0.13);
  --art-screen: #ffffff;  --art-screen-edge: #c9d5e8; --art-screen-ui: #dfe7f3;
  --art-screen-hero: #e8f0fb; --art-screen-ink: #0b1c47; --art-screen-card: #f1f5fb;

  /* type: English (Manrope) */
  --font-sans: "S4H Sans", "S4H Arabic", system-ui, "Segoe UI", Tahoma, Arial, sans-serif;
  --font-mono: "S4H Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  /* weights: text 400 / chips 500 / buttons, nav, labels 600 / headings 700 */
  --fw-body: 400; --fw-chip: 500; --fw-label: 600; --fw-head: 700;
  --fs-mono: 0.8125rem;
  --fs-small: 0.9375rem;
  --fs-label: 0.9375rem;     /* nav, buttons */
  --fs-chip: 0.875rem;       /* scope tags */
  --fs-body: 1.0625rem;
  --fs-unit: 1.0625rem;      /* service descriptions */
  --fs-lead: clamp(1.125rem, 1.03rem + 0.4vw, 1.3125rem);
  --fs-h3: clamp(1.1875rem, 1.07rem + 0.5vw, 1.4375rem);
  --fs-h2: clamp(1.875rem, 1.25rem + 1.9vw, 2.75rem);
  --fs-h1: clamp(2.375rem, 1.2rem + 3.6vw, 3.875rem);
  --fs-hero: clamp(3rem, -0.4rem + 5.2vw, 3.875rem);     /* hero h1 in the two-column layout (>= 1000px) */
  --fs-closing: clamp(2rem, 1.2rem + 2.5vw, 3rem);       /* dark closing section h2 */
  --lh-body: 1.7;
  --lh-lead: 1.65;
  --lh-unit: 1.65;
  --lh-h1: 1.08;
  --lh-h2: 1.15;
  --lh-h3: 1.3;
  /* Manrope is wide at display sizes: tighten headings progressively, give word spaces back */
  --track-h1: -0.035em;
  --track-h2: -0.028em;
  --track-h3: -0.012em;
  --track-label: -0.005em;
  --word-h: 0.03em;

  /* space (4px base) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;
  --section-pad: clamp(72px, 9vw, 128px);
  --gutter: clamp(16px, 4vw, 40px);
  --content: 1200px;

  /* shape and depth */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgb(11 28 71 / 0.06);
  --shadow-2: 0 1px 2px rgb(11 28 71 / 0.05), 0 22px 48px -24px rgb(11 28 71 / 0.28);

  /* motion */
  --dur-fast: 160ms; --dur-ui: 220ms; --dur-panel: 420ms;
  --ease-out: cubic-bezier(.2, .7, .2, 1);

  /* header and logo (logo aspect 320:285) */
  --bar: 88px;
  --logo: 128px;
  --logo-compact: 80px;
  --logo-top: 10px;
  --logo-overhang: 36px; /* logo-top + logo height at top (128 * 285/320) - bar, rounded */

  --dir: 1;
}
[dir="rtl"] { --dir: -1; }
/* type: Arabic (Almarai). Never letter-spaced; taller lines for ascenders, descenders and marks.
   Almarai has 300/400/700/800: text Regular 400, headings and buttons Bold 700; nav, footer links,
   scope tags and the "Includes" label stay Regular so Bold marks only headings and actions. */
:lang(ar) {
  /* Arabic font first, so spaces and punctuation match the letters; Latin words fall through to Manrope. */
  --font-sans: "S4H Arabic", "S4H Sans", system-ui, "Segoe UI", Tahoma, Arial, sans-serif;
  --fw-body: 400; --fw-chip: 400; --fw-label: 700; --fw-head: 700;
  --fs-small: 1rem;
  --fs-label: 1rem;
  --fs-chip: 0.9375rem;
  --fs-body: 1.125rem;       /* 18px Regular: approved size for Arabic reading text */
  --fs-unit: 1.125rem;
  --fs-lead: clamp(1.1875rem, 1.1rem + 0.35vw, 1.375rem);
  --fs-h3: clamp(1.25rem, 1.12rem + 0.5vw, 1.5rem);
  --fs-h2: clamp(1.75rem, 1.2rem + 1.7vw, 2.5rem);
  --fs-h1: clamp(2.125rem, 1.15rem + 3vw, 3.25rem);
  --fs-hero: clamp(2.75rem, 0.2rem + 4vw, 3.5rem);
  --fs-closing: clamp(1.75rem, 1.15rem + 2.1vw, 2.875rem);
  --lh-body: 1.9;
  --lh-lead: 1.85;
  --lh-unit: 1.9;
  --lh-h1: 1.45;
  --lh-h2: 1.5;
  --lh-h3: 1.55;
  --track-h1: 0; --track-h2: 0; --track-h3: 0; --track-label: 0;
  --word-h: normal;
}
/* an English run inside the Arabic page (the language switch) keeps the English label style */
:lang(en) { --fw-body: 400; --fw-label: 600; --fs-label: 0.9375rem; --track-label: -0.005em; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: var(--fw-body);
  line-height: var(--lh-body);
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3 { margin: 0; color: var(--heading); font-weight: var(--fw-head); text-wrap: balance; }
h1, h2 { word-spacing: var(--word-h); }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
[role="list"] { list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
figure { margin: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }

.visually-hidden {
  position: absolute !important; inline-size: 1px; block-size: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; inset-inline-start: var(--s-4); inset-block-start: var(--s-3); z-index: 100;
  padding: var(--s-3) var(--s-4); border-radius: var(--r-sm);
  background: var(--heading); color: #fff; font-weight: 600; text-decoration: none;
  transform: translateY(-160%); transition: transform var(--dur-fast) var(--ease-out);
}
.skip-link:focus-visible { transform: none; }
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }

/* ---------- Layout ---------- */
.wrap {
  inline-size: 100%;
  max-inline-size: calc(var(--content) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Components ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-block-size: 50px; padding-inline: 22px;
  border: 1px solid transparent; border-radius: var(--r-md);
  font: var(--fw-label) 1rem/1.2 var(--font-sans); letter-spacing: var(--track-label);
  text-decoration: none; white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.button__icon { flex: none; transition: translate var(--dur-ui) var(--ease-out); }
.button:hover .button__icon { translate: calc(3px * var(--dir)) 0; }
.button--primary { background: var(--heading); color: #fff; }
.button--primary:hover { background: var(--brand); }
.button--quiet { border-color: var(--border-strong); color: var(--heading); background: transparent; }
.button--quiet:hover { background: var(--surface-raised); border-color: var(--heading); }
.button--signal { background: var(--signal-on-inverse); color: var(--heading); }
.button--signal:hover { background: #ffb85c; }

/* Header */
.site-header {
  position: sticky; inset-block-start: 0; z-index: 50;
  background: rgb(246 248 252 / 0.86);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-block-end: 1px solid transparent;
  transition: border-color var(--dur-ui) var(--ease-out), box-shadow var(--dur-ui) var(--ease-out);
}
.site-header.is-scrolled { border-block-end-color: var(--border); box-shadow: 0 8px 24px -20px rgb(11 28 71 / 0.35); }
/* The bar keeps one fixed height. At the top of the page the logo is shown large and hangs below
   the bar (the hero reserves that space); once the page scrolls it settles into the bar.
   Because the bar never changes height, nothing below it moves. */
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  block-size: var(--bar);
}
.brand { display: inline-flex; border-radius: var(--r-sm); flex: none; align-self: flex-start; margin-block-start: var(--logo-top); }
.brand__logo { inline-size: var(--logo); block-size: auto; transition: inline-size var(--dur-ui) var(--ease-out); }
.site-header.is-scrolled .brand__logo { inline-size: var(--logo-compact); }
html:not(.js) .site-header { position: relative; } /* without JS the logo never shrinks, so the bar does not stick */
.site-nav__list { display: flex; align-items: center; gap: var(--s-1); }
.site-nav__link {
  display: inline-flex; align-items: center; min-block-size: 44px; padding-inline: 14px;
  color: var(--heading); text-decoration: none; font-size: var(--fs-label); font-weight: var(--fw-label);
  letter-spacing: var(--track-label); border-radius: var(--r-sm);
}
.site-nav__link:hover { color: var(--heading); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.lang-switch {
  display: inline-flex; align-items: center; gap: var(--s-2);
  min-block-size: 44px; padding-inline: 14px; margin-inline-start: var(--s-2);
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  color: var(--heading); text-decoration: none; font-size: var(--fs-label); font-weight: var(--fw-label);
  letter-spacing: var(--track-label);
  background: var(--surface-raised);
  transition: border-color var(--dur-fast) var(--ease-out);
}
.lang-switch:hover { border-color: var(--heading); }
.lang-switch__icon { color: var(--sky-ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: calc(clamp(24px, 4vw, 56px) + var(--logo-overhang)) clamp(64px, 8vw, 112px);
  background:
    radial-gradient(60% 70% at calc(50% + 22% * var(--dir)) 45%, rgb(5 152 220 / 0.09), transparent 70%),
    var(--surface);
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(32px, 5vw, 56px); align-items: center; }
.hero__copy { max-inline-size: 40rem; }
.hero__title { font-size: var(--fs-h1); line-height: var(--lh-h1); letter-spacing: var(--track-h1); }
.hero__lead { margin-block-start: var(--s-5); font-size: var(--fs-lead); line-height: var(--lh-lead); color: var(--text); max-inline-size: 34em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-block-start: var(--s-6); }

/* hero illustration */
.hero-art { position: relative; }
.hero-art__stage { position: relative; aspect-ratio: var(--art-ratio); }
.hero-art__svg { inline-size: 100%; block-size: auto; overflow: visible; }
[dir="rtl"] .hero-art__svg { transform: scaleX(-1); }
.hero-art__labels { position: absolute; inset: 0; pointer-events: none; }
.art-label {
  position: absolute;
  inset-block-start: var(--y);
  inset-inline-end: calc(100% - var(--x));
  translate: 0 -50%;
  display: flex; align-items: baseline; gap: 10px;
  padding-inline-end: 46px;
  max-inline-size: 15.5rem;
}
.art-label::after { /* leader line */
  content: ""; position: absolute; inset-inline-end: 4px; inset-block-start: 50%;
  inline-size: 34px; block-size: 1px; background: var(--border-strong);
}
.art-label::before { /* anchor dot */
  content: ""; position: absolute; inset-inline-end: -3px; inset-block-start: calc(50% - 4px);
  inline-size: 8px; block-size: 8px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--signal);
}
.art-label__index { font: 500 var(--fs-mono)/1 var(--font-mono); color: var(--signal-ink); letter-spacing: 0.02em; }
.art-label__text {
  font-size: 0.9375rem; font-weight: var(--fw-label); line-height: 1.3; letter-spacing: var(--track-label); color: var(--heading);
}
:lang(ar) .art-label__text { line-height: 1.55; }
.art-label--site .art-label__index {
  inline-size: 8px; block-size: 8px; border-radius: 50%; background: #16a36a; align-self: center;
  box-shadow: 0 0 0 4px rgb(22 163 106 / 0.16);
}
.art-tag { display: none; }

/* ---------- Section head ---------- */
.section-head { display: grid; gap: var(--s-5); margin-block-end: clamp(40px, 5vw, 64px); }
.section-head__title { font-size: var(--fs-h2); line-height: var(--lh-h2); letter-spacing: var(--track-h2); max-inline-size: 16em; }
.section-head__intro { font-size: var(--fs-lead); line-height: var(--lh-lead); color: var(--text); max-inline-size: 34em; }

/* ---------- Services: rack ---------- */
.services { padding-block: var(--section-pad); background: var(--surface-alt); border-block: 1px solid var(--border); }
.rack {
  position: relative; display: grid; gap: var(--s-3);
  --rack-pad: clamp(30px, 3.4vw, 46px);
  --rail-inset: clamp(11px, 1.3vw, 18px);
  padding: 18px var(--rack-pad);
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, #e1e8f3, #d9e2ef);
  border: 1px solid var(--border-strong);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.7);
}
.rack::before, .rack::after { /* mounting rails with holes */
  content: ""; position: absolute; inset-block: 22px; inline-size: 8px;
  background: radial-gradient(circle, #b3c1d7 1.9px, transparent 2.4px) center top / 8px 14px repeat-y;
}
.rack::before { inset-inline-start: var(--rail-inset); }
.rack::after { inset-inline-end: var(--rail-inset); }

.unit {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-5);
  padding: clamp(20px, 2.6vw, 30px) clamp(20px, 3vw, 36px);
  background: var(--surface-raised);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}
.unit__bay { display: flex; align-items: center; gap: var(--s-4); }
.unit__id { font: 500 var(--fs-mono)/1 var(--font-mono); color: var(--text-muted); letter-spacing: 0.06em; }
.unit__leds { display: inline-flex; gap: 7px; }
.unit__led {
  inline-size: 9px; block-size: 9px; border-radius: 50%;
  background: var(--sky); box-shadow: 0 0 0 3px rgb(5 152 220 / 0.16);
  transition: background-color 300ms var(--ease-out), box-shadow 300ms var(--ease-out);
  transition-delay: calc((var(--n, 1) - 1) * 220ms + var(--i) * 90ms);
}
.js .rack:not(.is-on) .unit__led { background: #c6d2e4; box-shadow: 0 0 0 3px transparent; }
.unit__title { font-size: var(--fs-h3); line-height: var(--lh-h3); letter-spacing: var(--track-h3); }
.unit__text { margin-block-start: var(--s-3); font-size: var(--fs-unit); line-height: var(--lh-unit); color: var(--text); max-inline-size: 38em; }
.unit__scope-label {
  font: 500 var(--fs-mono)/1.4 var(--font-mono); color: var(--text-muted);
  letter-spacing: 0.06em; text-transform: uppercase; margin-block-end: var(--s-3);
}
:lang(ar) .unit__scope-label { font-family: var(--font-sans); font-size: 0.875rem; font-weight: 400; letter-spacing: 0; text-transform: none; }
.unit__ports { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.unit__ports li {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 6px 12px 6px 10px; padding-inline: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--surface); font-size: var(--fs-chip); font-weight: var(--fw-chip); line-height: 1.4;
  letter-spacing: var(--track-label); color: var(--heading);
}
.unit__ports li::before {
  content: ""; flex: none; inline-size: 7px; block-size: 7px; border-radius: 2px; background: var(--sky);
}

/* Status (announcement) */
.status {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-4);
  margin-block-start: clamp(32px, 4vw, 48px);
  padding: var(--s-4) var(--s-5);
  border: 1px dashed var(--border-strong); border-radius: var(--r-lg);
  background: rgb(255 255 255 / 0.55);
}
.status__host { font: 400 var(--fs-mono)/1.4 var(--font-mono); color: var(--text-muted); }
.status__state {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 4px 12px; border-radius: var(--r-pill);
  background: rgb(232 130 15 / 0.12); color: var(--signal-ink);
  font-size: 0.875rem; font-weight: var(--fw-label); line-height: 1.5;
}
.status__dot { position: relative; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--signal); }
.status__text { flex: 1 1 24rem; font-size: var(--fs-small); color: var(--text); }

/* ---------- Contact (inverse) ---------- */
.section--inverse {
  --heading: var(--on-inverse);
  --text: var(--on-inverse-muted);
  --border: var(--border-inverse);
  --focus: #7cc8f5;
  color: var(--text);
}
.contact {
  position: relative; overflow: hidden;
  padding-block: var(--section-pad);
  background:
    radial-gradient(70% 90% at calc(50% + 45% * var(--dir)) 0%, rgb(5 152 220 / 0.22), transparent 60%),
    linear-gradient(180deg, var(--surface-inverse-2), var(--surface-inverse));
}
.contact::before { /* faint dot field */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle, rgb(255 255 255 / 0.07) 1px, transparent 1.4px) 0 0 / 22px 22px;
  mask-image: linear-gradient(180deg, #000, transparent 85%);
  pointer-events: none;
}
.contact__orbit {
  position: absolute; inset-block-end: -38%; inset-inline-end: -26%;
  inline-size: min(1280px, 120vw); aspect-ratio: 3.2 / 1;
  border: 1.5px solid rgb(243 160 58 / 0.3); border-radius: 50%;
  rotate: calc(-9deg * var(--dir));
  pointer-events: none;
}
.contact__grid { position: relative; display: grid; gap: clamp(32px, 5vw, 64px); align-items: center; }
.contact__title { font-size: var(--fs-closing); line-height: var(--lh-h2); letter-spacing: var(--track-h2); }
.contact__lead { margin-block-start: var(--s-5); font-size: var(--fs-lead); line-height: var(--lh-lead); max-inline-size: 32em; }
.contact__panel {
  display: grid; gap: var(--s-3); align-content: start;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--border-inverse); border-radius: var(--r-xl);
  background: rgb(255 255 255 / 0.04);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.contact__label { font: 500 var(--fs-mono)/1.4 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--on-inverse-muted); }
:lang(ar) .contact__label { font-family: var(--font-sans); font-size: 0.9375rem; font-weight: var(--fw-label); letter-spacing: 0; text-transform: none; }
.contact__value { font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); font-weight: 600; color: var(--on-inverse); overflow-wrap: anywhere; }
.contact__email { text-decoration: none; }
.contact__email:hover { text-decoration: underline; text-underline-offset: 6px; }
.contact__panel .button { justify-self: start; margin-block-start: var(--s-3); }
.contact__pending {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  border: 1.5px dashed rgb(255 255 255 / 0.32); border-radius: var(--r-md);
  color: var(--on-inverse); font-weight: 600; font-size: 1.0625rem; line-height: 1.5;
}
.contact__pending-mark { flex: none; inline-size: 10px; block-size: 10px; border-radius: 50%; border: 2px solid var(--signal-on-inverse); }
.contact__note { font-size: var(--fs-small); color: var(--on-inverse-muted); }
.contact__include { margin-block-start: var(--s-4); padding-block-start: var(--s-5); border-block-start: 1px solid var(--border-inverse); }
.contact__include-label { font-size: var(--fs-small); font-weight: var(--fw-label); color: var(--on-inverse); margin-block-end: var(--s-3); }
.contact__include-list { display: grid; gap: var(--s-2); }
.contact__include-list li {
  position: relative; padding-inline-start: 22px;
  font-size: var(--fs-small); line-height: 1.55; color: var(--on-inverse-muted);
}
.contact__include--solo { margin-block-start: 0; padding-block-start: 0; border-block-start: 0; }
.contact__include--solo .contact__include-label { font-size: 1.0625rem; margin-block-end: var(--s-4); }
.contact__later {
  display: grid; gap: var(--s-2); justify-items: start;
  margin-block-start: var(--s-5); padding-block-start: var(--s-5);
  border-block-start: 1px solid var(--border-inverse);
  font-size: var(--fs-small); line-height: 1.6; color: var(--on-inverse-muted);
}
.contact__later-host { font: 500 var(--fs-mono)/1.4 var(--font-mono); color: var(--signal-on-inverse); }
.contact__include-list li::before {
  content: ""; position: absolute; inset-inline-start: 2px; inset-block-start: 0.62em;
  inline-size: 10px; block-size: 2px; border-radius: 2px; background: var(--signal-on-inverse);
}

/* ---------- Contact form (dark closing section, since 1.3.0) ---------- */
.contact__grid:has(.contact-form) { align-items: start; }
@media (min-width: 1000px) {
  .contact__grid:has(.contact-form) { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); }
}
.contact__copy .contact__include { margin-block-start: var(--s-6); max-inline-size: 30em; }
.contact-form { display: grid; gap: var(--s-4); margin-block-start: var(--s-2); }
.contact-form__row { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.field { display: grid; gap: var(--s-2); align-content: start; }
.field__label { font-size: var(--fs-small); font-weight: var(--fw-label); color: var(--on-inverse); line-height: 1.4; }
.field__input {
  inline-size: 100%; min-block-size: 48px;
  padding: 11px 14px;
  border: 1px solid rgb(255 255 255 / 0.24); border-radius: var(--r-md);
  background: rgb(255 255 255 / 0.06); color: var(--on-inverse);
  font: var(--fw-body) 1rem/1.5 var(--font-sans);
  transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
:lang(ar) .field__input { font-size: 1.0625rem; }
.field__input:hover { border-color: rgb(255 255 255 / 0.4); }
.field__input:focus { border-color: var(--focus); background-color: rgb(255 255 255 / 0.1); }
.field__input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.field__input[dir="ltr"] { text-align: start; }
[dir="rtl"] .field__input[dir="ltr"] { text-align: end; }
.field__textarea { min-block-size: 140px; resize: vertical; }
.field__select {
  appearance: none; cursor: pointer;
  padding-inline-end: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 8l4.5 4.5L14.5 8' fill='none' stroke='%23aebbda' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 18px; background-position: right 14px center;
}
[dir="rtl"] .field__select { background-position: left 14px center; } /* physical: the chevron sits at the inline end */
/* The dropdown list is drawn by the browser. Inside the dark section --heading is a light colour, so the
   options use fixed dark-surface colours (and a dark colour scheme) instead of the section variables. */
.contact-form { color-scheme: dark; }
.field__select option { color: #f1f5ff; background-color: #0c2152; }
.field__select option:checked { color: #ffffff; background-color: #0a4aa0; }
/* Browser autofill would paint the field light blue; keep the dark field and light text. */
.field__input:-webkit-autofill,
.field__input:-webkit-autofill:hover,
.field__input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--on-inverse);
  caret-color: var(--on-inverse);
  box-shadow: 0 0 0 1000px #13285a inset;
  transition: background-color 600000s 0s;
}
.field__input:autofill { box-shadow: 0 0 0 1000px #13285a inset; }
.field__hint { font-size: 0.875rem; line-height: 1.5; color: var(--on-inverse-muted); }
:lang(ar) .field__hint { font-size: 0.9375rem; }
.contact-form__hp { position: absolute; inset-inline-start: -10000px; inline-size: 1px; block-size: 1px; overflow: hidden; }
.contact-form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-5); margin-block-start: var(--s-2); }
.contact__panel .contact-form .button { margin-block-start: 0; }
.contact-form .button[disabled] { opacity: 0.7; cursor: progress; }
.contact-form__privacy { flex: 1 1 14em; font-size: 0.875rem; line-height: 1.5; color: var(--on-inverse-muted); }
:lang(ar) .contact-form__privacy { font-size: 0.9375rem; }
.form-status {
  display: none;
  padding: var(--s-3) var(--s-4); border-radius: var(--r-md);
  font-size: var(--fs-small); line-height: 1.55; color: var(--on-inverse);
}
.form-status:target, .form-status.is-shown { display: block; }
.form-status:focus { outline: none; }
.form-status--ok { border: 1px solid rgb(124 200 245 / 0.55); background: rgb(5 152 220 / 0.16); }
.form-status--error { border: 1px solid rgb(243 160 58 / 0.6); background: rgb(232 130 15 / 0.14); }
@media (max-width: 719px) {
  .contact-form__foot .button { flex: 1 1 100%; }
}

/* ---------- Footer ---------- */
.site-footer { padding-block: clamp(48px, 6vw, 72px) var(--s-6); background: var(--surface); border-block-start: 1px solid var(--border); }
.site-footer__grid { display: grid; gap: var(--s-6); align-items: start; }
.site-footer__brand { display: grid; gap: var(--s-4); justify-items: start; }
.site-footer__logo { inline-size: 128px; }
.site-footer__services { color: var(--text-muted); font-size: var(--fs-small); max-inline-size: 42em; }
.site-footer__nav ul { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-2); }
.site-footer__nav a {
  display: inline-flex; align-items: center; min-block-size: 44px; padding-inline: 12px;
  color: var(--heading); text-decoration: none; font-size: var(--fs-label); font-weight: var(--fw-label);
  letter-spacing: var(--track-label); border-radius: var(--r-sm);
}
.site-footer__nav li:first-child a { padding-inline-start: 0; }
:lang(ar) .site-nav__link, :lang(ar) .site-footer__nav a { font-weight: 400; }
.site-footer__nav a:hover { text-decoration: underline; text-underline-offset: 6px; }
.site-footer__base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2) var(--s-5);
  margin-block-start: var(--s-7); padding-block-start: var(--s-5);
  border-block-start: 1px solid var(--border);
  color: var(--text-muted); font-size: 0.875rem;
}
.site-footer__domain { font-family: var(--font-mono); font-size: var(--fs-mono); }

/* ---------- Motion (only when the user has not asked for less) ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .art-packet { offset-rotate: 0deg; animation: s4h-orbit 9s linear infinite; }
  .art-unit:nth-child(n) .art-led { animation: s4h-led 3.6s ease-in-out infinite; animation-delay: calc(var(--led) * 0.45s); }
  .art-unit[data-unit="2"] .art-led { animation-duration: 4.4s; }
  .art-unit[data-unit="3"] .art-led { animation-duration: 3.1s; }
  .status__dot::after {
    content: ""; position: absolute; inset: -4px; border-radius: 50%;
    border: 2px solid var(--signal); opacity: 0;
    animation: s4h-ping 2.8s var(--ease-out) infinite;
  }
}
@media (prefers-reduced-motion: reduce) {
  .art-packet { display: none; }
  .unit__led, .brand__logo { transition: none; }
  *, *::before, *::after { scroll-behavior: auto !important; }
}
@keyframes s4h-orbit { from { offset-distance: 0%; } to { offset-distance: 100%; } }
@keyframes s4h-led { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes s4h-ping { 0% { transform: scale(0.6); opacity: 0.7; } 80%, 100% { transform: scale(1.8); opacity: 0; } }

/* ---------- Media ---------- */
@media (min-width: 720px) {
  .unit { grid-template-columns: 96px minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
  .unit__bay {
    flex-direction: column; align-items: flex-start; gap: var(--s-3);
    padding-block-start: 6px; padding-inline-end: var(--s-4);
    border-inline-end: 1px solid var(--border); align-self: stretch;
  }
  .unit::before, .unit::after { /* rack ears */
    content: ""; position: absolute; inset-block-start: calc(50% - 5px);
    inline-size: 10px; block-size: 10px; border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #fff, #cfd9e8);
    box-shadow: inset 0 0 0 1px #b3c1d7;
  }
  .unit::before { inset-inline-start: calc(-1 * (var(--rack-pad) - var(--rail-inset)) - 1px); }
  .unit::after { inset-inline-end: calc(-1 * (var(--rack-pad) - var(--rail-inset)) - 1px); }
  .section-head { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: end; column-gap: clamp(32px, 6vw, 96px); }
  .site-footer__grid { grid-template-columns: minmax(0, 1fr) auto; }
}
@media (min-width: 1000px) {
  .hero__grid { grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr); }
  /* the copy column is narrow in the two-column hero: scale the headline with it (3 lines, 1024–1600) */
  .hero__title { font-size: var(--fs-hero); }
  .contact__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
}
@media (max-width: 999px) {
  .hero-art { max-inline-size: 680px; }
}
@media (max-width: 719px) {
  :root { --bar: 68px; --logo: 96px; --logo-compact: 60px; --logo-top: 8px; --logo-overhang: 26px; --section-pad: 64px; }
  .site-nav__item--optional { display: none; }

  /* services: a tighter rack on phones (same parts, less air) */
  .section-head { gap: var(--s-4); margin-block-end: var(--s-6); }
  .rack { gap: 10px; }
  .unit { gap: var(--s-3); padding: 18px 18px 20px; }
  .unit__title { font-size: var(--fs-h3-m); }
  .unit__text { margin-block-start: var(--s-2); font-size: var(--fs-unit-m); }
  .unit__scope-label { margin-block-end: var(--s-2); }
  .unit__ports { gap: 6px; }
  .unit__ports li { padding-block: 4px; padding-inline: 8px 10px; font-size: var(--fs-chip-m); gap: 6px; }
  .unit__ports li::before { inline-size: 6px; block-size: 6px; }
  .status { margin-block-start: var(--s-5); }
  /* typography on phones: English one step smaller; Arabic keeps 18px text */
  :root { --fs-lead: 1.0625rem; --fs-unit-m: 1rem; --fs-h3-m: 1.1875rem; --fs-chip-m: 0.8125rem; }
  :lang(ar) { --fs-body: 1.125rem; --fs-lead: 1.1875rem; --fs-unit-m: 1.0625rem; --fs-h3-m: 1.25rem; --fs-chip-m: 0.875rem; }

  /* crop the label gutter of the illustration and move labels into a list */
  .hero-art__stage { overflow: hidden; aspect-ratio: 525 / 595; --k: 1.4381; --shift: 43.81%; margin-block: -6% -4%; }
  .hero-art__svg { inline-size: calc(100% * var(--k)); max-inline-size: none; margin-inline-start: calc(-1 * var(--shift)); }
  .art-tag {
    display: block; position: absolute;
    inset-block-start: var(--y); inset-inline-start: calc(var(--x) * var(--k) - var(--shift));
    translate: calc(12px * var(--dir)) -50%;
    padding: 3px 6px; border-radius: 5px;
    font: 500 0.75rem/1 var(--font-mono); color: var(--heading);
    background: var(--surface-raised); box-shadow: 0 1px 2px rgb(4 18 52 / 0.35);
  }
  .hero-art__labels {
    position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3) var(--s-4);
    margin-block-start: var(--s-4); pointer-events: auto;
  }
  .art-label { position: static; translate: none; padding-inline-end: 0; max-inline-size: none; gap: var(--s-2); }
  .art-label::before, .art-label::after { display: none; }
  .art-label__text { background: none; padding: 0; margin: 0; }
  .status { padding: var(--s-4); }
  .rack { --rack-pad: 24px; --rail-inset: 8px; padding-block: 14px; border-radius: var(--r-lg); }
  .unit { border-radius: var(--r-md); }
  .contact__panel .button { justify-self: stretch; }
}
@media (max-width: 380px) {
  .hero__actions .button { flex: 1 1 100%; }
}
