:root {
  --teal-ink: #061b1f;
  --teal-deep: #0a2f34;
  --teal: #0d434b;
  --teal-soft: #1a5a63;
  --gold: #c6a45a;
  --gold-bright: #e0c07a;
  --cream: #f7f1e4;
  --mist: rgba(232, 241, 244, 0.12);
  --glass: rgba(12, 48, 54, 0.55);
  --text: #eef6f7;
  --muted: #a7c0c5;
  --danger-soft: #3a2a12;
  --radius: 22px;
  --shadow-deep: 0 30px 80px rgba(0, 0, 0, 0.45);
  --perspective: 1200px;
  --font-ui: "Vazirmatn", sans-serif;
  --font-brand: "Vazirmatn", sans-serif;
  --font-quran: "UthmanicHafs", "Vazirmatn", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  color: var(--text);
  background: radial-gradient(1200px 700px at 10% -10%, #164f57 0%, transparent 55%),
    radial-gradient(900px 600px at 100% 0%, #3a2f16 0%, transparent 45%),
    linear-gradient(165deg, #041416 0%, #0a2f34 42%, #071f23 100%);
  overflow-x: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
}

.scene {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  perspective: var(--perspective);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  transform: translate3d(0, 0, 0);
  animation: drift 16s ease-in-out infinite;
}

.orb-a {
  width: 420px;
  height: 420px;
  top: -80px;
  inset-inline-start: -60px;
  background: radial-gradient(circle, rgba(198, 164, 90, 0.45), transparent 70%);
}

.orb-b {
  width: 520px;
  height: 520px;
  bottom: 10%;
  inset-inline-end: -120px;
  background: radial-gradient(circle, rgba(26, 90, 99, 0.7), transparent 70%);
  animation-delay: -4s;
}

.orb-c {
  width: 280px;
  height: 280px;
  top: 42%;
  inset-inline-start: 35%;
  background: radial-gradient(circle, rgba(232, 212, 150, 0.25), transparent 70%);
  animation-delay: -8s;
}

.mesh {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 50% 30%, black 20%, transparent 75%);
  transform: rotateX(58deg) scale(1.4);
  transform-origin: center top;
  opacity: 0.35;
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(24px, -30px, 40px) scale(1.08);
  }
}

.topbar,
main,
.footer {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  backdrop-filter: blur(16px) saturate(140%);
  background: rgba(6, 27, 31, 0.55);
  border-bottom: 1px solid rgba(198, 164, 90, 0.18);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.brand-logo {
  display: block;
  height: auto;
  object-fit: contain;
}

.brand-logo--nav {
  width: clamp(110px, 18vw, 148px);
}

.brand-logo--hero {
  width: min(100%, 420px);
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.4));
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
}

.nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--gold-bright);
}

.lang-switch {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.2rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(198, 164, 90, 0.25);
}

.lang-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  min-width: 2.2rem;
  height: 2rem;
  border-radius: 999px;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-btn.is-active,
