:root {
  --bg: #09090b;
  --card: #18181b;
  --line: #27272a;
  --line-strong: #3f3f46;
  --text: #fafafa;
  --muted: #a1a1aa;
  --dim: #71717a;
  --press: #e4e4e7;
  --ok: #4ade80;
  --sphere: #18181b;
  --near: rgb(0 0 0 / 0.15);
  --far: #000;
  --bar: rgb(9 9 11 / 0.6);
  --glass: rgb(24 24 27 / 0.6);
  --edge: rgb(255 255 255 / 0.08);
  --shadow: rgb(0 0 0 / 0.8);
  --ink: invert(1);
  --ease: 180ms ease-out;
  color-scheme: dark;
}
/* The globe's lines are drawn white, so light mode inverts them. */
:root[data-theme="light"] {
  --bg: #ffffff;
  --card: #f4f4f5;
  --line: #e4e4e7;
  --line-strong: #d4d4d8;
  --text: #09090b;
  --muted: #52525b;
  --dim: #71717a;
  --press: #27272a;
  --ok: #16a34a;
  --sphere: #ffffff;
  --near: #000;
  --far: rgb(0 0 0 / 0.7);
  --bar: rgb(255 255 255 / 0.7);
  --glass: rgb(255 255 255 / 0.7);
  --edge: rgb(0 0 0 / 0.08);
  --shadow: rgb(0 0 0 / 0.12);
  --ink: none;
  color-scheme: light;
}
:root[data-theme="light"] .globe-art img { filter: invert(1); }

@font-face {
  font-family: "Noto Sans Arabic";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/noto-sans-arabic.woff2) format("woff2-variations");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

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

html { background: var(--bg); color: var(--text); scroll-behavior: smooth; }

