/* ============================================================
   Ela-Salaty website — global styles
   Brand: #ffae00 (amber gold from logo)
   Mode: single-mode, cinematic, dark-leaning with dynamic theme
   ============================================================ */

:root {
  /* Brand */
  --brand: #ffae00;
  --brand-2: #ff8a00;
  --brand-glow: rgba(255, 174, 0, 0.55);
  --brand-soft: rgba(255, 174, 0, 0.12);
  --green: #34d399;
  --green-soft: rgba(52, 211, 153, 0.14);
  --cyan: #5dadff;

  /* Scroll-driven theme (default = night) */
  --bg-1: #050811;
  --bg-2: #0c1226;
  --bg-3: #1a1430;
  --sky-top: #050811;
  --sky-mid: #0c1226;
  --sky-bot: #1a1430;
  --silhouette: #04060d;
  --text: #f6efe2;
  --text-dim: rgba(246, 239, 226, 0.62);
  --text-faint: rgba(246, 239, 226, 0.35);
  --line: rgba(246, 239, 226, 0.10);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.10);

  /* Phase colors used in scroll mixing */
  --phase: 0; /* 0..1 */

  /* Type */
  --font: 'Outfit', 'Manrope', system-ui, -apple-system, sans-serif;
  --font-ar: 'Tajawal', 'Reem Kufi', system-ui, sans-serif;
  --font-display: 'Outfit', 'Manrope', system-ui, sans-serif;

  --radius: 22px;
  --radius-sm: 12px;
  --radius-lg: 32px;
}

html[lang="ar"] {
  --font-display: 'Reem Kufi', 'Tajawal', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-1);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

html[lang="ar"] body { font-family: var(--font-ar); }

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

::selection { background: var(--brand); color: #0a0a0a; }

/* ============================================================
   Sky / dynamic theme backdrop — fills the whole viewport
   The colors of --sky-* shift as you scroll the page.
   ============================================================ */

.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 0%, var(--sky-top) 0%, transparent 60%),
    radial-gradient(140% 100% at 50% 50%, var(--sky-mid) 0%, transparent 70%),
    linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 45%, var(--sky-bot) 100%);
  transition: background 0.4s ease;
}

.sky::after {
  /* sun/moon orb that drifts across as you scroll */
  content: '';
  position: absolute;
  --orb-x: 50%;
  --orb-y: 70%;
  --orb-c: var(--brand);
  --orb-glow: var(--brand-glow);
  left: var(--orb-x);
  top: var(--orb-y);
  width: 360px;
  height: 360px;
  margin-left: -180px;
  margin-top: -180px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--orb-c) 0%, transparent 65%);
  filter: blur(40px);
  opacity: 0.55;
  transition: all 0.6s ease;
}

/* ============================================================
   Star field — visible mostly at night phases
   ============================================================ */
.stars {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: var(--stars-opacity, 1);
  transition: opacity 0.5s ease;
}

.stars canvas { width: 100%; height: 100%; display: block; }

/* ============================================================
   Layout
   ============================================================ */

.app { position: relative; z-index: 5; }

.section {
  position: relative;
  padding: 140px 5vw;
  max-width: 1480px;
  margin: 0 auto;
}

.section--tight { padding: 100px 5vw; }
.section--hero { min-height: 100vh; padding-top: 120px; }

