/* ==========================================================================
   Data Intelligence Wave — the journey
   The page is a flight: scrolling moves a camera forward through the company's
   universe. The DOM only carries type, a route bar, and white controls.
   ========================================================================== */

:root {
  --void: #020207;
  --text: #f4f5ff;
  --mute: #9096b9;
  --faint: #5c6285;
  --line: rgba(244, 245, 255, 0.12);
  --line-2: rgba(244, 245, 255, 0.24);
  --ice: #a9beff;

  --display: "Unbounded", "Noto Kufi Arabic", system-ui, sans-serif;
  --body: "Readex Pro", "Noto Kufi Arabic", system-ui, sans-serif;
  --num: "Unbounded", system-ui, sans-serif;

  --gutter: clamp(20px, 5vw, 80px);
  --top-h: 84px;
  --hit: 44px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--void); color-scheme: dark; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
::selection { background: var(--text); color: var(--void); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; border-radius: 8px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip {
  position: fixed; top: 12px; inset-inline-start: 12px; z-index: 200;
  display: inline-flex; align-items: center; min-height: var(--hit); padding: 0 18px;
  border-radius: 999px; background: var(--text); color: var(--void); font-weight: 500;
  transform: translateY(-200%);
}
.skip:focus-visible { transform: none; }

/* ---------- Space ---------- */
#space { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; }
.veil {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(130% 95% at 50% 50%, transparent 58%, rgba(2, 2, 7, 0.85) 100%),
    linear-gradient(to left, rgba(2, 2, 7, 0.72), rgba(2, 2, 7, 0.2) 48%, transparent 62%);
}
[dir="ltr"] .veil {
  background:
    radial-gradient(130% 95% at 50% 50%, transparent 58%, rgba(2, 2, 7, 0.85) 100%),
    linear-gradient(to right, rgba(2, 2, 7, 0.72), rgba(2, 2, 7, 0.2) 48%, transparent 62%);
}
.no-webgl body {
  background:
    radial-gradient(50% 45% at 25% 40%, rgba(169, 190, 255, 0.16), transparent 70%),
    var(--void);
}
.no-webgl #space { display: none; }
main, .foot { position: relative; z-index: 3; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 28px;
  border: 1px solid transparent; border-radius: 999px;
  font-family: var(--body); font-size: 1rem; font-weight: 500; line-height: 1.2;
  white-space: nowrap; cursor: pointer;
  transition: background-color 0.3s, border-color 0.3s, box-shadow 0.4s;
}
.btn-light { background: #fff; color: var(--void); }
.btn-light:hover { box-shadow: 0 0 44px -6px rgba(200, 214, 255, 0.8); }
.btn-ghost { border-color: var(--line-2); background: rgba(2, 2, 7, 0.4); color: var(--text); }
.btn-ghost:hover { border-color: rgba(244, 245, 255, 0.6); background: rgba(244, 245, 255, 0.06); }
.btn-sm { min-height: var(--hit); padding: 0 20px; font-size: 0.875rem; }
.pill {
  display: inline-grid; place-items: center;
  min-width: var(--hit); height: var(--hit); padding: 0 14px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: rgba(2, 2, 7, 0.5);
  font-size: 0.875rem; font-weight: 500; cursor: pointer;
  transition: border-color 0.3s;
}
.pill:hover { border-color: rgba(244, 245, 255, 0.6); }

/* ---------- Top bar ---------- */
.top {
  position: fixed; top: 0; inset-inline: 0; z-index: 30;
  display: flex; align-items: center; gap: 24px;
  height: var(--top-h); padding-inline: var(--gutter);
  background: linear-gradient(180deg, rgba(2, 2, 7, 0.75), transparent);
}
.top.menu-open { background: var(--void); }
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: var(--hit); min-width: 0; }
.brand-mark { width: 40px; height: 30px; color: var(--text); flex: none; }
.brand-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--display); font-size: 0.9375rem; font-weight: 700;
}
.nav { display: flex; gap: 4px; margin-inline: auto; }
.nav a {
  display: inline-flex; align-items: center; min-height: var(--hit); padding: 0 16px;
  border-radius: 999px; color: var(--mute); font-size: 0.875rem; font-weight: 500;
  transition: color 0.3s, background-color 0.3s;
}
.nav a:hover, .nav a.is-on { color: var(--text); background: rgba(244, 245, 255, 0.07); }
.top-actions { display: flex; flex: none; align-items: center; gap: 10px; }
.menu-btn { display: none; gap: 5px; align-content: center; padding: 0 12px; }
.menu-btn span { display: block; width: 18px; height: 1.5px; border-radius: 2px; background: var(--text); transition: transform 0.35s var(--ease); }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 25;
  display: flex; flex-direction: column; justify-content: center; gap: 40px;
  padding: calc(var(--top-h) + 16px) var(--gutter) 48px;
  background: rgba(2, 2, 7, 0.97);
  opacity: 0; transition: opacity 0.35s var(--ease);
}
.menu.is-open { opacity: 1; }
.menu[hidden] { display: none; }
.menu nav { display: flex; flex-direction: column; }
.menu nav a { padding-block: 10px; font-family: var(--display); font-size: clamp(2rem, 9vw, 3.2rem); font-weight: 800; line-height: 1.25; }
.menu .btn { align-self: flex-start; }

