:root {
  --bg: #f5f7f6;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-solid: #ffffff;
  --surface-soft: #eaf1ed;
  --text: #0b1f18;
  --text-muted: #52675e;
  --border: rgba(15, 61, 46, 0.08);
  --primary: #0f3d2e;
  --primary-accent: #1d6b47;
  --primary-soft: rgba(29, 107, 71, 0.1);
  --gold: #b87a14;
  --gold-bright: #e9b44c;
  --gold-soft: rgba(233, 180, 76, 0.16);
  --shadow: 0 14px 36px rgba(11, 31, 24, 0.06);
  --shadow-lg: 0 32px 72px rgba(11, 31, 24, 0.13);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --apple-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans Arabic", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
}

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

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* Majestic Always-Moving Islamic Ambient Background */
.islamic-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 12%, rgba(29, 107, 71, 0.11), transparent 44%),
    radial-gradient(circle at 14% 38%, rgba(233, 180, 76, 0.12), transparent 42%),
    radial-gradient(circle at 75% 84%, rgba(15, 61, 46, 0.09), transparent 48%);
}

.islamic-pattern {
  position: absolute;
  inset: -120px;
  opacity: 0.55;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%230F3D2E' stroke-opacity='0.065' stroke-width='1'%3E%3Crect x='30' y='30' width='100' height='100' rx='6'/%3E%3Crect x='30' y='30' width='100' height='100' rx='6' transform='rotate(45 80 80)'/%3E%3Ccircle cx='80' cy='80' r='52' stroke='%23C68616' stroke-opacity='0.07'/%3E%3Ccircle cx='80' cy='80' r='22'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 160px 160px;
  animation: patternDrift 48s linear infinite;
  will-change: transform;
}

.islamic-arch-glow {
  position: absolute;
  left: 50%;
  top: -120px;
  width: min(980px, 130vw);
  height: 980px;
  transform: translateX(-50%);
  border-radius: 50% 50% 0 0;
  border: 1.5px solid rgba(200, 140, 30, 0.14);
  box-shadow:
    inset 0 40px 120px rgba(29, 107, 71, 0.06),
    0 0 100px rgba(233, 180, 76, 0.08);
  animation: archBreathe 12s ease-in-out infinite alternate;
}

.islamic-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(75px);
  will-change: transform;
}

.islamic-orb-a {
  width: 460px;
  height: 460px;
  top: 8%;
  right: -120px;
  background: radial-gradient(circle, rgba(29, 107, 71, 0.16), transparent 70%);
  animation: orbFloatA 18s ease-in-out infinite alternate;
}

.islamic-orb-b {
  width: 400px;
  height: 400px;
  bottom: 10%;
  left: -100px;
  background: radial-gradient(circle, rgba(233, 180, 76, 0.18), transparent 70%);
  animation: orbFloatB 22s ease-in-out infinite alternate;
}

@keyframes patternDrift {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(160px, 160px, 0); }
}

@keyframes archBreathe {
  0% { transform: translateX(-50%) scale(0.98); opacity: 0.65; }
  100% { transform: translateX(-50%) scale(1.03); opacity: 1; }
}

@keyframes orbFloatA {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-60px, 70px, 0); }
}

@keyframes orbFloatB {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(70px, -60px, 0); }
}

/* Modern Floating Glassmorphic Navbar */
.nav-wrap {
  position: sticky;
  top: 12px;
  z-index: 60;
  padding: 0 16px;
}

.navbar {
  width: min(1040px, 100%);
  margin: 0 auto;
  border-radius: 999px;
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(15, 61, 46, 0.09);
  box-shadow: 0 10px 30px rgba(11, 31, 24, 0.07);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px 8px 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.08rem;
  padding-right: 4px;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(15, 61, 46, 0.14);
  transition: transform 0.35s var(--spring);
}

.brand:hover img {
  transform: rotate(-6deg) scale(1.06);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-links a {
  padding: 7px 14px;
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-links a:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0f3d2e, #1d6b47);
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(15, 61, 46, 0.2);
  transition: transform 0.28s var(--spring), box-shadow 0.2s ease;
}

.nav-cta:hover {
  transform: translateY(-2px);
}

/* Apple Editorial Cinema Hero */
.hero {
  padding: 58px 0 36px;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  box-shadow: 0 6px 18px rgba(15, 61, 46, 0.05);
  color: var(--primary-accent);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero h1 {
  margin: 0 auto 18px;
  max-width: 16ch;
  font-size: clamp(2.4rem, 5.8vw, 4.35rem);
  line-height: 1.14;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, #0f3d2e 10%, #1d6b47 55%, #b87a14 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  margin: 0 auto 30px;
  max-width: 54ch;
  font-size: clamp(1.06rem, 1.8vw, 1.24rem);
  color: var(--text-muted);
  font-weight: 400;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 42px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--spring), box-shadow 0.25s ease;
}

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

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: linear-gradient(135deg, #0f3d2e, #1d6b47);
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 61, 46, 0.24);
}

