/* ==========================================================================
   AquaNova — site styles
   Structure: tokens · base · layout · header · hero · infographic · sections
              · services accordion · lifecycle · contact · footer · motion
   All spacing/alignment uses logical properties so one stylesheet serves
   both LTR (English) and RTL (Arabic).
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  /* brand palette (sampled from the AquaNova logo) */
  --navy-950: #051629;
  --navy-900: #072a4e;
  --navy-800: #0b3b6b;
  --blue-700: #0e52a6;
  --blue-600: #1268c7;
  --cyan-500: #0faeeb;
  --cyan-400: #4fc9f5;

  /* semantic tokens — light */
  --bg: #ffffff;
  --bg-alt: #f3f9fd;
  --surface: #ffffff;
  --text: #0b1f30;
  --muted: #46617a;
  --border: #d9e7f1;
  --border-strong: #bcd3e4;
  --accent: #0faeeb;
  --focus: #0b6fa4;
  --brand: #1268c7;
  --ink-deep: #072a4e;
  --btn-bg: #1268c7;
  --btn-bg-hover: #0e52a6;
  --btn-text: #ffffff;
  --chip-bg: #e9f3fa;
  --chip-text: #0b3b6b;
  --header-bg: rgba(255, 255, 255, 0.92);
  --footer-bg: #072a4e;
  --footer-text: #a9c9de;
  --footer-line: #173c64;
  --side-bg: #072a4e;
  --shadow-1: 0 1px 2px rgba(7, 42, 78, 0.06), 0 6px 20px rgba(7, 42, 78, 0.05);
  --shadow-2: 0 2px 4px rgba(7, 42, 78, 0.08), 0 16px 36px rgba(7, 42, 78, 0.12);

  /* shape, motion, type */
  --r-s: 8px;
  --r-m: 14px;
  --r-l: 22px;
  --ease: cubic-bezier(0.22, 0.7, 0.2, 1);
  --gutter: 28px;
  --header-h: 72px;
  --font-head: "Space Grotesk", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-body: "Inter", "IBM Plex Sans Arabic", system-ui, sans-serif;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #061626;
  --bg-alt: #081e33;
  --surface: #0a2038;
  --text: #e9f3fb;
  --muted: #9fc0d6;
  --border: #163350;
  --border-strong: #24506f;
  --accent: #4fc9f5;
  --focus: #4fc9f5;
  --brand: #4fc9f5;
  --ink-deep: #bfe1f4;
  --btn-bg: #4fc9f5;
  --btn-bg-hover: #7ad8f8;
  --btn-text: #04223a;
  --chip-bg: #0e2740;
  --chip-text: #bfe1f4;
  --header-bg: rgba(6, 22, 38, 0.9);
  --footer-bg: #041220;
  --footer-text: #8fb0c6;
  --footer-line: #102a41;
  --side-bg: #08203a;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 14px 34px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

/* Arabic typography: one family for both roles, no letter-spacing (it breaks joining) */
html[lang="ar"] {
  --font-head: "IBM Plex Sans Arabic", "Space Grotesk", system-ui, sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Inter", system-ui, sans-serif;
}

/* ---------- 2. Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html[lang="ar"] body { line-height: 1.85; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4 { letter-spacing: 0; line-height: 1.4; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.ico {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: var(--r-s);
  background: var(--btn-bg); color: var(--btn-text); font-weight: 600; text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---------- 3. Layout ---------- */
.wrap { width: min(100% - 2 * var(--gutter), 1160px); margin-inline: auto; }
@media (max-width: 640px) { :root { --gutter: 20px; } }

.section { padding-block: clamp(64px, 9vw, 112px); }
.section--alt { background: var(--bg-alt); }

.section-head { max-width: 700px; margin-block-end: clamp(32px, 5vw, 52px); }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); }
.section-head .lede { margin-block-start: 16px; font-size: 17px; color: var(--muted); max-width: 58ch; }

.eyebrow {
  display: flex; align-items: center; gap: 10px;
  margin-block-end: 14px;
  color: var(--brand); font-size: 14px; font-weight: 600;
}
.eyebrow::before {
  content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--accent);
}

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px;
  border: 1px solid transparent; border-radius: 10px;
  font-family: var(--font-body); font-size: 15px; font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease),
    color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-primary { background: var(--btn-bg); color: var(--btn-text); }