@media (max-width: 768px) {
  .section { padding: 80px 5vw; }
  .section--hero { padding-top: 100px; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
html[lang="ar"] .eyebrow { letter-spacing: 0; font-weight: 800; }
.eyebrow::before {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--brand);
  display: inline-block;
  flex-shrink: 0;
}
.eyebrow__text {
  display: inline-block;
  background: var(--brand);
  color: #1a0d00;
  padding: 5px 12px 5px 12px;
  line-height: 1.2;
}
html[lang="ar"] .eyebrow__text { padding: 6px 14px; font-weight: 800; }

.h-display {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(36px, 6vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
  text-wrap: balance;
}
html[lang="ar"] .h-display { letter-spacing: 0; line-height: 1.6; font-weight: 700; padding-bottom: 0.15em; }

.h-section {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  text-wrap: balance;
}
html[lang="ar"] .h-section { line-height: 1.6; font-weight: 700; letter-spacing: 0; padding-bottom: 0.15em; }

.lede {
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 60ch;
  margin: 0 0 36px;
}

/* ============================================================
   NAV
   ============================================================ */

.nav {
  position: fixed;
  inset: 16px 16px auto 16px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  background: rgba(10, 14, 28, 0.55);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
}
.nav__brand img { width: 28px; height: 28px; filter: drop-shadow(0 0 18px rgba(255,174,0,0.5)); }
.nav__brand span { line-height: 1; }

.nav__links {
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav__links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  padding: 10px 14px;
  border-radius: 999px;
  transition: color .2s, background .2s;
}
.nav__links a:hover { color: var(--text); background: var(--glass); }

.nav__right { display: flex; align-items: center; gap: 8px; }

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  transition: all .25s;
}
.lang-btn:hover { background: var(--glass-strong); border-color: var(--brand); color: var(--brand); }

.cta-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--brand);
  color: #1a0d00;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.01em;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 6px 20px -8px var(--brand-glow);
}
.cta-pill:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -8px var(--brand-glow); }

@media (max-width: 880px) {
  .nav__links { display: none; }
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
  min-height: 90vh;
}

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; gap: 40px; min-height: auto; }
}

.hero__copy { position: relative; z-index: 2; }

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(12px);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 24px;
}
.hero__eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }

.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(48px, 8vw, 120px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  margin: 0 0 28px;
}
html[lang="ar"] .hero__title {
  line-height: 1.55;
  font-weight: 700;
  letter-spacing: 0;
  font-size: clamp(40px, 6.5vw, 96px);
  padding-bottom: 0.15em;
}
html[lang="ar"] .hero__title .word { padding-top: 0.18em; padding-bottom: 0.08em; line-height: inherit; }

.hero__title .grad {
  background: linear-gradient(120deg, var(--brand) 0%, #fde68a 50%, var(--brand-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
  position: relative;
}

.hero__title .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(60px);
  animation: heroWord 1s cubic-bezier(0.2,0.8,0.2,1) forwards;
}
.hero__title .word:nth-child(1) { animation-delay: 0.1s; }
.hero__title .word:nth-child(2) { animation-delay: 0.25s; }
.hero__title .word:nth-child(3) { animation-delay: 0.4s; }
.hero__title .word:nth-child(4) { animation-delay: 0.55s; }
.hero__title .word:nth-child(5) { animation-delay: 0.7s; }

@keyframes heroWord {
  to { opacity: 1; transform: translateY(0); }
}

.hero__sub {
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.55;
  color: var(--text-dim);
  max-width: 50ch;
  margin: 0 0 36px;
  opacity: 0;
  animation: heroWord 1s cubic-bezier(0.2,0.8,0.2,1) 0.8s forwards;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  opacity: 0;
  animation: heroWord 1s cubic-bezier(0.2,0.8,0.2,1) 1s forwards;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  border-radius: 999px;
  background: var(--brand);
  color: #1a0d00;
  font-weight: 700;
  font-size: 15px;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 10px 30px -10px var(--brand-glow);
}
.btn-primary:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 20px 40px -10px var(--brand-glow); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 24px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  transition: all .2s;
}
.btn-ghost:hover { background: var(--glass-strong); border-color: var(--brand); }

/* hero scene */
.hero__scene {
  position: relative;
  height: 720px;
  perspective: 1400px;
}

@media (max-width: 880px) {
  .hero__scene { height: 600px; }
}

.scene-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.crescent {
  position: absolute;
  top: 8%;
  right: 12%;
  width: 220px;
  height: 220px;
  filter: drop-shadow(0 0 60px rgba(255,174,0,0.45)) drop-shadow(0 0 120px rgba(255,138,0,0.25));
  animation: crescentFloat 8s ease-in-out infinite;
  z-index: 1;
}
html[dir="rtl"] .crescent { right: auto; left: 12%; }

@keyframes crescentFloat {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50% { transform: translateY(-20px) rotate(-6deg); }
}

