:root {
  --bg: #0a1322;
  --surface: #111c30;
  --surface-2: #18263e;
  --line: rgba(255, 255, 255, .14);
  --text: #f2f5f9;
  --muted: #b4c0d0;
  --blue: #4aa6e8;
  --red: #c8202f;
  --red-hover: #a91a27;
  --tile: #e9edf2;
  --gutter: clamp(16px, 4vw, 56px);
  --section: clamp(64px, 8vw, 112px);
  --radius: 10px;
  --header: 80px;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 12px); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
[dir="rtl"] body, [dir="rtl"] button, [dir="rtl"] input, [dir="rtl"] select, [dir="rtl"] textarea {
  font-family: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.ltr { direction: ltr; unicode-bidi: isolate; }

.skip {
  position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100;
  background: #fff; color: var(--bg); padding: 10px 16px; border-radius: 6px; font-weight: 600;
}
.skip:focus { top: 12px; }

h1, h2, h3 { font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(38px, 5.2vw, 72px); line-height: 1.08; letter-spacing: -.02em; }
h2 { font-size: clamp(30px, 3.5vw, 46px); line-height: 1.15; letter-spacing: -.015em; }
h3 { font-size: 20px; line-height: 1.3; }
[dir="rtl"] h1 { line-height: 1.3; letter-spacing: 0; }
[dir="rtl"] h2 { line-height: 1.35; letter-spacing: 0; }

.wrap { max-width: 1320px; margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.alt { background: var(--surface); }
.head { max-width: 720px; margin-block-end: clamp(32px, 4vw, 52px); }
.head p { color: var(--muted); font-size: 18px; margin-block-start: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px; border: 0; border-radius: 6px;
  font-weight: 600; transition: background-color .2s, border-color .2s;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-hover); }
.btn-ghost { background: none; border: 1px solid rgba(255, 255, 255, .45); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header);
  background: rgba(10, 19, 34, .94); border-block-end: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 28px; height: 100%; }
.nav .brand img { height: 46px; width: auto; }
.nav nav { margin-inline-start: auto; }
.nav-links { display: flex; gap: 28px; font-weight: 500; font-size: 15px; }
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; transition: color .2s; }
.nav-links a:hover { color: var(--blue); }
.lang { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; font-size: 15px; }
.lang:hover { color: var(--blue); }
.nav .btn { min-height: 44px; padding: 0 18px; font-size: 15px; }
.menu-btn {
  display: none; width: 44px; height: 44px; padding: 11px; background: none;
  border: 1px solid var(--line); border-radius: 6px;
}
.menu-btn svg { display: block; width: 100%; height: 100%; }

/* Hero */
.hero {
  position: relative; isolation: isolate; display: flex; flex-direction: column;
  min-height: calc(100svh - var(--header)); background: var(--bg);
}
.hero-photo {
  position: absolute; top: 0; inset-inline-end: 0; z-index: -2;
  width: 70%; height: 100%; object-fit: cover; object-position: 50% 62%;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, var(--bg) 36%, rgba(10, 19, 34, .74) 54%, rgba(10, 19, 34, .08) 80%),
    linear-gradient(0deg, var(--bg) 8%, rgba(10, 19, 34, 0) 36%);
}
[dir="rtl"] .hero::before {
  background:
    linear-gradient(270deg, var(--bg) 36%, rgba(10, 19, 34, .74) 54%, rgba(10, 19, 34, .08) 80%),
    linear-gradient(0deg, var(--bg) 8%, rgba(10, 19, 34, 0) 36%);
}
.hero .wrap { width: 100%; }
.hero-copy { flex: 1; display: flex; align-items: center; padding-block: 40px; }
.hero-copy > .wrap > div { display: flex; flex-direction: column; gap: 24px; max-width: 800px; }
.sub { color: var(--muted); font-size: clamp(17px, 1.5vw, 20px); max-width: 58ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-block: 20px; border-block-start: 1px solid var(--line); }
.stats b { display: block; font-size: clamp(26px, 2.6vw, 36px); font-weight: 600; line-height: 1.2; }
.stats span { color: var(--muted); font-size: 14px; }
.certs { color: var(--muted); font-size: 14px; padding-block: 14px 26px; border-block-start: 1px solid var(--line); }