.lang-btn:hover {
  background: var(--gold);
  color: var(--teal-ink);
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding: clamp(2rem, 6vh, 4rem) clamp(1rem, 4vw, 2.5rem) 3rem;
  perspective: var(--perspective);
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.brand-hero {
  margin: 0;
  line-height: 0;
}

.tagline {
  margin: 1rem 0 1.6rem;
  max-width: 34rem;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  line-height: 1.75;
  font-weight: 500;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: var(--teal-ink);
  box-shadow: 0 12px 30px rgba(198, 164, 90, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn-primary.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  box-shadow: none;
}

.btn-ghost {
  border: 1px solid rgba(198, 164, 90, 0.45);
  color: var(--cream);
  background: rgba(255, 255, 255, 0.04);
}

.btn-ghost:hover {
  background: rgba(198, 164, 90, 0.12);
}

.hero-meta {
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.92rem;
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
}

.hero-meta strong {
  color: var(--gold-bright);
}

.hero-stage {
  position: relative;
  min-height: 420px;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
}

.stage-glow {
  position: absolute;
  width: 70%;
  height: 70%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(198, 164, 90, 0.28), transparent 70%);
  filter: blur(18px);
}

.phone-3d {
  position: relative;
  width: min(280px, 70vw);
  transform-style: preserve-3d;
  transform: rotateY(-18deg) rotateX(8deg);
  animation: phoneFloat 7s ease-in-out infinite;
}

@keyframes phoneFloat {
  0%,
  100% {
    transform: rotateY(-18deg) rotateX(8deg) translateY(0);
  }
  50% {
    transform: rotateY(-12deg) rotateX(4deg) translateY(-14px);
  }
}

.phone-shell {
  position: relative;
  border-radius: 36px;
  padding: 12px;
  background: linear-gradient(160deg, #1d3034, #0a171a 55%, #142226);
  box-shadow: var(--shadow-deep), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transform: translateZ(40px);
}

.phone-notch {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 88px;
  height: 10px;
  border-radius: 999px;
  background: #050d0f;
  z-index: 2;
}

.phone-screen {
  border-radius: 28px;
  min-height: 460px;
  padding: 2.2rem 1rem 1.2rem;
  background:
    linear-gradient(180deg, rgba(13, 67, 75, 0.95), rgba(6, 27, 31, 0.98)),
    radial-gradient(circle at 70% 20%, rgba(198, 164, 90, 0.2), transparent 50%);
  border: 1px solid rgba(198, 164, 90, 0.2);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.screen-logo {
  display: block;
  width: min(70%, 168px);
  height: auto;
  margin: 0.35rem auto 0.25rem;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
}

.screen-ayahs {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.35rem;
  flex: 1;
  justify-content: center;
}

.screen-ayah {
  margin: 0;
  font-family: var(--font-quran);
  text-align: center;
  color: #e8f3f4;
  font-size: clamp(0.95rem, 2.8vw, 1.12rem);
  line-height: 1.95;
  padding: 0.7rem 0.65rem;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(198, 164, 90, 0.12));
  border: 1px solid rgba(198, 164, 90, 0.18);
}

.float-card {
  position: absolute;
  padding: 0.55rem 0.9rem;
  border-radius: 14px;
  background: rgba(247, 241, 228, 0.92);
  color: var(--teal-deep);
  font-weight: 800;
  font-size: 0.82rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(198, 164, 90, 0.35);
  transform: translateZ(90px);
  animation: cardBob 5.5s ease-in-out infinite;
}

.float-a {
  top: 12%;
  inset-inline-start: -18%;
}
.float-b {
  top: 48%;
  inset-inline-end: -22%;
  animation-delay: -1.5s;
}
.float-c {
  bottom: 8%;
  inset-inline-start: -8%;
  animation-delay: -3s;
}

@keyframes cardBob {
  0%,
  100% {
    transform: translateZ(90px) translateY(0);
  }
  50% {
    transform: translateZ(110px) translateY(-10px);
  }
}

.panel,
.download {
  padding: 1.25rem clamp(1rem, 4vw, 2.5rem) 2.5rem;
}

.panel-card,
.download-card {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(198, 164, 90, 0.22);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px) saturate(140%);
  transform: rotateX(2deg);
  transform-style: preserve-3d;
}

.panel-card.accent {
  border-color: rgba(198, 164, 90, 0.55);
  background: linear-gradient(160deg, rgba(198, 164, 90, 0.14), rgba(255, 255, 255, 0.04));
}

.panel-card h2,
.download-card h2 {
  margin: 0 0 1rem;
  font-family: var(--font-brand);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--gold-bright);
}

.panel-body,
.download-lead {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.9;
  color: #d5e4e7;
  font-size: 1.02rem;
}

.download-card {
  text-align: center;
  max-width: 760px;
}

.download-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 1.5rem 0 1.25rem;
}

.download-meta div {
  padding: 0.85rem 0.5rem;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.download-meta span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 0.3rem;
}

.download-meta strong {
  color: var(--cream);
  font-size: 0.98rem;
}

.btn-download {
  min-width: min(100%, 260px);
}

.download-note {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer {
  padding: 2rem 1rem 2.5rem;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.reveal {
  opacity: 0;
  transform: translateY(28px) translateZ(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 960px) {
  .nav {
    display: none;
  }
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    text-align: center;
  }
  .brand-logo--hero {
    margin-inline: auto;
  }
  .tagline {
    margin-inline: auto;
  }
  .hero-cta {
    justify-content: center;
  }
  .hero-meta {
    justify-content: center;
  }
  .phone-3d {
    transform: rotateY(-8deg) rotateX(6deg);
  }
}

@media (max-width: 640px) {
  .download-meta {
    grid-template-columns: 1fr;
  }
  .float-a,
  .float-b,
  .float-c {
    display: none;
  }
  .phone-screen {
    min-height: 400px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .orb,
  .phone-3d,
  .float-card {
    animation: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
