:root {
  color-scheme: dark;
  --bg: #030817;
  --bg-2: #07152d;
  --text: #f7fbff;
  --muted: #a8b8d4;
  --soft: rgba(255, 255, 255, 0.72);
  --panel: rgba(6, 16, 38, 0.54);
  --panel-strong: rgba(7, 18, 42, 0.72);
  --border: rgba(122, 222, 255, 0.24);
  --cyan: #22d8ff;
  --blue: #1769ff;
  --violet: #8f32ff;
  --purple: #d51fff;
  --shadow: 0 30px 110px rgba(0, 8, 28, 0.58);
  --radius: 24px;
  --font-ar: "Cairo", system-ui, sans-serif;
  --font-en: "Inter", system-ui, sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eaf5ff;
  --bg-2: #ffffff;
  --text: #061329;
  --muted: #41536f;
  --soft: rgba(6, 19, 41, 0.72);
  --panel: rgba(255, 255, 255, 0.64);
  --panel-strong: rgba(255, 255, 255, 0.82);
  --border: rgba(23, 105, 255, 0.22);
  --shadow: 0 26px 90px rgba(20, 69, 134, 0.2);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow: hidden;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 16% 14%, rgba(34, 216, 255, 0.2), transparent 30vw),
    radial-gradient(circle at 82% 74%, rgba(213, 31, 255, 0.2), transparent 32vw),
    linear-gradient(135deg, var(--bg), var(--bg-2));
  color: var(--text);
  font-family: var(--font-ar);
  transition: background 420ms ease, color 260ms ease;
}

body[dir="ltr"] {
  font-family: var(--font-en);
}

button,
a {
  font: inherit;
}

#webgl-stage,
.noise-layer,
.cursor-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

#webgl-stage {
  z-index: -4;
}

.noise-layer {
  z-index: -2;
  opacity: 0.34;
  background:
    linear-gradient(rgba(34, 216, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 216, 255, 0.045) 1px, transparent 1px),
    radial-gradient(circle at var(--cursor-x, 50%) var(--cursor-y, 50%), rgba(34, 216, 255, 0.16), transparent 20rem);
  background-size: 72px 72px, 72px 72px, 100% 100%;
  mask-image: radial-gradient(circle at 50% 50%, #000 0, transparent 78%);
}

.noise-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.cursor-glow {
  z-index: -1;
  background: radial-gradient(circle at var(--cursor-x, 50%) var(--cursor-y, 50%), rgba(34, 216, 255, 0.22), transparent 21rem);
  mix-blend-mode: screen;
}

.page-shell {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  padding: clamp(16px, 2.4vw, 30px);
  isolation: isolate;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  z-index: 4;
}

.brand-mark,
.control-group {
  display: inline-flex;
  align-items: center;
}

.brand-mark {
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark img {
  width: clamp(190px, 16vw, 248px);
  max-height: 68px;
  object-fit: contain;
  filter: drop-shadow(0 0 24px rgba(34, 216, 255, 0.38));
}

.control-group {
  gap: 10px;
}

.toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.03)), var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
  cursor: pointer;
  backdrop-filter: blur(20px);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.toggle-button:hover {
  border-color: rgba(34, 216, 255, 0.62);
}

.theme-toggle {
  gap: 9px;
}

.theme-orbit {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff, #9eeeff 24%, #1769ff 58%, #8f32ff 100%);
  box-shadow: 0 0 18px rgba(34, 216, 255, 0.62);
}

.theme-text {
  font-size: 0.86rem;
  font-weight: 800;
}

.hero {
  align-self: center;
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(320px, 0.72fr);
  gap: clamp(16px, 2.5vw, 34px);
  width: min(1200px, 100%);
  max-width: 100%;
  margin: 0 auto;
  perspective: 1400px;
}

.hero > *,
.mission-stack > *,
.panel-header > *,
.countdown > * {
  min-width: 0;
}

