/* ═══════════════════════════════════════════════════════
   GULF ENGINES — Brand website (dark edition)
   Palette: Gulf Blue #1776BB · Ice Blue #DCEBF7 · #0A0A0A · #FFF
   Type: Montserrat (Latin) · Risala (Arabic, brand font)
   ═══════════════════════════════════════════════════════ */

/* Risala — brand Arabic face. Arabic-only: Latin letters and
   Western digits intentionally fall through to Montserrat. */
@font-face {
  font-family: 'Risala';
  src: url('../assets/fonts/risala-300.woff2') format('woff2');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Risala';
  src: url('../assets/fonts/risala-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Risala';
  src: url('../assets/fonts/risala-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Risala';
  src: url('../assets/fonts/risala-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Risala';
  src: url('../assets/fonts/risala-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --gulf-blue: #1776BB;
  --gulf-blue-bright: #2f97e0;
  --gulf-blue-dark: #0d4a77;
  --gulf-blue-deep: #0a2c47;
  --ice-blue: #DCEBF7;
  --sand: #F0B45C;

  --bg: #070b0f;          /* page base */
  --bg-2: #0a1119;        /* alternate section */
  --panel: #0d1722;       /* cards */
  --panel-2: #111f2e;     /* hovered / raised */
  --line: rgba(220, 235, 247, .09);
  --text: #eef6fc;
  --muted: #8ea6b8;

  --font-latin: 'Montserrat', sans-serif;
  --font-arabic: 'Risala', 'Montserrat', 'Cairo', sans-serif;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --shadow-soft: 0 12px 40px rgba(0, 0, 0, .45);
  --shadow-hover: 0 24px 70px rgba(0, 0, 0, .6);
  --glow: 0 0 0 1px rgba(23,118,187,.35), 0 12px 50px rgba(23,118,187,.25);
  --radius: 18px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-latin);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

html[dir="rtl"] body { font-family: var(--font-arabic); }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3, html[dir="rtl"] h4 { font-family: var(--font-arabic); }

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
::selection { background: rgba(23,118,187,.55); color: #fff; }

.container { width: min(1200px, 92%); margin-inline: auto; }
.section { padding: clamp(80px, 10vw, 130px) 0; position: relative; }

/* ── Typography ── */
.overline {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gulf-blue-bright);
  margin-bottom: 18px;
}
html[dir="rtl"] .overline { letter-spacing: .06em; }

.section-title {
  font-size: clamp(30px, 4.4vw, 52px);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -.01em;
  max-width: 18em;
  color: var(--text);
}
.section-title b, .section-title strong { font-weight: 600; }
.section-head { margin-bottom: clamp(40px, 6vw, 70px); }

/* ── Buttons ── */
.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 16px 34px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), background .25s, color .25s, border-color .25s;
  will-change: transform;
}
html[dir="rtl"] .btn { letter-spacing: 0; font-size: 15px; }
.btn-primary {
  background: var(--gulf-blue);
  color: #fff;
  box-shadow: 0 8px 30px rgba(23, 118, 187, .45);
}
.btn-primary:hover {
  background: var(--gulf-blue-bright);
  transform: translateY(-3px);
  box-shadow: 0 16px 44px rgba(23, 118, 187, .55);
}
.btn-ghost {
  background: rgba(7, 11, 15, .25);
  color: #fff;
  border-color: rgba(255,255,255,.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.btn-ghost:hover {
  background: rgba(255,255,255,.12);
  border-color: #fff;
  transform: translateY(-3px);
}
.btn-white {
  background: #fff;
  color: var(--gulf-blue);
  box-shadow: 0 10px 30px rgba(0,0,0,.3);
}
.btn-white:hover { transform: translateY(-3px) scale(1.02); }
.btn-block { width: 100%; }

/* ═══════════ PRELOADER ═══════════ */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .6s ease, visibility .6s;
}
.preloader.done { opacity: 0; visibility: hidden; }
.preloader-inner { text-align: center; }
.preloader-logo {
  width: 130px;
  margin: 0 auto 28px;
  animation: preloaderPulse 1.4s ease-in-out infinite;
  filter: drop-shadow(0 0 24px rgba(23,118,187,.5));
}
@keyframes preloaderPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: .85; }
}
.preloader-bar {
  width: 130px;
  height: 3px;
  background: rgba(220,235,247,.12);
  border-radius: 3px;
  overflow: hidden;
  margin: 0 auto;
}
.preloader-bar span {
  display: block;
  height: 100%;
  width: 40%;
  background: var(--gulf-blue-bright);
  border-radius: 3px;
  animation: preloaderBar 1.1s var(--ease-out) infinite;
}
@keyframes preloaderBar {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(360%); }
}
html[dir="rtl"] .preloader-bar span { animation-name: preloaderBarRtl; }
@keyframes preloaderBarRtl {
  0% { transform: translateX(110%); }
  100% { transform: translateX(-360%); }
}

