/* Ruya-AI coming-soon page. Tokens and type follow the main site. */
:root {
  --navy: #092d91;
  --royal: #1554d1;
  --electric: #168cff;
  --cyan: #39a5ff;
  --green: #16a34a;
  --ink: #172235;
  --ink-soft: #4b5a75;
  --sky: #f4f8ff;
  --line: #dbe4f6;
  --grad-cta: linear-gradient(90deg, #0b3ba6 0%, #1554d1 42%, #0e9a72 82%, #16a34a 100%);
  --grad-text: linear-gradient(90deg, #1450d2 0%, #1868e6 38%, #0e9a72 72%, #16a34a 100%);
  --gutter: clamp(18px, 4vw, 72px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; height: 100%; overflow: hidden; }

body {
  margin: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff 0%, var(--sky) 100%);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

:root[lang="ar"] body {
  font-family: "IBM Plex Sans Arabic", "Manrope", system-ui, "Segoe UI", Tahoma, Arial, sans-serif;
}

/* Letter-spacing breaks the joins between Arabic letters. */
:root[lang="ar"] *, :root[lang="ar"] *::before, :root[lang="ar"] *::after { letter-spacing: 0 !important; }

:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 8px; }

/* ---------- Background ---------- */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

.glow { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.glow-a { width: 46vmax; height: 46vmax; inset-inline-start: -14vmax; top: -18vmax; background: radial-gradient(circle, rgba(22, 140, 255, .35), transparent 68%); }
.glow-b { width: 42vmax; height: 42vmax; inset-inline-end: -14vmax; bottom: -20vmax; background: radial-gradient(circle, rgba(14, 154, 114, .32), transparent 68%); }

.dots {
  position: absolute;
  width: 110px;
  height: clamp(120px, 30svh, 258px);
  background-image: radial-gradient(circle, rgba(15, 118, 110, .5) 1.7px, transparent 2.2px);
  background-size: 24.5px 24.5px;
}
.dots-tl { inset-inline-start: 1.4%; bottom: 16svh; }
.dots-br { inset-inline-end: 1.2%; top: 14svh; }

.waves { position: absolute; width: min(44vw, 640px); height: min(44svh, 420px); }
.waves-l { inset-inline-start: 0; bottom: 4svh; animation: drift 14s ease-in-out infinite alternate; }
:root[dir="rtl"] .waves { scale: -1 1; }

@keyframes drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, 14px, 0); } }

/* ---------- Header ---------- */
.top, .stage, .foot { position: relative; z-index: 1; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(12px, 2.4svh, 26px) var(--gutter) 0;
  width: min(1760px, 100%);
  margin-inline: auto;
}

.brand { display: block; line-height: 0; }
.brand img { width: clamp(170px, min(15vw, 24svh), 300px); height: auto; }

.lang {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .85);
  border: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(9, 45, 145, .08);
}
.lang button {
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  min-width: 52px;
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.lang button[aria-pressed="true"] { background: var(--grad-cta); color: #fff; }
.lang button:not([aria-pressed="true"]):hover { color: var(--navy); }

/* ---------- Layout: copy beside the globe ---------- */
.stage {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: center;
  min-height: 0;
  gap: clamp(8px, 2vw, 48px);
  width: min(1760px, 100%);
  margin-inline: auto;
  padding: clamp(6px, 1.6svh, 20px) var(--gutter);
}

.copy { text-align: start; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .88);
  border: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(9, 45, 145, .07);
  font-size: clamp(14px, min(1.05vw, 2.2svh), 18px);
  font-weight: 700;
  color: #0d3bb0;
}

.pulse { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--green);
  animation: ping 2s cubic-bezier(0, 0, .2, 1) infinite;
}
@keyframes ping { 0% { transform: scale(1); opacity: .6; } 75%, 100% { transform: scale(2.8); opacity: 0; } }

.title {
  margin: clamp(12px, 2.6svh, 30px) 0 0;
  font-size: clamp(34px, min(3.7vw, 7svh), 72px);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.02em;
  color: #0c1633;
  text-wrap: balance;
}
.title > span { display: block; }
:root[lang="ar"] .title { line-height: 1.42; }

