/* Zikr Break — Premium landing motion layer (paired with js/screens/landing-fx.js)
   Everything is scoped to html.lfx-on, which JS adds only after it runs — so if
   JS ever fails to load, NO content is hidden and the landing renders normally. */

/* Scroll-progress bar */
.lfx-progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60;
  transform: scaleX(0); transform-origin: 0 50%;
  background: var(--grad-primary); box-shadow: 0 0 12px var(--c-primary-glow);
  pointer-events: none;
}
[dir="rtl"] .lfx-progress { transform-origin: 100% 50%; }

/* Mouse-follow glow */
.lfx-cursor-glow {
  position: fixed; top: 0; left: 0; width: 540px; height: 540px; margin: -270px 0 0 -270px;
  border-radius: 50%; pointer-events: none; z-index: 0; mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(45,212,191,0.20), rgba(16,185,129,0.06) 42%, transparent 70%);
  opacity: 0; transition: opacity .5s ease; will-change: transform;
}
html.lfx-on #landing:hover .lfx-cursor-glow { opacity: 1; }

/* Hero headline — staggered word reveal */
html.lfx-on .hero-title .lfx-word { display: inline-block; overflow: hidden; vertical-align: top; line-height: 1.1; }
html.lfx-on .hero-title .lfx-word-in {
  display: inline-block; transform: translateY(115%) rotate(5deg); opacity: 0;
  animation: lfx-word .9s cubic-bezier(.16,1,.3,1) forwards;
  animation-delay: calc(var(--wi, 0) * 0.045s); will-change: transform, opacity;
}
@keyframes lfx-word { to { transform: translateY(0) rotate(0); opacity: 1; } }

/* Scroll-triggered section reveals */
html.lfx-on [data-lfx] {
  opacity: 0; will-change: transform, opacity;
  transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1);
  transition-delay: calc(var(--ri, 0) * 0.06s);
}
html.lfx-on [data-lfx="up"]    { transform: translateY(42px); }
html.lfx-on [data-lfx="scale"] { transform: scale(.92); }
html.lfx-on [data-lfx="left"]  { transform: translateX(-42px); }
html.lfx-on [data-lfx="right"] { transform: translateX(42px); }
html.lfx-on [data-lfx].lfx-in  { opacity: 1; transform: none; }

/* Floating depth shapes (parallax) */
.lfx-float { position: absolute; border-radius: 50%; pointer-events: none; filter: blur(8px); opacity: .5; will-change: transform; }
.lfx-f1 { width: 120px; height: 120px; top: 16%; left: 7%;  background: radial-gradient(circle at 30% 30%, rgba(45,212,191,.55), transparent 70%); animation: lfx-bob 9s ease-in-out infinite; }
.lfx-f2 { width: 210px; height: 210px; top: 54%; right: 5%; background: radial-gradient(circle at 30% 30%, rgba(56,189,248,.42), transparent 70%); animation: lfx-bob 13s ease-in-out infinite reverse; }
.lfx-f3 { width: 84px;  height: 84px;  top: 80%; left: 16%; background: radial-gradient(circle at 30% 30%, rgba(245,158,11,.42), transparent 70%); animation: lfx-bob 11s ease-in-out infinite; }
@keyframes lfx-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -24px; } }

/* Scroll cue (animated mouse) */
.lfx-scroll-cue { position: relative; height: 44px; margin: 0 auto 1.6rem; opacity: .85; transition: opacity .4s ease; }
.lfx-scroll-cue.lfx-cue-hide { opacity: 0; }
.lfx-scroll-cue::before {
  content: ''; position: absolute; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid var(--c-border-strong); border-radius: 14px;
}
.lfx-cue-dot {
  position: absolute; left: 50%; top: 7px; width: 5px; height: 5px; border-radius: 50%;
  background: var(--c-primary); transform: translate(-50%, 0);
  animation: lfx-cue 1.7s ease-in-out infinite;
}
@keyframes lfx-cue {
  0%   { transform: translate(-50%, 0);    opacity: 0; }
  30%  { opacity: 1; }
  70%  { opacity: 1; }
  100% { transform: translate(-50%, 15px); opacity: 0; }
}