.glass-panel {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 28%),
    linear-gradient(315deg, rgba(143, 50, 255, 0.14), transparent 34%),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(26px) saturate(1.25);
  overflow: hidden;
}

.glass-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(34, 216, 255, 0.72), transparent 32%, rgba(213, 31, 255, 0.46));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.hero-copy {
  padding: clamp(22px, 3.2vw, 46px);
  transform-style: preserve-3d;
}

.signal-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(12px, 2vh, 20px);
  color: var(--cyan);
  font-family: var(--font-en);
  font-size: clamp(0.72rem, 0.9vw, 0.84rem);
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

body[dir="rtl"] .signal-row {
  font-family: var(--font-ar);
  letter-spacing: 0;
}

.signal-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(34, 216, 255, 0.58);
  animation: pulse 1.9s ease-out infinite;
}

h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.1rem, 5.2vw, 5.1rem);
  line-height: 0.97;
  letter-spacing: 0;
  text-wrap: balance;
  overflow-wrap: anywhere;
  text-shadow: 0 0 42px rgba(34, 216, 255, 0.15);
  white-space: pre-line;
}

.description {
  max-width: 780px;
  margin: clamp(14px, 2vh, 21px) 0 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.35vw, 1.18rem);
  line-height: 1.72;
  overflow-wrap: anywhere;
}

.tagline {
  margin: clamp(10px, 1.6vh, 16px) 0 0;
  color: var(--text);
  font-size: clamp(1rem, 1.48vw, 1.22rem);
  font-weight: 900;
}

.feature-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: clamp(16px, 2.5vh, 26px);
}

.feature-chips span {
  padding: 9px 12px;
  border: 1px solid rgba(122, 222, 255, 0.24);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(34, 216, 255, 0.13), rgba(143, 50, 255, 0.12));
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.mission-stack {
  display: grid;
  gap: 14px;
  align-self: stretch;
  transform-style: preserve-3d;
}

.holo-card,
.countdown-panel,
.ai-panel {
  padding: clamp(17px, 2.3vw, 28px);
}

.launch-card {
  display: grid;
  gap: 4px;
  min-height: 112px;
}

.card-kicker,
.panel-header span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body[dir="rtl"] .card-kicker,
body[dir="rtl"] .panel-header span {
  letter-spacing: 0;
}

.launch-card strong {
  font-size: clamp(1.5rem, 2.8vw, 2.4rem);
  line-height: 1.05;
}

.scan-line {
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--purple), transparent);
  animation: scan 3.2s ease-in-out infinite;
}

.countdown-panel {
  display: grid;
  gap: 18px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-header div {
  display: grid;
  gap: 4px;
}

.panel-header strong {
  font-size: clamp(1rem, 1.55vw, 1.28rem);
}

.countdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.countdown article {
  position: relative;
  display: grid;
  min-height: clamp(84px, 11.4vh, 108px);
  place-items: center;
  gap: 3px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(34, 216, 255, 0.22), transparent 66%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02)),
    var(--panel-strong);
  overflow: hidden;
  transform-style: preserve-3d;
}

.countdown article::after {
  content: "";
  position: absolute;
  inset: auto 14px 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 216, 255, 0.72), transparent);
}

.countdown strong {
  font-family: var(--font-en);
  font-size: clamp(1.8rem, 3.55vw, 2.9rem);
  line-height: 1;
}

.countdown span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.ai-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
}

.ai-core {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: radial-gradient(circle, rgba(34, 216, 255, 0.18), rgba(143, 50, 255, 0.1));
}

.ai-core span {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(34, 216, 255, 0.44);
  border-radius: 50%;
  animation: rotate 6s linear infinite;
}

.ai-core span:nth-child(2) {
  inset: 18px;
  border-color: rgba(213, 31, 255, 0.5);
  animation-duration: 4.4s;
  animation-direction: reverse;
}