/* ═══════════ NAVBAR ═══════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  padding: 22px 0;
  transition: padding .4s var(--ease-out), background .4s, box-shadow .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  padding: 10px 0;
  background: rgba(7, 11, 15, .78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}
.nav-inner {
  width: min(1280px, 94%);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.nav-logo { display: flex; align-items: center; gap: 12px; }
.nav-logo img { height: 46px; transition: height .4s var(--ease-out); }
.nav.scrolled .nav-logo img { height: 38px; }
.nav-logo-text {
  font-size: 15px;
  font-weight: 300;
  letter-spacing: .14em;
  color: #fff;
  white-space: nowrap;
}
.nav-logo-text b { font-weight: 700; }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-link {
  position: relative;
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 14px;
  color: rgba(238,246,252,.72);
  transition: color .3s;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  inset-inline-start: 14px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--gulf-blue-bright);
  transition: width .35s var(--ease-out);
}
.nav-link:hover::after, .nav-link.active::after { width: calc(100% - 28px); }
.nav-link:hover, .nav-link.active { color: #fff; }

.nav-store {
  font-size: 13px;
  font-weight: 600;
  padding: 9px 20px;
  margin-inline-start: 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(23,118,187,.25);
  border: 1px solid rgba(47,151,224,.5);
  transition: all .3s;
  white-space: nowrap;
}
.nav-store:hover { background: var(--gulf-blue); border-color: var(--gulf-blue); }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang-toggle {
  font-family: var(--font-arabic);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  padding: 7px 16px;
  cursor: pointer;
  transition: all .3s;
}
html[dir="rtl"] .lang-toggle { font-family: var(--font-latin); }
.lang-toggle:hover { background: rgba(255,255,255,.12); border-color: #fff; }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-burger span {
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: all .35s var(--ease-out);
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══════════ SCROLL-SCRUB HERO ═══════════ */
.scrub {
  position: relative;
  height: 520vh;              /* scroll runway that drives the film */
  background: #0c0f13;
}
.scrub-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
#scrubCanvas,
.scrub-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scrub-poster { z-index: 0; }
#scrubCanvas { z-index: 1; opacity: 0; transition: opacity .5s ease; }
#scrubCanvas.ready { opacity: 1; }

.scrub-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7,11,15,.55) 0%, transparent 22%, transparent 72%, rgba(7,11,15,.8) 100%),
    radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(7,11,15,.5) 100%);
}

.scrub-stage {
  position: absolute;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  will-change: opacity, transform;
}
.scrub-stage.on { pointer-events: auto; }

.stage-center {
  inset-inline: 0;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
  padding-inline: 6vw;
}
.stage-left {
  top: 50%;
  transform: translateY(-50%);
  inset-inline-start: clamp(24px, 8vw, 140px);
  max-width: 500px;
}
.stage-right {
  top: 50%;
  transform: translateY(-50%);
  inset-inline-end: clamp(24px, 8vw, 140px);
  max-width: 500px;
  text-align: end;
}
.stage-left, .stage-right {
  padding: 30px 34px;
  border-radius: 22px;
  background: rgba(5, 8, 11, .38);
  border: 1px solid rgba(220, 235, 247, .08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.scrub-kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--ice-blue);
  margin-bottom: 24px;
  text-shadow: 0 2px 20px rgba(0,0,0,.6);
}
html[dir="rtl"] .scrub-kicker { letter-spacing: .06em; }

.scrub-title {
  font-size: clamp(46px, 8vw, 104px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -.015em;
  color: #fff;
  text-shadow: 0 4px 40px rgba(0,0,0,.55);
}
.scrub-title b { font-weight: 600; }
.scrub-title-final { font-size: clamp(34px, 5vw, 64px); margin-bottom: 34px; }

.scrub-num {
  display: block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .3em;
  color: var(--gulf-blue-bright);
  margin-bottom: 14px;
}
html[dir="rtl"] .scrub-num { letter-spacing: .08em; }
.scrub-sub-title {
  font-size: clamp(28px, 3.6vw, 46px);
  font-weight: 600;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 14px;
  text-shadow: 0 3px 30px rgba(0,0,0,.6);
}
.scrub-sub-text {
  font-size: clamp(15px, 1.4vw, 17.5px);
  color: rgba(238,246,252,.82);
  text-shadow: 0 2px 16px rgba(0,0,0,.7);
}

.scrub-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.scrub-hint {
  position: absolute;
  z-index: 3;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.7);
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  transition: opacity .5s;
}
html[dir="rtl"] .scrub-hint { letter-spacing: .1em; }
.scrub-hint.hide { opacity: 0; }
.hero-scroll-line {
  width: 1.5px;
  height: 44px;
  background: rgba(255,255,255,.3);
  overflow: hidden;
  position: relative;
}
.hero-scroll-line::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 40%;
  background: #fff;
  animation: scrollDrip 1.8s var(--ease-out) infinite;
}
@keyframes scrollDrip {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(280%); }
}

/* Static fallback (reduced motion / no JS) */
.scrub.static { height: 100vh; }
.scrub.static .scrub-stage { opacity: 0; }
.scrub.static .stage-final { opacity: 1; pointer-events: auto; }
.scrub.static #scrubCanvas { display: none; }

/* ═══════════ MARQUEE ═══════════ */
.marquee {
  background: #05080b;
  color: var(--ice-blue);
  overflow: hidden;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 42px;
  width: max-content;
  animation: marqueeMove 26s linear infinite;
}
html[dir="rtl"] .marquee-track { animation-name: marqueeMoveRtl; }
.marquee-track span {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: .85;
}
html[dir="rtl"] .marquee-track span { letter-spacing: .04em; }
.marquee-track i { color: var(--gulf-blue-bright); font-style: normal; font-size: 10px; }
@keyframes marqueeMove { to { transform: translateX(-50%); } }
@keyframes marqueeMoveRtl { to { transform: translateX(50%); } }

/* ═══════════ ABOUT ═══════════ */
.about { background: var(--bg); }
.about::before {
  content: '';
  position: absolute;
  top: -200px;
  inset-inline-start: -260px;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(23,118,187,.16), transparent 65%);
  pointer-events: none;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: start;
  position: relative;
}
.about-text p {
  color: var(--muted);
  font-size: 16.5px;
  margin-bottom: 22px;
}
.about-text .btn { margin-top: 10px; }