.gradient {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* Keeps descenders from being clipped by the text background. */
  padding-bottom: .1em;
}
/* Right to left: the gradient starts at the right, where the text starts. */
:root[dir="rtl"] .gradient { background-image: linear-gradient(270deg, #1450d2 0%, #1868e6 38%, #0e9a72 72%, #16a34a 100%); }

.lede {
  margin: clamp(8px, 1.8svh, 22px) 0 0;
  max-width: 34em;
  font-size: clamp(15px, min(1.2vw, 2.4svh), 21px);
  font-weight: 500;
  line-height: 1.6;
  color: #33405a;
  text-wrap: pretty;
}

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 22px;
  margin-top: clamp(16px, 3.4svh, 40px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 220px;
  height: clamp(46px, 6.2svh, 60px);
  padding: 0 28px;
  border-radius: 999px;
  background: var(--grad-cta);
  color: #fff;
  font-size: clamp(15px, min(1.1vw, 2.3svh), 19px);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(21, 84, 209, .28);
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(21, 84, 209, .34); }

.mail {
  font-size: clamp(14px, min(1vw, 2.2svh), 17px);
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.mail:hover { color: var(--royal); border-color: var(--royal); }

/* ---------- The globe ---------- */
.visual {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  height: 100%;
  /* The globe is sized from the space this box really has, so it (and its
     orbit rings, 1.28 times its width) can never push the page to scroll. */
  container-type: size;
  overflow: clip;
}

.orb {
  --o: min(84cqw, 84cqh, 1000px);
  position: relative;
  width: var(--o);
  aspect-ratio: 1;
}

/* Tinted glass core, shaded for volume (light top-left, deeper bottom-right). */
.core {
  position: absolute;
  inset: 9%;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #ffffff 0%, rgba(176, 228, 250, .97) 26%, rgba(86, 176, 232, .95) 60%, rgba(34, 150, 196, .95) 100%);
  box-shadow:
    inset -16px -22px 44px rgba(14, 84, 182, .32),
    inset 12px 12px 30px rgba(255, 255, 255, .45),
    0 40px 90px -34px rgba(9, 45, 145, .45);
}

.shadow {
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: -3%;
  height: 8%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(6, 52, 110, .38) 0%, rgba(6, 52, 110, .14) 50%, transparent 74%);
  filter: blur(10px);
}

/* Canvas: the rotating Earth, drawn by globe.js. */
.globe { position: absolute; inset: 0; width: 100%; height: 100%; }

.orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(21, 84, 209, .3);
  animation: turn 44s linear infinite;
}
.orbit i {
  position: absolute;
  top: -6px;
  left: 50%;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #9be7c4, #0e9a72);
  box-shadow: 0 0 14px rgba(14, 154, 114, .7);
}
.o1 { inset: -4%; }
.o2 { inset: -9%; border-color: rgba(21, 84, 209, .16); animation-direction: reverse; animation-duration: 64s; }
.o2 i { background: radial-gradient(circle at 35% 35%, #bfe4ff, #1a6be0); box-shadow: 0 0 14px rgba(26, 107, 224, .7); }
@keyframes turn { to { transform: rotate(360deg); } }

/* Four-point star, as in the logo. */
.spark {
  position: absolute;
  top: 17%;
  inset-inline-end: 20%;
  width: 7%;
  aspect-ratio: 1;
  background: #fff;
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, .95));
  animation: twinkle 3.2s ease-in-out infinite;
}
@keyframes twinkle { 0%, 100% { opacity: .55; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.1); } }

/* ---------- Footer ---------- */
.foot {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 24px clamp(12px, 2.6svh, 28px);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}
.sep { width: 4px; height: 4px; border-radius: 50%; background: var(--electric); }

/* ---------- Motion: one calm entrance, transform and opacity only ---------- */
@keyframes rise { from { opacity: 0; transform: translate3d(0, 14px, 0); } to { opacity: 1; transform: none; } }
.copy > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.copy > :nth-child(2) { animation-delay: .1s; }
.copy > :nth-child(3) { animation-delay: .2s; }
.copy > :nth-child(4) { animation-delay: .3s; }
.visual { animation: rise .9s cubic-bezier(.2, .7, .2, 1) .15s both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Screens ---------- */

/* Type that follows the screen height as well as the width. */
.title { font-size: clamp(24px, min(3.7vw, 7svh), 72px); }
.lede { font-size: clamp(13px, min(1.2vw, 2.4svh), 21px); }

/* Tablets in portrait and below: one column, text first, the globe fills
   whatever height is left. */
@media (max-width: 920px) {
  .stage { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); align-content: stretch; gap: clamp(2px, 1svh, 14px); }
  .copy { text-align: center; }
  .title { font-size: clamp(24px, min(7.4vw, 5.6svh), 58px); }
  .lede { margin-inline: auto; font-size: clamp(13px, min(2.6vw, 2.2svh), 20px); }
  .actions { justify-content: center; }
  .dots-tl { display: none; }
  .dots-br { top: auto; bottom: 9svh; }
}

@media (max-width: 640px) {
  .brand img { width: clamp(120px, 38vw, 160px); }
  .lang button { height: 32px; min-width: 46px; font-size: 13px; }
  .stage { padding-top: 12px; padding-bottom: 4px; }
  .btn { min-width: 0; width: min(100%, 320px); }
  .actions { flex-direction: column; gap: 8px; margin-top: clamp(10px, 2svh, 20px); }
  .status { padding: 6px 14px; }
  .foot { font-size: 12px; gap: 8px; padding-bottom: 8px; }
  .dots-br { width: 74px; height: 140px; opacity: .4; }
  .waves { width: 80vw; opacity: .6; }
}

/* A phone on its side: copy beside the globe, as on desktop. */
@media (max-width: 920px) and (orientation: landscape) and (max-height: 560px) {
  .stage { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); grid-template-rows: minmax(0, 1fr); }
  .copy { text-align: start; }
  .title { font-size: clamp(20px, 7.4svh, 34px); }
  .lede { margin-inline: 0; font-size: clamp(12px, 3.6svh, 16px); }
  .actions { flex-direction: row; justify-content: flex-start; }
  .lang button { height: 30px; min-width: 44px; font-size: 12px; }
}

/* Short screens (a phone on its side, a small laptop window). */
@media (max-height: 520px) {
  .brand img { width: 130px; }
  .btn { height: 38px; min-width: 0; font-size: 14px; padding: 0 20px; }
  .actions { margin-top: 8px; }
  .status { padding: 4px 12px; font-size: 12px; }
  .title { margin-top: 6px; }
  .lede { margin-top: 4px; }
  .foot { display: none; }
}

@media (min-width: 2200px) {
  .lang button { font-size: 20px; height: 50px; min-width: 72px; }
  .brand img { width: 420px; }
  .foot { font-size: 22px; }
  .status { font-size: 26px; padding: 12px 28px; }
  .title { font-size: min(3.6vw, 7.2svh); }
  .lede { font-size: min(1.1vw, 2.5svh); }
  .btn { min-width: 340px; height: 88px; font-size: 28px; }
  .mail { font-size: 24px; }
  .dots { width: 150px; }
  .orb { --o: min(84cqw, 84cqh, 1700px); }
  .top, .stage { width: min(2700px, 100%); }
}
