:root {
  --bg: #02050d;
  --panel: #090e1d;
  --line: rgba(153, 166, 194, 0.16);
  --violet: #843fff;
  --violet-soft: #a855f7;
  --gold: #f2b046;
  --white: #ffffff;
  --muted: #99a6c2;
  --font: "IBM Plex Sans Arabic", system-ui, sans-serif;
  --brand: "Space Grotesk", "IBM Plex Sans Arabic", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad: clamp(1rem, 3.5vw, 2.5rem);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--white);
  background: var(--bg);
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(700px 360px at 85% 0%, rgba(132, 63, 255, 0.28), transparent 60%),
    radial-gradient(500px 280px at 10% 30%, rgba(242, 176, 70, 0.08), transparent 55%),
    linear-gradient(180deg, #02040e, #0a0618 50%, #030511);
}

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem var(--pad);
  background: rgba(2, 5, 13, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
}

.header.is-scrolled {
  border-bottom-color: var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(132, 63, 255, 0.4);
}

.brand span {
  display: grid;
  gap: 0.1rem;
}

.brand strong {
  font-family: var(--brand);
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, #fff 10%, #f2b046 55%, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand small {
  color: var(--muted);
  font-size: 0.7rem;
}

.nav {
  display: flex;
  gap: 1.25rem;
}

.nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
}

.nav a:hover {
  color: var(--white);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.2s var(--ease), filter 0.2s, background 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-gold {
  background: linear-gradient(135deg, #f2b046, #e09a2a);
  color: #1a1205;
  box-shadow: 0 8px 22px rgba(242, 176, 70, 0.25);
}

.btn-ghost {
  border-color: var(--line);
  background: rgba(15, 22, 39, 0.55);
  color: var(--white);
}

.btn-ghost:hover {
  border-color: rgba(132, 63, 255, 0.5);
}

.btn-wide {
  width: 100%;
  background: rgba(132, 63, 255, 0.14);
  border-color: rgba(132, 63, 255, 0.4);
  color: var(--white);
}

.btn-wide:hover {
  background: rgba(132, 63, 255, 0.22);
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem var(--pad) 1.25rem;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.6rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(242, 176, 70, 0.35);
  background: rgba(242, 176, 70, 0.08);
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 600;
}

.hero h1 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  line-height: 1.25;
}

.lede {
  margin: 0 0 1rem;
  color: var(--muted);
  max-width: 32rem;
  font-size: 1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 240px;
}

.hero-art img {
  width: min(220px, 55%);
  border-radius: 50%;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 40px rgba(132, 63, 255, 0.35);
  animation: float 5s ease-in-out infinite;
}

.orbit {
  position: absolute;
  width: min(280px, 70%);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid rgba(132, 63, 255, 0.45);
  box-shadow: 0 0 30px rgba(132, 63, 255, 0.2);
  animation: spin 22s linear infinite;
}

.orbit::after {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 1px dashed rgba(168, 85, 247, 0.4);
}

.apps {
  padding: 0.75rem var(--pad) 1.5rem;
}

.apps-head {
  margin-bottom: 1rem;
}

.eyebrow {
  margin: 0 0 0.25rem;
  color: var(--violet-soft);
  font-weight: 700;
  font-size: 0.85rem;
}

.apps-head h2,
.about h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.app-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(132, 63, 255, 0.28);
  background: linear-gradient(180deg, #0f1627, #090e1d);
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
  animation: rise 0.55s var(--ease) both;
}

.app-card:hover {
  transform: translateY(-4px);
  border-color: rgba(132, 63, 255, 0.55);
  box-shadow: 0 14px 34px rgba(132, 63, 255, 0.14);
}

.app-cover {
  aspect-ratio: 4 / 5;
  background: #050812;
  overflow: hidden;
}

.app-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.app-body {
  display: grid;
  gap: 0.55rem;
  padding: 0.9rem 0.95rem 1rem;
}

.app-body h3 {
  margin: 0;
  font-size: 1.05rem;
}

.app-body .desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.chip {
  font-size: 0.7rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
}

.about {
  padding: 1.25rem var(--pad) 2rem;
}

.about h2 span {
  color: var(--gold);
}

.about > h2 {
  margin-bottom: 0.9rem;
}

.about-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.about-row article {
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(9, 14, 29, 0.7);
}

.about-row h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  color: var(--gold);
}

.about-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 1.25rem var(--pad) 1rem;
}

.footer-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.9rem;
}

.mail {
  color: var(--gold);
  font-weight: 600;
}

.footer-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
}

.footer-bar p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.social {
  display: flex;
  gap: 0.45rem;
}

.social a {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.social a:hover {
  color: var(--white);
  border-color: rgba(132, 63, 255, 0.45);
}

.modal {
  border: 1px solid rgba(132, 63, 255, 0.4);
  border-radius: 18px;
  padding: 0;
  width: min(680px, calc(100vw - 1.5rem));
  background: var(--panel);
  color: var(--white);
  overflow: hidden;
}

.modal::backdrop {
  background: rgba(2, 5, 13, 0.78);
  backdrop-filter: blur(4px);
}

.modal-box {
  margin: 0;
  position: relative;
}

.modal-x {
  position: absolute;
  top: 0.7rem;
  inset-inline-start: 0.7rem;
  z-index: 2;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(9, 14, 29, 0.85);
  color: var(--white);
  cursor: pointer;
  font-size: 1.2rem;
}

.modal-cover {
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 420px;
  object-fit: contain;
  background: #050812;
}

.modal-body {
  padding: 1rem 1.15rem 1.25rem;
  display: grid;
  gap: 0.45rem;
}

.modal-body h3 {
  margin: 0;
  font-size: 1.35rem;
}

.status {
  margin: 0;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 700;
}

.muted {
  color: var(--muted);
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 980px) {
  .apps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 1.1rem;
  }

  .hero-art {
    order: -1;
    min-height: 180px;
  }

  .hero-art img {
    width: 150px;
  }
}

@media (max-width: 520px) {
  .apps-grid {
    grid-template-columns: 1fr;
  }

  .header .btn-gold {
    padding-inline: 0.85rem;
  }
}

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