.btn-primary:hover { background: var(--btn-bg-hover); box-shadow: 0 8px 18px rgba(18, 104, 199, 0.28); }
:root[data-theme="dark"] .btn-primary:hover { box-shadow: 0 8px 20px rgba(79, 201, 245, 0.22); }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: var(--bg-alt); border-color: var(--accent); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }

/* ---------- 5. Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--border); box-shadow: 0 6px 20px rgba(7, 42, 78, 0.06); }
.header-row { display: flex; align-items: center; gap: 18px; min-height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; text-decoration: none; }
.brand-mark { height: 34px; width: auto; border-radius: 8px; transition: transform 0.3s var(--ease); }
.brand:hover .brand-mark { transform: rotate(-3deg) scale(1.04); }
:root[data-theme="dark"] .brand-mark { background: #fff; padding: 3px 6px; }
.brand-name { font-family: var(--font-head); font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
html[lang="ar"] .brand-name { letter-spacing: 0; }

.main-nav { margin-inline-start: auto; }
.nav-list { display: flex; align-items: center; gap: 26px; }
.nav-link {
  position: relative; display: inline-block; padding-block: 6px;
  color: var(--muted); font-size: 15px; font-weight: 500; text-decoration: none;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ease);
}
html[dir="rtl"] .nav-link::after { transform-origin: right; }
.nav-link:hover,
.nav-link.is-active { color: var(--text); }
.nav-link:hover::after,
.nav-link.is-active::after { transform: scaleX(1); }
.nav-cta-item { margin-inline-start: 4px; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-toggle,
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s var(--ease);
}
.lang-toggle { padding: 0 14px; font-size: 14px; font-weight: 600; }
.icon-btn { width: 40px; }
.lang-toggle:hover,
.icon-btn:hover { border-color: var(--accent); background: var(--bg-alt); }
.lang-toggle:active,
.icon-btn:active { transform: scale(0.95); }
.lang-toggle .ico { width: 16px; height: 16px; color: var(--brand); }
.icon-btn .ico { width: 19px; height: 19px; }

.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
.theme-toggle.is-turning .ico { animation: icon-turn 0.5s var(--ease); }

.menu-btn { display: none; flex-direction: column; gap: 4px; }
.menu-btn span {
  display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform 0.3s var(--ease), opacity 0.2s ease;
}
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 960px) {
  .menu-btn { display: inline-flex; }
  .main-nav {
    position: absolute; inset-inline: 0; top: 100%; margin: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-2);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0s linear 0.25s;
  }
  .main-nav.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-link { display: block; padding: 14px 4px; border-bottom: 1px solid var(--border); font-size: 16px; }
  .nav-link::after { display: none; }
  .nav-cta-item { margin: 18px 0 0; }
  .nav-cta-item .btn { width: 100%; }
}

@media (max-width: 520px) {
  .header-row { gap: 10px; }
  .header-actions { gap: 6px; }
  .brand { gap: 8px; }
  .brand-mark { height: 30px; }
  .brand-name { font-size: 17px; }
  .lang-toggle { padding: 0 11px; }
  .lang-toggle .ico { display: none; }
  .lang-toggle, .icon-btn { height: 38px; }
  .icon-btn { width: 38px; }
}
@media (max-width: 370px) {
  .brand-name { display: none; }   /* the logo mark carries the brand; the link keeps its aria-label */
}

/* ---------- 6. Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding-block: clamp(40px, 7vw, 84px) clamp(28px, 4vw, 48px);
}
.hero-ripples {
  position: absolute; inset-inline-end: -170px; top: -150px; z-index: 0;
  width: 600px; height: 600px; color: var(--accent); opacity: 0.16; pointer-events: none;
}
.hero-ripples circle { fill: none; stroke: currentColor; stroke-width: 1.2; }
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 64px); align-items: center;
}
.hero-scope {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  margin-block-end: 22px; color: var(--muted); font-size: 14px; font-weight: 600;
}
.hero-scope .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.hero h1 { font-size: clamp(36px, 5.2vw, 60px); line-height: 1.05; max-width: 14ch; }
html[lang="ar"] .hero h1 { line-height: 1.3; max-width: 16ch; }
.hero .lede { margin-block-start: 22px; max-width: 48ch; color: var(--muted); font-size: 18px; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-block-start: 34px; }

.hero-media {
  position: relative; margin: 0; overflow: hidden;
  aspect-ratio: 3 / 2; border-radius: var(--r-l);
  background: var(--bg-alt); border: 1px solid var(--border); box-shadow: var(--shadow-2);
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { aspect-ratio: 16 / 10; }
}

/* ---------- 7. Treatment-train infographic ---------- */
.train-card {
  position: relative;
  margin-block-start: clamp(32px, 5vw, 56px);
  padding: clamp(24px, 3.5vw, 40px) clamp(16px, 3vw, 36px) clamp(30px, 4vw, 46px);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-l);
  box-shadow: var(--shadow-1);
}
.train-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 4px 24px; margin-block-end: clamp(26px, 4vw, 42px);
}
.train-title { font-size: 19px; }
.train-sub { color: var(--muted); font-size: 14.5px; }

