/* MIT / mersalk.com - "The Mast" design system.
   One light theme (daylight scene). Logical properties throughout so Arabic (RTL) mirrors English (LTR). */

/* ---------- Fonts (self-hosted, OFL) ---------- */
@font-face {
  font-family: "Changa";
  src: url("../fonts/changa-arabic.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  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: "Readex Pro";
  src: url("../fonts/readex-pro-arabic.woff2") format("woff2");
  font-weight: 160 700;
  font-display: swap;
  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: "Archivo";
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  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: "Archivo";
  src: url("../fonts/archivo-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --sky: #edf1f4;
  --sky-hi: #f7f9fa;
  --steel-150: #dce3e8;
  --steel-200: #cfd7de;
  --steel-300: #aeb9c2;
  --steel-500: #7c8892;
  --ink: #141a21;
  --ink-2: #3d4853;
  --ink-3: #55616c;
  --red: #c8102e;
  --red-ink: #a50d26;
  --paint: #fbfcfd;
  --green: #1e7a3c;
  --navy: #14213d;
  --mersalk: #4a5baa;
  --mersalk-deep: #3a4892;
  --mersalk-pin: #e2e83c;
  --mersalk-soft: #dde3f5;

  --f-body: "Archivo", "Segoe UI", system-ui, sans-serif;
  --f-head: "Archivo", "Segoe UI", system-ui, sans-serif;
  --f-mark: "Archivo", "Segoe UI", system-ui, sans-serif;
  --head-stretch: 78%;
  --lh-body: 1.6;
  --lh-head: 1.04;

  --frame: 1320px;
  --gutter: clamp(16px, 4vw, 48px);
  --draw-w: clamp(176px, 34vw, 500px);
  --rail-w: calc(var(--draw-w) * 70 / 480);
  --arm: clamp(20px, 4vw, 72px);
  --bay-pad: clamp(4rem, 9vw, 8rem);
  --header-h: 68px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --rail-red: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 70 70' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='%2355616c' stroke-width='3.4'%3E%3Cpath d='M2 0V70M68 0V70'/%3E%3C/g%3E%3Cg fill='none' stroke='%2355616c' stroke-width='2.4'%3E%3Cpath d='M2 1H68M2 1L68 69M68 1L2 69'/%3E%3C/g%3E%3Cg fill='none' stroke='%23c8102e' stroke-width='2.4'%3E%3Cpath d='M2 0V70M68 0V70'/%3E%3C/g%3E%3Cg fill='none' stroke='%23c8102e' stroke-width='1.3'%3E%3Cpath d='M2 1H68M2 1L68 69M68 1L2 69'/%3E%3C/g%3E%3C/svg%3E");
  --rail-white: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 70 70' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='%2355616c' stroke-width='3.4'%3E%3Cpath d='M2 0V70M68 0V70'/%3E%3C/g%3E%3Cg fill='none' stroke='%2355616c' stroke-width='2.4'%3E%3Cpath d='M2 1H68M2 1L68 69M68 1L2 69'/%3E%3C/g%3E%3Cg fill='none' stroke='%23fbfcfd' stroke-width='2.2'%3E%3Cpath d='M2 0V70M68 0V70'/%3E%3C/g%3E%3Cg fill='none' stroke='%23fbfcfd' stroke-width='1.1'%3E%3Cpath d='M2 1H68M2 1L68 69M68 1L2 69'/%3E%3C/g%3E%3C/svg%3E");
}

html[lang="ar"] {
  --f-body: "Readex Pro", "Archivo", "Segoe UI", Tahoma, sans-serif;
  --f-head: "Changa", "Archivo", "Segoe UI", Tahoma, sans-serif;
  --lh-body: 1.85;
  --lh-head: 1.28;
}

@media (max-width: 639px) {
  :root { --draw-w: 196px; --arm: 12px; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--sky);
  color: var(--ink-2);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: var(--lh-body);
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
html[lang="ar"] body { font-weight: 380; }
img, svg, video { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: var(--red-ink); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--f-head); color: var(--ink); margin: 0; line-height: var(--lh-head); text-wrap: balance; }
html:not([lang="ar"]) :is(h1, h2, h3, h4) { font-stretch: var(--head-stretch); letter-spacing: -0.012em; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
::selection { background: var(--red); color: var(--paint); }
:focus-visible { outline: 2px solid var(--red-ink); outline-offset: 2px; }
html { scrollbar-color: var(--steel-500) var(--sky); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: currentColor; }
[dir="rtl"] .icon--dir { transform: scaleX(-1); }

.skip {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 50;
  background: var(--ink); color: var(--paint); padding: 0.6rem 1rem; text-decoration: none;
}
.skip:focus, .skip:hover { top: 12px; color: var(--paint); }

/* Numerals and marks: condensed Archivo, tabular */
.num, .mark {
  font-family: var(--f-mark);
  font-stretch: 62%;
  font-weight: 650;
  font-variant-numeric: tabular-nums lining-nums;
  unicode-bidi: isolate;
  letter-spacing: 0;
}

/* ---------- Type scale ---------- */
.display {
  font-size: clamp(2.25rem, 4.3vw, 4.25rem);
  font-weight: 760;
  line-height: 1.02;
}
html[lang="ar"] .display { font-size: clamp(2.1rem, 3.9vw, 3.9rem); font-weight: 700; line-height: 1.24; }
.h2 { font-size: clamp(1.65rem, 2.7vw, 2.55rem); font-weight: 720; }
html[lang="ar"] .h2 { font-weight: 680; }
.h3 { font-size: 1.25rem; font-weight: 650; }
html:not([lang="ar"]) .h3 { font-stretch: 88%; }
.lead { font-size: clamp(1.1rem, 1.5vw, 1.3rem); color: var(--ink-2); max-width: 54ch; }
.body { max-width: 66ch; }
html[lang="ar"] .body { max-width: 60ch; }
.small { font-size: 0.875rem; color: var(--ink-3); }
.stack > * + * { margin-block-start: 1rem; }
.stack-lg > * + * { margin-block-start: 1.5rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 48px; padding: 0.7rem 1.25rem;
  border: 2px solid transparent; border-radius: 2px;
  font-family: var(--f-head); font-weight: 700; font-size: 1rem; line-height: 1.1;
  white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out), border-color 160ms var(--ease-out), transform 120ms var(--ease-out);
}
html:not([lang="ar"]) .btn { font-stretch: 90%; letter-spacing: 0.005em; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--red); color: var(--paint); }
.btn--primary:hover { background: var(--red-ink); color: var(--paint); }
.btn--secondary { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--secondary:hover { background: var(--ink); color: var(--paint); }
.btn--on-dark { border-color: var(--paint); color: var(--paint); background: transparent; }
.btn--on-dark:hover { background: var(--paint); color: var(--ink); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn .icon { width: 1.1em; height: 1.1em; }
.btn.is-loading { pointer-events: none; }
.btn.is-loading .icon { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.textlink {
  display: inline-flex; align-items: center; gap: 0.4em;
  font-family: var(--f-head); font-weight: 650; color: var(--ink); text-decoration: none;
  border-block-end: 2px solid var(--red); padding-block: 0.55rem 2px;
}
html:not([lang="ar"]) .textlink { font-stretch: 90%; }
.textlink:hover { color: var(--red-ink); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--sky);
  border-block-end: 1px solid transparent;
  transition: border-color 200ms var(--ease-out);
}
.site-header.is-scrolled { border-block-end-color: var(--steel-300); }
.site-header .bar {
  max-width: var(--frame); margin-inline: auto; padding-inline: var(--gutter);
  height: var(--header-h); display: flex; align-items: center; gap: clamp(0.75rem, 2vw, 2rem);
}
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--ink); flex: none; }
.brand svg { height: 40px; width: auto; }
.brand-name { display: block; line-height: 1.2; font-size: 0.78rem; font-weight: 600; color: var(--ink-2); max-width: 21ch; }
html[lang="ar"] .brand-name { font-family: var(--f-head); font-size: 0.84rem; max-width: 17ch; line-height: 1.35; }
html:not([lang="ar"]) .brand-name { font-stretch: 85%; letter-spacing: 0.01em; }
.nav { margin-inline-start: auto; }
.nav ul { list-style: none; display: flex; gap: clamp(0.5rem, 1.6vw, 1.6rem); }
.nav ul a {
  display: block; padding-block: 0.5rem; text-decoration: none; color: var(--ink-2);
  font-family: var(--f-head); font-weight: 600; font-size: 0.98rem; border-block-end: 2px solid transparent;
}
html:not([lang="ar"]) .nav ul a { font-stretch: 88%; }
.nav ul a:hover { color: var(--ink); border-block-end-color: var(--steel-300); }
.nav ul a[aria-current="page"] { color: var(--ink); border-block-end-color: var(--red); }
.lang {
  display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; text-decoration: none; color: var(--ink);
  font-weight: 600; font-size: 0.95rem; padding: 0.45rem 0.2rem;
}
.lang:hover { color: var(--red-ink); }
.lang .icon { width: 1.1em; height: 1.1em; }
.lang[lang="ar"] { font-family: "Changa", var(--f-body); }
.lang[lang="en"] { font-family: "Archivo", var(--f-body); font-stretch: 90%; }
.menu-btn { display: none; }
.header-cta { flex: none; }

@media (max-width: 1080px) {
  .header-cta { display: none; }
}
@media (max-width: 860px) {
  .menu-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; border: 2px solid var(--ink); background: transparent; border-radius: 2px; cursor: pointer;
  }
  .menu-btn .icon { width: 24px; height: 24px; }
  .menu-btn .i-close { display: none; }
  .menu-btn[aria-expanded="true"] .i-open { display: none; }
  .menu-btn[aria-expanded="true"] .i-close { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; margin: 0;
    background: var(--sky); border-block: 1px solid var(--steel-300);
    padding: 0.5rem var(--gutter) 1.5rem; display: none;
    max-height: calc(100vh - var(--header-h)); max-height: calc(100dvh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain;
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav ul a { font-size: 1.25rem; padding-block: 0.85rem; border-block-end: 1px solid var(--steel-150); }
  .nav .nav-cta { display: block; margin-block-start: 1.25rem; }
  .bar > .lang { margin-inline-start: auto; }
  .menu-btn { margin-inline-start: 0.5rem; }
  .brand-name { display: none; }
}
@media (min-width: 861px) { .nav .nav-cta { display: none; } }
/* Without JavaScript the phone menu cannot open: show the links as a wrapped row instead */
@media (max-width: 860px) {
  html:not(.js) .menu-btn { display: none; }
  html:not(.js) .site-header .bar { flex-wrap: wrap; height: auto; min-height: var(--header-h); padding-block: 0.5rem; }
  html:not(.js) .nav { display: block; position: static; order: 5; flex-basis: 100%; padding: 0; border: 0; background: none; }
  html:not(.js) .nav ul { flex-direction: row; flex-wrap: wrap; gap: 0.25rem 1.1rem; }
  html:not(.js) .nav ul a { font-size: 1rem; padding-block: 0.35rem; border-block-end: 0; }
  html:not(.js) .nav .nav-cta { display: none; }
}

/* Language suggestion strip (shown by JS only when the browser language differs) */
.lang-hint {
  background: var(--ink); color: var(--paint); font-size: 0.92rem; padding-inline: var(--gutter);
}
.lang-hint .inner { max-width: calc(var(--frame) - 2 * var(--gutter)); margin-inline: auto; padding-block: 0.55rem; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.lang-hint a { color: var(--paint); font-weight: 650; }
.lang-hint button { margin-inline-start: auto; background: none; border: 0; color: var(--paint); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0.25rem; }

/* ---------- Bays (sections) and the mast rail ---------- */
.bay { position: relative; }
.bay > .frame {
  position: relative;
  max-width: var(--frame);
  margin-inline: auto;
  padding-block: var(--bay-pad);
  padding-inline-start: var(--gutter);
  padding-inline-end: calc(var(--gutter) + var(--rail-w) + var(--arm));
}
.bay > .frame::after {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-end: var(--gutter);
  width: var(--rail-w);
  background-image: var(--rail-red);
  background-repeat: repeat-y;
  background-size: 100% var(--rail-w);
  pointer-events: none;
}
main > .bay:nth-of-type(even) > .frame::after { background-image: var(--rail-white); }
.bay--tight > .frame { padding-block: clamp(3rem, 6vw, 5rem); }

/* Mounting arm: heading line that runs to the rail and ends in a bolt plate */
.mount { display: flex; align-items: center; gap: clamp(0.75rem, 2vw, 1.5rem); }
.mount > span { flex: 0 1 auto; max-width: 26ch; }
html[lang="ar"] .mount > span { max-width: 24ch; }
.mount::after {
  content: "";
  flex: 1 1 2rem;
  min-width: 2rem;
  height: 14px;
  margin-inline-end: calc(-1 * var(--arm));
  background:
    linear-gradient(var(--ink), var(--ink)) right center / 7px 14px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 100% 2px no-repeat;
  transform-origin: right center;
}
[dir="rtl"] .mount::after { transform-origin: left center; background-position: left center, center; }

/* Motion: arms draw in from the mast when the bay arrives (content itself is always visible) */
@media (prefers-reduced-motion: no-preference) {
  .js .bay:not(.is-in) .mount::after { transform: scaleX(0); }
  .js .bay .mount::after { transition: transform 700ms var(--ease-out) 80ms; }
  .js .bay:not(.is-in) .rise { transform: translateY(14px); }
  .js .bay .rise { transition: transform 700ms var(--ease-out) 120ms; }
}

/* ---------- Photos ---------- */
.photo { margin: 0; position: relative; }
.photo img { width: 100%; height: 100%; object-fit: cover; background: var(--steel-150); }
.photo--frame { border: 1px solid var(--ink); padding: 6px; background: var(--sky-hi); }
.photo figcaption { margin-block-start: 0.6rem; font-size: 0.85rem; color: var(--ink-3); }

/* ---------- Hero ---------- */
.hero > .frame {
  padding-block-start: clamp(2rem, 5vw, 4.5rem);
  padding-block-end: clamp(3rem, 6vw, 5rem);
  padding-inline-end: calc(var(--gutter) + var(--draw-w) - var(--draw-w) * 0.0521 + 1rem);
  min-height: calc(var(--draw-w) * 1.5 + clamp(2rem, 5vw, 4.5rem) + 2rem);
}
.hero > .frame::after { inset-block-start: calc(clamp(2rem, 5vw, 4.5rem) + var(--draw-w) * 1.5 - 1px); }
.hero-copy { display: grid; gap: clamp(1.25rem, 2.4vw, 2rem); max-width: 40rem; padding-block-start: clamp(0rem, 3vw, 3rem); }
.hero-copy .display { max-width: 15ch; }
html[lang="ar"] .hero-copy .display { max-width: 14ch; }

.request {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.6rem; justify-items: start;
  max-width: 34rem; padding: 0.9rem; background: var(--sky-hi); border: 1px solid var(--ink);
}
.request label { grid-column: 1 / -1; font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.request .select-wrap { min-width: 0; width: 100%; }
.request-alt { display: flex; gap: 1.25rem; flex-wrap: wrap; align-items: center; }

/* Mast-top drawing (signature) */
.mast {
  position: absolute;
  inset-block-start: clamp(2rem, 5vw, 4.5rem);
  inset-inline-end: calc(var(--gutter) - var(--draw-w) * 0.0521);
  width: var(--draw-w);
  aspect-ratio: 480 / 720;
  container-type: inline-size;
  container-name: mast;
}
.mast svg { width: 100%; height: 100%; overflow: visible; }
[dir="rtl"] .mast svg { transform: scaleX(-1); }
.mast .eq { fill: var(--steel-150); stroke: var(--ink); stroke-width: 1.25; stroke-linejoin: round; transition: stroke 180ms var(--ease-out), fill 180ms var(--ease-out); }
.mast .eq-line { fill: none; stroke: var(--ink); stroke-width: 1.25; transition: stroke 180ms var(--ease-out); }
.mast .leader { fill: none; stroke: var(--ink-3); stroke-width: 1; transition: opacity 180ms var(--ease-out), stroke 180ms var(--ease-out); }
.mast .leader-taut { fill: none; stroke: var(--red); stroke-width: 2; opacity: 0; transition: opacity 180ms var(--ease-out); }
.mast .lead-dot { fill: var(--ink); }
.mast .beacon { fill: var(--red); }
.mast .beacon-halo { fill: var(--red); opacity: 0.18; transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .mast .beacon-halo { animation: beacon 2.6s ease-in-out 2; }
  @keyframes beacon { 0%, 100% { opacity: 0.08; transform: scale(0.7); } 50% { opacity: 0.32; transform: scale(1.15); } }
}
.mast-num {
  position: absolute;
  inset-block-start: calc(var(--y) * 1%);
  inset-inline-end: calc((100 - var(--x)) * 1%);
  transform: translateY(-50%);
  display: flex; align-items: center; gap: 0.45rem;
  min-height: 24px; padding: 0.15rem 0.35rem; margin-inline-end: 4px;
  text-decoration: none; color: var(--ink); background: var(--sky);
  border: 1px solid transparent; border-radius: 2px;
  flex-direction: row-reverse;
}
.mast-num .n { font-size: clamp(1.05rem, 6.4cqi, 1.8rem); line-height: 1; color: var(--ink); }
.mast-num .t {
  font-family: var(--f-head); font-size: 0.84rem; font-weight: 600; line-height: 1.2; color: var(--ink-2);
  max-width: 16ch; text-align: end;
}
html:not([lang="ar"]) .mast-num .t { font-stretch: 85%; }
.mast-num:hover, .mast-num:focus-visible { border-color: var(--red); }
.mast-num:hover .n, .mast-num:focus-visible .n { color: var(--red-ink); }
@container mast (max-width: 380px) { .mast-num .t { font-size: 0.72rem; max-width: none; white-space: nowrap; } .mast-num { gap: 0.3rem; padding: 0.05rem 0.2rem; } }
.mast-caption {
  position: absolute; inset-block-start: 100%; inset-inline-end: 0; width: 100%;
  padding-block-start: 0.5rem; font-size: 0.8rem; color: var(--ink-3); text-align: end;
}

/* Highlight equipment for the active numeral (CSS :has with JS data-active fallback) */
.mast[data-active="11"] :is(.eq-11, .eq-11 *), .mast[data-active="12"] :is(.eq-12, .eq-12 *),
.mast[data-active="13"] :is(.eq-13, .eq-13 *), .mast[data-active="14"] :is(.eq-14, .eq-14 *),
.mast[data-active="15"] :is(.eq-15, .eq-15 *), .mast[data-active="16"] :is(.eq-16, .eq-16 *),
.mast[data-active="17"] :is(.eq-17, .eq-17 *), .mast[data-active="18"] :is(.eq-18, .eq-18 *) { stroke: var(--red); }
.mast[data-active="11"] .ld-11 .leader, .mast[data-active="12"] .ld-12 .leader, .mast[data-active="13"] .ld-13 .leader,
.mast[data-active="14"] .ld-14 .leader, .mast[data-active="15"] .ld-15 .leader, .mast[data-active="16"] .ld-16 .leader,
.mast[data-active="17"] .ld-17 .leader, .mast[data-active="18"] .ld-18 .leader { opacity: 0; }
.mast[data-active="11"] .ld-11 .leader-taut, .mast[data-active="12"] .ld-12 .leader-taut, .mast[data-active="13"] .ld-13 .leader-taut,
.mast[data-active="14"] .ld-14 .leader-taut, .mast[data-active="15"] .ld-15 .leader-taut, .mast[data-active="16"] .ld-16 .leader-taut,
.mast[data-active="17"] .ld-17 .leader-taut, .mast[data-active="18"] .ld-18 .leader-taut { opacity: 1; }
.mast[data-active] .eq-hl { stroke-width: 2; }
.mast .eq-14-hl { fill: none; stroke: transparent; stroke-width: 6; }
.mast[data-active="14"] .eq-14-hl { stroke: var(--red); }

@media (max-width: 639px) {
  .hero > .frame { padding-inline-end: calc(var(--gutter) + var(--rail-w) + var(--arm)); min-height: 0; padding-block-end: calc(var(--draw-w) * 1.5 + 3.5rem); }
  .hero > .frame::after { inset-block-start: auto; height: 0; }
  .mast { inset-block-start: auto; inset-block-end: 0; }
  .request { grid-template-columns: 1fr; }
}

/* ---------- Form controls ---------- */
.field { display: grid; gap: 0.4rem; }
.field label, .field .label { font-weight: 600; color: var(--ink); font-size: 0.95rem; }
.field .opt { font-weight: 400; color: var(--ink-3); }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 0.65rem 0.8rem;
  background: var(--paint); color: var(--ink);
  border: 1px solid var(--ink-3); border-radius: 2px;
  transition: border-color 140ms var(--ease-out), box-shadow 140ms var(--ease-out);
}
.textarea { min-height: 9rem; resize: vertical; line-height: 1.5; }
.select {
  appearance: none; -webkit-appearance: none; padding-inline-end: 2.4rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-size: 6px 6px, 6px 6px; background-repeat: no-repeat;
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
}
[dir="rtl"] .select { background-position: 12px 50%, 18px 50%; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 2px var(--sky), 0 0 0 4px var(--red-ink); }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); opacity: 1; }
.field.is-invalid .input, .field.is-invalid .select, .field.is-invalid .textarea { border-color: var(--red-ink); border-width: 2px; }
.field .error { display: none; align-items: center; gap: 0.35rem; color: var(--red-ink); font-size: 0.88rem; font-weight: 500; }
.field.is-invalid .error { display: flex; }
.hp { position: absolute !important; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Rollout stations ---------- */
.stations { list-style: none; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; margin-block-start: clamp(2rem, 4vw, 3.5rem); counter-reset: st; position: relative; }
.stations::before {
  content: ""; position: absolute; inset-inline: 0; inset-block-start: 11px; height: 2px; background: var(--steel-300);
}
.station { position: relative; padding-inline-end: 1rem; padding-block-start: 2.25rem; }
.station::before {
  content: ""; position: absolute; inset-block-start: 0; inset-inline-start: 0;
  width: 24px; height: 24px; background: var(--sky); border: 2px solid var(--ink); z-index: 1;
  transition: background-color 300ms var(--ease-out), border-color 300ms var(--ease-out);
}
.station::after {
  content: ""; position: absolute; inset-inline: 0; inset-block-start: 11px; height: 2px; background: var(--red);
  transform: scaleX(1); transform-origin: left center;
  transition: transform 420ms var(--ease-out);
}
[dir="rtl"] .station::after { transform-origin: right center; }
.station:last-child::after { display: none; }
.station .mark { font-size: 0.95rem; color: var(--ink-3); display: block; }
.station h3 { font-size: 1.05rem; margin-block: 0.25rem 0.35rem; }
html:not([lang="ar"]) .station h3 { font-stretch: 88%; }
.station p { font-size: 0.92rem; color: var(--ink-2); line-height: 1.5; }
html[lang="ar"] .station p { line-height: 1.7; }
.station.is-accept::before { border-color: var(--green); background: var(--green); }
.station.is-accept .stamp, .station.is-air .stamp {
  display: inline-block; margin-block-start: 0.6rem; padding: 0.15rem 0.45rem;
  border: 2px solid var(--green); color: var(--green); font-family: var(--f-mark); font-stretch: 70%; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.04em;
  transform: rotate(-4deg);
}
.station.is-air::before { background: var(--red); border-color: var(--red); border-radius: 50%; }
.station.is-air .stamp { border-color: var(--red); color: var(--red-ink); transform: none; }
.station:not(.is-accept):not(.is-air)::before { background: var(--red); border-color: var(--red); }
@media (prefers-reduced-motion: no-preference) {
  .js .bay:not(.is-in) .station::after { transform: scaleX(0); }
  .js .bay:not(.is-in) .station:not(.is-accept):not(.is-air)::before { background: var(--sky); border-color: var(--ink); }
  .js .bay:not(.is-in) .station.is-accept::before { background: var(--sky); border-color: var(--ink); }
  .js .bay:not(.is-in) .station.is-air::before { background: var(--sky); border-color: var(--ink); }
  .js .bay:not(.is-in) .stamp { opacity: 0; }
  .stamp { transition: opacity 300ms var(--ease-out); }
  .js .bay.is-in .station:nth-child(1)::after, .js .bay.is-in .station:nth-child(1)::before, .js .bay.is-in .station:nth-child(1) .stamp { transition-delay: 0ms; }
  .js .bay.is-in .station:nth-child(2)::after, .js .bay.is-in .station:nth-child(2)::before, .js .bay.is-in .station:nth-child(2) .stamp { transition-delay: 140ms; }
  .js .bay.is-in .station:nth-child(3)::after, .js .bay.is-in .station:nth-child(3)::before, .js .bay.is-in .station:nth-child(3) .stamp { transition-delay: 280ms; }
  .js .bay.is-in .station:nth-child(4)::after, .js .bay.is-in .station:nth-child(4)::before, .js .bay.is-in .station:nth-child(4) .stamp { transition-delay: 420ms; }
  .js .bay.is-in .station:nth-child(5)::after, .js .bay.is-in .station:nth-child(5)::before, .js .bay.is-in .station:nth-child(5) .stamp { transition-delay: 560ms; }
  .js .bay.is-in .station:nth-child(6)::after, .js .bay.is-in .station:nth-child(6)::before, .js .bay.is-in .station:nth-child(6) .stamp { transition-delay: 700ms; }
  .js .bay.is-in .station:nth-child(7)::after, .js .bay.is-in .station:nth-child(7)::before, .js .bay.is-in .station:nth-child(7) .stamp { transition-delay: 840ms; }
}
@media (max-width: 960px) {
  .stations { grid-template-columns: 1fr; gap: 0; }
  .stations::before { inset-block: 0; inset-inline-start: 11px; inset-inline-end: auto; width: 2px; height: auto; }
  .station { padding-block: 0 1.6rem; padding-inline-start: 2.75rem; padding-inline-end: 0; }
  .station::after { inset-inline-start: 11px; inset-inline-end: auto; inset-block: 12px 0; width: 2px; height: auto; transform-origin: center top; }
  .js .bay:not(.is-in) .station::after { transform: scaleY(0); }
}

.split-photo { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: end; }
.split-photo .photo img { aspect-ratio: 3 / 2; }
@media (max-width: 860px) { .split-photo { grid-template-columns: 1fr; } }

/* ---------- Equipment schedule (services 11-18): each row hangs from the rail on a leader ---------- */
.schedule { list-style: none; margin-block-start: clamp(2rem, 4vw, 3rem); }
.sched a {
  --lead: var(--steel-500); --lead-w: 1px;
  display: grid; grid-template-columns: clamp(3.4rem, 6vw, 5rem) minmax(0, 1fr); gap: 0 clamp(1rem, 2.5vw, 2rem); align-items: start;
  padding-block: 1.05rem; text-decoration: none; color: var(--ink-2);
  border-block-start: 1px solid var(--steel-200);
}
.sched:first-child a { border-block-start: 0; }
.sched .num { font-size: clamp(2.2rem, 3.6vw, 3.1rem); line-height: 0.9; color: var(--red-ink); }
.sched-title {
  display: flex; align-items: center; gap: 0.9rem;
  font-family: var(--f-head); font-weight: 680; font-size: clamp(1.15rem, 1.7vw, 1.4rem); line-height: 1.2; color: var(--ink);
}
html:not([lang="ar"]) .sched-title { font-stretch: 86%; }
.sched-title > span { flex: 0 1 auto; }
.sched-title::after {
  content: ""; flex: 1 1 2rem; min-width: 2rem; height: 9px;
  margin-inline-end: calc(-1 * var(--arm));
  background:
    radial-gradient(circle, var(--ink) 3px, transparent 3.6px) right center / 9px 9px no-repeat,
    linear-gradient(var(--lead), var(--lead)) center / 100% var(--lead-w) no-repeat;
}
[dir="rtl"] .sched-title::after { background-position: left center, center; }
.sched-line { display: block; margin-block-start: 0.3rem; font-size: 0.97rem; line-height: 1.5; color: var(--ink-2); max-width: 62ch; }
html[lang="ar"] .sched-line { line-height: 1.75; }
.sched a:hover, .sched a:focus-visible { --lead: var(--red); --lead-w: 2px; }
.sched a:hover .sched-title, .sched a:focus-visible .sched-title { color: var(--red-ink); }

/* ---------- Rack (services 01-10) ---------- */
.shelter { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; margin-block-start: clamp(2rem, 4vw, 3rem); }
.shelter .photo img { aspect-ratio: 4 / 5; }
@media (max-width: 960px) { .shelter { grid-template-columns: 1fr; } .shelter .photo img { aspect-ratio: 3 / 2; } }
.rack {
  list-style: none; position: relative;
  padding: 10px 34px; background: var(--ink);
  border-radius: 2px;
}
.rack::before, .rack::after {
  content: ""; position: absolute; inset-block: 10px; width: 14px;
  background: repeating-linear-gradient(to bottom, var(--steel-500) 0 3px, var(--ink) 3px 6px, var(--steel-500) 6px 9px, var(--ink) 9px 22px);
  -webkit-mask: linear-gradient(#000, #000); mask: linear-gradient(#000, #000);
}
.rack::before { inset-inline-start: 10px; }
.rack::after { inset-inline-end: 10px; }
.unit + .unit { margin-block-start: 4px; }
.unit a {
  display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; align-items: center; gap: 0.9rem;
  min-height: 62px; padding: 0.55rem 1rem; text-decoration: none;
  background:
    repeating-linear-gradient(90deg, transparent 0 5px, rgba(20, 26, 33, 0.16) 5px 7px) right 14px center / 64px 16px no-repeat,
    var(--steel-150);
  color: var(--ink-2);
  transition: background-color 160ms var(--ease-out);
}
[dir="rtl"] .unit a { background-position: left 14px center, 0 0; }
.unit a:hover, .unit a:focus-visible { background-color: var(--paint); }
.unit .num { font-size: 1.7rem; line-height: 1; color: var(--ink); }
.unit .u-title { font-family: var(--f-head); font-weight: 650; color: var(--ink); font-size: 1.02rem; line-height: 1.25; display: block; }
html:not([lang="ar"]) .unit .u-title { font-stretch: 88%; }
.unit .u-line { display: block; font-size: 0.86rem; color: var(--ink-3); line-height: 1.4; margin-block-start: 0.15rem; }
.unit .icon { color: var(--ink-3); margin-inline-end: 64px; }
.unit a:hover .icon { color: var(--red-ink); }
@media (max-width: 520px) {
  .rack { padding: 8px 22px; }
  .rack::before, .rack::after { width: 8px; }
  .unit a { grid-template-columns: 2.25rem minmax(0, 1fr); background-size: 0 0, auto; }
  .unit .icon { display: none; }
}

/* ---------- Mersalk link block (one deliberate colour block) ---------- */
.bay--mersalk { background: var(--mersalk); color: var(--mersalk-soft); }
.bay--mersalk :is(h1, h2, h3) { color: var(--paint); }
.bay--mersalk :is(.lead, p) { color: var(--mersalk-soft); }
.bay--mersalk .mount::after { background-image: linear-gradient(var(--paint), var(--paint)), linear-gradient(var(--paint), var(--paint)); }
.bay--mersalk .mount.mount--link::after {
  height: 30px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 30'%3E%3Cpath d='M15 15H26' stroke='%23fbfcfd' stroke-width='2'/%3E%3Cellipse cx='11' cy='15' rx='5' ry='13' fill='%234a5baa' stroke='%23fbfcfd' stroke-width='2'/%3E%3Cpath d='M1 15H10' stroke='%23fbfcfd' stroke-width='1.5'/%3E%3C/svg%3E") right center / 26px 30px no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 22' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%23e2e83c'/%3E%3Cstop offset='.4' stop-color='%239be26b'/%3E%3Cstop offset='.72' stop-color='%2343c6e8'/%3E%3Cstop offset='1' stop-color='%239cc3ff'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0 11C10 1 20 1 30 11S50 21 60 11S80 1 90 11S110 21 120 11' fill='none' stroke='url(%23g)' stroke-width='2.5' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") left center / calc(100% - 25px) 22px no-repeat;
}
[dir="rtl"] .bay--mersalk .mount.mount--link::after {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 30'%3E%3Cpath d='M0 15H11' stroke='%23fbfcfd' stroke-width='2'/%3E%3Cellipse cx='15' cy='15' rx='5' ry='13' fill='%234a5baa' stroke='%23fbfcfd' stroke-width='2'/%3E%3Cpath d='M16 15H25' stroke='%23fbfcfd' stroke-width='1.5'/%3E%3C/svg%3E") left center / 26px 30px no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 22' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='1' x2='0'%3E%3Cstop offset='0' stop-color='%23e2e83c'/%3E%3Cstop offset='.4' stop-color='%239be26b'/%3E%3Cstop offset='.72' stop-color='%2343c6e8'/%3E%3Cstop offset='1' stop-color='%239cc3ff'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0 11C10 1 20 1 30 11S50 21 60 11S80 1 90 11S110 21 120 11' fill='none' stroke='url(%23g)' stroke-width='2.5' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") right center / calc(100% - 25px) 22px no-repeat;
}
.bay--mersalk a:not(.btn):not(.store) { color: var(--paint); }
.bay--mersalk :focus-visible { outline-color: var(--paint); }
.mersalk-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 860px) { .mersalk-grid { grid-template-columns: 1fr; } }
.mersalk-logo { width: clamp(140px, 16vw, 190px); height: auto; margin-block-end: 1.25rem; }
.apps-mini { list-style: none; display: grid; gap: 0.9rem; margin-block: 1.75rem; }
.apps-mini li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 0.9rem; align-items: center; }
.apps-mini img { width: 52px; height: 52px; border-radius: 12px; }
.apps-mini strong { display: block; color: var(--paint); font-family: var(--f-head); font-weight: 650; }
.apps-mini span { font-size: 0.92rem; color: var(--mersalk-soft); }
.phone {
  justify-self: center; position: relative; width: min(290px, 78vw); aspect-ratio: 9 / 19;
  padding: 10px; background: #0f1630; border-radius: 40px;
  box-shadow: 0 18px 40px rgba(19, 27, 66, 0.45), inset 0 0 0 2px #2b3566;
}
.phone .screen { position: relative; height: 100%; overflow: hidden; border-radius: 31px; background: #fff; padding-block-start: 34px; }
.phone .screen video { width: 100%; height: 100%; object-fit: cover; object-position: top; background: #fff; }
.phone-toggle {
  position: absolute; inset-block-end: 14px; inset-inline-start: 50%; transform: translateX(-50%);
  display: grid; place-items: center; width: 46px; height: 46px; padding: 0;
  border: 1px solid rgba(251, 252, 253, 0.4); border-radius: 50%;
  background: rgba(20, 26, 33, 0.82); color: var(--paint); cursor: pointer;
  transition: background-color 160ms var(--ease-out);
}
[dir="rtl"] .phone-toggle { transform: translateX(50%); }
.phone-toggle:hover { background: var(--ink); }
.phone-toggle:focus-visible { outline: 2px solid var(--paint); outline-offset: 3px; }
.phone-toggle .icon { width: 20px; height: 20px; }
.phone-toggle .i-pause { display: none; }
.phone-toggle[data-state="playing"] .i-play { display: none; }
.phone-toggle[data-state="playing"] .i-pause { display: block; }
.phone::before { content: ""; position: absolute; inset-block-start: 20px; inset-inline-start: 50%; width: 76px; height: 20px; border-radius: 12px; background: #0f1630; transform: translateX(-50%); z-index: 1; }
[dir="rtl"] .phone::before { transform: translateX(50%); }

/* Store badges */
.stores { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.store {
  display: inline-flex; align-items: center; gap: 0.6rem; min-height: 48px; padding-block: 0.45rem; padding-inline: 0.8rem 0.95rem;
  background: var(--ink); color: var(--paint); text-decoration: none; border-radius: 6px; border: 1px solid #39424c;
}
.store:hover { background: #000c18; color: var(--paint); }
.store svg { width: 22px; height: 22px; fill: currentColor; }
.store > span { display: grid; line-height: 1.1; text-align: start; font-family: "Archivo", var(--f-body); }
html[lang="ar"] .store small { font-family: "Readex Pro", var(--f-body); font-size: 0.74rem; }
.store small { font-size: 0.72rem; letter-spacing: 0.02em; opacity: 0.9; }
.store b { font-size: 1.02rem; font-weight: 650; font-stretch: 92%; }
.bay--mersalk .store { border-color: rgba(251, 252, 253, 0.35); }
.store-note { font-size: 0.85rem; color: var(--ink-3); }
.stores-label { margin-block: 1.25rem 0.5rem; font-size: 0.92rem; font-weight: 600; }
.field .hint { margin: 0; font-size: 0.86rem; color: var(--ink-3); }
.bay--mersalk .store-note { color: var(--mersalk-soft); }

/* ---------- Sectors strip ---------- */
.sectors { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 2.4vw, 2rem); margin-block-start: clamp(2rem, 4vw, 3rem); }
.sectors li { border-block-start: 3px solid var(--ink); padding-block-start: 1rem; }
.sectors h3 { font-size: 1.15rem; margin-block-end: 0.5rem; }
.sectors p { font-size: 0.95rem; }
@media (max-width: 960px) { .sectors { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .sectors { grid-template-columns: 1fr; } }

/* ---------- Ground (closing contact band) ---------- */
.sub-h { margin-block: clamp(2.5rem, 5vw, 3.5rem) 0; }
.climb.climb--compact { margin-block-start: 1.25rem; }
.climb.climb--compact .step { padding: 0.6rem 0.75rem; }
.climb.climb--compact .step strong { font-size: 0.98rem; }
.climb.climb--compact li:nth-child(1) .step { min-height: 3rem; } .climb.climb--compact li:nth-child(2) .step { min-height: 3.7rem; }
.climb.climb--compact li:nth-child(3) .step { min-height: 4.4rem; } .climb.climb--compact li:nth-child(4) .step { min-height: 5.1rem; }
.climb.climb--compact li:nth-child(5) .step { min-height: 5.8rem; } .climb.climb--compact li:nth-child(6) .step { min-height: 6.5rem; }
.climb.climb--compact p { font-size: 0.86rem; }
.ground .frame { display: grid; gap: 1.5rem; }
.email-big {
  font-family: var(--f-mark); font-stretch: 70%; font-weight: 650;
  font-size: clamp(1.8rem, 5vw, 3.6rem); line-height: 1; color: var(--ink); text-decoration: none;
  border-block-end: 3px solid var(--red); justify-self: start; padding-block-end: 0.15em;
  direction: ltr; unicode-bidi: isolate; overflow-wrap: anywhere;
}
.email-big:hover { color: var(--red-ink); }
.contact-grid .email-big { font-size: clamp(1.5rem, 3.4vw, 2.5rem); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: center; }

/* ---------- Footer: the foundation ---------- */
.site-footer { position: relative; background: var(--navy); color: #d3dcef; }
.site-footer .footing {
  max-width: var(--frame); margin-inline: auto; position: relative; height: 0;
}
.site-footer .footing::before {
  content: ""; position: absolute; inset-block-end: 0; inset-inline-end: max(0px, calc(var(--gutter) - var(--rail-w) * 0.6));
  width: calc(var(--rail-w) * 2.2); height: 18px; background: #8f9aa4;
  clip-path: polygon(14% 0, 86% 0, 100% 100%, 0 100%);
}
.site-footer .inner {
  max-width: var(--frame); margin-inline: auto; padding: clamp(3rem, 6vw, 4.5rem) var(--gutter) 2rem;
  display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 2.5rem;
}
.site-footer h2 { color: var(--paint); font-size: 1.15rem; margin-block-end: 0.75rem; }
.site-footer a { color: var(--paint); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer ul { list-style: none; display: grid; gap: 0.15rem; }
.site-footer ul a { display: inline-block; padding-block: 0.3rem; }
.site-footer .names { display: grid; gap: 0.35rem; }
.site-footer .names .ar { font-family: "Changa", var(--f-body); font-size: 1.15rem; color: var(--paint); }
.site-footer .names .en { font-family: "Archivo", var(--f-body); font-stretch: 85%; font-weight: 600; letter-spacing: 0.02em; color: var(--paint); }
.site-footer .logo-foot { width: 92px; height: auto; margin-block-end: 1rem; }
.site-footer .logo-foot .t-ink { fill: var(--paint); }
.site-footer .legal {
  max-width: var(--frame); margin-inline: auto; padding: 1.25rem var(--gutter) 2rem;
  border-block-start: 1px solid #2c3b60; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; font-size: 0.85rem;
}
.site-footer :focus-visible, .rack :focus-visible, .lang-hint :focus-visible { outline-color: var(--paint); }
@media (max-width: 760px) { .site-footer .inner { grid-template-columns: 1fr; } }

/* ---------- Page heads (inner pages) ---------- */
.page-head > .frame { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2rem, 4vw, 3rem); }
.page-head .display { max-width: 18ch; }
.page-head .lead { margin-block-start: 1.25rem; }
.page-head + .bay > .frame { padding-block-start: clamp(1.5rem, 4vw, 3.5rem); }
.mersalk-grid--top { align-items: start; }

/* ---------- Services page ---------- */
.index-group { margin-block-start: 1.1rem; }
.index-group .small { margin-block-end: 0.45rem; }
.index18 { list-style: none; display: grid; grid-template-columns: repeat(10, minmax(0, 3.6rem)); gap: 0.4rem; }
@media (max-width: 640px) { .index18 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.index18 a {
  display: grid; place-items: center; height: 3.4rem; text-decoration: none; color: var(--ink);
  border: 1px solid var(--steel-300); background: var(--sky-hi); font-size: 1.4rem;
}
.index18 a:hover, .index18 a:focus-visible { border-color: var(--red); color: var(--red-ink); }
.index18.grp-b a { background: var(--steel-150); }
.svc { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0.5rem clamp(1rem, 3vw, 2.5rem); padding-block: clamp(2rem, 4vw, 3rem); border-block-start: 1px solid var(--steel-300); }
.svc:first-of-type { border-block-start: 0; }
.svc > .num { font-size: clamp(3rem, 6vw, 4.75rem); line-height: 0.85; color: var(--red-ink); }
.svc h3 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); margin-block-end: 0.6rem; }
.svc .points { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem 1.75rem; margin-block-start: 1.1rem; }
.svc .points li { position: relative; padding-inline-start: 1.1rem; font-size: 0.97rem; line-height: 1.5; }
html[lang="ar"] .svc .points li { line-height: 1.75; }
.svc .points li::before { content: ""; position: absolute; inset-inline-start: 0; inset-block-start: 0.62em; width: 7px; height: 2px; background: var(--red); }
.svc .svc-cta { margin-block-start: 1.25rem; }
@media (max-width: 760px) { .svc { grid-template-columns: 1fr; } .svc .points { grid-template-columns: 1fr; } }

.hub { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem; list-style: none; margin-block-start: 1.25rem; }
.hub li { padding: 0.8rem 0.9rem; background: var(--sky-hi); border: 1px solid var(--steel-300); font-weight: 550; color: var(--ink); font-size: 0.95rem; line-height: 1.35; }
.hub li { border-block-start: 3px solid var(--ink); }
@media (max-width: 760px) { .hub { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.band-photo { margin-block: clamp(2rem, 4vw, 3rem); }
.band-photo img { aspect-ratio: 21 / 8; }
@media (max-width: 640px) { .band-photo img { aspect-ratio: 3 / 2; } }

/* ---------- About page ---------- */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.goals { list-style: none; display: grid; gap: 0.75rem; counter-reset: g; }
.goals li { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: 0.75rem; align-items: baseline; }
.goals .num { font-size: 1.4rem; color: var(--red-ink); }
.climb { list-style: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: auto auto; gap: 0.5rem; margin-block-start: 2rem; }
.climb li { display: grid; grid-row: span 2; grid-template-rows: subgrid; gap: 0.5rem; }
.climb .step { align-self: end; }
.climb p { align-self: start; }
.climb .step { padding: 0.9rem; color: var(--ink); background: var(--sky-hi); border: 1px solid var(--ink); border-block-start: 3px solid var(--ink); min-height: 4.5rem; display: grid; align-content: end; gap: 0.15rem; }
.climb li:nth-child(1) .step { min-height: 5rem; } .climb li:nth-child(2) .step { min-height: 6.5rem; } .climb li:nth-child(3) .step { min-height: 8rem; }
.climb li:nth-child(4) .step { min-height: 9.5rem; } .climb li:nth-child(5) .step { min-height: 11rem; } .climb li:nth-child(6) .step { min-height: 12.5rem; }
.climb .step strong { font-family: var(--f-head); font-size: 1.1rem; color: var(--ink); }
html:not([lang="ar"]) .climb .step strong { font-stretch: 85%; }
.climb .step .mark { font-size: 1rem; color: var(--red-ink); }
.climb p { font-size: 0.9rem; line-height: 1.45; color: var(--ink-2); }
@media (max-width: 860px) {
  .climb { grid-template-columns: 1fr; }
  .climb li { grid-row: auto; grid-template-rows: none; grid-template-columns: 9rem minmax(0, 1fr); align-items: center; }
  .climb li .step { min-height: 0 !important; }
}
.note-box { padding: 1.25rem 1.4rem; border: 1px solid var(--ink); background: var(--sky-hi); }

/* ---------- Mersalk page ---------- */
.app-rows { display: grid; gap: clamp(2.5rem, 5vw, 4rem); margin-block-start: clamp(2rem, 4vw, 3rem); }
.app-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.app-row:nth-child(even) .app-media { order: -1; }
@media (max-width: 860px) { .app-row { grid-template-columns: 1fr; } .app-row:nth-child(even) .app-media { order: 0; } }
.app-head { display: flex; align-items: center; gap: 1rem; margin-block-end: 1rem; }
.app-head img { width: 64px; height: 64px; border-radius: 15px; }
.app-role { font-size: 0.95rem; color: var(--ink-3); }
.app-feats { list-style: none; display: grid; gap: 0.45rem; margin-block: 1rem 1.4rem; }
.app-feats li { position: relative; padding-inline-start: 1.1rem; }
.app-feats li::before { content: ""; position: absolute; inset-inline-start: 0; inset-block-start: 0.7em; width: 7px; height: 2px; background: var(--mersalk); }
.app-media img { width: 100%; max-width: 300px; margin-inline: auto; border-radius: 18px; border: 1px solid var(--steel-300); }
.screens { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; max-width: 520px; margin-inline: auto; }
.screens img { border-radius: 14px; }
.steps4 { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-block-start: 2rem; }
.steps4 li { padding-block-start: 1rem; border-block-start: 3px solid var(--mersalk); }
.steps4 .mark { font-size: 1.8rem; color: var(--mersalk-deep); line-height: 1; display: block; margin-block-end: 0.5rem; }
.steps4 h3 { font-size: 1.1rem; margin-block-end: 0.35rem; }
@media (max-width: 860px) { .steps4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .steps4 { grid-template-columns: 1fr; } }
.videos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 2rem); margin-block-start: 2rem; }
.video { margin: 0; }
.video video { width: 100%; aspect-ratio: 16 / 9; background: var(--ink); border: 1px solid var(--ink); object-fit: contain; }
.video figcaption { margin-block-start: 0.6rem; font-family: var(--f-head); font-weight: 600; color: var(--ink); }
.video-desc { margin-block-start: 0.4rem; font-size: 0.92rem; }
.video-desc summary { cursor: pointer; color: var(--red-ink); font-weight: 600; min-height: 32px; display: inline-flex; align-items: center; }
.video-desc p { margin-block-start: 0.4rem; color: var(--ink-2); max-width: 60ch; }
/* Phones: long service names do not fit in a native select, so the full choice is repeated below it */
.select-full { display: none; margin: 0.35rem 0 0; font-size: 0.86rem; color: var(--ink-2); }
@media (max-width: 639px) { .select-full:not(:empty) { display: block; } }
@media (max-width: 760px) { .videos { grid-template-columns: 1fr; } }

/* ---------- Contact page ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-lines { list-style: none; display: grid; gap: 1rem; margin-block-start: 1.5rem; }
.contact-lines li { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); gap: 0.75rem; align-items: start; }
.contact-lines .icon { width: 1.4rem; height: 1.4rem; color: var(--ink); margin-block-start: 0.2rem; }
.contact-lines a { font-weight: 600; }
.form { display: grid; gap: 1.2rem; padding: clamp(1.25rem, 3vw, 2rem); background: var(--sky-hi); border: 1px solid var(--ink); }
.form .row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
@media (max-width: 600px) { .form .row2 { grid-template-columns: 1fr; } }
.status { display: none; gap: 0.7rem; align-items: flex-start; padding: 1rem 1.1rem; border: 2px solid; font-weight: 500; }
.status:target, .status.is-shown { display: flex; }
.status:focus { outline: 2px solid currentColor; outline-offset: 3px; }
.status .icon { width: 1.4rem; height: 1.4rem; margin-block-start: 0.1rem; }
.status--ok { border-color: var(--green); color: var(--green); background: #eaf4ee; }
.status--err { border-color: var(--red-ink); color: var(--red-ink); background: #fbecee; }
.form-foot { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }

/* ---------- 404 ---------- */
.nf .frame { min-height: 60vh; display: grid; align-content: center; gap: 1.25rem; }
.nf .gap-rail { position: relative; }

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .mast, .bay > .frame::after, .lang-hint { display: none !important; }
  body { background: #fff; }
}