/* Magnetic buttons — smooth return after pointer leaves */
html.lfx-on #landing-install, html.lfx-on #landing-start {
  transition: transform .35s cubic-bezier(.16,1,.3,1), box-shadow .3s ease, background .3s ease;
}

/* Premium hover lift on feature/seo cards */
html.lfx-on .seo-section .card, html.lfx-on .feature-list li {
  transition: transform .35s cubic-bezier(.16,1,.3,1), box-shadow .35s ease;
}
html.lfx-on .seo-section .card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

/* ===== Cinematic layer (v2.6.24) ===== */

/* 3D hover tilt on cards — preserves depth, lifts with light */
html.lfx-on .lfx-tilt {
  transform-style: preserve-3d;
  transition: box-shadow .35s ease, border-color .35s ease;
  will-change: transform;
}
html.lfx-on .lfx-tilt.lfx-tilting {
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.22), 0 0 0 1px var(--c-primary-glow);
  border-color: var(--c-primary);
  z-index: 2;
}

/* Hero accent — flowing gradient shimmer on the emphasised word.
   Higher specificity (two classes) than the .lfx-word-in reveal rule, and we
   run BOTH animations (one-shot reveal + infinite shimmer) so the word lifts
   in and then shimmers continuously. */
html.lfx-on .hero-title em,
html.lfx-on .hero-title .lfx-accent {
  background: linear-gradient(100deg, var(--c-primary) 0%, #2dd4bf 25%, var(--c-accent) 50%, #2dd4bf 75%, var(--c-primary) 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  font-style: normal;
}
html.lfx-on .hero-title .lfx-word-in.lfx-accent {
  animation: lfx-word .9s cubic-bezier(.16,1,.3,1) calc(var(--wi,0) * 0.045s) forwards,
             lfx-shimmer 6s linear 1s infinite;
}
@keyframes lfx-shimmer { to { background-position: 250% 0; } }

/* Richer reveal — add a gentle blur lift to the base "up" reveal */
html.lfx-on [data-lfx] { filter: blur(6px); transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .9s cubic-bezier(.16,1,.3,1), filter .8s ease; }
html.lfx-on [data-lfx].lfx-in { filter: blur(0); }

/* A 4th, larger depth shape for a more layered hero */
.lfx-float.lfx-f1 { box-shadow: 0 0 80px 20px rgba(45,212,191,.18); }
.lfx-float.lfx-f2 { box-shadow: 0 0 120px 40px rgba(56,189,248,.12); }

/* Animated aurora behind the hero (additive, very soft) */
html.lfx-on #landing .landing-bg::after {
  content: ''; position: absolute; inset: -20% -10% auto -10%; height: 80vh; z-index: 0;
  background:
    radial-gradient(40% 50% at 20% 30%, rgba(45,212,191,0.18), transparent 70%),
    radial-gradient(45% 55% at 80% 20%, rgba(56,189,248,0.16), transparent 70%),
    radial-gradient(40% 50% at 60% 70%, rgba(245,158,11,0.12), transparent 70%);
  filter: blur(30px); pointer-events: none;
  animation: lfx-aurora 18s ease-in-out infinite alternate;
}
@keyframes lfx-aurora {
  0%   { transform: translate3d(0,0,0) scale(1); opacity: 0.9; }
  50%  { transform: translate3d(2%, 2%, 0) scale(1.08); opacity: 1; }
  100% { transform: translate3d(-2%, 1%, 0) scale(1.04); opacity: 0.85; }
}

/* Premium CTA sheen — applied to a clipped inner layer so it never hides the
   RECOMMENDED badge (which intentionally pokes above the button). */