.train {
  --b: 76px;   /* badge diameter */
  --g: 12px;   /* gap between badge edge and arrow */
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
}
.stage {
  position: relative; display: flex; flex-direction: column; align-items: center;
  padding-inline: 6px; text-align: center;
}
.badge {
  position: relative; flex: none;
  display: grid; place-items: center;            /* icon is centred by construction */
  width: var(--b); height: var(--b); border-radius: 50%;
  background: var(--surface); border: 2px solid var(--border-strong); color: var(--ink-deep);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease),
    background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.badge .ico { width: calc(var(--b) * 0.4); height: calc(var(--b) * 0.4); }
.badge .num {
  position: absolute; top: -5px; inset-inline-start: -5px;
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--btn-bg); color: var(--btn-text);
  font: 600 12px/1 var(--font-head);
}
.stage--key .badge { border-color: var(--accent); background: var(--chip-bg); }
.stage--out .badge { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-text); }
.stage--out .badge .num { background: var(--surface); color: var(--ink-deep); border: 1px solid var(--border-strong); }
.stage:hover .badge { transform: translateY(-3px); border-color: var(--accent); }

.stage-text { min-width: 0; }
.stage-title { margin-block-start: 16px; font-family: var(--font-head); font-size: 16px; font-weight: 600; line-height: 1.3; }
.stage-sub { margin-block-start: 4px; color: var(--muted); font-size: 13.5px; line-height: 1.45; }

/* connector: always sits on the badge centre line, mirrored in RTL */
.link {
  position: absolute; pointer-events: none; color: var(--accent);
  top: calc(var(--b) / 2 - 1px);
  inset-inline-start: calc(50% + var(--b) / 2 + var(--g));
  width: calc(100% - var(--b) - var(--g) * 2);
  height: 2px;
}
.link::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, currentColor 0 6px, transparent 6px 11px);
  animation: flow-x 1.1s linear infinite;
}
html[dir="rtl"] .link::before { animation-direction: reverse; }
.link::after {
  content: ""; position: absolute; inset-inline-end: -1px; top: 50%;
  width: 9px; height: 9px;
  border-top: 2px solid currentColor; border-inline-end: 2px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}
html[dir="rtl"] .link::after { transform: translateY(-50%) rotate(-45deg); }
.stage:last-child .link { display: none; }

/* reuse loop: dashed return path from the last stage back to the first */
.reuse {
  position: relative; height: 46px; margin: 28px 10% 22px;
  border: 2px dashed var(--accent); border-top: 0; border-radius: 0 0 18px 18px;
}
.reuse::before {
  content: ""; position: absolute; inset-inline-start: -4px; top: -3px;
  width: 10px; height: 10px;
  border-top: 2px solid var(--accent); border-inline-start: 2px solid var(--accent);
  transform: rotate(45deg);
}
html[dir="rtl"] .reuse::before { transform: rotate(-45deg); }
.reuse-label {
  position: absolute; left: 50%; bottom: 0; transform: translate(-50%, 50%);
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 7px 16px; border: 1px solid var(--accent); border-radius: 999px;
  background: var(--surface); color: var(--text); font-size: 13.5px; font-weight: 600;
}
.reuse-label .ico { width: 16px; height: 16px; color: var(--brand); }

/* smaller variant used inside the odor-control panel */
.train--sm { --b: 52px; --g: 8px; }
.train--sm .badge .num { width: 20px; height: 20px; font-size: 11px; top: -6px; inset-inline-start: -6px; }
.train--sm .stage-title { margin-block-start: 12px; font-size: 14px; }