@media (max-width: 1279.98px) {
  .nav, .top-cta { display: none; }
  .menu-btn { display: inline-grid; }
  .top-actions { margin-inline-start: auto; }
}

/* ---------- Route bar ---------- */
.route {
  position: fixed; bottom: 22px; inset-inline: var(--gutter); z-index: 20;
  height: 44px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.5s var(--ease), visibility 0s linear 0.5s;
}
.route.is-on { opacity: 1; visibility: visible; transition: opacity 0.5s var(--ease), visibility 0s; }
.route-line { position: absolute; inset-inline: 0; top: 6px; height: 1px; background: var(--line); }
.route-fill {
  position: absolute; inset-block: 0; inset-inline-start: 0; width: 100%;
  background: linear-gradient(90deg, var(--ice), var(--text));
  transform: scaleX(0); transform-origin: left;
}
[dir="rtl"] .route-fill { transform-origin: right; background: linear-gradient(270deg, var(--ice), var(--text)); }
.route-stops li { position: absolute; top: 0; inset-inline-start: var(--pos, 0%); }
.route-stops a {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-width: var(--hit); min-height: var(--hit);
  transform: translateX(50%);
  color: var(--faint); font-size: 0.75rem; font-weight: 500; white-space: nowrap;
  transition: color 0.3s;
}
[dir="ltr"] .route-stops a { transform: translateX(-50%); }
.route-stops a::before {
  content: ""; width: 9px; height: 9px; margin-top: 2px;
  border: 1px solid var(--line-2); border-radius: 50%; background: var(--void);
  transition: background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.route-stops a:hover, .route-stops a.is-past { color: var(--mute); }
.route-stops a.is-past::before { border-color: var(--ice); background: var(--ice); }
.route-stops a.is-on { color: var(--text); }
.route-stops a.is-on::before { border-color: #fff; background: #fff; box-shadow: 0 0 14px rgba(255, 255, 255, 0.8); }
@media (max-width: 767.98px) {
  .route { bottom: 14px; height: 16px; }
  .route-stops span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .route-stops a { min-height: 16px; min-width: 24px; }
}

/* ---------- Chapters ---------- */
.label {
  display: flex; align-items: baseline; gap: 12px;
  color: var(--mute); font-size: 0.875rem; font-weight: 500;
}
.num, .count, .step-num { font-family: var(--num); font-variant-numeric: tabular-nums; }
.num { color: var(--faint); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; }

/* Launch */
.ch-launch {
  position: relative;
  display: flex; flex-direction: column; justify-content: center;
  min-height: 100vh; min-height: 100svh;
  padding: var(--top-h) var(--gutter) 96px;
}
.launch-in { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; max-width: 54%; }
.launch-title {
  display: flex; flex-direction: column;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(3.2rem, min(9vw, 13vh), 9.5rem); line-height: 1.12;
}
html[lang="en"] .launch-title { font-size: clamp(2.8rem, min(8vw, 13vh), 8.6rem); line-height: 1; letter-spacing: -0.045em; }
.launch-lead { max-width: 34ch; color: var(--mute); font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.375rem); }
.launch-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.launch-cue {
  position: absolute; bottom: 88px; inset-inline-start: var(--gutter);
  display: inline-flex; align-items: center; gap: 14px;
  color: var(--mute); font-size: 0.875rem;
}
.cue-line { position: relative; width: 56px; height: 1px; overflow: hidden; background: var(--line-2); }
.cue-line::after {
  content: ""; position: absolute; inset: 0; background: var(--text);
  transform: translateX(100%); animation: cue 2.4s var(--ease) infinite;
}
[dir="ltr"] .cue-line::after { animation-name: cue-ltr; }
@keyframes cue { 0% { transform: translateX(100%); } 60%, 100% { transform: translateX(-100%); } }
@keyframes cue-ltr { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }

/* Sticky chapters: the text holds still while the camera flies on. */
.ch-sticky { position: relative; height: var(--len, 200vh); }
.panel {
  position: sticky; top: 0;
  display: flex; align-items: center;
  height: 100vh; height: 100svh;
  padding: var(--top-h) var(--gutter) 96px;
}
.panel-in {
  display: flex; flex-direction: column; align-items: flex-start; gap: 18px;
  width: min(540px, 42vw);
}
.panel-wide { width: min(620px, 46vw); }
.jr .panel-in {
  opacity: var(--show, 0);
  transform: translateY(calc((1 - var(--show, 0)) * 24px));
}
.title { font-family: var(--display); font-weight: 800; font-size: clamp(1.9rem, 3.4vw, 3.4rem); line-height: 1.2; }
html[lang="en"] .title { line-height: 1.05; letter-spacing: -0.03em; font-size: clamp(1.6rem, 2.8vw, 2.9rem); }

/* Manifesto: words light up as you fly */
.manifesto {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.7rem, 3.2vw, 3.3rem); line-height: 1.45;
}
html[lang="en"] .manifesto { line-height: 1.2; letter-spacing: -0.02em; }
.manifesto .w { opacity: 0.16; transition: opacity 0.4s; }
.manifesto .w.is-lit { opacity: 1; }