.about-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.value-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out), background .3s, border-color .3s;
}
.value-card:hover {
  transform: translateY(-6px);
  background: var(--panel-2);
  border-color: rgba(47,151,224,.4);
  box-shadow: var(--glow);
}
.value-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--gulf-blue-bright);
  letter-spacing: .2em;
  margin-bottom: 14px;
}
.value-card h3 { font-size: 19px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.value-card p { font-size: 14px; color: var(--muted); }

/* ═══════════ STATS ═══════════ */
.stats {
  background: linear-gradient(120deg, var(--gulf-blue-deep), var(--gulf-blue-dark) 55%, var(--gulf-blue));
  color: #fff;
  padding: clamp(56px, 7vw, 90px) 0;
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1.4px);
  background-size: 24px 24px;
}
.stats-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}
.stat-value {
  font-size: clamp(38px, 5vw, 60px);
  font-weight: 300;
  line-height: 1;
  margin-bottom: 10px;
}
.stat-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ice-blue);
  opacity: .85;
}
html[dir="rtl"] .stat-label { letter-spacing: .02em; }

/* ═══════════ PRODUCTS ═══════════ */
.products { background: var(--bg-2); }
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.product-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 38px 30px;
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out), border-color .3s, background .3s;
  position: relative;
  overflow: hidden;
}
.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--gulf-blue), var(--gulf-blue-bright));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease-out);
}
html[dir="rtl"] .product-card::before { transform-origin: right; }
.product-card:hover {
  transform: translateY(-10px);
  background: var(--panel-2);
  border-color: rgba(47,151,224,.35);
  box-shadow: var(--shadow-hover);
}
.product-card:hover::before { transform: scaleX(1); }
.product-icon {
  width: 74px;
  height: 74px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  color: var(--gulf-blue-bright);
  background: rgba(23,118,187,.14);
  border: 1px solid rgba(47,151,224,.25);
  margin-bottom: 26px;
  transition: transform .5s var(--ease-out), background .3s, color .3s;
}
.product-icon svg { width: 42px; height: 42px; }
.product-card:hover .product-icon {
  background: var(--gulf-blue);
  color: #fff;
  transform: rotate(-6deg) scale(1.06);
}
.product-card h3 { font-size: 19px; font-weight: 600; margin-bottom: 10px; color: var(--text); }
.product-card p { font-size: 14px; color: var(--muted); margin-bottom: 22px; }
.product-link {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gulf-blue-bright);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
html[dir="rtl"] .product-link { letter-spacing: 0; }
.product-link i {
  font-style: normal;
  transition: transform .35s var(--ease-out);
  display: inline-block;
}
html[dir="rtl"] .product-link i { transform: scaleX(-1); }
.product-link:hover i { transform: translateX(5px); }
html[dir="rtl"] .product-link:hover i { transform: scaleX(-1) translateX(5px); }

/* ═══════════ PROCESS ═══════════ */
.process {
  background: #05080b;
  color: #fff;
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
}
.process::after {
  content: '';
  position: absolute;
  bottom: -220px;
  inset-inline-end: -220px;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(23,118,187,.3), transparent 65%);
  pointer-events: none;
}
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
.process-step {
  padding: 40px 28px 10px;
  border-inline-end: 1px solid var(--line);
  position: relative;
  transition: background .4s;
}
.process-step:last-child { border-inline-end: none; }
.process-step:hover { background: rgba(23,118,187,.1); }
.process-num {
  display: block;
  font-size: 54px;
  font-weight: 300;
  color: transparent;
  -webkit-text-stroke: 1px rgba(238,246,252,.35);
  line-height: 1;
  margin-bottom: 24px;
  transition: color .4s, -webkit-text-stroke-color .4s;
}
.process-step:hover .process-num { color: var(--gulf-blue-bright); -webkit-text-stroke-color: var(--gulf-blue-bright); }
.process-step h3 { font-size: 20px; font-weight: 600; margin-bottom: 10px; }
.process-step p { font-size: 14px; color: var(--muted); }