/* Clients */
.clients { padding-block: clamp(48px, 6vw, 72px); }
.clients h2 { font-size: clamp(22px, 2.2vw, 28px); margin-block-end: 24px; }
.logos { display: grid; grid-template-columns: repeat(9, 1fr); gap: 12px; }
.logos li {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 3 / 2; padding: 12px; background: #fff; border-radius: 8px;
}
.logos img { max-height: 100%; width: auto; object-fit: contain; }

/* Products */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-block-end: 28px; }
.filters button {
  min-height: 44px; padding: 0 16px; background: none; border: 1px solid var(--line);
  border-radius: 6px; color: var(--muted); font-weight: 500; transition: background-color .2s, color .2s, border-color .2s;
}
.filters button:hover { color: var(--text); border-color: rgba(255, 255, 255, .4); }
.filters button[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.product { background: var(--surface-2); border-radius: var(--radius); overflow: hidden; }
.product[hidden] { display: none; }
.product .tile { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; padding: 14px; background: var(--tile); }
.product .tile img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.product h3 { padding: 14px 16px 16px; font-size: 16px; font-weight: 500; }

/* Services */
.services { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.service { grid-column: span 2; display: flex; flex-direction: column; background: var(--surface-2); border-radius: var(--radius); overflow: hidden; }
.service:nth-child(-n+2) { grid-column: span 3; }
.service img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.service:nth-child(-n+2) img { aspect-ratio: 16 / 8; }
.service div { padding: 20px; }
.service p { color: var(--muted); margin-block-start: 8px; }

/* Repair or replace */
.repair { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.repair .lead { color: var(--muted); font-size: 18px; margin-block: 16px 28px; }
.assess { margin-block-end: 28px; }
.assess strong { display: block; margin-block-end: 10px; }
.assess ol { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.assess li { padding: 12px 14px; background: var(--surface-2); border-radius: 8px; color: var(--muted); }
.saving { padding: clamp(24px, 3vw, 36px); background: var(--surface-2); border-radius: var(--radius); }
.saving .label { font-weight: 600; color: var(--blue); }
.saving p { color: var(--muted); }
.saving .big { color: var(--text); font-size: clamp(30px, 3.2vw, 44px); font-weight: 600; line-height: 1.25; margin-block: 8px 12px; }
.saving small { display: block; margin-block-start: 16px; padding-block-start: 16px; border-block-start: 1px solid var(--line); color: var(--muted); font-size: 14px; }

/* Process */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: step; }
.steps li { counter-increment: step; padding-block-start: 18px; border-block-start: 2px solid var(--blue); }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; color: var(--blue); font-weight: 600; margin-block-end: 8px; }
.steps p { color: var(--muted); margin-block-start: 8px; }

/* About */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.about img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.about .lead { color: var(--muted); font-size: 18px; margin-block: 16px 24px; }
.mv { display: grid; gap: 14px; margin-block-end: 24px; }
.mv b { color: var(--text); }
.mv p { color: var(--muted); }
.sectors { display: flex; flex-wrap: wrap; gap: 8px; }
.sectors li { padding: 8px 14px; background: var(--surface-2); border-radius: 6px; font-size: 14px; }

/* Contact */
.contact { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(32px, 5vw, 72px); }
form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.field.full { grid-column: 1 / -1; }
label { font-weight: 500; font-size: 15px; }
input, select, textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; font-size: 16px;
  color: var(--text); background: var(--surface-2); border: 1px solid rgba(255, 255, 255, .28); border-radius: 6px;
}
textarea { min-height: 120px; resize: vertical; }
input[type="file"] { padding: 8px 10px; color: var(--muted); }
input[type="file"]::file-selector-button {
  min-height: 30px; margin-inline-end: 12px; padding: 0 12px; border: 0; border-radius: 4px;
  background: var(--text); color: var(--bg); font: inherit; font-weight: 500; cursor: pointer;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
[aria-invalid="true"] { border-color: #ff8a93; }
.error { color: #ff9aa2; font-size: 14px; }
.error:empty { display: none; }
.status { grid-column: 1 / -1; color: var(--muted); }
.status:empty { display: none; }
form .btn { grid-column: 1 / -1; justify-self: start; min-width: 200px; }
.details { display: grid; gap: 22px; align-content: start; }
.details h3 { font-size: 14px; font-weight: 500; color: var(--muted); margin-block-end: 4px; }
.details a { display: inline-flex; align-items: center; min-height: 32px; font-weight: 500; }
.details a:hover { color: var(--blue); }
.details .row { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.map-link { color: var(--blue); }

/* Footer */
.site-footer { padding-block: 32px; border-block-start: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.site-footer img { height: 40px; width: auto; }

/* Mobile action bar */
.mobile-bar { display: none; }

/* Scroll reveal, only when JS is running */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease-out, transform .5s ease-out; }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 1180px) {
  .hero-photo { width: 58%; }
  .hero-copy > .wrap > div { max-width: 56%; }
  .hero::before {
    background:
      linear-gradient(90deg, var(--bg) 50%, rgba(10, 19, 34, .55) 66%, rgba(10, 19, 34, .08) 92%),
      linear-gradient(0deg, var(--bg) 8%, rgba(10, 19, 34, 0) 36%);
  }
  [dir="rtl"] .hero::before {
    background:
      linear-gradient(270deg, var(--bg) 50%, rgba(10, 19, 34, .55) 66%, rgba(10, 19, 34, .08) 92%),
      linear-gradient(0deg, var(--bg) 8%, rgba(10, 19, 34, 0) 36%);
  }
  .logos { grid-template-columns: repeat(5, 1fr); }
  .products { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
  :root { --header: 68px; }
  .nav { gap: 12px; }
  .nav .brand img { height: 36px; }
  .menu-btn { display: block; }
  .nav nav { margin: 0; }
  .lang { margin-inline-start: auto; }
  .nav-links {
    display: none; position: absolute; inset-inline: 0; top: var(--header); flex-direction: column; gap: 0;
    margin: 0; padding: 8px var(--gutter) 16px; background: var(--bg); border-block-end: 1px solid var(--line); font-size: 17px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; min-height: 48px; }
  .repair, .about, .contact { grid-template-columns: 1fr; }
  .service, .service:nth-child(-n+2) { grid-column: span 3; }
  .service:nth-child(-n+2) img { aspect-ratio: 16 / 10; }
  .service:last-child { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .hero-photo { width: 100%; }
  .hero-copy > .wrap > div { max-width: none; }
  .hero::before, [dir="rtl"] .hero::before { background: linear-gradient(0deg, rgba(10, 19, 34, .98) 32%, rgba(10, 19, 34, .72) 100%); }
}
@media (max-width: 640px) {
  .nav > .btn { display: none; }
  .actions .btn { flex: 1 1 100%; }
  .stats { grid-template-columns: 1fr 1fr; }
  .logos { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .products { grid-template-columns: 1fr 1fr; gap: 10px; }
  .product h3 { padding: 10px 12px 12px; font-size: 15px; }
  .services { grid-template-columns: 1fr; }
  .service, .service:nth-child(-n+2), .service:last-child { grid-column: auto; }
  .steps { grid-template-columns: 1fr; }
  .assess ol { grid-template-columns: 1fr; }
  form { grid-template-columns: 1fr; }
  form .btn { justify-self: stretch; }
  body { padding-block-end: 68px; }
  .mobile-bar {
    position: fixed; inset-inline: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px;
    padding: 10px var(--gutter); padding-block-end: calc(10px + env(safe-area-inset-bottom));
    background: rgba(10, 19, 34, .97); border-block-start: 1px solid var(--line);
  }
  .mobile-bar .btn { padding: 0 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
