:root {
  --primary: #1f7fd0;
  --primary-dark: #1667ad;
  --primary-soft: #e8f3fc;
  --text: #0f172a;
  --muted: #64748b;
  --surface: #ffffff;
  --border: #dbe5ef;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Cairo", "Segoe UI", Tahoma, sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.7;
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.page-shell {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}

.bg-dots {
  position: absolute;
  width: 180px;
  height: 180px;
  background-image: radial-gradient(#d7e2ec 1.6px, transparent 1.6px);
  background-size: 16px 16px;
  opacity: 0.8;
  pointer-events: none;
}

.bg-dots-top {
  top: 28px;
  left: 28px;
}

.bg-dots-bottom {
  right: 28px;
  bottom: 220px;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: max(14px, env(safe-area-inset-top, 0px)) 0 10px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(219, 229, 239, 0.9);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-copy strong {
  font-size: 1.45rem;
  color: var(--primary);
  line-height: 1.1;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.header-actions-scroll {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.header-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.header-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(31, 127, 208, 0.12);
}

.header-link-social {
  color: var(--primary);
  border-color: rgba(31, 127, 208, 0.25);
  background: var(--primary-soft);
}

.hero {
  position: relative;
  z-index: 1;
  padding: 28px 0 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 28px;
  align-items: center;
}

.official-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 18px;
}

.official-badge-icon {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  font-size: 0.85rem;
}

.hero-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(1.85rem, 6vw, 3.8rem);
  line-height: 1.2;
  color: var(--primary);
  text-wrap: balance;
}

.hero-lead {
  margin: 0;
  max-width: 52ch;
  color: var(--muted);
  font-size: clamp(0.98rem, 3.8vw, 1.08rem);
  font-weight: 600;
  text-wrap: pretty;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.store-badge {
  display: inline-flex;
  flex: 1 1 180px;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  min-height: 58px;
  padding: 10px 16px;
  border-radius: 12px;
  background: #111;
  color: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
  transition: transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.store-badge:hover {
  transform: translateY(-2px);
}

.store-badge-label {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  opacity: 0.88;
}

.store-badge-name {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.1;
}

.desktop-download-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  width: min(100%, 860px);
}

.desktop-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: min(100%, 420px);
  margin-top: 0;
  padding: 14px 18px;
  border-radius: 16px;
  border: 2px solid rgba(31, 127, 208, 0.18);
  background: linear-gradient(180deg, #ffffff 0%, #f5faff 100%);
  box-shadow: 0 14px 30px rgba(31, 127, 208, 0.12);
  font-weight: 800;
  color: var(--primary);
  transition: transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.desktop-download-btn:hover {
  transform: translateY(-1px);
}

.desktop-download-btn small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.desktop-download-icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 1.1rem;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 12px 0 40px;
}

.phone-shadow {
  position: absolute;
  inset: auto 12% 8% 12%;
  height: 42px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.14);
  filter: blur(18px);
}

.phone-frame {
  position: relative;
  width: min(100%, 320px);
  padding: 12px;
  border-radius: 34px;
  background: linear-gradient(180deg, #f8fafc 0%, #dbe7f2 100%);
  box-shadow: var(--shadow);
}

.phone-screen {
  padding: 18px 16px 20px;
  border-radius: 26px;
  background: #fff;
}

.phone-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.phone-brand strong {
  display: block;
  color: var(--primary);
  font-size: 1rem;
}

.phone-brand span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.phone-welcome {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
}

.phone-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
  padding: 4px;
  border-radius: 14px;
  background: #f1f5f9;
}

.phone-tab {
  padding: 8px 6px;
  border-radius: 10px;
  text-align: center;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.phone-tab.is-active {
  background: var(--primary);
  color: #fff;
}

.phone-field {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: #94a3b8;
  font-size: 0.76rem;
  font-weight: 600;
}

.phone-field-icon {
  color: var(--primary);
}

.phone-forgot {
  margin: 2px 0 12px;
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 700;
  text-align: left;
}

.phone-submit {
  padding: 12px;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 800;
}

.phone-footer {
  margin-top: 12px;
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
}

.features-wave {
  position: relative;
  margin-top: 12px;
  padding: 120px 0 48px;
  /* خلفية كاملة للقسم — wave-shape يغطي الأعلى فقط وكان يترك الباقي أبيض (نص المميزات يختفي على الموبايل) */
  background: linear-gradient(165deg, #2b8ce0 0%, #1f7fd0 48%, #1667ad 100%);
  overflow: visible;
}

.wave-shape {
  position: absolute;
  inset: 0 0 auto;
  height: 220px;
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(255, 255, 255, 0.18), transparent 58%),
    linear-gradient(135deg, #2b8ce0 0%, #1f7fd0 48%, #1667ad 100%);
  border-radius: 100% 100% 0 0 / 100% 100% 0 0;
  transform: scaleX(1.08);
  transform-origin: bottom;
  pointer-events: none;
}

.features-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.feature-item {
  text-align: center;
  color: #fff;
}

.feature-icon {
  display: inline-flex;
  width: 58px;
  height: 58px;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 1.5rem;
}

.feature-item h2 {
  margin: 0;
  color: #fff;
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 700;
  text-wrap: pretty;
}

.site-footer {
  position: relative;
  z-index: 1;
  padding: 0 0 28px;
  background: linear-gradient(180deg, #1667ad 0%, #145f9f 100%);
  color: rgba(255, 255, 255, 0.92);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a {
  font-weight: 700;
  color: #fff;
  opacity: 0.95;
}

.footer-links a:hover {
  opacity: 1;
  text-decoration: underline;
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-lead {
    margin-inline: auto;
  }

  .official-badge {
    margin-inline: auto;
  }

  .store-row {
    justify-content: center;
  }

  .desktop-download-btn {
    margin-inline: auto;
  }

  .hero-visual {
    padding: 0 0 12px;
  }

  .features-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .features-wave {
    padding-top: 96px;
    padding-bottom: 40px;
  }

  .wave-shape {
    height: 190px;
  }
}

@media (max-width: 768px) {
  .container {
    width: min(1180px, calc(100% - 24px));
  }

  .bg-dots {
    width: 120px;
    height: 120px;
    opacity: 0.55;
  }

  .bg-dots-bottom {
    display: none;
  }

  .header-inner {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .header-actions,
  .header-actions-scroll {
    width: 100%;
    justify-content: stretch;
  }

  .header-actions-scroll {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .header-link {
    width: 100%;
    min-height: 42px;
    padding: 0 10px;
    font-size: 0.82rem;
  }

  .brand-lockup img {
    width: 46px;
    height: 46px;
  }

  .brand-copy strong {
    font-size: 1.25rem;
  }

  .hero {
    padding-top: 18px;
  }

  .phone-frame {
    width: min(100%, 280px);
    padding: 10px;
    border-radius: 28px;
  }

  .phone-screen {
    padding: 16px 14px 18px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .feature-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.12);
    text-align: right;
  }

  .feature-icon {
    margin: 0;
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    font-size: 1.35rem;
  }

  .feature-item h2 {
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .footer-inner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .footer-brand {
    justify-content: center;
  }

  .footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .footer-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
  }
}

@media (max-width: 480px) {
  .container {
    width: min(1180px, calc(100% - 20px));
  }

  .hero-copy h1 {
    font-size: clamp(1.65rem, 8.5vw, 2.2rem);
  }

  .hero-lead {
    font-size: 0.95rem;
    line-height: 1.75;
  }

  .store-row {
    flex-direction: column;
    align-items: stretch;
  }

  .store-badge {
    width: 100%;
    flex-basis: auto;
  }

  .desktop-download-btn {
    width: 100%;
    align-items: center;
  }

  .desktop-download-btn span:last-child {
    text-align: right;
    flex: 1;
  }

  .hero-visual {
    padding-bottom: 4px;
  }

  .phone-frame {
    width: min(100%, 250px);
  }

  .phone-tab,
  .phone-field,
  .phone-welcome,
  .phone-forgot,
  .phone-footer {
    font-size: 0.7rem;
  }

  .features-wave {
    margin-top: 8px;
    padding-top: 80px;
    padding-bottom: 36px;
  }

  .wave-shape {
    height: 120px;
    transform: scaleX(1.12);
  }

  .feature-item h2 {
    font-size: 1rem;
    line-height: 1.65;
    text-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
  }

  .site-footer {
    padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
  }

  .footer-links {
    grid-template-columns: 1fr;
  }
}