/* Slides (products, labs, method) stack in one cell */
.slides { width: 100%; margin-top: 18px; }
.jr .slides { display: grid; }
.jr .slide {
  grid-area: 1 / 1;
  opacity: 0; visibility: hidden;
  transform: translateY(26px);
  transition: opacity 0.6s var(--ease), transform 0.8s var(--ease), visibility 0s linear 0.6s;
}
.jr .slide.is-on {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity 0.7s var(--ease) 0.12s, transform 0.9s var(--ease) 0.12s, visibility 0s;
}
.jr .slide.was-on { transform: translateY(-26px); }
html:not(.jr) .slide + .slide { margin-top: 64px; }
.slide { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.slide-meta { display: flex; align-items: center; gap: 16px; }
.slide-logo { width: 44px; height: 44px; object-fit: contain; filter: brightness(0) invert(1); }
.count { direction: ltr; unicode-bidi: isolate; color: var(--faint); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; }
.slide-name { font-family: var(--display); font-weight: 800; font-size: clamp(2.3rem, 4.8vw, 4.8rem); line-height: 1.12; }
html[lang="en"] .slide-name { letter-spacing: -0.035em; line-height: 1.02; }
.slide-cat { color: var(--ice); font-size: 0.9375rem; font-weight: 500; }
.slide-desc { max-width: 40ch; color: var(--mute); font-size: clamp(1rem, 0.95rem + 0.3vw, 1.1875rem); line-height: 1.65; }
.slide-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: var(--hit);
  border-bottom: 1px solid var(--line-2); font-weight: 500;
  transition: border-color 0.3s;
}
.slide-link:hover { border-color: #fff; }
.i-arrow { width: 16px; height: 16px; transition: transform 0.35s var(--ease); }
.slide-link:hover .i-arrow { transform: translate(3px, -3px); }
.step-num {
  font-size: clamp(4.5rem, 10vw, 9rem); font-weight: 800; line-height: 0.9;
  color: transparent; -webkit-text-stroke: 1px rgba(244, 245, 255, 0.4);
}

/* Capabilities: an index that follows the flight */
.caps { width: 100%; margin-top: 10px; border-top: 1px solid var(--line); }
.cap { padding-block: 12px; border-bottom: 1px solid var(--line); }
.cap-name {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.4rem, 2.5vw, 2.4rem); line-height: 1.25;
  color: var(--faint);
  transition: color 0.4s;
}
html[lang="en"] .cap-name { letter-spacing: -0.02em; }
.cap-desc {
  max-width: 44ch; max-height: 0; overflow: hidden;
  color: var(--mute); opacity: 0;
  transition: max-height 0.6s var(--ease), opacity 0.4s, padding 0.4s;
}
html:not(.jr) .cap-desc { max-height: none; opacity: 1; }
.cap.is-on .cap-name { color: var(--text); }
.cap.is-on .cap-desc { max-height: 9em; opacity: 1; padding-top: 6px; }