@media (max-width: 960px) {
  .train { --b: 64px; }
  .train--sm { --b: 46px; }
  .stage-title { font-size: 15px; }
}

@media (max-width: 760px) {
  .train, .train--sm { grid-template-columns: 1fr; --b: 56px; --g: 8px; }
  .stage { flex-direction: row; align-items: flex-start; gap: 16px; padding: 0 0 34px; text-align: start; }
  .stage:last-child { padding-block-end: 0; }
  .stage-title, .train--sm .stage-title { margin-block-start: 0; padding-block-start: 4px; font-size: 16px; }
  .link {
    top: calc(var(--b) + var(--g)); inset-inline-start: calc(var(--b) / 2 - 1px);
    width: 2px; height: calc(100% - var(--b) - var(--g) * 2);
  }
  .link::before {
    background: repeating-linear-gradient(180deg, currentColor 0 6px, transparent 6px 11px);
    animation-name: flow-y;
  }
  html[dir="rtl"] .link::before { animation-direction: normal; }
  .link::after {
    inset-inline-end: auto; top: auto; bottom: -1px; left: 50%;
    border: 0; border-top: 2px solid currentColor; border-right: 2px solid currentColor;
  }
  .link::after,
  html[dir="rtl"] .link::after { transform: translateX(-50%) rotate(135deg); }
  .reuse {
    display: flex; justify-content: center; height: auto; margin: 26px 0 0;
    border: 0; border-radius: 0;
  }
  .reuse::before { display: none; }
  .reuse-label { position: static; transform: none; white-space: normal; text-align: center; }
}

/* ---------- 8. About ---------- */
.about-grid {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(32px, 6vw, 72px); align-items: start;
}
.about-block + .about-block { margin-block-start: 28px; padding-block-start: 26px; border-top: 1px solid var(--border); }
.about-block h3 { margin-block-end: 8px; color: var(--brand); font-size: 15px; font-weight: 600; }
.about-block p { color: var(--muted); }
.about-block .about-lead { color: var(--text); font-size: 18px; line-height: 1.7; }
.values {
  padding: clamp(24px, 3vw, 34px);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-l);
  box-shadow: var(--shadow-1);
}
.values h3 { margin-block-end: 18px; font-size: 17px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  padding: 8px 14px; border-radius: 999px;
  background: var(--chip-bg); color: var(--chip-text); font-size: 14px; font-weight: 500;
  transition: transform 0.2s var(--ease), background-color 0.2s ease;
}
.pill:hover { transform: translateY(-2px); }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } }

/* ---------- 9. Services accordion ---------- */
.svc-list { position: relative; padding-inline-start: 46px; }
.svc-list::before {
  content: ""; position: absolute; inset-inline-start: 15px; top: 14px; bottom: 14px;
  width: 2px; border-radius: 2px; background: var(--border-strong);
}
.svc-item { position: relative; border-bottom: 1px solid var(--border); }
.svc-item:first-child { border-top: 1px solid var(--border); }
.svc-item::before {
  content: ""; position: absolute; z-index: 1; inset-inline-start: -37px; top: 28px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg-alt); border: 2px solid var(--border-strong);
  transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease);
}
.svc-item.is-open::before { background: var(--accent); border-color: var(--accent); transform: scale(1.2); }

.svc-heading { margin: 0; font-size: inherit; }
.svc-trigger {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 22px 4px; border: 0; border-radius: var(--r-s);
  background: none; text-align: start; cursor: pointer;
}
.svc-num { flex: none; width: 26px; color: var(--muted); font: 600 13px/1 var(--font-head); }
.svc-title {
  flex: 1; min-width: 0; font-family: var(--font-head); font-size: clamp(17px, 2vw, 19.5px);
  font-weight: 600; transition: color 0.25s ease;
}
.svc-trigger:hover .svc-title,
.svc-item.is-open .svc-title { color: var(--brand); }
.svc-plus {
  position: relative; flex: none; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--border-strong);
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.4s var(--ease);
}
.svc-plus::before,
.svc-plus::after {
  content: ""; position: absolute; top: 50%; left: 50%; background: var(--muted);
  transform: translate(-50%, -50%); transition: transform 0.35s var(--ease), background-color 0.25s ease;
}
.svc-plus::before { width: 11px; height: 1.6px; }
.svc-plus::after { width: 1.6px; height: 11px; }
.svc-trigger:hover .svc-plus { border-color: var(--accent); }
.svc-item.is-open .svc-plus { background: var(--btn-bg); border-color: var(--btn-bg); }
.svc-item.is-open .svc-plus::before { background: var(--btn-text); }
.svc-item.is-open .svc-plus::after { background: var(--btn-text); transform: translate(-50%, -50%) scaleY(0); }