html.lfx-on #landing-install { position: relative; }
html.lfx-on #landing-install .install-pulse::after {
  content: ''; position: absolute; inset: 3px; border-radius: var(--r-pill);
  overflow: hidden; pointer-events: none;
  background: linear-gradient(100deg, transparent 40%, rgba(255,255,255,0.4) 50%, transparent 60%);
  background-size: 250% 100%; background-position: 150% 0;
}
html.lfx-on #landing-install:hover .install-pulse::after { animation: lfx-sheen 0.9s ease; }
@keyframes lfx-sheen { from { background-position: 150% 0; } to { background-position: -150% 0; } }

/* Respect reduced motion — reveal everything instantly, kill transforms/anim */
@media (prefers-reduced-motion: reduce) {
  html.lfx-on [data-lfx],
  html.lfx-on .hero-title .lfx-word-in { opacity: 1 !important; transform: none !important; filter: none !important; animation: none !important; transition: none !important; }
  html.lfx-on [data-lfx] { filter: none !important; }
  .lfx-float, .lfx-cue-dot { animation: none !important; }
  html.lfx-on .hero-title em, html.lfx-on .hero-title .lfx-em { animation: none !important; }
  html.lfx-on #landing .landing-bg::after { animation: none !important; }
  .lfx-cursor-glow { display: none !important; }
  .lfx-progress { display: none !important; }
}

/* =========================================================================
   Landing sections for the Qibla finder, Islamic calendar and companion apps.
   Lives here (not in the async layer) because these render on the landing page
   itself, which must be styled on first paint for SEO crawlers and LCP.
   ========================================================================= */
.section-lede {
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--c-text-muted);
  max-width: 68ch;
  margin: 0 0 1.4rem;
}
.section-lede strong { color: var(--c-text); font-weight: 700; }

/* --- Three-up feature cards (compass / globe / camera) --- */
.feature-trio {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin: 1.2rem 0 1.6rem;
}
@media (min-width: 700px) {
  .feature-trio { grid-template-columns: repeat(3, 1fr); }
}
.trio-card {
  padding: 1.25rem 1.2rem;
  background: var(--c-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--c-glass-border);
  border-radius: var(--r-lg);
  transition: transform var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
}
.trio-card:hover {
  transform: translateY(-3px);
  border-color: var(--c-primary);
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.16);
}
.trio-ico {
  display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 14px;
  font-size: 1.45rem; line-height: 1;
  background: var(--c-primary-soft);
  box-shadow: inset 0 0 0 1px var(--c-glass-border);
  margin-bottom: 0.75rem;
}
.trio-card h3 { margin: 0 0 0.4rem; font-size: 1.05rem; font-weight: 700; }
.trio-card p { margin: 0; font-size: 0.92rem; line-height: 1.6; color: var(--c-text-muted); }
.trio-card strong { color: var(--c-text); }

/* --- Companion app cards --- */
.companion-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-top: 1.2rem;
}
@media (min-width: 640px) { .companion-grid { grid-template-columns: 1fr 1fr; } }
.companion-card {
  display: flex; flex-direction: column;
  padding: 1.2rem 1.2rem;
  background: var(--c-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--c-glass-border);
  border-radius: var(--r-lg);
  transition: transform var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
}
.companion-card:hover {
  transform: translateY(-3px);
  border-color: var(--c-primary);
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.16);
}
.companion-card h3 {
  margin: 0 0 0.5rem; font-size: 1.02rem; font-weight: 700;
  display: flex; align-items: center; gap: 0.5rem;
}
.companion-card h3 span { font-size: 1.2rem; line-height: 1; }
.companion-card p { margin: 0 0 0.9rem; font-size: 0.9rem; line-height: 1.6; color: var(--c-text-muted); flex: 1; }
.companion-card strong { color: var(--c-text); }
.companion-card a {
  align-self: flex-start;
  font-size: 0.88rem; font-weight: 700; color: var(--c-primary);
  text-decoration: none;
  transition: gap var(--t-fast), color var(--t-fast);
}
.companion-card a:hover { color: var(--c-primary-dark); text-decoration: underline; }