/* ═══════════ PROJECTS ═══════════ */
.projects { background: var(--bg); }
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.project-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out), border-color .3s;
}
.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(47,151,224,.35);
  box-shadow: var(--shadow-hover);
}
.project-visual {
  overflow: hidden;
  aspect-ratio: 5 / 3;
  background: var(--panel-2);
}
.project-visual svg,
.project-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform .8s var(--ease-out);
}
.project-card:hover .project-visual svg,
.project-card:hover .project-visual img { transform: scale(1.06); }
.project-body { padding: 26px 28px 30px; }
.project-body h3 { font-size: 20px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.project-body p { font-size: 14.5px; color: var(--muted); }

/* ═══════════ QUOTE ═══════════ */
.quote-band {
  background:
    radial-gradient(80% 130% at 50% 0%, rgba(23,118,187,.22), transparent 60%),
    var(--bg-2);
  padding: clamp(70px, 9vw, 110px) 0;
  text-align: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.quote-band blockquote p {
  font-size: clamp(20px, 3vw, 32px);
  font-weight: 300;
  line-height: 1.5;
  color: var(--ice-blue);
  max-width: 20em;
  margin: 0 auto 24px;
}
.quote-band cite {
  font-style: normal;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gulf-blue-bright);
}
html[dir="rtl"] .quote-band cite { letter-spacing: .04em; }

/* ═══════════ TECHNOLOGY ═══════════ */
.technology { background: var(--bg); overflow: hidden; }
.tech-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(40px, 7vw, 100px);
  align-items: center;
}
.tech-visual {
  position: relative;
  aspect-ratio: 1;
  max-width: 440px;
  margin-inline: auto;
  width: 100%;
}
.tech-ring {
  position: absolute;
  border: 1.5px dashed rgba(47,151,224,.35);
  border-radius: 50%;
}
.ring-1 { inset: 0; animation: ringSpin 42s linear infinite; }
.ring-2 { inset: 13%; border-color: rgba(47,151,224,.5); animation: ringSpin 30s linear infinite reverse; }
.ring-3 { inset: 27%; border-style: solid; border-color: rgba(220,235,247,.12); }
@keyframes ringSpin { to { transform: rotate(360deg); } }
.tech-center {
  position: absolute;
  inset: 36%;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #2e8fd2, var(--gulf-blue) 55%, var(--gulf-blue-dark));
  display: grid;
  place-items: center;
  box-shadow: 0 0 60px rgba(23,118,187,.5), 0 18px 50px rgba(0,0,0,.5);
  animation: techBreathe 5s ease-in-out infinite;
}
@keyframes techBreathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
.tech-node {
  position: absolute;
  background: var(--panel-2);
  border: 1px solid rgba(47,151,224,.35);
  box-shadow: 0 8px 30px rgba(0,0,0,.5);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ice-blue);
  padding: 9px 18px;
  white-space: nowrap;
  animation: nodeFloat 5s ease-in-out infinite;
}
.node-1 { top: 4%; inset-inline-start: 52%; animation-delay: 0s; }
.node-2 { top: 42%; inset-inline-end: -4%; animation-delay: 1.2s; }
.node-3 { bottom: 6%; inset-inline-start: 12%; animation-delay: 2.1s; }
.node-4 { top: 22%; inset-inline-start: -4%; animation-delay: 3s; }
@keyframes nodeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.tech-text > p { color: var(--muted); font-size: 16.5px; margin-bottom: 26px; max-width: 480px; }
.tech-list li {
  position: relative;
  padding-inline-start: 34px;
  margin-bottom: 14px;
  font-size: 15.5px;
  font-weight: 500;
  color: var(--text);
}
.tech-list li::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(23,118,187,.2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f97e0' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat;
  border: 1px solid rgba(47,151,224,.3);
}

/* ═══════════ CTA BAND ═══════════ */
.cta-band {
  position: relative;
  background: linear-gradient(120deg, var(--gulf-blue-dark), var(--gulf-blue) 60%, #2e8fd2);
  color: #fff;
  padding: clamp(80px, 10vw, 130px) 0;
  overflow: hidden;
  text-align: center;
  border-top: 1px solid var(--line);
}
.cta-sun {
  position: absolute;
  top: -46%;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240,180,92,.5), rgba(240,180,92,.08) 55%, transparent 70%);
  animation: techBreathe 7s ease-in-out infinite;
  pointer-events: none;
}
html[dir="rtl"] .cta-sun { transform: translateX(50%); }
.cta-inner { position: relative; }
.cta-inner h2 {
  font-size: clamp(32px, 5vw, 58px);
  font-weight: 300;
  margin-bottom: 18px;
}
.cta-inner p {
  max-width: 520px;
  margin: 0 auto 36px;
  color: rgba(255,255,255,.88);
  font-size: 16.5px;
}

/* ═══════════ CONTACT ═══════════ */
.contact { background: var(--bg-2); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(36px, 5vw, 70px);
  align-items: start;
}
.contact-info { display: grid; gap: 16px; }
.contact-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out), border-color .3s;
}
.contact-card:hover {
  transform: translateY(-4px);
  border-color: rgba(47,151,224,.4);
  box-shadow: var(--glow);
}
.contact-ic {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(23,118,187,.15);
  border: 1px solid rgba(47,151,224,.3);
  color: var(--gulf-blue-bright);
}
.contact-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}
html[dir="rtl"] .contact-label { letter-spacing: .02em; }
.contact-value { font-size: 15.5px; font-weight: 600; color: var(--text); }

.contact-form {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(28px, 4vw, 44px);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { position: relative; margin-bottom: 18px; }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: rgba(7,11,15,.6);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 22px 18px 10px;
  outline: none;
  transition: border-color .3s, background .3s;
  resize: vertical;
}
.form-field select { padding: 16px 18px; color: var(--muted); }
.form-field select option { background: var(--panel); color: var(--text); }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--gulf-blue-bright);
  background: rgba(7,11,15,.9);
}
.form-field label {
  position: absolute;
  inset-inline-start: 18px;
  top: 16px;
  font-size: 15px;
  color: var(--muted);
  pointer-events: none;
  transition: all .25s var(--ease-out);
}
.form-field input:focus + label,
.form-field input:not(:placeholder-shown) + label,
.form-field textarea:focus + label,
.form-field textarea:not(:placeholder-shown) + label {
  top: 7px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gulf-blue-bright);
}
.form-note {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 16px;
}