.svc-panel {
  display: grid; grid-template-rows: 0fr; visibility: hidden;
  transition: grid-template-rows 0.42s var(--ease), visibility 0s linear 0.42s;
}
.svc-item.is-open .svc-panel { grid-template-rows: 1fr; visibility: visible; transition-delay: 0s; }
.svc-panel-inner { min-height: 0; overflow: hidden; }

.svc-content {
  display: grid; gap: 26px clamp(28px, 4vw, 52px);
  padding: 2px 4px 34px; padding-inline-start: 44px;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.3s var(--ease), transform 0.4s var(--ease);
}
.svc-item.is-open .svc-content { opacity: 1; transform: none; transition-delay: 0.1s; }
.svc-content.has-media { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; }
.svc-content.has-media.is-portrait { grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.72fr); }
.svc-body { display: grid; gap: 22px; min-width: 0; }
.svc-wide { grid-column: 1 / -1; }
.svc-lead { max-width: 64ch; color: var(--muted); font-size: 16px; line-height: 1.7; }
.svc-group h4 { margin-block-end: 10px; color: var(--text); font-size: 14px; font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--r-s);
  background: var(--surface); color: var(--text); font-size: 14px; line-height: 1.45;
}
.bullets { display: grid; gap: 8px; }
.bullets li { position: relative; padding-inline-start: 22px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.bullets li::before {
  content: ""; position: absolute; inset-inline-start: 4px; top: 0.7em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}
.svc-note { padding-inline-start: 16px; border-inline-start: 3px solid var(--accent); }
.svc-note h4 { margin-block-end: 6px; font-size: 15px; }
.svc-note p { color: var(--muted); font-size: 15px; line-height: 1.7; }
.svc-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.svc-media {
  position: relative; margin: 0; overflow: hidden; aspect-ratio: 4 / 3;
  border: 1px solid var(--border); border-radius: var(--r-m); background: var(--bg-alt);
  box-shadow: var(--shadow-1);
}
.svc-media img { width: 100%; height: 100%; object-fit: cover; }
.js .svc-media img { opacity: 0; transform: scale(1.03); transition: opacity 0.5s var(--ease), transform 0.9s var(--ease); animation: reveal-fallback 0.01s linear 3s forwards; }
.js .svc-media img.is-loaded { opacity: 1; transform: none; }
.svc-media--portrait { aspect-ratio: 424 / 585; width: 100%; max-width: 340px; justify-self: end; }

@media (max-width: 860px) {
  .svc-content.has-media,
  .svc-content.has-media.is-portrait { grid-template-columns: 1fr; }
  .svc-media { order: -1; }
  .svc-media--portrait { max-width: 280px; justify-self: start; }
}
@media (max-width: 640px) {
  .svc-list { padding-inline-start: 34px; }
  .svc-list::before { inset-inline-start: 9px; }
  .svc-item::before { inset-inline-start: -31px; }
  .svc-content { padding-inline-start: 4px; }
}

/* ---------- 10. Lifecycle ---------- */
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 36px 0; }
.steps li { padding-inline-end: 20px; }
.t-top { display: flex; align-items: center; margin-block-end: 16px; }
.t-num {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--btn-bg); color: var(--btn-text); font: 600 14px/1 var(--font-head);
}
.t-rule { flex: 1; height: 2px; margin-inline-start: 10px; background: var(--border-strong); }
.steps li:nth-child(5n) .t-rule { display: none; }
.t-body h3 { margin-block-end: 6px; font-size: 16px; }
.t-body p { color: var(--muted); font-size: 14px; line-height: 1.55; }