body {
  font: 16px/26px Inter, "Noto Sans Arabic", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

svg[hidden] { display: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 8px; }

.wrap { max-width: 1248px; margin-inline: auto; padding-inline: 24px; }

.skip { position: absolute; inset-inline-start: 16px; top: -48px; padding: 8px 12px; background: var(--text); color: var(--bg); border-radius: 8px; z-index: 20; }
.skip:focus { top: 12px; }

/* Top bar */
.bar { position: sticky; top: 0; z-index: 10; margin-bottom: -65px; background: var(--bar); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid var(--edge); }
.bar-in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo img { display: block; height: 20px; width: auto; filter: var(--ink); }
.bar-end { display: flex; align-items: center; gap: 24px; }

.link { font-size: 14px; line-height: 20px; color: var(--muted); transition: color var(--ease); }
.link:hover { color: var(--text); }

.btn { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding-inline: 16px; border-radius: 8px; border: 1px solid var(--line-strong); font-size: 14px; font-weight: 500; transition: background-color var(--ease), border-color var(--ease); }
.btn:hover { background: var(--card); }
.btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn.primary:hover { background: var(--press); }
.bar .btn { height: 32px; padding-inline: 12px; }
.theme { display: flex; }
.theme svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
:root[data-theme="light"] .theme .sun, :root:not([data-theme="light"]) .theme .moon { display: none; }

/* Type */
h1 { font-size: 64px; line-height: 72px; font-weight: 600; letter-spacing: -0.035em; }
h1 span { display: block; }
h2 { font-size: 32px; line-height: 40px; font-weight: 600; letter-spacing: -0.02em; max-width: 24ch; }
h3 { font-size: 18px; line-height: 24px; font-weight: 600; letter-spacing: -0.01em; }
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3 { letter-spacing: 0; }
.dim { color: var(--dim); }
.eyebrow { font-size: 14px; line-height: 20px; color: var(--muted); margin-bottom: 16px; }
.lead { font-size: 18px; line-height: 28px; color: var(--muted); max-width: 56ch; margin-top: 24px; }
.sub { color: var(--muted); max-width: 60ch; margin-top: 12px; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* Hero: the logo rising from behind a solid globe, the stats card on the globe, then the copy. */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 176px;
  overflow: hidden;
  container-type: inline-size;
  --w: clamp(900px, 100cqw, 1200px);
  --logo: min(1100px, 92cqw);
}
.hero > .wrap { width: 100%; }

.globe {
  position: relative;
  z-index: -1;
  width: 100%;
  max-width: 1200px;
  overflow: hidden;
}
/* The globe's top edge cuts the logo 70% down. The fade is a ring around the globe's center (radius 1200 of 1200), so it follows the curve: dark mode dims the logo near the globe, light mode darkens it there like a shadow. */
.globe-logo {
  --r: var(--w);
  --fade: radial-gradient(circle at 50% calc(70% + var(--r)), var(--near) var(--r), var(--far) calc(var(--r) + var(--logo) * 0.1));
  display: block;
  width: var(--logo);
  height: auto;
  margin-inline: auto;
  filter: var(--ink);
  -webkit-mask-image: var(--fade);
  mask-image: var(--fade);
}
/* The art is 1200x480: the globe's top edge at y 2, the cities about 190 to 250 below it. */
.globe-art {
  position: relative;
  width: var(--w);
  aspect-ratio: 1200 / 480;
  margin-top: calc(var(--logo) * 181 / 1371 * -0.3);
  margin-inline: calc((100% - var(--w)) / 2);
  --sides: linear-gradient(to right, transparent, #000 96px, #000 calc(100% - 96px), transparent);
  --bottom: linear-gradient(#000 55%, transparent);
  -webkit-mask-image: var(--sides), var(--bottom);
  -webkit-mask-composite: source-in;
  mask-image: var(--sides), var(--bottom);
  mask-composite: intersect;
}
.globe-art img, .globe-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
/* The solid globe under the lines: center (600, 1202), radius 1200 in the art's 1200x480 box. The shade covers its top 216 units. */
.sphere { position: absolute; left: -50%; top: 0.4%; width: 200%; height: 500%; border-radius: 50%; background: linear-gradient(var(--sphere), var(--bg) 9%); }

.routes { fill: none; stroke: var(--text); stroke-linecap: round; }
.still { stroke-opacity: 0.4; stroke-width: 1.2; display: none; }
.trail { stroke-opacity: 0.24; stroke-width: 0.9; stroke-dasharray: 100 100; stroke-dashoffset: 100; opacity: 0; animation: route 8s linear infinite; }
.trail.back { stroke-dashoffset: -100; animation-name: route-back; }
.beam { stroke-width: 1.6; stroke-dasharray: 22 200; stroke-dashoffset: 22; filter: url(#glow); animation: beam 8s linear infinite; }
.beam.back { stroke-dashoffset: -100; animation-name: beam-back; }
.at-1 { animation-delay: 2s; }
.at-2 { animation-delay: 4s; }
.at-3 { animation-delay: 6s; }

@keyframes beam { 0% { stroke-dashoffset: 22; } 30%, 100% { stroke-dashoffset: -100; } }
@keyframes beam-back { 0% { stroke-dashoffset: -100; } 30%, 100% { stroke-dashoffset: 22; } }
@keyframes route { 0% { stroke-dashoffset: 100; opacity: 1; } 24.6% { stroke-dashoffset: 0; } 30% { opacity: 1; } 42%, 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes route-back { 0% { stroke-dashoffset: -100; opacity: 1; } 24.6% { stroke-dashoffset: 0; } 30% { opacity: 1; } 42%, 100% { stroke-dashoffset: 0; opacity: 0; } }

.spots .halo { fill: var(--text); fill-opacity: 0.1; }
.spots .dot { fill: var(--text); stroke: var(--bg); stroke-width: 1.5; paint-order: stroke; }
.spots text { font-size: 12px; fill: var(--text); stroke: var(--bg); stroke-width: 3; stroke-linejoin: round; paint-order: stroke; direction: ltr; user-select: none; }

.points { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px 24px; }

/* The copy on the left, a git push going live on the right. */
.intro { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 48px; align-items: center; }
.deploy { border: 1px solid var(--line); border-radius: 12px; background: var(--glass); box-shadow: 0 24px 60px -24px var(--shadow), inset 0 1px 0 var(--edge); font: 13px/20px "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }
.deploy figcaption { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--dim); font-size: 12px; }
.deploy figcaption i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.deploy figcaption span { margin-inline-start: 10px; }
.deploy ol { display: grid; gap: 10px; padding: 18px 16px; }
.deploy li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 12px; align-items: center; opacity: 0; animation: line 400ms ease-out forwards; }
.deploy b { font-weight: 400; }
.deploy li svg { width: 14px; height: 14px; fill: none; stroke: var(--ok); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.deploy em { font-style: normal; color: var(--dim); }
.deploy .cmd b { color: var(--dim); }
.deploy .live { margin-top: 6px; padding-top: 16px; border-top: 1px dashed var(--line); }
.deploy .live b { width: 8px; height: 8px; margin-inline: 3px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 18%, transparent); }
.deploy li:nth-child(2) { animation-delay: 0.6s; }
.deploy li:nth-child(3) { animation-delay: 1.2s; }
.deploy li:nth-child(4) { animation-delay: 1.8s; }
.deploy li:nth-child(5) { animation-delay: 2.4s; }
.deploy li:nth-child(6) { animation-delay: 3s; }
.deploy li:nth-child(7) { animation-delay: 3.6s; }
@keyframes line { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* The stats card sits on the globe, below the cities. */
.stats { width: 100%; margin-top: calc(var(--w) * -0.15); padding-bottom: 56px; display: flex; justify-content: center; }
.stats ul { display: grid; grid-template-columns: repeat(4, auto); border-radius: 16px; border: 1px solid var(--edge); background: var(--glass); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); box-shadow: 0 24px 60px -20px var(--shadow), inset 0 1px 0 var(--edge); }
.stats li { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 32px; }
.stats li + li { border-inline-start: 1px solid var(--edge); }
.stats strong { font-size: 26px; line-height: 32px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stats span { font-size: 13px; line-height: 18px; color: var(--muted); white-space: nowrap; }
.points li { display: flex; align-items: center; gap: 8px; color: var(--text); }
.points svg, .area svg, .more-grid svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; color: var(--dim); }

/* Sections */
.section { padding-top: 128px; }

.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 48px; }
.tile { display: flex; flex-direction: column; gap: 8px; padding: 24px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); transition: border-color var(--ease); }
.tile:hover { border-color: var(--line-strong); }
.tile.big { grid-column: span 2; }
.tile p:not(.area) { font-size: 14px; line-height: 20px; color: var(--muted); }
.area { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; color: var(--muted); margin-bottom: 8px; }

.rollout { margin-top: auto; padding-top: 24px; }
.track { height: 4px; border-radius: 999px; background: var(--line); overflow: hidden; }
.track span { display: block; height: 100%; width: 100%; border-radius: inherit; background: var(--text); animation: fill 6s ease-out infinite; }
.rollout ol { display: flex; justify-content: space-between; margin-top: 10px; font-size: 12px; line-height: 16px; color: var(--dim); font-variant-numeric: tabular-nums; }
@keyframes fill { 0% { width: 0; } 15% { width: 20%; } 30% { width: 40%; } 50% { width: 60%; } 70% { width: 80%; } 85%, 100% { width: 100%; } }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-top: 48px; counter-reset: step; }
.steps li { counter-increment: step; padding-top: 20px; border-top: 1px solid var(--line-strong); }
.steps li::before { content: counter(step); display: block; font-size: 14px; line-height: 20px; color: var(--dim); margin-bottom: 12px; font-variant-numeric: tabular-nums; }
:lang(ar) .steps li::before { content: counter(step, arabic-indic); }
.steps p { color: var(--muted); margin-top: 8px; }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 48px; border: 1px solid var(--line); border-radius: 8px; background: var(--line); overflow: hidden; }
.facts li { padding: 32px 24px; background: var(--bg); font-size: 20px; line-height: 28px; font-weight: 500; letter-spacing: -0.01em; }

/* Two boxes in one grid, so each NearCloud product sits on the same row as the tools it replaces. */
.vs { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); column-gap: 24px; margin-top: 48px; }
.vs > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 64px; padding: 14px 24px; border: 1px solid var(--line); border-bottom: 0; }
.vs .nc { flex-wrap: nowrap; background: var(--card); border-color: var(--line-strong); font-weight: 500; }
.vs .nc svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }
.vs .top { border-radius: 12px 12px 0 0; }
.vs .top img { height: 20px; width: auto; filter: var(--ink); }
.vs .top strong { font-weight: 500; color: var(--muted); }
.vs .end { border-bottom: 1px solid; border-radius: 0 0 12px 12px; }
.vs .nc.end { border-bottom-color: var(--line-strong); }
.vs .ext.end { border-bottom-color: var(--line); }
.vs .end strong { font-weight: 500; }
.vs .ext.end strong { color: var(--dim); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; line-height: 18px; color: var(--muted); transition: color var(--ease), border-color var(--ease); }
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip svg { width: 14px; height: 14px; fill: currentColor; }
.saas-note { margin-top: 12px; font-size: 12px; line-height: 16px; color: var(--dim); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card { padding: 24px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); }
.card p { font-size: 14px; line-height: 20px; color: var(--muted); margin-top: 8px; }