/* ═══════════ FOOTER ═══════════ */
.footer { background: #05080b; color: var(--muted); border-top: 1px solid var(--line); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding: clamp(60px, 8vw, 90px) 0 50px;
}
.footer-logo { width: 96px; margin-bottom: 20px; }
.footer-brand p { font-size: 15px; font-weight: 300; color: var(--text); margin-bottom: 22px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(238,246,252,.2);
  color: rgba(238,246,252,.75);
  transition: all .3s;
}
.footer-social a:hover {
  background: var(--gulf-blue);
  border-color: var(--gulf-blue);
  color: #fff;
  transform: translateY(-3px);
}
.footer-col h4 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 20px;
}
html[dir="rtl"] .footer-col h4 { letter-spacing: .03em; }
.footer-col a, .footer-col span {
  display: block;
  font-size: 14px;
  margin-bottom: 12px;
  transition: color .25s;
}
.footer-col a:hover { color: var(--gulf-blue-bright); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 22px 0;
  font-size: 13px;
}
.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ═══════════ SCROLL REVEAL ═══════════ */
body:not(.no-io) .section .reveal-up,
body:not(.no-io) .stats .reveal-up,
body:not(.no-io) .quote-band .reveal-up,
body:not(.no-io) .cta-band .reveal-up {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
  transition-delay: var(--d, 0s);
}
body:not(.no-io) .section .reveal-up.visible,
body:not(.no-io) .stats .reveal-up.visible,
body:not(.no-io) .quote-band .reveal-up.visible,
body:not(.no-io) .cta-band .reveal-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════ PROJECT GALLERY PAGES ═══════════ */
.scrub-short { height: 420vh; }

.regions { background: var(--bg); }
.region-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.region-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px 26px;
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out), border-color .3s, background .3s;
}
.region-card:hover {
  transform: translateY(-6px);
  background: var(--panel-2);
  border-color: rgba(47,151,224,.4);
  box-shadow: var(--glow);
}
.region-count {
  font-size: clamp(34px, 4vw, 46px);
  font-weight: 300;
  line-height: 1;
  color: var(--gulf-blue-bright);
  margin-bottom: 10px;
}
.region-card h3 { font-size: 17px; font-weight: 600; color: var(--text); }
.gallery .page-back { margin-top: 34px; }

/* Aspiration line above the project galleries */
.gallery-note {
  position: relative;
  max-width: 46em;
  margin: -18px 0 34px;
  padding-inline-start: 18px;
  font-size: clamp(16px, 1.9vw, 20px);
  font-weight: 300;
  line-height: 1.6;
  color: var(--ice-blue);
}
.gallery-note::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: .35em;
  bottom: .35em;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--gulf-blue-bright), var(--gulf-blue));
}
html[dir="rtl"] .gallery-note { font-size: clamp(17px, 2vw, 21px); }

/* Today / Next split (schools vs commercial) */
.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.split-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out), border-color .3s, background .3s;
}
.split-card:hover {
  transform: translateY(-6px);
  background: var(--panel-2);
  border-color: rgba(47,151,224,.4);
  box-shadow: var(--glow);
}
.split-tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
html[dir="rtl"] .split-tag { letter-spacing: .02em; }
.tag-now {
  color: #7ce0a3;
  background: rgba(63, 174, 106, .14);
  border: 1px solid rgba(63, 174, 106, .35);
}
.tag-soon {
  color: var(--sand);
  background: rgba(240, 180, 92, .12);
  border: 1px solid rgba(240, 180, 92, .35);
}
.split-card h3 { font-size: 21px; font-weight: 600; margin-bottom: 10px; color: var(--text); }
.split-card p { font-size: 15px; color: var(--muted); }
.split-card .product-link { margin-top: 18px; }

@media (max-width: 900px) { .split-grid { grid-template-columns: 1fr; } }

/* Capability cards (government sectors — no fabricated counts) */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.cap-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  position: relative;
  overflow: hidden;
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out), border-color .3s, background .3s;
}
.cap-card::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--gulf-blue), var(--gulf-blue-bright));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease-out);
}
html[dir="rtl"] .cap-card::before { transform-origin: right; }
.cap-card:hover {
  transform: translateY(-6px);
  background: var(--panel-2);
  border-color: rgba(47,151,224,.4);
  box-shadow: var(--glow);
}
.cap-card:hover::before { transform: scaleX(1); }
.cap-card h3 { font-size: 18px; font-weight: 600; margin-bottom: 10px; color: var(--text); }
.cap-card p { font-size: 14px; color: var(--muted); }

@media (max-width: 900px) { .cap-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cap-grid { grid-template-columns: 1fr; } }

@media (max-width: 900px) { .region-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .region-grid { grid-template-columns: 1fr; } }

a.project-card { display: block; color: inherit; }
.project-view {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gulf-blue-bright);
}
html[dir="rtl"] .project-view { letter-spacing: 0; }
.project-view i { font-style: normal; transition: transform .35s var(--ease-out); display: inline-block; }
html[dir="rtl"] .project-view i { transform: scaleX(-1); }
.project-card:hover .project-view i { transform: translateX(5px); }
html[dir="rtl"] .project-card:hover .project-view i { transform: scaleX(-1) translateX(5px); }

.page-hero {
  padding: clamp(140px, 18vh, 190px) 0 clamp(50px, 7vw, 80px);
  background:
    radial-gradient(90% 120% at 50% -20%, rgba(23,118,187,.25), transparent 60%),
    var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.page-hero .section-title { margin-bottom: 14px; }
.page-hero p { color: var(--muted); max-width: 560px; font-size: 16.5px; }
.page-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gulf-blue-bright);
}
.page-back i { font-style: normal; display: inline-block; transform: scaleX(-1); }
html[dir="rtl"] .page-back i { transform: none; }

.gallery { padding: clamp(50px, 7vw, 90px) 0 clamp(70px, 9vw, 110px); background: var(--bg); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.g-tile {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 0;
  cursor: zoom-in;
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out), border-color .3s;
}
.g-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(47,151,224,.4);
  box-shadow: var(--shadow-hover);
}
.g-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .7s var(--ease-out);
}
.g-tile:hover img { transform: scale(1.05); }