@media (max-width: 960px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps li:nth-child(5n) .t-rule { display: block; }
  .steps li:nth-child(2n) .t-rule { display: none; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps li { position: relative; display: grid; grid-template-columns: 36px 1fr; column-gap: 16px; padding: 0 0 26px; }
  .steps li::before {
    content: ""; position: absolute; inset-inline-start: 17px; top: 40px; bottom: 2px;
    width: 2px; background: var(--border-strong);
  }
  .steps li:last-child::before { display: none; }
  .t-top { margin: 0; }
  .steps .t-rule { display: none; }
}

/* ---------- 11. Why AquaNova ---------- */
.why-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(28px, 5vw, 64px); border-bottom: 1px solid var(--border);
}
.why-item { display: flex; gap: 16px; padding-block: 22px; border-top: 1px solid var(--border); }
.why-mark {
  flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--chip-bg); color: var(--brand);
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.3s var(--ease);
}
.why-item:hover .why-mark { background: var(--btn-bg); color: var(--btn-text); transform: scale(1.06); }
.why-mark .ico { width: 17px; height: 17px; stroke-width: 2.2; }
.why-item h3 { margin-block-end: 4px; font-size: 17px; }
.why-item p { color: var(--muted); font-size: 14.5px; }
.commitment {
  max-width: 54ch; margin-block-start: 44px; padding-inline-start: 20px;
  border-inline-start: 3px solid var(--accent);
  font-family: var(--font-head); font-size: clamp(20px, 2.4vw, 26px); line-height: 1.5;
}
@media (max-width: 720px) { .why-grid { grid-template-columns: 1fr; } }

/* ---------- 12. Quote / contact ---------- */
.quote-steps { display: flex; flex-wrap: wrap; gap: 28px; margin-block-end: 48px; }
.quote-step { flex: 1 1 220px; min-width: 200px; }
.quote-step .qs-num { margin-block-end: 8px; color: var(--accent); font: 600 28px/1 var(--font-head); }
:root[data-theme="light"] .quote-step .qs-num { color: var(--brand); }
.quote-step h3 { margin-block-end: 6px; font-size: 17px; }
.quote-step p { color: var(--muted); font-size: 14.5px; }

