/* ==========================================================================
   Machines Innovation
   1. Fonts  2. Base  3. Header  4. Hero  5. Ticker  6. Sections  7. About
   8. Process  9. Custom panel  10. Sectors  11. Gallery  12. Contact
   13. Footer  14. Dialogs  15. Responsive  16. Right-to-left  17. Motion
   ========================================================================== */

/* 1. Fonts (WOFF2, Latin subset; Arabic loads only when Arabic text is on the page) */
@font-face { font-family: "Noto Sans Arabic"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(../fonts/noto-sans-arabic.woff2) format("woff2"); size-adjust: 112%; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/inter-400.woff2) format("woff2"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/inter-600.woff2) format("woff2"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/inter-700.woff2) format("woff2"); }

/* 2. Base */
:root {
  --bg: #081323;
  --card: #11243b;
  --card-deep: #0b1a2b;
  --orange: #f47a20;
  --ink: #111927;
  --white: #f4f7fb;
  --muted: #aab8c9;
  --stroke: rgba(255, 255, 255, .12);
  --glow: rgba(244, 122, 32, .23);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; overscroll-behavior-x: none; -webkit-text-size-adjust: 100%; }
html.i18n-wait { background: var(--bg); }
/* Hide only the text that is about to be translated, so the hero image and title can paint right away. */
html.i18n-wait [data-t], html.i18n-wait #sectorGrid { visibility: hidden; }
body { margin: 0; background: var(--bg); color: var(--white); font-family: Inter, system-ui, "Segoe UI", Arial, sans-serif; line-height: 1.65; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(circle at 80% 12%, rgba(244, 122, 32, .10), transparent 25%), radial-gradient(circle at 5% 60%, rgba(65, 116, 168, .11), transparent 35%); }
body.modal-open { overflow: hidden; }
main { overflow-x: clip; }
@supports not (overflow: clip) { main { overflow-x: hidden; } }
a { color: inherit; text-decoration: none; }
.container { width: min(1180px, 92%); margin: auto; }
.accent { color: var(--orange); }
.num { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.skip { position: absolute; left: 0; top: -120px; z-index: 100; background: var(--orange); color: var(--ink); padding: 10px 14px; border-radius: 0 0 8px 8px; font-weight: 700; }
.skip:focus { top: 0; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
.btn { display: inline-flex; gap: 9px; align-items: center; justify-content: center; padding: 12px 18px; border: 1px solid var(--orange); border-radius: 8px; font-weight: 700; transition: transform .25s, box-shadow .25s, background .25s; }
.btn-main { background: var(--orange); color: var(--ink); box-shadow: 0 0 22px var(--glow); }
.btn-ghost { background: transparent; color: var(--white); border-color: var(--stroke); }
.btn-ghost:hover { border-color: var(--orange); color: var(--orange); box-shadow: none; }
.btn:hover { transform: translateY(-3px); box-shadow: 0 10px 28px var(--glow); }
.backtop { position: fixed; bottom: 86px; inset-inline-end: 22px; z-index: 20; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--orange); color: var(--bg); font-weight: 700; box-shadow: 0 0 22px var(--glow); }
.wa-float { position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 21; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 999px; background: #25d366; color: #062812; font-weight: 700; font-size: 15px; box-shadow: 0 6px 22px rgba(0, 0, 0, .35); transition: transform .25s; }
.wa-float:hover { transform: translateY(-3px); }

/* 3. Header */
.header { position: sticky; top: 0; z-index: 50; background: rgba(8, 19, 35, .84); backdrop-filter: blur(16px); border-bottom: 1px solid var(--stroke); }
.head-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: 2px; }
.brand small { display: block; color: var(--orange); font-size: 12px; letter-spacing: 4px; }
.logo { position: relative; display: grid; place-items: center; width: 43px; height: 43px; border: 2px solid var(--orange); border-radius: 50%; font-size: 12px; }
.logo::after { content: ""; position: absolute; inset: -6px; border: 1px dashed var(--orange); border-radius: 50%; animation: spin 18s linear infinite; }
.nav { display: flex; gap: 24px; font-size: 14px; color: var(--muted); }
.nav a { position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -7px; height: 2px; background: var(--orange); transition: .3s; }
.nav a:hover { color: white; }
.nav a:hover::after, .nav a[aria-current=true]::after { right: 0; }
.nav a[aria-current=true] { color: white; }
.nav .nav-cta { padding: 7px 16px; border: 1px solid var(--orange); border-radius: 8px; color: var(--orange); font-weight: 600; }
.nav .nav-cta::after { display: none; }
.nav .nav-cta:hover, .nav .nav-cta[aria-current=true] { background: var(--orange); color: var(--ink); }
.head-actions { display: flex; gap: 9px; align-items: center; }
.lang { display: flex; gap: 5px; }
.lang a { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font: inherit; background: transparent; border: 1px solid var(--stroke); border-radius: 7px; color: var(--muted); padding: 7px 9px; cursor: pointer; }
.lang a.active, .lang a:hover { background: var(--orange); border-color: var(--orange); color: #091322; }
.menu-btn { display: none; background: none; border: 1px solid var(--stroke); border-radius: 8px; color: white; padding: 9px 12px; font-size: 20px; }

/* 4. Hero */
.hero { position: relative; display: flex; align-items: center; width: 100%; min-height: 620px; margin: 0; padding: clamp(48px, 7vw, 88px) max(4%, calc((100% - 1180px) / 2)); overflow: hidden; isolation: isolate; }
.hero-content { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; width: min(100%, 620px); text-align: start; }
.kicker { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--orange); font-size: 13px; letter-spacing: 4px; text-transform: uppercase; }
.kicker::before, .kicker::after { content: ""; width: 34px; height: 1px; background: var(--orange); }
h1 { font-size: clamp(42px, 6vw, 78px); line-height: 1.03; letter-spacing: 4px; font-weight: 600; margin: 20px 0 12px; }
h1 span { display: block; color: var(--orange); }
.hero h2 { font-size: clamp(16px, 2vw, 21px); font-weight: 400; letter-spacing: 2px; color: #bdc8d6; margin: 20px 0; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 12px; margin-top: 28px; }
.hero-copy { max-width: 610px; margin: 0; font-size: 17px; color: #d3dce7; }
.hero .kicker { justify-content: flex-start; }
.hero .kicker::before, .hero .kicker::after { display: none; }
/* The photo spans the whole band, centred; only its top and bottom edges fade into the page background. A darker veil on the text side keeps the copy readable. */
.hero { --fade: to right; }
.visual { position: absolute; inset-block: 0; inset-inline: 0; z-index: -1;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 24%, #000 72%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 24%, #000 72%, transparent 100%);
  -webkit-mask-composite: source-in; mask-composite: intersect; }
.visual img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(var(--fade), rgba(8, 19, 35, .84), rgba(8, 19, 35, .66) 45%, rgba(8, 19, 35, .52)); pointer-events: none; }

/* 5. Ticker */
.ticker { overflow: hidden; direction: ltr; contain: paint; border-block: 1px solid var(--stroke); background: #0c1b2e; padding: 14px 0; }
.ticker-track { display: flex; gap: 32px; width: max-content; animation: marquee 32s linear infinite; }
.ticker-item { color: #b5c1d0; white-space: nowrap; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }
.ticker-item b { color: var(--orange); }

/* 6. Sections */
.section { padding: 85px 0; }
.section-head { max-width: 760px; margin: 0 auto 32px; text-align: center; }
.section-title { font-size: clamp(28px, 4vw, 42px); line-height: 1.2; margin: 0 0 14px; }
.section-title span { color: var(--orange); }
.lead { color: var(--muted); font-size: 16px; }
.section-head .lead { margin-inline: auto; }
.spec-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.tag { padding: 10px 14px; border: 1px solid rgba(244, 122, 32, .35); border-radius: 30px; color: #f4c59f; background: rgba(244, 122, 32, .05); }

/* 7. About */
.about-photo { width: min(250px, 68%); margin: 22px auto 6px; text-align: center; }
.about-photo img { display: block; width: 100%; height: auto; border: 2px solid rgba(244, 122, 32, .55); border-radius: 14px; box-shadow: 0 10px 28px rgba(0, 0, 0, .38); }
.about-body { max-width: 760px; margin: 8px auto 0; text-align: center; }
.about-body h3, .about-body p.tagline { font: inherit; font-size: 20px; font-weight: 700; line-height: 1.5; color: #fff; margin: 28px 0 12px; letter-spacing: 0; text-align: center; }
.about-body p { font: inherit; font-size: 16px; line-height: 1.8; color: var(--muted); margin: 0 0 14px; text-align: center; }
.about-body strong { color: #fff; font-weight: 600; }
.about-body .tagline span { color: inherit; }
.about-tags { margin-top: 24px; }
.about-toggle-wrap { text-align: center; margin-top: 18px; }
.about-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 11px 24px; border: 1.5px solid var(--orange); border-radius: 999px; background: rgba(244, 122, 32, .12); color: var(--orange); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; transition: .25s; }
.about-toggle:hover { background: var(--orange); color: var(--ink); }
.about-toggle:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
.about-toggle .chev { display: inline-block; transition: transform .25s; }
.about-toggle[aria-expanded=true] .chev { transform: rotate(180deg); }
.about-more[hidden] { display: none; }

/* 8. Process: four phases stacked on a vertical timeline (no moving parts) */
.process-num { display: block; direction: ltr; unicode-bidi: isolate; text-align: start; color: var(--orange); font-size: 12px; letter-spacing: 2px; }
.steps { position: relative; display: grid; gap: 22px; margin: 0; padding: 0; list-style: none; }
/* The rail runs behind the numbered nodes. */
.steps::before { content: ""; position: absolute; top: 24px; bottom: 24px; inset-inline-start: 23px; width: 2px; background: linear-gradient(180deg, var(--orange), rgba(244, 122, 32, .12)); }
.step { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 20px; align-items: start; }
.step-node { position: relative; z-index: 1; display: grid; place-items: center; width: 48px; height: 48px; border: 2px solid var(--orange); border-radius: 50%; background: var(--bg); color: var(--orange); font-size: 15px; font-weight: 700; direction: ltr; box-shadow: 0 0 0 6px var(--bg), 0 0 22px var(--glow); }
.step-card { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); overflow: hidden; border: 1px solid var(--stroke); border-radius: 16px; background: linear-gradient(160deg, var(--card), var(--card-deep)); cursor: pointer; transition: border-color .3s, transform .3s, box-shadow .3s; }
.step-card:hover { border-color: var(--orange); transform: translateY(-3px); box-shadow: 0 15px 35px rgba(244, 122, 32, .1); }
/* Every second card flips: photo on the reading-start side. */
.step:nth-child(even) .step-media { order: -1; }
.step-body { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 28px 28px 26px; }
.step-body h3 { margin: 0; font-size: 21px; line-height: 1.35; }
.step-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.step-chips .tag { padding: 6px 12px; font-size: 13px; }
.step-more { align-self: flex-start; margin-top: auto; padding: 10px 20px; border: 1.5px solid var(--orange); border-radius: 999px; background: rgba(244, 122, 32, .14); color: var(--orange); font: inherit; font-size: 14px; font-weight: 700; line-height: 1.3; cursor: pointer; transition: .25s; }
.step-card:hover .step-more, .step-more:focus-visible { background: var(--orange); color: var(--ink); }
.step-more:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
.step-media { position: relative; min-height: 260px; overflow: hidden; background: var(--card-deep); }
.step-media img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.step-media img[src*="process-1."] { object-position: 50% 58%; }
.step-media img[src*="process-2."] { object-position: 50% 55%; }
.step-card:hover .step-media img { transform: scale(1.04); }
/* Phases without a photo: a large glyph on a soft blueprint grid. */
.step-art { display: grid; place-items: center; background: radial-gradient(circle at 50% 45%, rgba(244, 122, 32, .20), transparent 62%), linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px) 0 0 / 28px 28px, linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px) 0 0 / 28px 28px, var(--card-deep); }
.step-glyph { display: grid; place-items: center; color: var(--orange); filter: drop-shadow(0 0 18px var(--glow)); }
.step-glyph svg { display: block; width: clamp(84px, 11vw, 120px); height: auto; }
.phase-img { display: block; width: 100%; max-height: 38vh; aspect-ratio: 16 / 10; margin: 0 0 18px; object-fit: cover; border-radius: 12px; }
.phase-img[hidden] { display: none; }
.phase-img[src*="process-1."] { object-position: 50% 58%; }
@media (max-width: 760px) {
  .steps { gap: 16px; }
  .steps::before { top: 18px; bottom: 18px; inset-inline-start: 17px; }
  .step { grid-template-columns: 36px minmax(0, 1fr); gap: 12px; }
  .step-node { width: 36px; height: 36px; font-size: 12px; box-shadow: 0 0 0 5px var(--bg), 0 0 16px var(--glow); }
  .step-card { grid-template-columns: 1fr; border-radius: 14px; }
  .step-media, .step:nth-child(even) .step-media { order: -1; min-height: 0; aspect-ratio: 16 / 10; }
  .step-art { aspect-ratio: 16 / 7; }
  .step-glyph svg { width: 64px; }
  .step-body { gap: 10px; padding: 18px 16px 18px; }
  .step-body h3 { font-size: 18px; }
  .step-more { width: 100%; text-align: center; }
}

.motion-bar { display: flex; justify-content: center; }
.motion-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; min-width: 44px; margin-top: 10px; padding: 8px 18px; border: 1px solid var(--stroke); border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.motion-toggle:hover, .motion-toggle:focus-visible { border-color: var(--orange); color: var(--white); }
.motion-toggle:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* 9. Custom panel */
.spec-panel { display: grid; grid-template-columns: 1fr; gap: 30px; align-items: center; justify-items: center; padding: 30px; border: 1px solid var(--stroke); border-radius: 18px; background: linear-gradient(120deg, #0d1d31, #12243a); text-align: center; }
.spec-panel h2 { margin: 0 0 12px; }

/* 10. Sectors */
.sector-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; max-width: 980px; margin: 8px auto 0; }
.sector-card { padding: 22px; border: 1px solid var(--stroke); border-radius: 13px; background: linear-gradient(160deg, var(--card), var(--card-deep)); text-align: start; }
.sector-card.wide { grid-column: span 2; }
.sector-num { direction: inherit; text-align: start; }
.sector-card h3 { font-size: 18px; line-height: 1.4; margin: 8px 0 12px; color: #fff; }
.sector-card ul { list-style: none; margin: 0; padding: 0; }
.sector-card li { position: relative; margin: 0 0 8px; padding-inline-start: 16px; color: var(--muted); font-size: 14.5px; line-height: 1.7; }
.sector-card li::before { content: ""; position: absolute; inset-inline-start: 0; top: .7em; width: 5px; height: 5px; border-radius: 50%; background: var(--orange); }
.sector-card li strong { color: #fff; font-weight: 600; }
.sector-card p { color: var(--muted); font-size: 15px; line-height: 1.8; margin: 0; }
.sector-photo { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; margin: 0 0 16px; object-fit: cover; border: 1px solid var(--stroke); border-radius: 10px; background: var(--card-deep); }
/* Cards 01 and 02 both carry photos and have similar heights, so a plain 2-column grid (01|02, 03|04) leaves no gap. */
.sector-card li .sector-photo { width: calc(100% + 16px); margin: 10px 0 10px; margin-inline-start: -16px; }
@media (min-width: 761px) { .sector-card:nth-child(3) { align-self: start; } }
.sector-card li .sector-photo-portrait { width: min(300px, 100%); aspect-ratio: 3 / 4; margin-inline: auto; }
.sector-note { max-width: 760px; margin: 24px auto 0; text-align: center; color: var(--muted); line-height: 1.8; }

/* 11. Gallery */
.gal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 8px; }
.gal-item { display: block; width: 100%; aspect-ratio: 3 / 4; margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--stroke); border-radius: 12px; background: var(--card); line-height: 0; cursor: zoom-in; }
.gal-item img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gal-item img[src*="gallery-2."] { object-position: 35% 50%; }
.gal-item img[src*="gallery-8."] { object-position: 42% 50%; }
.gal-item:hover img { transform: scale(1.03); }
.gal-item:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* 12. Contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-card { padding: 24px; border: 1px solid var(--stroke); border-radius: 14px; background: var(--card); text-align: center; transition: .3s; }
.contact-card:hover { border-color: rgba(244, 122, 32, .55); transform: translateY(-4px); }
.contact-card h3 { display: flex; align-items: center; justify-content: center; gap: 9px; margin: 0 0 10px; }
.flag { display: block; width: 22px; height: 15px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .22); }
.contact-card p { color: var(--muted); margin: 8px 0; }
.contact-extra { margin-top: 16px; }
.social { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 17px; }
.social a { padding: 10px 13px; border: 1px solid var(--stroke); border-radius: 8px; transition: .25s; }
.social a:hover { border-color: var(--orange); color: var(--orange); transform: translateY(-2px); }

/* 404 page */
.page-404 { display: grid; place-content: center; gap: 14px; min-height: 70vh; text-align: center; }
.page-404 h1 { letter-spacing: 0; }

/* 13. Footer */
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 15px; padding: 26px 0; border-top: 1px solid var(--stroke); color: var(--muted); font-size: 13px; }
footer .container { display: flex; flex-direction: column; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; text-align: center; }

/* 14. Dialogs: process phase and image lightbox */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(4, 10, 20, .78); }
.modal[hidden], .lb[hidden] { display: none; }
.modal-box { position: relative; width: min(640px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; padding: 28px 24px 24px; border: 1px solid var(--stroke); border-radius: 18px; background: var(--card-deep); text-align: start; }
.modal-box h3 { font-size: 20px; line-height: 1.45; margin: 6px 0 18px; padding-inline-end: 40px; color: #fff; }
.modal-box ul { list-style: none; margin: 0; padding: 0; }
.modal-box li { color: var(--muted); line-height: 1.8; font-size: 15px; margin: 0 0 16px; }
.modal-box li strong { display: block; margin-bottom: 2px; color: #fff; font-weight: 600; }
.modal-close { z-index: 2; background: rgba(8, 19, 35, .72); position: absolute; top: 12px; inset-inline-end: 12px; width: 38px; height: 38px; border: 1px solid var(--stroke); border-radius: 50%; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.modal-close:focus-visible, .modal-box:focus-visible { outline: 2px solid var(--orange); }
#phaseNum { text-align: start; }
.lb { position: fixed; inset: 0; z-index: 210; display: flex; align-items: center; justify-content: center; padding: 60px 12px 64px; background: rgba(3, 8, 16, .94); }
.lb img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.lb-cap { position: absolute; left: 0; right: 0; bottom: 16px; padding: 0 64px; text-align: center; color: #d5deea; font-size: 14px; line-height: 1.5; }
.lb button { position: absolute; width: 44px; height: 44px; border: 1px solid var(--stroke); border-radius: 50%; background: rgba(17, 36, 59, .88); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.lb button:focus-visible { outline: 2px solid var(--orange); }
.lb-close { top: 10px; inset-inline-end: 10px; }
.lb-prev, .lb-next { top: 50%; margin-top: -22px; }
/* Physical on purpose: the arrows keep their screen side in RTL; main.js swaps what they do. */
.lb-prev { left: 10px; }
.lb-next { right: 10px; }

/* 15. Responsive */
@media (max-width: 900px) {
  .nav { gap: 12px; }
}
@media (min-width: 651px) and (max-width: 900px) {
  .nav { font-size: 12px; }
  .hero { min-height: 540px; }
  h1 { letter-spacing: 2px; }
}
@media (max-width: 760px) {
  .sector-grid { grid-template-columns: 1fr; }
  .sector-card.wide { grid-column: auto; }
}
@media (max-width: 650px) {
  .container { width: min(100% - 30px, 1180px); }
  .head-inner { min-height: 66px; gap: 8px; }
  .brand { gap: 8px; font-size: 12px; letter-spacing: 1.2px; white-space: nowrap; }
  .brand small { font-size: 12px; letter-spacing: 1px; }
  .logo { width: 34px; height: 34px; font-size: 12px; }
  .lang { gap: 3px; }
  .lang a { min-width: 44px; min-height: 44px; padding: 6px; font-size: 12px; }
  .menu-btn { display: block; min-width: 44px; min-height: 44px; padding: 7px 9px; font-size: 18px; }
  .nav { display: none; position: absolute; top: 66px; left: 15px; right: 15px; flex-direction: column; gap: 0; padding: 8px; border: 1px solid var(--stroke); border-radius: 12px; background: #0b1a2d; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 10px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
  .nav a:last-child { border-bottom: 0; }
  .hero { min-height: 0; padding: 36px 15px 44px; }
  .hero-content { min-width: 0; }
  .kicker { gap: 8px; font-size: 13px; letter-spacing: 1.5px; }
  .hero-cta { flex-direction: column; align-items: stretch; width: 100%; margin-top: 22px; }
  .kicker::before { width: 22px; flex: 0 0 22px; }
  h1 { font-size: clamp(36px, 10vw, 54px); letter-spacing: 1.5px; line-height: 1.06; margin: 16px 0 10px; overflow-wrap: anywhere; }
  .hero h2 { font-size: 15px; letter-spacing: 1px; line-height: 1.5; margin: 14px 0; }
  .hero-copy { font-size: 14px; line-height: 1.75; }
  /* On phones the text covers the photo: it spans the full width, fades top and bottom, and is darkened for legibility. */
  .visual { inset-inline: 0; }
  .visual { -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%); }
  .visual::after { background: rgba(8, 19, 35, .66); }
  .ticker { padding: 11px 0; }
  .ticker-track { gap: 18px; animation-duration: 40s; }
  .ticker-item { font-size: 12px; letter-spacing: 1.2px; }
  .section { padding: 43px 0; }
  .section-head { margin-bottom: 22px; }
  .section-title { font-size: clamp(25px, 7.5vw, 34px); letter-spacing: -.3px; }
  .lead { font-size: 14px; line-height: 1.7; }
  .about-body p { font-size: 15px; }
  .about-body h3, .about-body p.tagline { font-size: 18px; }
  .spec-panel { gap: 20px; padding: 20px 17px; border-radius: 14px; }
  .spec-tags { gap: 8px; }
  .tag { padding: 8px 11px; font-size: 12px; }
  .gal { grid-template-columns: 1fr 1fr; gap: 8px; }
  .contact { grid-template-columns: 1fr; gap: 12px; }
  .contact-card { padding: 19px 16px; border-radius: 12px; }
  .contact-card h3 { font-size: 17px; }
  .contact-card p { font-size: 13px; overflow-wrap: anywhere; }
  .btn { width: 100%; min-height: 46px; padding: 12px 14px; font-size: 14px; }
  .social { gap: 8px; }
  .social a { flex: 1; padding: 10px 8px; text-align: center; font-size: 13px; }
  footer { flex-direction: column; gap: 8px; padding: 20px 0; font-size: 12px; }
  .backtop { width: 40px; height: 40px; inset-inline-end: 12px; bottom: 72px; }
  .wa-float { inset-inline-end: 12px; bottom: 12px; min-height: 46px; padding: 0 16px; }
}
@media (max-width: 390px) {
  .head-inner { gap: 5px; }
  .brand { letter-spacing: .5px; }
  .brand small { letter-spacing: .5px; }
}
/* Very narrow phones: keep the logo, hide the name visually (screen readers still read it). */
@media (max-width: 359px) {
  .brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
@media (hover: none) {
  .btn:hover, .wa-float:hover, .step-card:hover, .contact-card:hover, .social a:hover, .gal-item:hover img { transform: none; }
  .nav a:hover::after { right: 100%; }
  .step-card:hover .step-more { background: rgba(244, 122, 32, .14); color: var(--orange); }
  .step-card:hover .step-media img { transform: none; }
}

/* 16. Right-to-left (Arabic) */
[dir=rtl] body { font-family: "Noto Sans Arabic", Inter, "Segoe UI", Tahoma, Arial, sans-serif; }
/* Letter spacing breaks Arabic letter joining, so it is disabled everywhere. */
[dir=rtl] * { letter-spacing: 0 !important; }
[dir=rtl] .ticker-item { direction: rtl; unicode-bidi: isolate; }
[dir=rtl] .ticker-item b { margin-left: 30px; }
[dir=rtl] .hero { --fade: to left; }


[dir=rtl] .section-title { line-height: 1.4; }
[dir=rtl] .sector-card h3, [dir=rtl] .modal-box h3 { line-height: 1.6; }
[dir=rtl] #phaseNum { text-align: right; }

/* 17. Motion */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes marquee { to { transform: translateX(-50%); } }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s, transform .7s; }
.reveal.show { opacity: 1; transform: none; }
html.motion-off .ticker-track, html.motion-off .logo::after { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .ticker-track, .logo::after { animation: none; }
  .motion-bar { display: none; }
}

/* 18. Gallery page (videos + photos) */
.gallery-page { padding-top: 40px; }
.back-wrap { margin: 0 0 22px; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 14px; }
.back-link:hover { color: var(--orange); }
.gallery-page h1.section-title { letter-spacing: 0; margin-top: 16px; }
.gal-sub { margin: 34px 0 14px; font-size: 22px; line-height: 1.3; }
.gal-sub::after { content: ""; display: block; width: 44px; height: 2px; margin-top: 8px; background: var(--orange); }
.vid-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.vid-card { margin: 0; aspect-ratio: 9 / 16; overflow: hidden; border: 1px solid var(--stroke); border-radius: 12px; background: #000; line-height: 0; }
.vid-card video { display: block; width: 100%; height: 100%; object-fit: cover; background: #000; }
.vid-card video:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }
.nav a[aria-current=page] { color: white; }
.nav a[aria-current=page]::after { right: 0; }
@media (max-width: 900px) { .vid-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 650px) {
  .gallery-page { padding-top: 24px; }
  .vid-grid { gap: 8px; }
  .gal-sub { font-size: 19px; margin-top: 26px; }
}
[dir=rtl] .gal-sub { line-height: 1.5; }

/* 19. Home gallery: 4 photos + link to the gallery page */
.gal-home { grid-template-columns: repeat(4, 1fr); }
.gal-more { display: flex; justify-content: center; margin-top: 26px; }
@media (max-width: 760px) { .gal-home { grid-template-columns: 1fr 1fr; } }
@media (max-width: 650px) { .gal-home { gap: 8px; } }
