:root {
  --bg: #0d1224;
  --bg-soft: #131b31;
  --card: rgba(17, 24, 39, 0.7);
  --card-border: rgba(200, 230, 255, 0.18);
  --text: #edf5ff;
  --muted: rgba(237, 245, 255, 0.78);
  --accent: #bfe9fb;
  --accent-strong: #75c9f2;
  --accent-dark: #0e2b44;
  --shadow: 0 24px 80px rgba(2, 8, 23, 0.45);
  --radius: 28px;
  --content-max: 1180px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Inter", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top center, rgba(88, 132, 255, 0.18), transparent 35%),
    linear-gradient(180deg, #12182f 0%, var(--bg) 100%);
  color: var(--text);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 14% 24%, rgba(255, 255, 255, 0.85) 0 2px, transparent 2.5px),
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.75) 0 2px, transparent 2.5px),
    radial-gradient(circle at 88% 68%, rgba(255, 255, 255, 0.55) 0 1.5px, transparent 2px),
    radial-gradient(circle at 24% 74%, rgba(255, 255, 255, 0.4) 0 1.5px, transparent 2px);
  opacity: 0.32;
  pointer-events: none;
}

a {
  color: var(--accent);
  text-decoration: none;
  overflow-wrap: anywhere;
}

a:hover {
  text-decoration: underline;
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 32px), var(--content-max));
  margin: 0 auto;
  padding: 24px 0 40px;
}

main {
  display: grid;
  gap: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(191, 233, 251, 0.12);
  border: 1px solid rgba(191, 233, 251, 0.25);
  flex: 0 0 auto;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.lang-switcher {
  display: inline-flex;
  border: 1px solid rgba(191, 233, 251, 0.22);
  border-radius: 999px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.05);
  flex: 0 0 auto;
}

.lang-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}

.lang-button.active {
  background: var(--accent);
  color: var(--accent-dark);
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 32px;
  padding: 42px;
}

.hero-copy {
  align-self: center;
  display: grid;
  gap: 12px;
}

.hero-copy h1 {
  max-width: 11ch;
}

.eyebrow {
  margin: 0;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-strong);
  font-weight: 700;
}

h1,
h2 {
  margin: 0;
  line-height: 1.05;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4.7rem);
}

h2 {
  font-size: clamp(1.3rem, 2.4vw, 2rem);
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
  max-width: 60ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 4px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(191, 233, 251, 0.24);
  white-space: nowrap;
}

.button:hover {
  text-decoration: none;
}

.button.primary {
  background: var(--accent);
  color: var(--accent-dark);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.hero-panel {
  display: flex;
  align-items: center;
  justify-content: center;
}

.mock-device {
  width: min(100%, 340px);
  aspect-ratio: 4 / 5;
  padding: 14px;
  border-radius: 36px;
  background: linear-gradient(180deg, rgba(255,255,255,0.15), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.12);
}

.mock-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at top center, rgba(255, 212, 124, 0.35), transparent 34%),
    linear-gradient(180deg, #132347 0%, #0f1731 100%);
}

.mock-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 22%, white 0 1.5px, transparent 2px),
    radial-gradient(circle at 68% 18%, rgba(255,255,255,0.9) 0 1.5px, transparent 2px),
    radial-gradient(circle at 72% 68%, rgba(255,255,255,0.7) 0 1.5px, transparent 2px);
  opacity: 0.8;
}

.mock-book {
  position: absolute;
  left: 50%;
  bottom: 14%;
  width: 56%;
  aspect-ratio: 11 / 15;
  transform: translateX(-50%);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.12), rgba(0,0,0,0.24)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='300' viewBox='0 0 220 300'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0%25' stop-color='%23f6df9f'/%3E%3Cstop offset='45%25' stop-color='%2380c9f4'/%3E%3Cstop offset='100%25' stop-color='%231b2a4a'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='220' height='300' rx='24' fill='url(%23g)'/%3E%3Ccircle cx='110' cy='86' r='44' fill='%23f0d27d' fill-opacity='0.75'/%3E%3Cpath d='M0 214 C40 194 68 180 110 180 C152 180 180 194 220 214 L220 300 L0 300 Z' fill='%230e3047' fill-opacity='0.45'/%3E%3Cpath d='M46 228 C64 214 82 202 106 198 C128 194 148 200 172 212 C164 174 144 136 110 132 C82 128 60 150 46 228 Z' fill='%23678d55' fill-opacity='0.7'/%3E%3C/svg%3E")
      center/cover no-repeat;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.35);
}

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

.info-card,
.policy-layout {
  padding: 28px;
}

.info-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.info-card p,
.policy-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.feature-list {
  margin: 0;
  padding-inline-start: 20px;
  color: var(--muted);
  line-height: 1.8;
}

.feature-list li + li {
  margin-top: 0.35rem;
}

.policy-layout {
  max-width: 980px;
  margin: 0 auto;
}

.policy-header {
  display: grid;
  gap: 10px;
  margin-bottom: 26px;
}

.policy-header h1 {
  font-size: clamp(2.5rem, 6vw, 4.2rem);
}

.policy-header .lead {
  max-width: 70ch;
}

.policy-section + .policy-section {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid rgba(191, 233, 251, 0.12);
}

.site-footer {
  margin-top: 24px;
  color: rgba(237, 245, 255, 0.6);
  text-align: center;
  font-size: 0.95rem;
}

.site-footer p {
  margin: 0;
}

.centered-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.error-card {
  width: min(100%, 520px);
  padding: 32px;
  text-align: center;
}

[dir="rtl"] body,
[dir="rtl"] {
  font-family: "Tahoma", "Arial", sans-serif;
}

[dir="rtl"] .topbar,
[dir="rtl"] .topbar-actions,
[dir="rtl"] .hero-actions {
  flex-direction: row-reverse;
}

[dir="rtl"] .brand {
  flex-direction: row-reverse;
}

[dir="rtl"] .lead,
[dir="rtl"] .policy-section p,
[dir="rtl"] .feature-list,
[dir="rtl"] .info-card p {
  text-align: right;
}

.lang-ar {
  display: none !important;
}

html[lang="ar"] .lang-en {
  display: none !important;
}

html[lang="ar"] .lang-ar {
  display: revert !important;
}

@media (max-width: 980px) {
  .hero,
  .grid-section {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 28px;
  }

  .hero-panel {
    order: 2;
  }

  .hero-copy {
    order: 1;
  }
}

@media (max-width: 760px) {
  .site-shell {
    width: min(calc(100% - 24px), var(--content-max));
    padding-top: 18px;
  }

  .topbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: start;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: nowrap;
  }

  .hero,
  .info-card,
  .policy-layout {
    padding: 24px;
  }

  .policy-header h1 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .lead,
  .policy-header .lead {
    max-width: none;
  }
}

@media (max-width: 460px) {
  .site-shell {
    width: min(calc(100% - 20px), var(--content-max));
    padding-top: 16px;
  }

  .brand {
    font-size: 0.94rem;
    gap: 10px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .topbar-actions {
    gap: 10px;
  }

  .nav-link {
    font-size: 0.92rem;
  }

  .lang-button {
    padding: 9px 12px;
  }

  .hero-copy h1 {
    max-width: none;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  [dir="rtl"] .hero-actions {
    align-items: flex-end;
  }

  .button {
    width: 100%;
  }

  h1 {
    font-size: 2.3rem;
  }

  .lead {
    font-size: 1rem;
  }
}