.minarets-bg {
  position: absolute;
  inset: auto 0 -10% 0;
  height: 60%;
  z-index: 0;
  opacity: 0.55;
  filter: blur(0.5px);
}

.hero-phone-wrap {
  position: relative;
  z-index: 2;
  width: 280px;
  filter: drop-shadow(0 60px 80px rgba(0,0,0,0.6));
  animation: phoneFloat 7s ease-in-out infinite;
  transform-style: preserve-3d;
}
@keyframes phoneFloat {
  0%, 100% { transform: translateY(0) rotateY(-8deg) rotateX(2deg); }
  50% { transform: translateY(-18px) rotateY(-6deg) rotateX(3deg); }
}

.hero-phone-secondary {
  position: absolute;
  z-index: 1;
  width: 170px;
  top: 50%;
  left: 50%;
  margin-top: -185px;
  margin-left: -85px;
  filter: drop-shadow(0 40px 60px rgba(0,0,0,0.55));
  opacity: 0.7;
  animation: phoneFloatL 9s ease-in-out -2s infinite;
}
.hero-phone-secondary.right {
  animation: phoneFloatR 10s ease-in-out -3s infinite;
}
@keyframes phoneFloatL {
  0%, 100% { transform: translate3d(-130px, 0, 0) rotateY(18deg) rotateZ(-4deg); }
  50%      { transform: translate3d(-130px, -22px, 0) rotateY(20deg) rotateZ(-3deg); }
}
@keyframes phoneFloatR {
  0%, 100% { transform: translate3d(130px, 0, 0) rotateY(-18deg) rotateZ(4deg); }
  50%      { transform: translate3d(130px, -22px, 0) rotateY(-20deg) rotateZ(3deg); }
}
@media (max-width: 700px) {
  .hero-phone-secondary { display: none; }
}

/* iPhone bezel */
.iphone {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 19.5;
  border-radius: 44px;
  padding: 8px;
  background: linear-gradient(160deg, #2a2a2c 0%, #0a0a0c 100%);
  box-shadow:
    inset 0 0 0 1.5px rgba(255,255,255,0.06),
    inset 0 0 0 3px rgba(0,0,0,0.6),
    0 0 0 1.5px rgba(255,255,255,0.05);
}
.iphone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 36px;
  overflow: hidden;
  background: #000;
}
.iphone__screen img { width: 100%; height: 100%; object-fit: cover; }
.iphone__island {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 28px;
  background: #000;
  border-radius: 999px;
  z-index: 5;
}

/* scroll cue */
.scroll-cue {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 600;
}
.scroll-cue__line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--brand), transparent);
  animation: cueLine 2s ease-in-out infinite;
}
@keyframes cueLine {
  0% { transform: scaleY(0.3); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  100% { transform: scaleY(0.3); transform-origin: bottom; }
}

/* ============================================================
   LIVE PRAYER TIMES SECTION
   ============================================================ */

.times-block {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 70px;
  align-items: center;
}
@media (max-width: 880px) {
  .times-block { grid-template-columns: 1fr; gap: 50px; }
}

.times-card {
  position: relative;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(20,18,32,0.85) 0%, rgba(8,8,16,0.92) 100%);
  border: 1px solid var(--line);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  min-width: 0;
}
@media (max-width: 520px) {
  .times-card { padding: 18px; }
}
.times-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: var(--radius-lg);
  padding: 2px;
  background: linear-gradient(135deg, var(--brand) 0%, transparent 40%, transparent 60%, var(--cyan) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0.45;
  pointer-events: none;
}

.times-card__head {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 24px;
}
.times-card__city {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--text-dim);
}
.times-card__date { font-size: 13px; color: var(--text-faint); text-align: right; }
html[dir="rtl"] .times-card__date { text-align: left; }

.times-card__hero {
  text-align: center;
  padding: 22px 0 28px;
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
  margin-bottom: 24px;
}
.times-card__label { font-size: 13px; color: var(--text-dim); margin-bottom: 8px; }
.times-card__countdown {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 60px var(--brand-glow);
}
.times-card__until { font-size: 14px; color: var(--brand); margin-top: 8px; font-weight: 600; }