.quote-panel {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr);
  overflow: hidden; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-l); box-shadow: var(--shadow-1);
}
.quote-side { position: relative; overflow: hidden; padding: clamp(30px, 4vw, 46px); background: var(--side-bg); color: #fff; }
.quote-ripples {
  position: absolute; inset-inline-end: -120px; bottom: -140px; width: 380px; height: 380px;
  color: #7fcbee; opacity: 0.14; pointer-events: none;
}
.quote-ripples circle { fill: none; stroke: currentColor; stroke-width: 1.2; }
.quote-side > :not(.quote-ripples) { position: relative; }
.quote-side h3 { margin-block-end: 12px; color: #fff; font-size: 24px; }
.quote-side .side-tag { margin-block-end: 6px; color: #eaf6fd; font-weight: 500; }
.quote-side .side-scope { margin-block-end: 28px; color: #b6d5e9; font-size: 14.5px; line-height: 1.7; }
.contact-line { display: flex; align-items: flex-start; gap: 12px; margin-block-end: 18px; }
.contact-line .ico { width: 19px; height: 19px; margin-block-start: 3px; color: #7fcbee; }
.contact-line a,
.contact-line span { color: #eaf6fd; font-size: 15px; line-height: 1.55; text-decoration: none; }
.contact-line a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.side-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-block-start: 26px; }
.wa-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 10px;
  background: rgba(255, 255, 255, 0.08); color: #fff; font-size: 14.5px; font-weight: 600; text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s var(--ease), border-color 0.2s ease;
}
.wa-btn:hover { background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.5); transform: translateY(-1px); }
.wa-btn:active { transform: scale(0.97); }
.wa-btn .ico { width: 18px; height: 18px; }

.social-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3); color: #fff; text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s var(--ease);
}
.social-btn:hover { background: #1877f2; border-color: #1877f2; transform: translateY(-2px); }
.social-btn:active { transform: scale(0.93); }
.social-btn .ico { width: 20px; height: 20px; stroke-width: 2; }

.quote-form { padding: clamp(30px, 4vw, 46px); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-block-end: 18px; }
.form-row--one { grid-template-columns: 1fr; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { color: var(--muted); font-size: 14px; font-weight: 600; }
.field input,
.field select,
.field textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--border-strong); border-radius: 10px;
  background: var(--bg); color: var(--text); font: inherit; font-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease;
}
.field textarea { min-height: 104px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(15, 174, 235, 0.22); }
.field input:user-invalid,
.field textarea:user-invalid { border-color: #d14343; }
.field input[dir="ltr"] { text-align: start; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.form-note { margin-block-start: 14px; color: var(--muted); font-size: 13px; }
.form-status { min-height: 1.6em; margin-block-start: 10px; color: var(--muted); font-size: 14px; }
.form-status a { color: var(--brand); font-weight: 600; }

@media (max-width: 860px) { .quote-panel { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }

/* ---------- 13. Footer ---------- */
.footer-wave { display: block; width: 100%; height: clamp(28px, 4vw, 56px); margin-block: clamp(40px, 6vw, 80px) -2px; color: var(--footer-bg); }
.site-footer { padding: 36px 0 28px; background: var(--footer-bg); color: var(--footer-text); }
.footer-top {
  display: grid; grid-template-columns: 1.3fr 1fr 1.2fr; gap: 48px;
  padding-block-end: 40px; border-bottom: 1px solid var(--footer-line);
}
.footer-logo-plate { display: inline-block; margin-block-end: 18px; padding: 12px 16px; border-radius: var(--r-m); background: #fff; }
.footer-logo-plate img { height: 74px; width: auto; }
.footer-brand p { max-width: 36ch; font-size: 14.5px; line-height: 1.75; }
.site-footer h4 { margin-block-end: 16px; color: #fff; font-size: 15px; }
.site-footer ul { display: grid; gap: 11px; }
.site-footer li a { color: var(--footer-text); font-size: 14.5px; text-decoration: none; transition: color 0.2s ease; }
.site-footer li a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.site-footer li { font-size: 14.5px; }
.footer-social { margin-block-start: 22px; }
.footer-social h4 { margin-block-end: 12px; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-block-start: 24px; font-size: 13px; }
@media (max-width: 780px) { .footer-top { grid-template-columns: 1fr; gap: 34px; } }

/* ---------- 14. Motion ---------- */
@keyframes flow-x { to { background-position: 11px 0; } }
@keyframes flow-y { to { background-position: 0 11px; } }
@keyframes icon-turn { from { transform: rotate(-90deg) scale(0.6); opacity: 0.2; } to { transform: none; opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(15, 174, 235, 0.5); }
  70% { box-shadow: 0 0 0 14px rgba(15, 174, 235, 0); }
  100% { box-shadow: 0 0 0 0 rgba(15, 174, 235, 0); }
}
@keyframes reveal-fallback { to { opacity: 1; transform: none; } }

/* hero: one orchestrated entrance */
.js .hero-copy > * { animation: rise 0.7s var(--ease) both; }
.js .hero-copy > :nth-child(1) { animation-delay: 0.05s; }
.js .hero-copy > :nth-child(2) { animation-delay: 0.12s; }
.js .hero-copy > :nth-child(3) { animation-delay: 0.2s; }
.js .hero-copy > :nth-child(4) { animation-delay: 0.28s; }
.js .hero-media { animation: rise 0.9s var(--ease) 0.2s both; }

/* the process lights up once, in order, when it scrolls into view */
.train.is-in .badge { animation: pulse-ring 1.1s var(--ease) both; animation-delay: calc(var(--i, 0) * 0.18s); }

/* restrained reveal for major blocks (visible without JS, with a timed fail-safe) */
.js .reveal {
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  animation: reveal-fallback 0.01s linear 3s forwards;
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* theme switch: animate colours only, only while switching */
html.theme-anim,
html.theme-anim *,
html.theme-anim *::before,
html.theme-anim *::after {
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease,
    fill 0.4s ease, stroke 0.4s ease, box-shadow 0.4s ease !important;
}

/* language switch: quick fade of translatable regions */
main, .site-footer, .nav-list, .brand-name, .lang-label { transition: opacity 0.24s ease, transform 0.24s ease; }
html.lang-out main,
html.lang-out .site-footer,
html.lang-out .nav-list,
html.lang-out .brand-name,
html.lang-out .lang-label { opacity: 0; transform: translateY(5px); transition-duration: 0.16s; }

/* avoid a flash of English when the page opens in Arabic */
html.i18n-pending body { visibility: hidden; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; transition-delay: 0s !important;
  }
  .link::before { animation: none; }
  .js .reveal,
  .js .svc-media img { opacity: 1; transform: none; }
}
