/* Layout concept: one long rooftop at night turning to day. Navy panels and silver frame lines everywhere, the amber sun is the only warm colour and marks what to press. Content aligns to the reading side (right in Arabic, left in English). */
:root {
  --navy: #0B1B33;      /* page ground, deep panel navy */
  --deep: #071226;      /* recessed surfaces */
  --cell: #13294B;      /* panel cell blue */
  --line: #2A4A7A;      /* silver-blue grid lines */
  --frame: #8FA3C2;     /* aluminium frame */
  --sun: #F5A524;       /* sun amber: actions and energy */
  --sun-soft: #FFD98A;
  --ink: #EEF2F7;       /* soft white text */
  --muted: #9DB0CB;
  --rule: rgba(157, 176, 203, .16);
  --on-sun: #1B1203;

  --display: "Alexandria", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --body: "IBM Plex Sans Arabic", "Alexandria", system-ui, sans-serif;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --r: 6px;
  --head: 72px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--navy);
  color: var(--ink);
  font: 400 1.0625rem/1.75 var(--body);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 60; background: var(--navy);
}

/* Bilingual: every text exists twice, the inactive language hides */
html[lang="ar"] body [lang="en"], html[lang="en"] body [lang="ar"] { display: none !important; }

img, svg { max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--sun); outline-offset: 3px; border-radius: 3px; }
::selection { background: var(--sun); color: var(--on-sun); }

.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.sec { padding-block: clamp(88px, 12vw, 168px); position: relative; }
.sec-head { display: grid; gap: 18px; margin-block-end: clamp(40px, 6vw, 72px); max-width: 760px; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h2 { font-size: clamp(2rem, 4.6vw, 3.5rem); line-height: 1.15; font-weight: 700; }
h3 { font-size: 1.35rem; line-height: 1.35; font-weight: 600; }
p { margin: 0; }
.lede { color: var(--muted); font-size: clamp(1.05rem, 1.5vw, 1.2rem); max-width: 56ch; }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; }

/* Split headline words (spaces only, Arabic letters must stay joined) */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-block: .08em; margin-block: -.08em; }
.wi { display: inline-block; will-change: transform; }