/* Mosaic gallery — feature tile + supporting tiles (real project photos) */
.gallery-grid.mosaic {
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  aspect-ratio: 2 / 1;
  gap: 16px;
}
.gallery-grid.mosaic .g-tile {
  aspect-ratio: auto;
  height: 100%;
}
.gallery-grid.mosaic .g-tile:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 3; }
.gallery-grid.mosaic .g-tile:nth-child(2) { grid-column: 3;     grid-row: 1; }
.gallery-grid.mosaic .g-tile:nth-child(3) { grid-column: 4;     grid-row: 1; }
.gallery-grid.mosaic .g-tile:nth-child(4) { grid-column: 3 / 5; grid-row: 2; }
@media (max-width: 760px) {
  .gallery-grid.mosaic {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
    aspect-ratio: auto;
  }
  .gallery-grid.mosaic .g-tile { aspect-ratio: 4 / 3; }
  .gallery-grid.mosaic .g-tile:nth-child(1) { grid-column: 1 / 3; grid-row: auto; }
  .gallery-grid.mosaic .g-tile:nth-child(2),
  .gallery-grid.mosaic .g-tile:nth-child(3) { grid-column: auto; grid-row: auto; }
  .gallery-grid.mosaic .g-tile:nth-child(4) { grid-column: 1 / 3; grid-row: auto; }
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(4, 7, 10, .93);
  display: none;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 82vh;
  border-radius: 10px;
  box-shadow: 0 30px 90px rgba(0,0,0,.6);
}
.lb-btn {
  position: absolute;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .25s;
}
.lb-btn:hover { background: var(--gulf-blue); border-color: var(--gulf-blue); }
.lb-close { top: 24px; inset-inline-end: 24px; }
.lb-prev { inset-inline-start: 24px; top: 50%; transform: translateY(-50%); }
.lb-next { inset-inline-end: 24px; top: 50%; transform: translateY(-50%); }
.lb-count {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.7);
  font-size: 13px;
  letter-spacing: .1em;
}

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 1080px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .process-step { border-bottom: 1px solid var(--line); padding-bottom: 34px; }
  .process-step:nth-child(2n) { border-inline-end: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .nav-links {
    position: fixed;
    top: 0;
    inset-inline-end: 0;
    height: 100vh;
    width: min(340px, 84vw);
    background: var(--bg-2);
    border-inline-start: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
    padding: 40px;
    box-shadow: -20px 0 60px rgba(0,0,0,.6);
    transform: translateX(110%);
    transition: transform .5s var(--ease-out);
    z-index: 950;
  }
  html[dir="rtl"] .nav-links { transform: translateX(-110%); }
  .nav-links.open { transform: translateX(0) !important; }
  .nav-links .nav-link { color: var(--text) !important; font-size: 18px; }
  .nav-store { margin-top: 14px; }
  .nav-burger { display: flex; z-index: 960; position: relative; }
  .about-grid, .tech-grid, .contact-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 20px; }
  .project-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .tech-visual { max-width: 340px; }
  .stage-left, .stage-right {
    inset-inline: 6vw;
    max-width: none;
    text-align: center;
    top: auto;
    bottom: 12vh;
    transform: none;
  }
}

@media (max-width: 600px) {
  .product-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr; }
  .process-step { border-inline-end: none; }
  .about-values { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .scrub-cta .btn { width: 100%; text-align: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom .container { justify-content: center; text-align: center; }
  .nav-logo-text { display: none; }
}

/* ═══════════ REDUCED MOTION ═══════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ═══════════════════════════════════════════════════════
   PRODUCT CATALOGUE — category cards, product pages
   ═══════════════════════════════════════════════════════ */

/* ── Homepage: product category cards — floating product in a glass rectangle ── */
.products .container { width: min(1420px, 94%); }

.pcat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(14px, 1.5vw, 22px);
  align-items: stretch;
}
a.pcat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  color: inherit;
  background: linear-gradient(180deg,
              rgba(226, 240, 252, .085) 0%,
              rgba(226, 240, 252, .032) 52%,
              rgba(226, 240, 252, .06) 100%);
  border: 1px solid rgba(226, 240, 252, .13);
  -webkit-backdrop-filter: blur(10px) saturate(125%);
  backdrop-filter: blur(10px) saturate(125%);
  transition: transform .5s var(--ease-out), border-color .35s,
              box-shadow .5s var(--ease-out), background .35s;
}
.pcat-card:hover {
  transform: translateY(-10px);
  border-color: rgba(47, 151, 224, .55);
  background: linear-gradient(180deg,
              rgba(47, 151, 224, .13) 0%,
              rgba(226, 240, 252, .04) 55%,
              rgba(226, 240, 252, .07) 100%);
  box-shadow: 0 0 0 1px rgba(23, 118, 187, .28), 0 26px 60px rgba(0, 0, 0, .55);
}
.pcat-card::before {
  content: '';
  position: absolute;
  top: 0; inset-inline-start: 0;
  width: 100%; height: 2px; z-index: 4;
  background: linear-gradient(90deg, var(--gulf-blue), var(--gulf-blue-bright));
  transform: scaleX(0); transform-origin: left;
  transition: transform .55s var(--ease-out);
}
html[dir="rtl"] .pcat-card::before { transform-origin: right; }
.pcat-card:hover::before { transform: scaleX(1); }

.pcat-media {
  position: relative;
  aspect-ratio: 41 / 54;
  padding: clamp(12px, 1.3vw, 20px) clamp(10px, 1.1vw, 16px) 0;
}
/* the products are near-black, so they always get a faint pool of light to sit in */
.pcat-media::before {
  content: '';
  position: absolute;
  left: 50%; top: 54%;
  width: 128%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(90, 150, 205, .13) 0%, rgba(47, 151, 224, 0) 62%);
  opacity: .6;
  transition: opacity .55s var(--ease-out);
  pointer-events: none;
}
.pcat-card:hover .pcat-media::before { opacity: 1; }
.pcat-media img {
  position: relative;
  z-index: 2;
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 24px 32px rgba(0, 0, 0, .5));
  transition: transform .8s var(--ease-out);
}
.pcat-card:hover .pcat-media img { transform: translateY(-7px) scale(1.05); }