/* The Qibla section gets a faint compass-rose wash so it reads as its own place */
.qibla-section {
  position: relative;
}
.qibla-section::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(60% 50% at 78% 12%, rgba(20, 184, 166, 0.10), transparent 70%);
}
.calendar-section::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(60% 50% at 20% 14%, rgba(129, 140, 248, 0.10), transparent 70%);
}
.calendar-section, .companions-section { position: relative; }
.companions-section::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(60% 50% at 82% 16%, rgba(251, 191, 36, 0.09), transparent 70%);
}

@media (prefers-reduced-motion: reduce) {
  .trio-card, .companion-card { transition: none !important; }
  .trio-card:hover, .companion-card:hover { transform: none; }
}

/* =========================================================================
   Scroll Guard on the landing page: the hero's "New" link and its section.
   Hidden on an iPhone or iPad ([data-android-only], see js/boot.js).
   ========================================================================= */
.hero-news {
  display: inline-flex; align-items: center; gap: 0.55rem; max-width: 100%;
  margin-top: 1rem; padding: 0.45rem 0.85rem 0.45rem 0.45rem;
  border-radius: var(--r-pill); text-decoration: none; color: var(--c-text);
  background: var(--c-glass); border: 1px solid rgba(139, 92, 246, 0.35);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-size: 0.84rem; font-weight: 600; line-height: 1.35;
  transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
.hero-news:hover { transform: translateY(-1px); border-color: #8b5cf6; box-shadow: 0 8px 22px rgba(139, 92, 246, 0.22); }
.hero-news-tag {
  flex-shrink: 0; padding: 0.18rem 0.55rem; border-radius: var(--r-pill);
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  color: #fff; background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}
.hero-news-text { min-width: 0; }
.hero-news-go { flex-shrink: 0; color: #7c3aed; color: color-mix(in srgb, #8b5cf6 62%, var(--c-text)); font-weight: 800; }

.guard-section { position: relative; }
.guard-section::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(60% 45% at 80% 10%, rgba(139, 92, 246, 0.12), transparent 70%);
}
.guard-section .section-eyebrow { color: #6d28d9; color: color-mix(in srgb, #8b5cf6 62%, var(--c-text)); background: rgba(139, 92, 246, 0.13); }

.sg-showcase {
  display: grid; grid-template-columns: 1fr; gap: 1.25rem; align-items: center;
  margin: 1.4rem 0 0.4rem;
}
@media (min-width: 640px) { .sg-showcase { grid-template-columns: 230px 1fr; gap: 1.6rem; } }

/* A phone drawn in CSS: two blurred reels under the pause for remembrance */
.sg-phone {
  justify-self: center; width: 230px; aspect-ratio: 9 / 18.5; padding: 9px;
  border-radius: 34px; background: linear-gradient(160deg, #1e293b, #0b1220);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.32), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.sg-screen {
  position: relative; height: 100%; overflow: hidden; border-radius: 26px;
  display: grid; place-items: center; background: #0f172a;
}
.sg-reel { position: absolute; inset-inline: 0; height: 52%; filter: blur(6px); opacity: 0.9; }
.sg-reel-a { top: 0; background: linear-gradient(135deg, #f472b6, #fb923c 55%, #facc15); }
.sg-reel-b { bottom: 0; background: linear-gradient(135deg, #38bdf8, #6366f1 60%, #a855f7); }
.sg-screen::after { content: ''; position: absolute; inset: 0; background: rgba(4, 12, 24, 0.55); }
.sg-pause {
  position: relative; z-index: 1; width: 86%;
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem; text-align: center;
  padding: 1rem 0.75rem 0.85rem; border-radius: 20px; color: #f8fafc;
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.28), rgba(15, 23, 42, 0.86));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  animation: sg-float 6s ease-in-out infinite;
}
@keyframes sg-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.sg-pause-ico { font-size: 1.5rem; line-height: 1; }
.sg-pause strong { font-size: 0.9rem; font-weight: 800; }
.sg-pause-used { font-size: 0.66rem; line-height: 1.4; color: rgba(248, 250, 252, 0.75); }
.sg-pause-ar { font-family: 'Amiri', 'Noto Naskh Arabic', serif; font-size: 1.15rem; line-height: 1.7; margin: 0.15rem 0; }
.sg-pause-tap {
  font-size: 0.66rem; font-weight: 700; padding: 0.35rem 0.7rem; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.18);
}
.sg-pause-go {
  margin-top: 0.15rem; font-size: 0.7rem; font-weight: 800; padding: 0.4rem 1.2rem; border-radius: var(--r-pill);
  color: #052e1c; background: #34d399;
}

.sg-panel {
  padding: 1.1rem; border-radius: var(--r-lg);
  background: var(--c-glass); border: 1px solid var(--c-glass-border);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.sg-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.sg-tile {
  min-width: 0; padding: 0.7rem 0.5rem; border-radius: var(--r-md); text-align: center;
  background: var(--c-bg-elev); border: 1px solid var(--c-border);
  display: flex; flex-direction: column; gap: 0.2rem;
}
.sg-tile strong { font-size: 1.05rem; font-weight: 800; line-height: 1.15; }
.sg-tile span { font-size: 0.66rem; line-height: 1.3; color: var(--c-text-muted); }
.sg-waste strong { color: #6d28d9; color: color-mix(in srgb, #8b5cf6 62%, var(--c-text)); }
.sg-week { display: flex; align-items: flex-end; gap: 0.4rem; height: 64px; margin: 0.9rem 0.2rem 0.2rem; }
.sg-week i {
  flex: 1; height: var(--h); border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.55), rgba(139, 92, 246, 0.18));
}
.sg-week .sg-today { background: linear-gradient(180deg, #8b5cf6, #6d28d9); }
.seo-section .sg-trade { margin: 0.8rem 0 0.25rem; font-size: 0.88rem; line-height: 1.55; }
.seo-section .sg-caption { margin: 0; font-size: 0.74rem; color: var(--c-text-muted); }
.sg-cta { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.3rem; }
.sg-cta .btn-primary { background: linear-gradient(135deg, #8b5cf6, #6d28d9); box-shadow: 0 10px 26px rgba(139, 92, 246, 0.32); }

/* Guides & articles: one card per guide page and article */
.guide-grid { display: grid; grid-template-columns: 1fr; gap: 0.7rem; margin-top: 1.1rem; }
@media (min-width: 560px) { .guide-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 860px) { .guide-grid { grid-template-columns: repeat(3, 1fr); } }
.guide-card {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 0.75rem; align-items: center;
  padding: 0.9rem 1rem; border-radius: var(--r-lg); text-decoration: none; color: var(--c-text);
  background: var(--c-glass); border: 1px solid var(--c-glass-border);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: transform var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
}
.guide-card:hover { transform: translateY(-3px); border-color: var(--c-primary); box-shadow: 0 10px 30px rgba(16, 185, 129, 0.16); }
.guide-ico {
  grid-row: span 2; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  font-size: 1.25rem; line-height: 1; background: var(--c-primary-soft);
}
.guide-card strong { font-size: 0.95rem; font-weight: 700; line-height: 1.3; }
.guide-card em { font-style: normal; font-size: 0.8rem; color: var(--c-text-muted); line-height: 1.4; }
.seo-section .guides-ur {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; margin: 1rem 0 0;
  font-family: "Noto Naskh Arabic", "Jameel Noori Nastaleeq", "Segoe UI", serif; font-size: 1rem; line-height: 1.9;
}
.guides-ur span { color: var(--c-text-muted); }
.guides-ur a {
  color: var(--c-primary-dark); text-decoration: none; font-weight: 600;
  padding: 0.1rem 0.75rem; border-radius: var(--r-pill); background: var(--c-primary-soft);
}
[data-theme="dark"] .guides-ur a { color: var(--c-primary); }

@media (prefers-reduced-motion: reduce) {
  .guide-card { transition: none; }
  .guide-card:hover { transform: none; }
  .sg-pause { animation: none; }
  .hero-news { transition: none; }
  .hero-news:hover { transform: none; }
}