.btn-shimmer::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.26), transparent);
  transform: skewX(-20deg);
  animation: shimmer 4.5s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 60% { left: -120%; }
  100% { left: 160%; }
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  border-color: var(--border);
  box-shadow: var(--shadow);
}

.btn-gold {
  background: var(--gold-soft);
  color: var(--gold);
  border-color: rgba(184, 122, 20, 0.25);
}

.btn-disabled {
  opacity: 0.85;
  cursor: default;
}

.btn-disabled:hover {
  transform: none;
}

/* Hero Phone Stage */
.hero-stage {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding: 18px 0 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-halo {
  position: absolute;
  width: min(460px, 88vw);
  height: min(460px, 88vw);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(29, 107, 71, 0.14) 0%, rgba(233, 180, 76, 0.08) 45%, transparent 72%);
  filter: blur(18px);
  z-index: 0;
}

.hero-phone-3d {
  position: relative;
  z-index: 2;
  transition: transform 0.25s var(--apple-ease);
  animation: floatPhone 6s ease-in-out infinite;
}

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

.phone-frame {
  width: min(300px, 76vw);
  padding: 10px;
  border-radius: 42px;
  background: linear-gradient(145deg, #27302c, #0c1210);
  box-shadow: var(--shadow-lg), inset 0 0 0 2px rgba(255, 255, 255, 0.16);
}

.phone-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 32px;
}

.float-widget {
  position: absolute;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(15, 61, 46, 0.09);
  box-shadow: 0 18px 36px rgba(11, 31, 24, 0.11);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.fw-1 { top: 44px; right: 24px; animation: bobA 4.6s ease-in-out infinite; }
.fw-2 { top: 46%; left: 10px; animation: bobB 5.2s ease-in-out infinite; }
.fw-3 { bottom: 42px; right: 32px; animation: bobA 5s ease-in-out infinite reverse; }

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

@keyframes bobB {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(9px); }
}

/* Sections */
.section {
  padding: 52px 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 34px;
}

.section-header h2 {
  margin: 0 0 10px;
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  line-height: 1.25;
}

.section-header p {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* Apple Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.bento-card {
  background: var(--surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  overflow: hidden;
  transition: transform 0.35s var(--spring), box-shadow 0.3s ease;
}

.bento-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.bento-wide { grid-column: span 7; }
.bento-med { grid-column: span 5; }
.bento-third { grid-column: span 4; }

.bento-tag {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-accent);
  margin-bottom: 6px;
}

.bento-card h3 {
  margin: 0 0 8px;
  font-size: 1.3rem;
  line-height: 1.3;
}

.bento-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.96rem;
}

/* Live Bento Mini-Visuals */
.prayer-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 10px;
  border-radius: 18px;
  background: var(--bg);
  border: 1px solid var(--border);
}

.p-pill {
  text-align: center;
  padding: 10px 6px;
  border-radius: 13px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.45s var(--spring);
}

.p-pill.active {
  background: linear-gradient(135deg, #0f3d2e, #1d6b47);
  color: #ffffff;
  transform: scale(1.05);
  box-shadow: 0 8px 18px rgba(15, 61, 46, 0.22);
}

.focus-ring-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 14px;
  border-radius: 20px;
  background: var(--bg);
}