.pcat-body {
  position: relative;
  z-index: 3;
  padding: 0 14px clamp(18px, 1.7vw, 24px);
  text-align: center;
}
.pcat-body::before {
  content: '';
  display: block;
  width: 26px; height: 2px;
  margin: 0 auto clamp(11px, 1.2vw, 15px);
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gulf-blue), var(--gulf-blue-bright));
  opacity: .4;
  transition: width .45s var(--ease-out), opacity .35s;
}
.pcat-card:hover .pcat-body::before { width: 56px; opacity: 1; }

/* ── Card title — Montserrat for Latin, Risala for Arabic ── */
.pcat-name {
  font-family: var(--font-latin);
  font-size: clamp(17px, 1.45vw, 21px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.005em;
  color: var(--text);
  margin: 0;
  min-height: 1.35em;             /* grid stretch handles a wrapped title */
  transition: color .3s;
  text-wrap: balance;
}
/* Arabic sits optically smaller at the same px and has no case, so it gets its
   own size, a looser line box for the descenders, and no Latin tracking. */
html[dir="rtl"] .pcat-name {
  font-family: var(--font-arabic);
  font-size: clamp(18px, 1.55vw, 23px);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
  min-height: 1.55em;
}
.pcat-card:hover .pcat-name { color: #fff; }
.pcat-desc, .pcat-link { display: none; }  /* full copy lives on the category page */

@media (max-width: 1100px) {
  .pcat-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .pcat-media { aspect-ratio: 41 / 48; }
  .pcat-name { font-size: 19px; min-height: 0; }
  html[dir="rtl"] .pcat-name { font-size: 21px; min-height: 0; }
}
@media (max-width: 620px) {
  .pcat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .pcat-media { aspect-ratio: 41 / 52; }
  .pcat-name { font-size: 15.5px; }
  html[dir="rtl"] .pcat-name { font-size: 17px; }
}

/* ── Category page hero ── */
.cat-hero {
  position: relative;
  min-height: clamp(340px, 46vh, 480px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.cat-hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
.cat-hero::after {
  content: '';
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(7,11,15,.72) 0%, rgba(7,11,15,.35) 40%, rgba(7,11,15,.94) 100%);
}
.cat-hero-inner {
  position: relative; z-index: 2;
  width: min(1200px, 92%);
  margin-inline: auto;
  padding: 0 0 clamp(34px, 5vw, 56px);
}
.cat-hero h1 {
  font-size: clamp(32px, 5vw, 58px);
  font-weight: 300;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 12px;
}
.cat-hero p {
  max-width: 34em;
  font-size: clamp(15px, 1.6vw, 18px);
  color: rgba(238,246,252,.86);
}
.cat-count {
  display: inline-block;
  margin-top: 16px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gulf-blue-bright);
  border: 1px solid rgba(47,151,224,.4);
  background: rgba(23,118,187,.14);
  border-radius: 999px;
  padding: 7px 16px;
}
html[dir="rtl"] .cat-count { letter-spacing: .02em; font-size: 14px; }

/* ── Product cards ── */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.prod-card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out), border-color .3s;
}
.prod-card:hover {
  transform: translateY(-7px);
  border-color: rgba(47,151,224,.4);
  box-shadow: var(--shadow-hover);
}
.prod-media {
  aspect-ratio: 1;
  background: #fff;
  overflow: hidden;
}
.prod-media img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 8%;
  transition: transform .8s var(--ease-out);
}
.prod-card:hover .prod-media img { transform: scale(1.06); }
.prod-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 24px 26px;
  flex: 1;
}
.prod-name { font-size: 18px; font-weight: 600; color: var(--text); line-height: 1.4; }
.prod-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.prod-chip {
  font-size: 12px;
  font-weight: 600;
  color: var(--ice-blue);
  background: rgba(23,118,187,.16);
  border: 1px solid rgba(47,151,224,.28);
  border-radius: 999px;
  padding: 5px 12px;
}
.prod-desc { font-size: 14.5px; color: var(--muted); flex: 1; }
.prod-cta {
  align-self: flex-start;
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gulf-blue-bright);
  display: inline-flex; align-items: center; gap: 8px;
}
html[dir="rtl"] .prod-cta { letter-spacing: 0; font-size: 14px; }
.prod-cta i { font-style: normal; display: inline-block; transition: transform .35s var(--ease-out); }
html[dir="rtl"] .prod-cta i { transform: scaleX(-1); }
.prod-cta:hover i { transform: translateX(5px); }
html[dir="rtl"] .prod-cta:hover i { transform: scaleX(-1) translateX(5px); }

/* ── Other categories strip ── */
.other-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}
.other-cat {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 22px;
  transition: all .3s;
}
.other-cat:hover {
  background: var(--gulf-blue);
  border-color: var(--gulf-blue);
  color: #fff;
  transform: translateY(-2px);
}

@media (max-width: 1024px) {
  .prod-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .prod-grid { grid-template-columns: 1fr; }
}

/* ── Brand-grouped catalogue (solar panels) ──────────────────
   The grid becomes a stack of manufacturer blocks: logo + who
   they are, then that factory's modules.
   ─────────────────────────────────────────────────────────── */
.prod-grid.by-brand {
  display: block;
}
.brand-block { margin-bottom: clamp(56px, 7vw, 92px); }
.brand-block:last-child { margin-bottom: 0; }