.ai-core span:nth-child(3) {
  inset: 27px;
  background: var(--cyan);
  box-shadow: 0 0 22px var(--cyan);
}

.ai-panel p {
  margin: 0;
  color: var(--soft);
  font-size: 0.92rem;
  line-height: 1.55;
}

footer {
  z-index: 2;
  padding-top: 15px;
  color: var(--muted);
  font-size: clamp(0.82rem, 1vw, 0.94rem);
  text-align: center;
}

.magnetic {
  will-change: transform;
}

@keyframes pulse {
  to {
    box-shadow: 0 0 0 14px rgba(34, 216, 255, 0);
  }
}

@keyframes scan {
  0%,
  100% {
    transform: translateX(-100%);
    opacity: 0;
  }
  50% {
    transform: translateX(100%);
    opacity: 1;
  }
}

@keyframes rotate {
  to {
    rotate: 1turn;
  }
}

@media (max-width: 920px) {
  body {
    overflow-y: auto;
    overflow-x: hidden;
  }

  .page-shell {
    min-height: 100svh;
    justify-items: center;
    overflow-x: hidden;
  }

  .hero {
    grid-template-columns: 1fr;
    align-self: start;
    margin-top: 22px;
    width: min(320px, calc(100vw - 40px));
    max-width: 100%;
    justify-self: center;
    margin-inline: auto;
  }

  .mission-stack {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 700px) {
  html[dir="rtl"] {
    direction: ltr;
  }

  .page-shell {
    width: 100vw;
    max-width: 100vw;
    --mobile-hero-size: min(320px, calc(100vw - 56px));
    padding: 14px;
    direction: ltr;
    justify-items: start;
    overflow-x: clip;
  }

  .topbar {
    width: 100%;
    min-width: 0;
  }

  .hero {
    width: var(--mobile-hero-size);
    position: static;
    transform: none;
    justify-self: start;
    justify-items: center;
    margin-left: calc((100vw - var(--mobile-hero-size)) / 2 - 75px);
    margin-right: 0;
  }

  body[dir="rtl"] .topbar,
  body[dir="rtl"] .hero,
  body[dir="rtl"] footer {
    direction: rtl;
  }

  .theme-text {
    display: none;
  }

  .hero-copy,
  .holo-card,
  .countdown-panel,
  .ai-panel {
    border-radius: 20px;
    width: 100%;
    max-width: 100%;
    justify-self: center;
  }

  .brand-mark img {
    width: 154px;
    max-height: 54px;
  }

  .hero-copy {
    padding: 20px 14px;
    text-align: center;
  }

  .signal-row,
  .feature-chips {
    justify-content: center;
  }

  h1 {
    font-size: clamp(1.7rem, 8vw, 2rem);
    line-height: 1.08;
    max-width: 300px;
    margin-inline: auto;
  }

  .description {
    font-size: 0.9rem;
    max-width: 100%;
    margin-inline: auto;
  }

  .countdown,
  .feature-chips {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .feature-chips span,
  .description,
  .tagline,
  .signal-row {
    overflow-wrap: anywhere;
    max-width: 100%;
  }

  .description {
    line-height: 1.62;
  }

  .countdown {
    gap: 9px;
  }

  .feature-chips span {
    font-size: 0.8rem;
    padding: 8px 10px;
  }

  .ai-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-height: 760px) and (min-width: 921px) {
  .page-shell {
    padding-block: 16px;
  }

  .hero-copy,
  .holo-card,
  .countdown-panel,
  .ai-panel {
    padding: 20px;
  }

  .logo-lockup {
    width: 315px;
    margin-bottom: 8px;
  }

  h1 {
    font-size: clamp(2rem, 4.7vw, 4.3rem);
  }

  .description {
    line-height: 1.52;
  }

  .countdown article {
    min-height: 78px;
  }

  .launch-card {
    min-height: 92px;
  }

  footer {
    padding-top: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