.times-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  padding: 12px 6px;
  background: rgba(255,255,255,0.04);
  border-radius: 18px;
  border: 1px solid var(--line);
  min-width: 0;
}
.times-cell {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: background .2s;
  position: relative;
  min-width: 0;
}
.times-cell:hover { background: var(--glass); }
.times-cell.is-active { background: var(--brand-soft); }
.times-cell.is-passed { opacity: 0.45; }
.times-cell__icon { width: 22px; height: 22px; color: var(--text-dim); flex-shrink: 0; }
.times-cell.is-active .times-cell__icon { color: var(--brand); }
.times-cell__timewrap { display: inline-flex; align-items: baseline; gap: 2px; }
.times-cell__time { font-size: 13px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1; }
.times-cell.is-active .times-cell__time { color: var(--brand); }
.times-cell__ampm { font-size: 8px; color: var(--text-faint); font-weight: 600; line-height: 1; align-self: flex-start; margin-top: -2px; }
.times-cell__name {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.15;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.times-cell.is-active .times-cell__name { color: var(--brand); font-weight: 700; }

/* Collapse to 3-col grid earlier — at 540px the 6-col cells get too narrow
   for any prayer name (Maghrib, Sunrise) to fit on one line. */
@media (max-width: 540px) {
  .times-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .times-cell { padding: 14px 6px 12px; }
  .times-cell__time { font-size: 15px; }
  .times-cell__name { font-size: 12px; }
  .times-cell__icon { width: 26px; height: 26px; }
  .times-cell__ampm { font-size: 9px; }
}

.times-tap-hint {
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 16px;
}

.timeline {
  margin-top: 28px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg,
    #1e3a5f 0%,
    #5dadff 18%,
    #fde68a 38%,
    #ffae00 60%,
    #d97757 75%,
    #2a1b3e 92%);
  position: relative;
  cursor: pointer;
  touch-action: none;
}
.timeline__cursor {
  position: absolute;
  top: -7px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--brand);
  box-shadow: 0 0 20px var(--brand-glow), 0 4px 12px rgba(0,0,0,0.4);
  margin-left: -12px;
  cursor: grab;
  z-index: 2;
}
.timeline__cursor:active { cursor: grabbing; transform: scale(1.15); }
.timeline__bubble {
  position: absolute;
  top: -36px;
  padding: 4px 10px;
  background: var(--brand);
  color: #1a0d00;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  white-space: nowrap;
  pointer-events: none;
  transition: left 0.05s linear, transform 0.05s linear;
  transform: translateX(-50%);
  z-index: 3;
}
/* When the cursor is near the rail's edge, anchor the bubble inside the rail
   so it doesn't overflow off the card. The little arrow shifts to point at
   the cursor instead of sitting under the bubble's center. */
.timeline__bubble--left  { transform: translateX(0); }
.timeline__bubble--right { transform: translateX(-100%); }
.timeline__bubble--left::after  { left: 12px; }
.timeline__bubble--right::after { left: auto; right: 12px; }
.timeline__bubble::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 8px; height: 8px;
  background: var(--brand);
  transform: translateX(-50%) rotate(45deg);
  border-radius: 1px;
}

/* ============================================================
   QIBLA COMPASS
   ============================================================ */

.qibla-block {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 70px;
  align-items: center;
}
@media (max-width: 880px) { .qibla-block { grid-template-columns: 1fr; gap: 40px; } }

.qibla-stage {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qibla-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}
.qibla-ring--outer {
  background: radial-gradient(circle, transparent 60%, var(--brand-soft) 75%, transparent 90%);
  animation: ringPulse 4s ease-in-out infinite;
}
@keyframes ringPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.05); opacity: 1; }
}