.focus-ring {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: conic-gradient(#1d6b47 0deg 260deg, rgba(29, 107, 71, 0.14) 260deg 360deg);
  display: grid;
  place-items: center;
  animation: pulseRing 3.5s ease-in-out infinite;
}

.focus-ring-inner {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #ffffff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--primary);
}

@keyframes pulseRing {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.mini-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 64px;
  padding: 10px 14px;
  border-radius: 18px;
  background: var(--bg);
}

.mini-bars span {
  flex: 1;
  border-radius: 999px;
  background: linear-gradient(180deg, #1d6b47, #7dc3a0);
  animation: barDance 3.2s ease-in-out infinite alternate;
}

.mini-bars span:nth-child(2) { height: 65%; animation-delay: 0.2s; }
.mini-bars span:nth-child(3) { height: 92%; animation-delay: 0.4s; background: linear-gradient(180deg, #0f3d2e, #1d6b47); }
.mini-bars span:nth-child(4) { height: 55%; animation-delay: 0.6s; }
.mini-bars span:nth-child(5) { height: 80%; animation-delay: 0.8s; }
.mini-bars span:nth-child(1) { height: 42%; }

@keyframes barDance {
  0% { transform: scaleY(0.85); transform-origin: bottom; }
  100% { transform: scaleY(1.08); transform-origin: bottom; }
}

.progress-track {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 78%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0f3d2e, #248a5b);
}

/* Interactive Device Showcase */
.showcase-card {
  background: var(--surface);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: 34px;
  box-shadow: var(--shadow-lg);
  padding: 36px 24px;
  text-align: center;
}

.tab-pills {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: var(--surface-soft);
  margin-bottom: 28px;
}

.tab-pill {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.28s var(--spring);
}

.tab-pill.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 4px 14px rgba(11, 31, 24, 0.1);
}

.showcase-stage {
  display: flex;
  justify-content: center;
}

.showcase-stage .phone-frame {
  width: min(305px, 78vw);
}

.showcase-stage img {
  transition: opacity 0.25s ease, transform 0.35s var(--apple-ease);
}

.showcase-caption {
  margin: 18px auto 0;
  max-width: 44ch;
  color: var(--text-muted);
  font-size: 0.96rem;
}

/* Testers & Download Section */
.testers-banner {
  background: linear-gradient(135deg, #ffffff 0%, #eaf3ee 100%);
  border: 1px solid var(--border);
  border-radius: 30px;
  box-shadow: var(--shadow);
  padding: 32px;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 24px;
  align-items: center;
}

.steps-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

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

.dl-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  transition: transform 0.32s var(--spring), box-shadow 0.25s ease;
}

.dl-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.dl-card.featured {
  border: 1.5px solid rgba(29, 107, 71, 0.35);
  background: linear-gradient(180deg, #ffffff 0%, #f2f9f5 100%);
}

.dl-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.dl-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.size-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--primary-soft);
  color: var(--primary-accent);
  margin-top: 8px;
}

.badge-gold {
  background: var(--gold-soft);
  color: var(--gold);
}

.dl-desc {
  margin: 12px 0 0;
  font-size: 0.94rem;
  color: var(--text-muted);
}

.dl-card .btn {
  width: 100%;
}

.help-box {
  margin-top: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 15px 20px;
}

.help-box summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--primary);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.help-box summary::-webkit-details-marker {
  display: none;
}

.help-box p {
  margin: 10px 0 0;
  font-size: 0.93rem;
  color: var(--text-muted);
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  transition: opacity 0.65s ease, transform 0.7s var(--spring);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Privacy Page */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding: 26px;
}

.prose-card {
  display: grid;
  gap: 18px;
}

.prose-block {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.prose-block:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.prose-block h2 {
  margin: 0 0 8px;
  font-size: 1.18rem;
}

.prose-block p,
.prose-block li {
  color: var(--text-muted);
  margin: 0 0 8px;
}

/* Footer */
.footer {
  margin-top: 32px;
  padding: 28px 0 42px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.92rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a:hover {
  color: var(--primary-accent);
}

@media (max-width: 960px) {
  .bento-wide,
  .bento-med,
  .bento-third {
    grid-column: span 12;
  }

  .testers-banner,
  .download-grid {
    grid-template-columns: 1fr;
  }
}

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

  .hero {
    padding-top: 34px;
  }

  .cta-group .btn {
    width: 100%;
  }

  .fw-1 { right: 4px; top: 14px; font-size: 0.78rem; padding: 8px 12px; }
  .fw-2 { left: 4px; top: 47%; font-size: 0.78rem; padding: 8px 12px; }
  .fw-3 { right: 6px; bottom: 16px; font-size: 0.78rem; padding: 8px 12px; }

  .prayer-strip {
    gap: 4px;
    padding: 8px;
  }

  .p-pill {
    font-size: 0.72rem;
    padding: 8px 2px;
  }

  .tab-pills {
    border-radius: 20px;
  }

  .tab-pill {
    padding: 8px 13px;
    font-size: 0.84rem;
  }

  .testers-banner,
  .showcase-card,
  .bento-card,
  .dl-card {
    padding: 20px;
  }
}

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