/* ---------- Buttons with press feedback ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 52px; padding: .8em 1.4em;
  border-radius: var(--r); border: 1px solid transparent;
  font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none;
  cursor: pointer; position: relative; overflow: hidden; isolation: isolate;
  transition: transform .18s var(--ease), background-color .25s, border-color .25s, color .25s;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:active { transform: scale(.965); transition-duration: .08s; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-sun { background: var(--sun); color: var(--on-sun); }
.btn-sun::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .5) 50%, transparent 70%);
  transform: translateX(-110%); transition: transform .7s var(--ease);
}
.btn-sun:hover::after { transform: translateX(110%); }
.btn-line { border-color: rgba(157, 176, 203, .35); color: var(--ink); background: rgba(7, 18, 38, .35); backdrop-filter: blur(6px); }
.btn-line:hover { border-color: var(--sun); }
.ripple {
  position: absolute; border-radius: 50%; pointer-events: none; z-index: -1;
  width: 16px; height: 16px; margin: -8px 0 0 -8px;
  background: currentColor; opacity: .28;
  animation: ripple .65s var(--ease) forwards;
}
@keyframes ripple { to { transform: scale(26); opacity: 0; } }

/* ---------- Header ---------- */
.site-head {
  position: fixed; inset-inline: 0; top: env(safe-area-inset-top, 0px); z-index: 50;
  transition: background-color .35s, border-color .35s, backdrop-filter .35s;
  border-block-end: 1px solid transparent;
}
.site-head.scrolled { background: rgba(7, 18, 38, .78); backdrop-filter: blur(14px); border-color: var(--rule); }
.head-row { height: var(--head); display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.1rem; }
.brand svg { width: 34px; height: 34px; color: var(--frame); }
.nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav a { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: var(--r); font-size: .95rem; transition: color .2s, background-color .2s; }
.nav a:hover { color: var(--ink); background: rgba(157, 176, 203, .08); }
.head-tools { display: flex; align-items: center; gap: 8px; }
.lang-btn {
  min-width: 48px; height: 40px; padding: 0 12px; border-radius: var(--r);
  background: transparent; border: 1px solid var(--rule); cursor: pointer; font-weight: 600;
  transition: border-color .2s, transform .15s var(--ease);
}
.lang-btn:hover { border-color: var(--frame); }
.lang-btn:active { transform: scale(.94); }
.head-cta { min-height: 40px; padding: .5em 1em; font-size: .92rem; }
.menu-btn { display: none; width: 44px; height: 40px; border-radius: var(--r); background: transparent; border: 1px solid var(--rule); cursor: pointer; place-items: center; }
.menu-btn span { display: block; width: 18px; height: 2px; background: var(--ink); position: relative; transition: transform .3s var(--ease); }
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; inset-inline: 0; height: 2px; background: var(--ink); transition: transform .3s var(--ease); }
.menu-btn span::before { top: -6px; } .menu-btn span::after { top: 6px; }
.menu-open .menu-btn span { background: transparent; }
.menu-open .menu-btn span::before { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-btn span::after { transform: translateY(-6px) rotate(-45deg); }
.progress { position: absolute; inset-inline: 0; bottom: -1px; height: 2px; background: var(--sun); transform: scaleX(0); transform-origin: left; }
[dir="rtl"] .progress { transform-origin: right; }

/* ---------- Hero: the 3D array ---------- */
.hero { position: relative; height: 100svh; min-height: 640px; overflow: hidden; background: linear-gradient(180deg, #06122A 0%, #0A1A33 55%, #0D2140 100%); }
.sky-glow {
  position: absolute; inset: 0; pointer-events: none; opacity: .9;
  background: radial-gradient(60% 50% at var(--gx, 20%) var(--gy, 75%), rgba(245, 165, 36, .16), transparent 70%);
}
.sun {
  position: absolute; inset-inline-end: 8%; top: 70%; width: clamp(70px, 8vw, 120px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, #FFF1C9 0 28%, #FFC45A 48%, #F5A524 60%, rgba(245, 165, 36, 0) 71%);
  box-shadow: 0 0 120px 50px rgba(245, 165, 36, .22);
  will-change: transform;
}
.horizon { position: absolute; inset-inline: 0; bottom: 0; height: 38%; background: linear-gradient(180deg, transparent, rgba(7, 18, 38, .9)); pointer-events: none; z-index: 1; }
.stage { position: absolute; inset: 0; perspective: 1500px; perspective-origin: 50% 20%; display: grid; place-items: center; pointer-events: none; }
.tilt { transform-style: preserve-3d; will-change: transform; }
.array {
  --cols: 6;
  direction: ltr;
  display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: clamp(6px, .7vw, 12px);
  width: min(1000px, 76vw);
  transform-style: preserve-3d;
  transform: translate(20%, 8%) rotateX(54deg) rotateZ(-20deg);
}
[dir="rtl"] .array { transform: translate(-20%, 8%) rotateX(54deg) rotateZ(20deg); }
.array::before {
  content: ""; position: absolute; inset: -4% -3%; transform: translateZ(-46px);
  background: rgba(2, 6, 16, .55); filter: blur(28px); border-radius: 20px;
}
.panel { --lit: .85; --sheen: 0%; position: relative; aspect-ratio: 1 / 1.55; transform-style: preserve-3d; will-change: transform; }
.face {
  position: absolute; inset: 0; border-radius: 3px; overflow: hidden;
  border: 3px solid var(--frame);
  background-image:
    linear-gradient(90deg, rgba(42, 74, 122, .95) 1px, transparent 1px),
    linear-gradient(rgba(42, 74, 122, .95) 1px, transparent 1px),
    linear-gradient(160deg, #193A6B 0%, #102649 55%, #0B1D3A 100%);
  background-size: 16.666% 100%, 100% 10%, 100% 100%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
  backface-visibility: hidden;
}
.face::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .22) 50%, transparent 62%);
  background-size: 300% 100%; background-position: var(--sheen) 0; background-repeat: no-repeat;
}
.face::after {
  content: ""; position: absolute; inset: 0; mix-blend-mode: screen; opacity: var(--lit);
  background: linear-gradient(130deg, rgba(255, 214, 120, 0) 15%, rgba(255, 190, 80, .5) 45%, rgba(245, 165, 36, .14) 65%, rgba(255, 214, 120, 0) 85%);
}

.hero-scrim { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(6, 18, 42, .92) 0%, rgba(6, 18, 42, .55) 38%, transparent 62%); }
[dir="rtl"] .hero-scrim { background: linear-gradient(270deg, rgba(6, 18, 42, .92) 0%, rgba(6, 18, 42, .55) 38%, transparent 62%); }
.hero-copy { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 26px; padding-block: calc(var(--head) + 24px) 64px; }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 5.6rem); line-height: 1.08; font-weight: 800; max-width: 11ch; }
.hero .lede { color: #C6D3E5; max-width: 44ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { display: flex; align-items: center; gap: 12px; color: var(--sun-soft); font-weight: 500; }
.hero-note::before { content: ""; width: 28px; height: 2px; background: var(--sun); }
.scroll-cue { position: absolute; z-index: 2; bottom: 28px; inset-inline-start: 50%; translate: -50% 0; display: grid; justify-items: center; gap: 10px; color: var(--muted); font-size: .85rem; }
[dir="rtl"] .scroll-cue { translate: 50% 0; }
.scroll-cue i { width: 2px; height: 42px; background: linear-gradient(var(--sun), transparent); animation: cue 2.2s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- Projects (horizontal on desktop) ---------- */
.projects { overflow: hidden; }
.projects .sec-head { margin-block-end: 48px; }
.track-wrap { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.track-wrap::-webkit-scrollbar { display: none; }
.track { display: flex; gap: 24px; width: max-content; padding-inline: max(20px, calc((100vw - 1240px) / 2 + 20px)); padding-block-end: 8px; }
.pcard {
  width: min(430px, 80vw); flex: none; scroll-snap-align: center;
  background: var(--deep); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden;
  display: grid; transition: border-color .3s, transform .35s var(--ease);
}
.pcard:hover { border-color: rgba(245, 165, 36, .45); transform: translateY(-4px); }
.photo {
  aspect-ratio: 4 / 3; position: relative; overflow: hidden; display: grid; place-items: center; align-content: center; gap: 10px;
  color: var(--muted); font-size: .9rem;
  background: repeating-linear-gradient(135deg, rgba(42, 74, 122, .32) 0 2px, transparent 2px 14px), var(--cell);
  border-block-end: 1px solid var(--rule);
}
.photo svg { width: 34px; height: 34px; color: var(--frame); transition: transform .5s var(--ease); }
.pcard:hover .photo svg { transform: scale(1.12); }
.pbody { padding: 22px 24px 26px; display: grid; gap: 14px; }
.ptop { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pkw { font-size: clamp(2.4rem, 4vw, 3.2rem); font-weight: 700; line-height: 1; color: var(--ink); }
.pkw small { font-size: .38em; color: var(--sun); margin-inline-start: .3em; font-weight: 600; }
.tag { font-size: .78rem; color: var(--muted); border: 1px solid var(--rule); border-radius: 4px; padding: 2px 8px; white-space: nowrap; }
.pspecs { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 0; font-size: .95rem; }
.pspecs dt { color: var(--muted); }
.pspecs dd { margin: 0; font-variant-numeric: tabular-nums; }

/* ---------- Brands strip ---------- */
.brands { padding-block: 56px; border-block: 1px solid var(--rule); background: var(--deep); }
.brands-row { display: flex; align-items: center; gap: 40px; }
.brands h3 { font-size: 1rem; color: var(--muted); font-weight: 500; flex: none; font-family: var(--body); }
.marquee { overflow: hidden; flex: 1; min-width: 0; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.mtrack { display: flex; gap: 16px; width: max-content; animation: marquee 38s linear infinite; }
[dir="rtl"] .mtrack { animation-name: marquee-rtl; }
.marquee:hover .mtrack { animation-play-state: paused; }
.logo-slot { width: 168px; height: 64px; flex: none; display: grid; place-items: center; border: 1px dashed rgba(157, 176, 203, .3); border-radius: var(--r); color: var(--muted); font-size: .85rem; }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes marquee-rtl { to { transform: translateX(50%); } }

/* ---------- Energy flow (pinned) ---------- */
.flow { min-height: 100svh; display: grid; align-items: center; background: radial-gradient(80% 60% at 70% 50%, rgba(19, 41, 75, .9), var(--navy) 70%); }
.flow-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.steps { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 6px; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 4px 16px; padding: 16px 18px; border-radius: 8px; border: 1px solid transparent; opacity: .42; transition: opacity .45s var(--ease), border-color .45s, background-color .45s; }
.step.on { opacity: 1; border-color: var(--rule); background: rgba(7, 18, 38, .55); }
.step b { grid-row: span 2; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); font-family: var(--display); font-weight: 600; transition: background-color .4s, color .4s, border-color .4s; }
.step.on b { background: var(--sun); color: var(--on-sun); border-color: var(--sun); }
.step h3 { font-size: 1.1rem; }
.step p { color: var(--muted); font-size: .98rem; }
.flow-svg { width: 100%; height: auto; overflow: visible; }
[dir="rtl"] .flow-svg { transform: scaleX(-1); }
.wire-base { fill: none; stroke: rgba(143, 163, 194, .2); stroke-width: 3; stroke-linecap: round; }
.wire { fill: none; stroke: var(--sun); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; filter: drop-shadow(0 0 6px rgba(245, 165, 36, .6)); }
.pulse { fill: none; stroke: #FFF0C4; stroke-width: 3.2; stroke-linecap: round; stroke-dasharray: .04 .16; animation: flow 1.6s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -.2; } }
.node { --on: 1; fill: var(--deep); stroke: color-mix(in srgb, var(--sun) calc(var(--on) * 100%), #3A5A8C); stroke-width: 2.5; filter: drop-shadow(0 0 calc(var(--on) * 12px) rgba(245, 165, 36, .45)); }
.node .fill-on { fill: color-mix(in srgb, var(--sun) calc(var(--on) * 100%), #2A4A7A); stroke: none; }
.node-sun { fill: var(--sun); stroke: none; filter: drop-shadow(0 0 18px rgba(245, 165, 36, .7)); }
.node-sun line { stroke: var(--sun); stroke-width: 3; stroke-linecap: round; }

/* ---------- Services ---------- */
.svc-list { list-style: none; margin: 0; padding: 0; border-block-start: 1px solid var(--rule); }
.svc {
  position: relative; display: grid; grid-template-columns: 64px minmax(0, 4fr) minmax(0, 6fr); gap: 24px; align-items: center;
  padding: 34px 8px; border-block-end: 1px solid var(--rule); overflow: hidden;
}
.svc::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(245, 165, 36, .1), transparent 70%); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); z-index: -1; }
[dir="rtl"] .svc::before { transform-origin: right; background: linear-gradient(270deg, rgba(245, 165, 36, .1), transparent 70%); }
.svc:hover::before { transform: scaleX(1); }
.svc-ico { width: 56px; height: 56px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--sun); transition: transform .5s var(--ease), background-color .4s; }
.svc:hover .svc-ico { transform: rotate(-8deg) scale(1.06); background: rgba(245, 165, 36, .08); }
.svc-ico svg { width: 28px; height: 28px; }
.svc h3 { font-size: clamp(1.3rem, 2.4vw, 1.9rem); transition: transform .5s var(--ease); }
.svc:hover h3 { transform: translateX(10px); }
[dir="rtl"] .svc:hover h3 { transform: translateX(-10px); }
.svc p { color: var(--muted); }

/* ---------- Systems (tabs) ---------- */
.systems { background: var(--deep); }
.tabs { position: relative; display: inline-flex; gap: 4px; padding: 5px; border-radius: 9px; background: var(--navy); border: 1px solid var(--rule); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tab { position: relative; z-index: 1; padding: 11px 20px; border: 0; border-radius: var(--r); background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; white-space: nowrap; transition: color .3s; overflow: hidden; }
.tab[aria-selected="true"] { color: var(--on-sun); }
.tab-ind { position: absolute; z-index: 0; top: 5px; bottom: 5px; left: 0; width: 0; border-radius: var(--r); background: var(--sun); }
.sys-body { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 80px); align-items: center; margin-block-start: 44px; }
.sys-panel { display: grid; gap: 26px; }
.sys-panel h3 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.spec { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.spec div { background: var(--deep); padding: 18px 18px 20px; display: grid; gap: 4px; }
.spec span { color: var(--muted); font-size: .88rem; }
.spec b { font-family: var(--display); font-size: 1.4rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.runs { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.runs li { padding: 6px 12px; border: 1px solid var(--rule); border-radius: 4px; font-size: .92rem; color: #C6D3E5; }
.fine { color: var(--muted); font-size: .9rem; }
.mini-roof { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; transform: perspective(900px) rotateX(38deg) rotateZ(-6deg); }
.mini-roof i { aspect-ratio: 1 / 1.5; border-radius: 2px; border: 2px solid #4A6690; background: var(--cell); transition: background-color .4s, border-color .4s, box-shadow .4s; }
.mini-roof i.lit { background: linear-gradient(150deg, #2B5596, #163566); border-color: var(--frame); box-shadow: 0 0 18px rgba(245, 165, 36, .25), inset 0 0 0 1px rgba(255, 210, 122, .25); }

/* Numbers with units read left to right even inside Arabic */
.spec b, .pspecs dd, .results b, .field output { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .spec b, [dir="rtl"] .pspecs dd, [dir="rtl"] .results b { text-align: right; }

/* ---------- Calculator ---------- */
.calc-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: start; }
.card { background: var(--deep); border: 1px solid var(--rule); border-radius: 12px; padding: clamp(22px, 3vw, 34px); }
.calc-in { display: grid; gap: 28px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; overflow: hidden; padding: 8px 14px; border-radius: 5px; border: 1px solid var(--rule); background: transparent; cursor: pointer; font-size: .93rem; color: #C6D3E5; transition: border-color .2s, background-color .2s, color .2s, transform .15s var(--ease); }
.chip:hover { border-color: var(--frame); }
.chip:active { transform: scale(.95); }
.chip.on { background: rgba(245, 165, 36, .14); border-color: var(--sun); color: var(--ink); }
.field { display: grid; gap: 12px; }
.field-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field label { font-weight: 500; }
.field output { font-family: var(--display); font-weight: 600; font-size: 1.25rem; color: var(--sun); font-variant-numeric: tabular-nums; white-space: nowrap; }
input[type="range"] { --p: 50%; -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; direction: ltr; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--sun) var(--p), var(--line) var(--p)); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--sun) var(--p), var(--line) var(--p)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 5px; background: var(--ink); border: 4px solid var(--sun); transition: transform .15s var(--ease); }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 5px; background: var(--ink); border: 4px solid var(--sun); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.18); }
.calc-out { display: grid; gap: 26px; }
.results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--rule); border-radius: 10px; overflow: hidden; border: 1px solid var(--rule); }
.results div { background: var(--navy); padding: 18px 20px; display: grid; gap: 2px; }
.results span { color: var(--muted); font-size: .88rem; }
.results b { font-family: var(--display); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.results b small { font-size: .5em; color: var(--muted); font-weight: 500; margin-inline-start: .25em; }
.results .big { grid-column: 1 / -1; box-shadow: inset 0 3px 0 var(--sun); }
.results .big b { color: var(--sun); font-size: clamp(2.2rem, 5vw, 3.2rem); }
.chart-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-block-end: 14px; }
.chart-head h3 { font-size: 1rem; font-family: var(--body); font-weight: 600; }
.chart-head span { color: var(--muted); font-size: .85rem; }
.chart { position: relative; height: 190px; display: grid; grid-template-columns: 38px 1fr; gap: 8px; direction: ltr; }
.y-axis { position: relative; font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.y-axis span { position: absolute; right: 0; transform: translateY(50%); }
.plot { position: relative; border-block-end: 1px solid var(--line); }
.grid-line { position: absolute; inset-inline: 0; border-top: 1px dashed rgba(157, 176, 203, .14); }
.bars { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; align-items: end; }
.bar { position: relative; height: 100%; display: flex; align-items: flex-end; }
.bar i { display: block; width: 100%; height: 100%; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, var(--sun), #C77D0E); transform-origin: bottom; transform: scaleY(var(--h, .5)); }
.bar:hover i { background: linear-gradient(180deg, var(--sun-soft), var(--sun)); }
.bar .tip { position: absolute; bottom: calc(var(--h, .5) * 100% + 6px); left: 50%; translate: -50% 0; font-size: .72rem; white-space: nowrap; background: var(--ink); color: var(--navy); padding: 2px 6px; border-radius: 3px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.bar:hover .tip { opacity: 1; }
.x-axis { display: grid; grid-template-columns: 38px repeat(12, 1fr); gap: 6px; margin-block-start: 6px; font-size: .7rem; color: var(--muted); text-align: center; direction: ltr; }
.x-axis span:first-child { visibility: hidden; }
.calc-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Process ---------- */
.process-list { position: relative; list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(40px, 6vw, 72px); max-width: 860px; }
.pline { position: absolute; inset-inline-start: 27px; top: 10px; bottom: 10px; width: 2px; background: var(--line); }
.pline i { position: absolute; inset: 0; background: var(--sun); transform-origin: top; box-shadow: 0 0 12px rgba(245, 165, 36, .6); }
.pstep { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 24px; }
.pdot { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); border: 2px solid var(--line); font-family: var(--display); font-weight: 700; font-size: 1.2rem; transition: background-color .5s var(--ease), border-color .5s, color .5s, transform .5s var(--ease); position: relative; z-index: 1; }
.pstep.on .pdot { background: var(--sun); border-color: var(--sun); color: var(--on-sun); transform: scale(1.06); }
.pstep h3 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); margin-block: 10px 6px; }
.pstep p { color: var(--muted); max-width: 52ch; }

/* ---------- FAQ ---------- */
.faq { background: var(--deep); }
.faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.qa { border-block-end: 1px solid var(--rule); }
.qa:first-child { border-block-start: 1px solid var(--rule); }
.q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px 4px; background: none; border: 0; cursor: pointer; text-align: start; font-family: var(--display); font-size: clamp(1.05rem, 1.8vw, 1.25rem); font-weight: 600; transition: color .2s; }
.q:hover { color: var(--sun-soft); }
.plus { position: relative; width: 32px; height: 32px; flex: none; border-radius: 50%; border: 1px solid var(--line); transition: transform .45s var(--ease), background-color .3s, border-color .3s; }
.plus::before, .plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; background: currentColor; }
.plus::after { transform: rotate(90deg); }
.q[aria-expanded="true"] .plus { transform: rotate(45deg); background: var(--sun); border-color: var(--sun); color: var(--on-sun); }
.a { overflow: hidden; height: 0; }
.a p { padding: 0 4px 26px; color: var(--muted); max-width: 62ch; }

/* ---------- Contact ---------- */
.contact { background: var(--navy); }
.reach > .btn { margin-block-end: 8px; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.reach { display: grid; gap: 14px; margin-block-start: 34px; }
.reach-line { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--rule); border-radius: 8px; }
.reach-line svg { width: 22px; height: 22px; color: var(--sun); flex: none; }
.reach-line span { color: var(--muted); font-size: .88rem; display: block; }
.reach-line b { font-weight: 600; direction: ltr; unicode-bidi: isolate; user-select: all; }
form.card { display: grid; gap: 18px; }
.f { display: grid; gap: 8px; }
.f label { font-size: .92rem; color: #C6D3E5; }
.f input, .f select, .f textarea { width: 100%; padding: 13px 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--navy); transition: border-color .2s, box-shadow .2s; font-size: 1rem; }
.f input:focus, .f select:focus, .f textarea:focus { outline: none; border-color: var(--sun); box-shadow: 0 0 0 3px rgba(245, 165, 36, .18); }
.f textarea { min-height: 110px; resize: vertical; }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sent { display: none; gap: 12px; padding: 16px; border-radius: 8px; border: 1px solid rgba(245, 165, 36, .4); background: rgba(245, 165, 36, .08); }
.sent.show { display: grid; }

/* ---------- Footer ---------- */
.site-foot { border-block-start: 1px solid var(--rule); padding-block: 40px calc(40px + env(safe-area-inset-bottom, 0px)); background: var(--deep); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; color: var(--muted); font-size: .92rem; }
.foot-row nav { display: flex; flex-wrap: wrap; gap: 18px; }
.foot-row a { text-decoration: none; }
.foot-row a:hover { color: var(--ink); }

/* Mobile WhatsApp bar */
.wa-bar { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .nav { display: none; }
  .menu-btn { display: grid; }
  .head-tools { margin-inline-start: auto; }
  .site-head .nav.open {
    display: grid; position: absolute; top: var(--head); inset-inline: 0; padding: 12px max(20px, env(safe-area-inset-right, 0px)) 20px max(20px, env(safe-area-inset-left, 0px));
    background: rgba(7, 18, 38, .97); border-block-end: 1px solid var(--rule); gap: 2px;
  }
  .site-head .nav.open a { padding: 14px 12px; font-size: 1.05rem; color: var(--ink); }
  .flow-grid, .sys-body, .calc-grid, .faq-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .flow-grid > div:last-child { order: -1; }
}
@media (max-width: 760px) {
  :root { --head: 64px; }
  .head-cta { display: none; }
  .hero { min-height: 600px; }
  .hero-scrim { background: linear-gradient(180deg, rgba(6, 18, 42, .94) 0%, rgba(6, 18, 42, .72) 46%, transparent 72%) !important; }
  .hero-copy { justify-content: flex-start; padding-block-start: calc(var(--head) + 36px); gap: 20px; }
  .array, [dir="rtl"] .array { width: 128vw; transform: translate(0, 30%) rotateX(56deg) rotateZ(-22deg); }
  .scroll-cue { display: none; }
  .brands-row { flex-direction: column; align-items: stretch; gap: 18px; }
  .svc { grid-template-columns: 56px minmax(0, 1fr); gap: 10px 18px; padding: 26px 4px; }
  .svc p { grid-column: 1 / -1; }
  .spec { grid-template-columns: minmax(0, 1fr); }
  .f-row { grid-template-columns: minmax(0, 1fr); }
  .flow { min-height: auto; }
  .steps { margin-block-start: 20px; }
  .step { padding: 12px; }
  .wa-bar {
    display: flex; position: fixed; z-index: 45; inset-inline: 0; bottom: 0;
    padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    background: rgba(7, 18, 38, .92); backdrop-filter: blur(12px); border-block-start: 1px solid var(--rule);
  }
  .wa-bar .btn { width: 100%; }
  .site-foot { padding-block-end: calc(100px + env(safe-area-inset-bottom, 0px)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .mtrack { animation: none; flex-wrap: wrap; width: auto; }
}