.compass {
  position: relative;
  width: 78%;
  height: 78%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.06) 0%, transparent 60%),
    linear-gradient(160deg, #14172a 0%, #050811 100%);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.04),
    inset 0 0 60px rgba(0,0,0,0.6),
    0 30px 60px -20px rgba(0,0,0,0.8),
    0 0 100px -20px var(--brand-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  user-select: none;
  touch-action: none;
  overflow: hidden;
}
.compass:active { cursor: grabbing; }

.compass__svg {
  position: absolute;
  top: 4%;
  left: 4%;
  width: 92%;
  height: 92%;
  display: block;
  pointer-events: none;
  transform-origin: center;
}

/* Fixed pointer at top of compass — shows "device top" */
.compass__device-top {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-top: 24px solid var(--brand);
  filter: drop-shadow(0 0 12px var(--brand-glow));
  z-index: 4;
}

.compass__hub {
  position: absolute;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #2a2a30, #050811 80%);
  border: 1.5px solid var(--brand);
  box-shadow: 0 0 0 6px rgba(255,174,0,0.10), 0 0 30px var(--brand-glow);
  z-index: 3;
}

.compass__deg {
  position: absolute;
  bottom: -52px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  white-space: nowrap;
  padding: 6px 14px;
  background: rgba(10, 8, 16, 0.6);
  border: 1px solid var(--brand-soft);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.qibla-info {
  display: flex; flex-direction: column; gap: 16px;
  margin-top: 24px;
}
.qibla-stat {
  display: flex; align-items: baseline; gap: 12px;
  padding: 16px 20px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.qibla-stat__num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.qibla-stat__label { font-size: 13px; color: var(--text-dim); }

/* ============================================================
   FEATURES GRID
   ============================================================ */

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 48px;
}
@media (max-width: 1100px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px)  { .features-grid { grid-template-columns: 1fr; } }

.feature-card {
  position: relative;
  padding: 28px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform .35s cubic-bezier(0.2,0.8,0.2,1), border-color .35s;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}
.feature-card:hover {
  transform: translateY(-6px);
  border-color: var(--brand);
}
.feature-card::after {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at center, var(--brand-soft) 0%, transparent 30%);
  opacity: 0;
  transition: opacity .35s;
  pointer-events: none;
}
.feature-card:hover::after { opacity: 1; }

.feature-card__icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-soft), transparent);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand);
  position: relative; z-index: 2;
}
.feature-card__icon svg { width: 26px; height: 26px; }

.feature-card__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
  position: relative; z-index: 2;
}
.feature-card__desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-dim);
  margin: 0;
  position: relative; z-index: 2;
}

/* Featured (large) feature card */
.feature-card--feat {
  grid-column: span 2;
  grid-row: span 1;
  position: relative;
  background: #050811;
  border-color: rgba(255,174,0,0.35);
  isolation: isolate;
}
.feature-card--feat::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('images/masjed.jpg') center / cover no-repeat;
  opacity: 0.6;
  z-index: -1;
  transition: transform .6s cubic-bezier(0.2,0.8,0.2,1);
}
.feature-card--feat:hover::before { transform: scale(1.04); }
/* Bottom gradient to keep the title + description legible over the photo */
.feature-card--feat::after {
  background: linear-gradient(180deg, transparent 35%, rgba(5,8,17,0.85) 100%);
  opacity: 1;
}
.feature-card--feat .feature-card__title {
  font-size: 28px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
.feature-card--feat .feature-card__desc {
  color: rgba(246, 239, 226, 0.85);
  text-shadow: 0 1px 8px rgba(0,0,0,0.6);
}
.feature-card--feat .feature-card__icon {
  background: rgba(10, 8, 16, 0.55);
  backdrop-filter: blur(8px);
  border-color: rgba(255,174,0,0.4);
  color: var(--brand);
}
@media (max-width: 1100px) { .feature-card--feat { grid-column: span 2; } }
@media (max-width: 580px)  { .feature-card--feat { grid-column: span 1; } }

/* ============================================================
   THEMES SHOWCASE
   ============================================================ */

.themes-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 48px;
}
@media (max-width: 980px) { .themes-rail { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .themes-rail { grid-template-columns: 1fr; } }

.theme-card {
  position: relative;
  aspect-ratio: 9 / 19.5;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform .4s cubic-bezier(0.2,0.8,0.2,1);
}
.theme-card:hover { transform: scale(1.02) translateY(-4px); }
.theme-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s cubic-bezier(0.2,0.8,0.2,1);
}
.theme-card:hover img { transform: scale(1.08); }
.theme-card__cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 18px 20px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
}
.theme-card__name { font-weight: 600; font-size: 16px; }
.theme-card__sub { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

/* ============================================================
   REVIEWS
   ============================================================ */

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 48px;
}
@media (max-width: 880px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }

.stat {
  padding: 28px 24px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--line);
  text-align: start;
}
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 600;
  line-height: 1;
  background: linear-gradient(135deg, var(--brand) 0%, #fde68a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.02em;
}
.stat__label { font-size: 13px; color: var(--text-dim); margin-top: 12px; line-height: 1.4; }

.quotes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 32px;
}
@media (max-width: 800px) { .quotes-grid { grid-template-columns: 1fr; } }

.quote {
  padding: 28px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid var(--line);
}
.quote__stars { display: flex; gap: 2px; margin-bottom: 14px; }
.quote__stars svg { width: 16px; height: 16px; color: var(--brand); }
.quote__title { font-size: 16px; font-weight: 600; margin: 0 0 8px; }
.quote__body { font-size: 14px; line-height: 1.55; color: var(--text-dim); margin: 0 0 16px; }
.quote__by { font-size: 12px; color: var(--text-faint); font-weight: 600; letter-spacing: 0.05em; }

/* ============================================================
   PRIVACY
   ============================================================ */

.privacy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 48px;
}
@media (max-width: 800px) { .privacy-grid { grid-template-columns: 1fr; } }
.privacy-card {
  padding: 36px 28px;
  text-align: center;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid var(--line);
}
.privacy-card__num {
  font-family: var(--font-display);
  font-size: clamp(64px, 8vw, 110px);
  font-weight: 600;
  line-height: 1;
  background: linear-gradient(135deg, var(--brand) 0%, #fde68a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.04em;
}
.privacy-card__label { font-size: 14px; color: var(--text-dim); margin-top: 16px; font-weight: 500; }

.privacy-verified {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 28px;
  padding: 12px 18px;
  background: var(--green-soft);
  border: 1px solid rgba(52,211,153,0.3);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
}

/* ============================================================
   GALLERY (App store screenshots — horizontal scroll)
   ============================================================ */

.gallery-scroller {
  margin-top: 48px;
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 24px 5vw;
  margin-left: -5vw;
  margin-right: -5vw;
  scrollbar-width: none;
}
.gallery-scroller::-webkit-scrollbar { display: none; }

.gallery-item {
  flex: 0 0 280px;
  scroll-snap-align: center;
  border-radius: 36px;
  overflow: hidden;
  border: 1px solid var(--line);
  position: relative;
  background: #000;
  transition: transform .4s cubic-bezier(0.2,0.8,0.2,1);
  aspect-ratio: 9 / 19.5;
}
.gallery-item:hover { transform: translateY(-8px); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   CTA FOOTER
   ============================================================ */
.cta-section {
  text-align: center;
  padding: 160px 5vw 100px;
  max-width: 1200px;
  margin: 0 auto;
}
.cta-section .h-display { font-size: clamp(40px, 6vw, 84px); }
.cta-section .lede { margin: 0 auto 36px; }

.footer {
  border-top: 1px solid var(--line);
  padding: 50px 5vw 40px;
  margin-top: 80px;
}
.footer-inner {
  max-width: 1480px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.footer__brand {
  display: inline-flex; align-items: center; gap: 12px;
}
.footer__brand img { width: 32px; height: 32px; }
.footer__brand span { font-weight: 600; font-size: 15px; }
.footer__copy { font-size: 12px; color: var(--text-faint); }
.footer__links { display: flex; gap: 6px; flex-wrap: wrap; }
.footer__links a { font-size: 13px; color: var(--text-dim); padding: 6px 12px; border-radius: 999px; transition: all .2s; }
.footer__links a:hover { color: var(--brand); background: var(--glass); }
.footer__note { font-size: 11px; color: var(--text-faint); margin-top: 12px; max-width: 100%; flex-basis: 100%; text-align: center; }

/* ============================================================
   Reveal on scroll
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .9s cubic-bezier(0.2,0.8,0.2,1), transform .9s cubic-bezier(0.2,0.8,0.2,1);
}
.reveal.is-in { opacity: 1; transform: translateY(0); }
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s cubic-bezier(0.2,0.8,0.2,1), transform .7s cubic-bezier(0.2,0.8,0.2,1);
}
.reveal-stagger.is-in > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.is-in > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.is-in > *:nth-child(2) { transition-delay: 0.12s; }
.reveal-stagger.is-in > *:nth-child(3) { transition-delay: 0.19s; }
.reveal-stagger.is-in > *:nth-child(4) { transition-delay: 0.26s; }
.reveal-stagger.is-in > *:nth-child(5) { transition-delay: 0.33s; }
.reveal-stagger.is-in > *:nth-child(6) { transition-delay: 0.40s; }
.reveal-stagger.is-in > *:nth-child(7) { transition-delay: 0.47s; }
.reveal-stagger.is-in > *:nth-child(8) { transition-delay: 0.54s; }

/* ============================================================
   ATHAN MODAL
   ============================================================ */
.athan-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(2, 4, 10, 0.92);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: athanIn .35s cubic-bezier(0.2,0.8,0.2,1);
}
@keyframes athanIn {
  from { opacity: 0; backdrop-filter: blur(0); }
  to   { opacity: 1; backdrop-filter: blur(20px); }
}

.athan-modal__inner {
  position: relative;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 48px;
  max-width: 1080px;
  width: 100%;
  align-items: center;
}
@media (max-width: 760px) {
  .athan-modal__inner { grid-template-columns: 1fr; gap: 24px; max-width: 320px; justify-items: center; }
}

.athan-modal__video {
  position: relative;
  display: block;
  width: 320px;
  max-width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 28px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 60px 100px -20px rgba(0,0,0,0.7), 0 0 80px -20px var(--brand-glow);
  border: 1px solid var(--line);
  margin: 0 auto;
}
.athan-modal__video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  display: block;
}

.athan-modal__youtube {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  transition: all .2s;
}
.athan-modal__youtube:hover { background: var(--glass-strong); border-color: var(--brand); color: var(--brand); }

.athan-modal__close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--glass);
  border: 1px solid var(--line);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .2s, border-color .2s;
  z-index: 5;
}
.athan-modal__close:hover { background: var(--glass-strong); border-color: var(--brand); color: var(--brand); }
.athan-modal__close svg { width: 18px; height: 18px; }
html[dir="rtl"] .athan-modal__close { right: auto; left: -16px; }