.brand-head {
  display: flex;
  align-items: center;
  gap: clamp(16px, 1.8vw, 26px);
  padding-bottom: 20px;
  margin-bottom: clamp(22px, 2.4vw, 32px);
  border-bottom: 1px solid var(--line);
}
.brand-logo {
  flex: none;
  width: clamp(62px, 5.4vw, 84px);
  height: clamp(62px, 5.4vw, 84px);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .45);
}
.brand-meta { flex: 1; min-width: 0; }
.brand-name {
  font-family: var(--font-latin);
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -.01em;
}
html[dir="rtl"] .brand-name { font-family: var(--font-arabic); letter-spacing: 0; }
.brand-blurb {
  margin-top: 6px;
  font-size: clamp(14px, 1.1vw, 15.5px);
  color: var(--muted);
  max-width: 62ch;
  line-height: 1.65;
}
.brand-count {
  flex: none;
  align-self: flex-start;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gulf-blue-bright);
  white-space: nowrap;
}
html[dir="rtl"] .brand-count { letter-spacing: .02em; font-size: 13.5px; text-transform: none; }

.brand-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* the maker's mark, on the product picture itself */
.prod-media { position: relative; }
.prod-media img.prod-brand {
  position: absolute;
  top: 12px; inset-inline-start: 12px;
  z-index: 3;
  width: clamp(38px, 3.4vw, 50px);
  height: clamp(38px, 3.4vw, 50px);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .22);
  padding: 0;
  object-fit: contain;
  pointer-events: none;
}
.prod-card:hover .prod-media img.prod-brand { transform: none; }
/* where the factory render is still to come, the mark carries the card */
.prod-media.no-img img.prod-mark {
  width: 46%;
  height: auto;
  max-height: 46%;
  object-fit: contain;
  padding: 0;
  opacity: .92;
  margin: 27% auto 0;
}
.prod-media.no-img img.prod-brand { display: none; }
.prod-media.no-img:has(.prod-mark)::after { display: none; }

@media (max-width: 1000px) {
  .brand-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .brand-grid { grid-template-columns: 1fr; gap: 18px; }
  .brand-head { flex-wrap: wrap; gap: 14px; }
  .brand-count { width: 100%; margin-top: 0; }
}

/* Product photo not supplied yet — neutral placeholder, never a broken icon */
.prod-media.no-img { background: var(--panel-2); position: relative; }
.prod-media.no-img::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 54px; height: 54px;
  border-radius: 14px;
  border: 2px dashed rgba(220,235,247,.2);
}

/* ── Technology sections (batteries: lithium / gel) ──────────
   Jump pills + a comparison table up top, then one numbered
   section per technology, each holding its brand blocks.
   ─────────────────────────────────────────────────────────── */
.tech-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: clamp(28px, 3vw, 40px);
}
.tech-jump a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 14px 11px 22px;
  transition: all .3s;
}
html[dir="rtl"] .tech-jump a { padding: 11px 22px 11px 14px; }
.tech-jump a b {
  font-size: 12px;
  font-weight: 600;
  color: var(--ice-blue);
  background: rgba(23,118,187,.16);
  border-radius: 999px;
  padding: 3px 10px;
}
.tech-jump a:hover {
  border-color: var(--gulf-blue);
  transform: translateY(-2px);
}

.tech-guide {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 2.6vw, 34px);
  margin-bottom: clamp(64px, 8vw, 110px);
}
.tech-guide-title {
  font-size: clamp(20px, 1.9vw, 26px);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 18px;
}
.tech-guide-scroll { overflow-x: auto; }
.tech-guide table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 14.5px;
}
.tech-guide th, .tech-guide td {
  text-align: start;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.tech-guide tbody tr:last-child th, .tech-guide tbody tr:last-child td { border-bottom: 0; }
.tech-guide thead th {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gulf-blue-bright);
}
html[dir="rtl"] .tech-guide thead th { letter-spacing: 0; font-size: 14px; text-transform: none; }
.tech-guide tbody th { font-weight: 600; color: var(--text); white-space: nowrap; }
.tech-guide td { color: var(--muted); }
.tech-guide td:last-child { color: var(--text); }

.tech-section {
  scroll-margin-top: 100px;
  margin-bottom: clamp(80px, 10vw, 140px);
}
.tech-section:last-child { margin-bottom: 0; }
.tech-head {
  display: flex;
  align-items: flex-start;
  gap: clamp(16px, 2vw, 28px);
  margin-bottom: clamp(36px, 4.4vw, 60px);
}
.tech-num {
  flex: none;
  font-family: var(--font-latin);
  font-size: clamp(40px, 4.6vw, 64px);
  font-weight: 300;
  line-height: .9;
  color: var(--gulf-blue-bright);
  opacity: .85;
}
.tech-name {
  font-size: clamp(28px, 3.4vw, 46px);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text);
  letter-spacing: -.015em;
}
html[dir="rtl"] .tech-name { letter-spacing: 0; }
.tech-blurb {
  margin-top: 10px;
  max-width: 68ch;
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.7;
  color: var(--muted);
}
@media (max-width: 640px) {
  .tech-guide table { min-width: 0; font-size: 13.5px; }
  .tech-guide th, .tech-guide td { padding: 11px 8px; }
  .tech-guide tbody th { white-space: normal; }
  .tech-head { gap: 12px; }
}

/* hero composed with the products opposite the headline: keep that side in frame */
.cat-hero-img.hero-side { object-position: 100% 50%; }
html[dir="rtl"] .cat-hero-img.hero-side { object-position: 0% 50%; }
