/* Layout: one deep-navy "space" with depth. Hero = text beside a 3D globe; products = tilted screens on tinted stages; services = 3D objects; process = rising stairs. */
:root {
  --bg: #040c22; --bg-2: #071636; --panel: #0b1f4a; --ink: #eef4ff; --muted: #a9bbe0; --line: #4aa8ff2e;
  --navy: #06183f; --accent: #0b6cf0; --on-accent: #ffffff; --brand: #5cb3ff;
  --hospital: #4db2ff; --factory: #ff9450; --restaurant: #ff6b76; --gym: #ffc94d;
  --display: "Inter", "Segoe UI", Tahoma, sans-serif; --body: "Inter", "Segoe UI", Tahoma, sans-serif;
  color-scheme: dark;
}
/* Type: Inter for English and digits, Tajawal for Arabic (Inter has no Arabic letters, so those fall through). 700 headings, 400 text, 500 numbers. */
[lang="ar"] { --display: "Inter", "Tajawal", "Segoe UI", Tahoma, sans-serif; --body: "Inter", "Tajawal", "Segoe UI", Tahoma, sans-serif; font-family: var(--body); }
[lang="ar"] body, .view[lang="ar"] { font-size: 17px; }
[lang="ar"] :is(h1, h2, h3) { line-height: 1.5; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.7 var(--body); overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.25; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 1.2rem + 3.4vw, 3.9rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.5rem); }
h3 { font-size: 1.1rem; }
p { margin: 0; }
:focus-visible { outline: 3px solid #8fd0ff; outline-offset: 3px; }
.wrap { width: 100%; max-width: 1320px; margin-inline: auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.skip { position: absolute; inset-inline-start: 8px; top: -80px; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 8px; z-index: 40; }
.skip:focus { top: 8px; }
.hospital { --tone: var(--hospital); } .factory { --tone: var(--factory); } .restaurant { --tone: var(--restaurant); } .gym { --tone: var(--gym); }

/* header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: #040c22e8; backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 20px; min-height: 70px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-inline-end: auto; }
.logo img { width: 46px; height: 46px; flex: none; }
.logo img, .sign img { border-radius: 22%; box-shadow: 0 0 0 1px #4aa8ff80, 0 6px 18px #0b6cf066; }
.lockup { display: grid; line-height: 1.35; }
.lockup b { font: 700 1.18rem var(--display); }
.lockup small { font: 500 .72rem var(--body); color: var(--brand); }
.nav { display: flex; gap: 24px; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: .95rem; }
.nav a:hover { color: var(--ink); }
.lang { text-decoration: none; border: 1px solid #ffffff40; border-radius: 999px; padding: 3px 14px; font-size: .88rem; white-space: nowrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 12px; padding: 11px 24px; font: 700 .95rem var(--body); text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.btn.primary { background: linear-gradient(180deg, #1c7cff, #0a5fd6); color: var(--on-accent); box-shadow: 0 5px 0 #05397f, 0 14px 28px -8px #0b6cf0cc; }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 7px 0 #05397f, 0 18px 32px -8px #0b6cf0; }
.btn.primary:active { transform: translateY(4px); box-shadow: 0 1px 0 #05397f; }
.btn.line { border-color: #7fc0ff66; background: #ffffff0a; }
.btn.line:hover { background: #ffffff17; }
.btn.small { padding: 7px 16px; font-size: .88rem; }
.menu { display: none; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* hero */
.hero { position: relative; isolation: isolate; overflow: hidden; background: radial-gradient(90% 80% at 50% 10%, #0d3380 0%, var(--bg-2) 48%, var(--bg) 100%); }
.floor { position: absolute; inset: auto -50% 0 -50%; height: 62%; z-index: -1; transform-origin: bottom; transform: perspective(520px) rotateX(63deg);
  background: repeating-linear-gradient(90deg, #4aa8ff38 0 1px, transparent 1px 76px), repeating-linear-gradient(0deg, #4aa8ff38 0 1px, transparent 1px 76px);
  mask-image: linear-gradient(transparent, #000 75%); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 20px 32px; align-items: center; padding-block: 34px 28px; }
.intro { display: grid; gap: 22px; justify-items: start; }
.kicker { font-weight: 700; color: var(--brand); border: 1px solid var(--line); background: #0b6cf022; border-radius: 999px; padding: 4px 16px; font-size: .92rem; }
.intro > p:not(.kicker) { color: var(--muted); max-width: 52ch; font-size: 1.12rem; }
.scene { position: relative; width: 100%; height: clamp(380px, min(44vw, calc(100vh - 230px)), 620px); direction: ltr; }
.scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.sat { display: grid; gap: 4px; width: clamp(104px, 12vw, 164px); padding: 7px; border-radius: 14px; text-decoration: none; text-align: center; background: #0a1c46f2; border: 1px solid var(--tone); box-shadow: 0 16px 30px -12px #000, 0 0 22px -8px var(--tone); }
.sat img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.sat b { font: 700 .92rem/1.4 var(--display); color: var(--tone); }
.scene.live .sat { position: absolute; left: 0; top: 0; will-change: transform; }
.scene:not(.live) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; height: auto; }
.facts-bar { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; list-style: none; margin: 0; padding: 0; }
.facts-bar li { background: linear-gradient(180deg, #12306c, #0a1c46); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; box-shadow: 0 6px 0 #02081a; display: grid; align-content: start; }
.facts-bar b { font-size: 1.05rem; }
.facts-bar span { color: var(--muted); font-size: .9rem; }

/* sections */
section.block { padding-block: clamp(40px, 5vw, 68px); scroll-margin-top: 70px; }
.head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 4px 24px; margin-bottom: 26px; }
.head p { color: var(--muted); }

/* products */
.stages { display: grid; gap: 26px; }
.product { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 44px); align-items: center; padding: clamp(16px, 2.6vw, 38px); border-radius: 26px; border: 1px solid var(--line); scroll-margin-top: 84px;
  background: radial-gradient(80% 120% at var(--at, 100%) 50%, color-mix(in srgb, var(--tone) 24%, transparent), transparent 70%), linear-gradient(160deg, #0c2255, #071535); }
[dir="rtl"] .product { --flip: -1; }
.product:nth-child(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); --at: 0%; }
.product:nth-child(even) .view3d { order: 2; }
.view3d { perspective: 1300px; --side: 1; }
.product:nth-child(even) .view3d { --side: -1; }
.slab { position: relative; transform-style: preserve-3d; transform: rotateY(calc(var(--side) * var(--flip, 1) * 13deg + var(--ry, 0deg))) rotateX(calc(4deg + var(--rx, 0deg))); transition: transform .25s ease-out; }
.slab > img { width: 100%; border-radius: 16px; border: 1px solid #ffffff38; box-shadow: calc(var(--side) * var(--flip, 1) * -9px) 11px 0 #020a20, 0 44px 60px -24px #000, 0 0 70px -22px var(--tone); }
.float { position: absolute; z-index: 2; background: #06142ff0; border: 1px solid var(--tone); border-radius: 12px; padding: 5px 14px; font: 700 .85rem var(--body); box-shadow: 0 14px 24px -10px #000; transform: translateZ(70px); white-space: nowrap; }
.float.one { top: -14px; inset-inline-start: 18px; }
.float.two { bottom: -14px; inset-inline-end: 18px; color: var(--tone); }
.info { display: grid; gap: 14px; min-width: 0; align-content: center; }
.name { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--tone); font: 700 1rem var(--display); }
.chip { font: 500 .76rem var(--body); border: 1px solid currentColor; border-radius: 999px; padding: 0 10px; }
.product h3 { font-size: clamp(1.3rem, 1rem + 1vw, 1.85rem); }
.info > p { color: var(--muted); }
.minis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; list-style: none; padding: 0; margin: 0; }
.minis li { background: #ffffff0c; border: 1px solid #ffffff1a; border-top: 2px solid var(--tone); border-radius: 12px; padding: 9px 13px; display: grid; align-content: start; }
.minis b { font-size: .95rem; }
.minis span { color: var(--muted); font-size: .83rem; line-height: 1.55; }
.ticks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ticks li { background: #ffffff0c; border: 1px dashed #ffffff40; border-radius: 8px; padding: 2px 12px; font-size: .85rem; }
.sub { font: 700 .9rem var(--body); color: var(--tone); }

/* services: small 3D objects */
.band { background: linear-gradient(180deg, var(--bg), var(--bg-2), var(--bg)); }
.services { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; perspective: 1200px; }
.service { background: linear-gradient(170deg, #12306c, #081a44 65%); border: 1px solid var(--line); border-radius: 20px; padding: 22px; display: grid; gap: 10px; align-content: start; box-shadow: 0 10px 0 #02081a; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s ease-out; }
.service p { color: var(--muted); font-size: .95rem; }
.service code { font: 500 .8rem ui-monospace, Consolas, monospace; color: var(--brand); direction: ltr; justify-self: start; }
.obj { height: 140px; display: grid; place-items: center; perspective: 600px; direction: ltr; }
.obj > div { position: relative; width: 74px; height: 74px; transform-style: preserve-3d; }
.obj i { position: absolute; inset: 0; border-radius: 10px; border: 1.5px solid #8fd0ff; background: linear-gradient(135deg, #1c7cffcc, #06286fcc); }
.obj.layers > div { transform: rotateX(60deg) rotateZ(45deg); }
.obj.layers i:nth-child(1) { transform: translateZ(-28px); opacity: .55; }
.obj.layers i:nth-child(2) { transform: translateZ(2px); opacity: .8; }
.obj.layers i:nth-child(3) { transform: translateZ(32px); }
.obj.phone > div { width: 58px; height: 108px; transform: rotateY(-30deg) rotateX(8deg); }
.obj.phone i { border-radius: 14px; }
.obj.phone i:nth-child(1) { transform: translateZ(-9px); background: #041235; }
.obj.phone i:nth-child(2) { transform: translateZ(0); background: #0a2a6b; }
.obj.phone i:nth-child(3) { transform: translateZ(9px); background: linear-gradient(#41a0ff, #0a4fc0); }
.obj.phone i:nth-child(3)::after { content: ""; position: absolute; inset: 14px 9px auto; height: 34px; border-radius: 6px; background: #ffffffd9; box-shadow: 0 42px 0 -10px #ffffffa6, 0 58px 0 -13px #ffffff80; }
.obj.cube > div { transform: rotateX(-24deg) rotateY(38deg); }
.obj.cube i { border-radius: 6px; }
.obj.cube i:nth-child(1) { transform: translateZ(37px); }
.obj.cube i:nth-child(2) { transform: rotateY(180deg) translateZ(37px); }
.obj.cube i:nth-child(3) { transform: rotateY(90deg) translateZ(37px); }
.obj.cube i:nth-child(4) { transform: rotateY(-90deg) translateZ(37px); }
.obj.cube i:nth-child(5) { transform: rotateX(90deg) translateZ(37px); background: linear-gradient(135deg, #8fd0ff, #1c7cff); }
.obj.cube i:nth-child(6) { transform: rotateX(-90deg) translateZ(37px); }
.obj.coin > div { width: 94px; height: 94px; transform: rotateY(-28deg); }
.obj.coin i { border-radius: 50%; }
.obj.coin i:nth-child(1) { transform: translateZ(-12px); background: #041235; }
.obj.coin i:nth-child(2) { transform: translateZ(-6px); background: #0a2a6b; }
.obj.coin i:nth-child(3) { transform: translateZ(0); background: #0b3f99; }
.obj.coin img { position: absolute; inset: 11px; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; transform: translateZ(8px); }
@media (prefers-reduced-motion: no-preference) {
  .obj.layers > div { animation: layers 9s ease-in-out infinite; }
  .obj.phone > div { animation: sway 7s ease-in-out infinite; }
  .obj.cube > div { animation: cube 12s linear infinite; }
  .obj.coin > div { animation: sway 6s ease-in-out infinite; }
  @keyframes layers { 50% { transform: rotateX(60deg) rotateZ(135deg); } }
  @keyframes sway { 50% { transform: rotateY(32deg) rotateX(-6deg); } }
  @keyframes cube { to { transform: rotateX(-24deg) rotateY(398deg); } }
  .float { animation: bob 5s ease-in-out infinite; }
  .float.two { animation-delay: -2.5s; }
  @keyframes bob { 50% { translate: 0 -8px; } }
  .coin-big { animation: turn 8s ease-in-out infinite; }
  @keyframes turn { 50% { transform: rotateY(20deg) rotateX(-6deg) translateY(-10px); } }
}

/* process: stairs that rise in reading order */
.steps { list-style: none; padding: 26px 0 12px; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; align-items: end; counter-reset: step; }
.steps li { counter-increment: step; position: relative; min-height: calc(190px + var(--n) * 42px); padding: 20px; border-radius: 4px 4px 12px 12px; background: linear-gradient(180deg, #154196, #08194a); display: grid; gap: 6px; align-content: start; }
.steps li::after { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 16px; background: linear-gradient(#8fd0ff, #3a86e8); clip-path: polygon(16px 0, calc(100% - 16px) 0, 100% 100%, 0 100%); }
.steps li::before { content: counter(step); font: 500 2.4rem/1 var(--display); color: #8fd0ff; }
.steps p { color: var(--muted); font-size: .95rem; }

/* contact */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 36px; align-items: stretch; }
.contact > div:first-child { display: grid; gap: 14px; align-content: start; }
.contact p { color: var(--muted); }
.channels { display: grid; gap: 10px; }
.channel { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; box-shadow: 0 5px 0 #02081a; }
.channel b { min-width: 5em; }
.channel a { direction: ltr; unicode-bidi: isolate; overflow-wrap: anywhere; margin-inline-end: auto; }
.channel button { font: 500 .8rem var(--body); background: transparent; color: inherit; border: 1px solid #ffffff40; border-radius: 6px; padding: 2px 10px; cursor: pointer; }
.note { border: 1px dashed var(--brand); border-radius: 10px; padding: 12px 14px; font-size: .92rem; }
.badge { perspective: 800px; display: grid; place-items: center; padding-block: 12px; flex: 1; }
.coin-big { width: min(270px, 70vw); border-radius: 50%; transform: rotateY(-20deg) rotateX(6deg); box-shadow: 8px 9px 0 #052c70, 14px 16px 0 #03163d, 0 40px 60px -20px #000, 0 0 60px -10px #0b6cf0; }
form { background: linear-gradient(170deg, #102a60, #08193f); border: 1px solid var(--line); border-radius: 22px; padding: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-content: start; box-shadow: 0 10px 0 #02081a; }
form label { display: grid; gap: 5px; font-size: .9rem; font-weight: 500; min-width: 0; }
form .full { grid-column: 1 / -1; }
input, select, textarea { width: 100%; font: 400 1rem var(--body); color: var(--ink); background: #030a1f; border: 1px solid #4aa8ff40; border-radius: 10px; padding: 10px 13px; }
textarea { min-height: 150px; resize: vertical; }
.result { font-size: .92rem; color: var(--brand); }
.result:empty { display: none; }

/* product page */
.phero .wrap { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 24px 44px; align-items: center; padding-block: 48px 60px; }
.phero { background: radial-gradient(80% 100% at 50% 0%, color-mix(in srgb, var(--tone) 30%, #0a2560), var(--bg) 85%); }
.phero .view3d { --side: -1; }
.phero .slab { --flip: 1; } [dir="rtl"] .phero .slab { --flip: -1; }
.crumb { color: var(--muted); font-size: .9rem; }
.phero p { color: var(--muted); font-size: 1.08rem; }
.feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; perspective: 1200px; }
.feat { background: linear-gradient(170deg, #102a60, #08193f); border: 1px solid var(--line); border-top: 3px solid var(--tone); border-radius: 16px; padding: 20px 22px; display: grid; gap: 4px; align-content: start; box-shadow: 0 8px 0 #02081a; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s ease-out; }
.feat h3 { color: var(--tone); }
.feat p { color: var(--muted); font-size: .95rem; }
.extra { display: grid; gap: 30px; margin-top: 38px; }
.extra h3 { margin-bottom: 12px; }
.extra dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0; }
.extra dl div { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; }
.extra dt { color: var(--tone); font-weight: 700; font-size: .9rem; }
.extra dd { margin: 0; }
.others { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; perspective: 1200px; }
.others a { display: grid; gap: 10px; text-decoration: none; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 10px 10px 14px; box-shadow: 0 8px 0 #02081a; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s ease-out; }
.others img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; }
.others b { color: var(--tone); text-align: center; }

footer { background: #020819; border-top: 1px solid var(--line); color: var(--muted); }
footer .wrap { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 28px; padding-block: 40px 26px; font-size: .93rem; }
footer h3 { color: var(--ink); font-size: 1rem; margin-bottom: 8px; }
footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
footer ul a { text-decoration: none; } footer ul a:hover { color: var(--ink); }
.sign { display: flex; align-items: center; gap: 12px; color: var(--ink); margin-bottom: 14px; }
.sign img { width: 58px; height: 58px; }
.mailto { direction: ltr; unicode-bidi: isolate; display: inline-block; overflow-wrap: anywhere; color: var(--brand); }
.social { color: var(--brand); font-weight: 700; }
.legal { grid-column: 1 / -1; border-top: 1px solid #ffffff14; padding-top: 18px; font-size: .85rem; }
.lost { min-height: 80vh; display: grid; place-content: center; justify-items: center; gap: 18px; text-align: center; }
.lost img { border-radius: 50%; }

@media (max-width: 1100px) {
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .minis { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 940px) {
  .nav, .top .btn { display: none; }
  .menu { display: block; position: relative; }
  .menu summary { list-style: none; cursor: pointer; border: 1px solid #ffffff40; border-radius: 8px; padding: 4px 12px; font-size: .88rem; }
  .menu summary::-webkit-details-marker { display: none; }
  .menu div { position: absolute; inset-inline-end: 0; top: calc(100% + 10px); background: #0b2257; border: 1px solid #ffffff2e; border-radius: 12px; padding: 8px; display: grid; min-width: 190px; }
  .menu a { text-decoration: none; padding: 8px 12px; }
  .hero .wrap, .product, .product:nth-child(even), .contact, .phero .wrap { grid-template-columns: minmax(0, 1fr); }
  .product:nth-child(even) .view3d { order: 0; }
  .view3d { padding-block: 14px; }
  .slab { transform: rotateY(calc(var(--side) * var(--flip, 1) * 6deg)) rotateX(3deg); }
  .scene { height: clamp(330px, 78vw, 560px); }
  .minis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts-bar, .steps, .feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps li { min-height: 190px; }
  .steps { row-gap: 34px; }
  footer .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .services, .steps, .feats, form, .extra dl { grid-template-columns: minmax(0, 1fr); }
  .minis { gap: 8px; }
  .minis li { padding: 8px 10px; }
  .minis span { display: none; }
  .others { grid-template-columns: minmax(0, 1fr); }
  .steps li { min-height: 0; }
  .logo img { width: 40px; height: 40px; }
  .logo .lockup small { display: none; }
  .top .wrap { gap: 8px; }
  .lockup b { font-size: 1.04rem; }
  .lang { padding-inline: 11px; }
  .sat b { font-size: .78rem; }
  .sat { padding: 5px; width: 98px; }
  footer .wrap > div:first-child, footer .wrap > div:nth-child(4) { grid-column: 1 / -1; }
  .facts-bar { gap: 10px; }
  .facts-bar li { padding: 10px 12px; }
}