.code { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 32px; padding: 12px 12px 12px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); font: 14px/20px "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }
.copy { padding: 4px 10px; border-radius: 6px; border: 1px solid var(--line-strong); font: 500 12px/16px Inter, -apple-system, system-ui, "Noto Sans Arabic", sans-serif; color: var(--muted); transition: color var(--ease), border-color var(--ease); }
.copy:hover { color: var(--text); border-color: var(--muted); }

.more-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-top: 40px; }
.more-grid h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.more-grid ul { margin-top: 12px; display: grid; gap: 8px; color: var(--muted); font-size: 15px; line-height: 22px; }

.closing { margin-top: 128px; padding-block: 128px; border-block: 1px solid var(--line); text-align: center; }
.closing h2, .closing .sub { margin-inline: auto; }
.closing .ctas { justify-content: center; }

.foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 32px; font-size: 14px; line-height: 20px; color: var(--dim); }
.foot nav { display: flex; align-items: center; gap: 24px; }
.foot a { transition: color var(--ease); }
.foot a:hover { color: var(--text); }

@media (max-width: 1024px) {
  .bento, .more-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .split, .intro { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 640px) {
  h1 { font-size: 48px; line-height: 56px; }
  h2 { font-size: 24px; line-height: 32px; }
  .hero { padding-top: 128px; }
  .points { flex-direction: column; gap: 8px; }
  .globe-art { -webkit-mask-image: var(--bottom); mask-image: var(--bottom); }
  .spots text { font-size: 15px; }
  .stats { padding-bottom: 24px; }
  .stats ul { grid-template-columns: repeat(2, 1fr); width: 100%; }
  .stats li { padding: 14px 8px; }
  .stats li + li { border-inline-start: 0; }
  .stats li:nth-child(even) { border-inline-start: 1px solid var(--edge); }
  .stats li:nth-child(n + 3) { border-top: 1px solid var(--edge); }
  .stats strong { font-size: 22px; line-height: 28px; }
  .section { padding-top: 80px; }
  .bento, .steps, .cards { grid-template-columns: 1fr; }
  .tile.big { grid-column: auto; }
  .vs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 12px; }
  .vs > div { padding: 12px; font-size: 14px; }
  .chip { padding: 6px; font-size: 0; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts li { padding: 24px 16px; font-size: 16px; line-height: 24px; }
  .closing { margin-top: 80px; padding-block: 80px; }
  .bar-end { gap: 16px; }
  .bar-end > a.link, .bar-end > .theme { display: none; }
  .foot { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .trail, .beam { display: none; }
  .still { display: inline; }
  .track span { animation: none; }
  .deploy li { animation: none; opacity: 1; }
  * { transition: none !important; }
}