.athan-modal__stage {
  display: flex; align-items: center; justify-content: center;
}
.athan-phone {
  width: 280px;
  filter: drop-shadow(0 60px 80px rgba(0,0,0,0.7)) drop-shadow(0 0 80px var(--brand-glow));
  animation: athanPhone 4s ease-in-out infinite;
}
@keyframes athanPhone {
  0%, 100% { transform: translateY(0) rotateY(-4deg); }
  50%      { transform: translateY(-10px) rotateY(-2deg); }
}

.athan-modal__caption {
  color: var(--text);
  max-width: 480px;
}
.athan-modal__title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 16px;
}
html[lang="ar"] .athan-modal__title { letter-spacing: 0; }
.athan-modal__theme {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
html[lang="ar"] .athan-modal__theme { letter-spacing: 0; font-weight: 700; }

.athan-modal__sub {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-dim);
  margin-bottom: 28px;
}

/* Wave animation */
.athan-wave {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  margin-bottom: 18px;
}
.athan-wave span {
  flex: 1;
  height: 100%;
  background: linear-gradient(to top, var(--brand-2), var(--brand));
  border-radius: 2px;
  animation: wavePulse 1.1s ease-in-out infinite;
  transform-origin: center;
}
@keyframes wavePulse {
  0%, 100% { transform: scaleY(0.18); opacity: 0.5; }
  50%      { transform: scaleY(1);    opacity: 1; }
}

.athan-progress {
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 18px;
}
.athan-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-2) 100%);
  transition: width 0.1s linear;
}

.athan-dots {
  display: flex;
  gap: 8px;
}
.athan-dot {
  width: 28px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.athan-dot:hover { transform: scaleY(1.5); }
.athan-dot.is-active { background: var(--brand); box-shadow: 0 0 10px var(--brand-glow); }