/* First paint: the launch copy rises once the scene is ready. */
.js .launch-in, .js .launch-cue {
  opacity: 0; transform: translateY(18px);
  transition: opacity 1.1s var(--ease) 0.9s, transform 1.2s var(--ease) 0.9s;
}
.is-ready .launch-in, .is-ready .launch-cue { opacity: 1; transform: none; }

/* Arrival */
.contact-title {
  max-width: 12ch;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.8rem, 6.6vw, 7rem); line-height: 1.12;
}
html[lang="en"] .contact-title { line-height: 1; letter-spacing: -0.04em; font-size: clamp(2.4rem, 5.6vw, 6rem); }
.contact-text { max-width: 38ch; color: var(--mute); font-size: 1.125rem; }
.contact-mail {
  font-family: var(--num); font-weight: 700;
  font-size: clamp(1.15rem, 2.4vw, 2.2rem); letter-spacing: -0.02em;
  border-bottom: 1px solid var(--line-2);
  transition: border-color 0.3s;
}
.contact-mail:hover { border-color: #fff; }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 6px; }
.copy-status { min-height: 1.6em; color: var(--ice); font-size: 0.875rem; }

/* ---------- Footer ---------- */
.foot {
  padding: 72px var(--gutter) 96px;
  border-top: 1px solid var(--line);
  background: var(--void);
}
.foot-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 40px; }
.foot-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.foot-mail { display: inline-flex; align-items: center; min-height: var(--hit); color: var(--mute); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 5px; }
.foot-mail:hover { color: var(--text); }
.foot-title { margin-bottom: 8px; color: var(--faint); font-size: 0.875rem; font-weight: 500; }
.foot-products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.foot-products a { display: inline-flex; align-items: center; min-height: var(--hit); color: var(--mute); transition: color 0.3s; }
.foot-products a:hover { color: var(--text); }
.foot-legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--faint); font-size: 0.875rem; }

/* ---------- Phones: the scene sits above, the words below ---------- */
@media (max-width: 767.98px) {
  :root { --top-h: 72px; }
  .brand-name { font-size: 0.8125rem; }
  .brand-mark { width: 34px; height: 26px; }
  .veil, [dir="ltr"] .veil {
    background:
      radial-gradient(130% 90% at 50% 40%, transparent 55%, rgba(2, 2, 7, 0.85) 100%),
      linear-gradient(to top, rgba(2, 2, 7, 0.88), rgba(2, 2, 7, 0.3) 50%, transparent 66%);
  }
  .ch-launch { justify-content: flex-end; padding-bottom: 120px; }
  .launch-in { max-width: none; }
  .launch-actions { width: 100%; }
  .launch-actions .btn { flex: 1 1 auto; }
  .launch-cue { bottom: 52px; }
  .panel { align-items: flex-end; padding-bottom: 64px; }
  .panel-in, .panel-wide { width: 100%; }
  .slide-name { font-size: clamp(2rem, 9vw, 2.8rem); }
  .cap-name { font-size: 1.3rem; }
  .cap { padding-block: 8px; }
  .step-num { font-size: 4rem; }
  .contact-actions .btn { flex: 1 1 auto; }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
}
