/* Meem: the landing page.
   Night sky, gold ornament and the app's own palette. Scroll scenes are
   driven by js/main.js through CSS custom properties (--p, --open, ...).
   Without JavaScript every section shows its finished state. */

@font-face {
  font-family: "Eczar";
  src: url("../assets/fonts/eczar-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Eczar";
  src: url("../assets/fonts/eczar-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
/* KFGQPC Uthmanic Script Hafs, served exactly as published (see fonts/). */
@font-face {
  font-family: "KFGQPC Hafs";
  src: url("../assets/fonts/UthmanicHafs-v22.ttf") format("truetype");
  font-display: swap;
}

:root {
  --navy-950: #030b19;
  --navy-900: #061c39;
  --navy-850: #081e3b;
  --navy-700: #0d2a52;
  --navy-500: #16407a;
  --gold: #d1a44e;
  --gold-soft: #e2ba68;
  --gold-light: #f6dfa4;
  --gold-deep: #9c7326;
  --ivory: #f3eee3;
  --muted: #9fb0cc;
  --emerald: #5cd6b0;
  --emerald-deep: #0e4a3c;
  --ink: #2b1f0e;

  --font-display: "Eczar", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-quran: "KFGQPC Hafs", "Amiri Quran", "Scheherazade New", "Noto Naskh Arabic", serif;
  --font-tamil: "Noto Sans Tamil", "Tamil Sangam MN", "Latha", var(--font-body);
  --font-urdu: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Urdu Typesetting", "Noto Naskh Arabic", serif;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --nav-h: 66px;
  --gutter: clamp(20px, 5vw, 56px);
  --radius: 26px;
  --glass: rgba(10, 32, 64, .55);
  --line: rgba(209, 164, 78, .22);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  background: var(--navy-950);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: clamp(16px, 1.05vw + 11px, 18px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* A faint lattice of eight-point stars over everything. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23d1a44e' stroke-width='1'%3E%3Cpath d='M60 16l12.9 31.1L104 60 72.9 72.9 60 104 47.1 72.9 16 60l31.1-12.9z'/%3E%3Cpath d='M60 31l20.5 8.5L89 60l-8.5 20.5L60 89l-20.5-8.5L31 60l8.5-20.5z'/%3E%3Cpath d='M0 0l16 16M120 0l-16 16M0 120l16-16M120 120l-16-16'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 120px 120px;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .35) 60%, #000 100%);
}

img, svg { display: block; }
img { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
::selection { background: rgba(209, 164, 78, .35); color: #fff; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 12px; background: var(--gold); color: var(--navy-950);
  font-weight: 600; text-decoration: none; transition: top .2s;
}
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; border-radius: 6px; }

.ic { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ic.big { width: 40px; height: 40px; }

/* ── Shared type ─────────────────────────────────────────────────────────── */

.kicker {
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 18px;
}
.kicker i { font-style: normal; opacity: .6; padding: 0 .2em; }
.center { text-align: center; margin-inline: auto; }

h2 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw + 8px, 72px);
  line-height: 1.04;
  letter-spacing: -.01em;
  color: var(--ivory);
  text-wrap: balance;
}
h2 em, .final-title em { font-style: normal; }
h2 em, .gold-text {
  background: linear-gradient(100deg, #f6dfa4 0%, #d1a44e 30%, #fff1c9 48%, #d1a44e 66%, #b8862b 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 7s linear infinite;
}
@keyframes shimmer { to { background-position: -220% 0; } }

h3 { font-family: var(--font-display); font-size: clamp(22px, 1.2vw + 16px, 28px); line-height: 1.15; }
.lead { font-size: clamp(17px, .6vw + 14px, 20px); color: rgba(243, 238, 227, .78); max-width: 560px; margin-top: 22px; }
.lead.center { margin-inline: auto; }
.muted { color: var(--muted); }

.wrap { width: min(1200px, 100%); margin-inline: auto; padding-inline: var(--gutter); }
.block { position: relative; padding-block: clamp(96px, 12vw, 170px); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.section-head { text-align: center; max-width: 840px; margin: 0 auto clamp(48px, 6vw, 80px); }

.glass {
  background: linear-gradient(160deg, rgba(22, 64, 122, .42), rgba(6, 28, 57, .62));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .06);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border-radius: 999px;
  border: 0;
  text-decoration: none;
  font-weight: 650;
  line-height: 1.1;
  cursor: pointer;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .35s;
  isolation: isolate;
  overflow: hidden;
}
.btn span { display: flex; flex-direction: column; align-items: flex-start; }
.btn small { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .75; margin-bottom: 3px; }
.btn-gold {
  color: var(--navy-950);
  background: linear-gradient(135deg, #f6dfa4, #d1a44e 55%, #b8862b);
  box-shadow: 0 12px 34px -10px rgba(209, 164, 78, .65), inset 0 1px 0 rgba(255, 255, 255, .55);
}
.btn-gold::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: sheen 4.5s var(--ease) 2s infinite;
}
@keyframes sheen { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
.btn-gold:hover { transform: translateY(-3px); box-shadow: 0 20px 44px -12px rgba(209, 164, 78, .8), inset 0 1px 0 rgba(255, 255, 255, .55); }
.btn-glass {
  color: var(--ivory);
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(226, 186, 104, .35);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.btn-soon {
  cursor: default;
  color: rgba(243, 238, 227, .88);
  background: rgba(255, 255, 255, .03);
  border: 1px dashed rgba(226, 186, 104, .5);
}
.btn-soon small { color: var(--gold-soft); opacity: 1; }
.btn-soon .ic { opacity: .8; }
.btn-lg { padding: 13px 34px 13px 22px; font-size: 18px; min-height: 60px; }
.btn-lg .ic { width: 26px; height: 26px; }
.btn-sm { padding: 10px 18px; font-size: 14.5px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }
.cta-row.center { justify-content: center; }
.link-btn { background: none; border: 0; color: var(--gold-soft); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }

/* ── Sky, progress and navigation ───────────────────────────────────────── */

.sky-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(22, 64, 122, .9), transparent 60%),
    radial-gradient(ellipse 60% 50% at 85% 105%, rgba(209, 164, 78, .12), transparent 60%),
    linear-gradient(180deg, var(--navy-900), var(--navy-950) 75%);
}
#stars { width: 100%; height: 100%; }

.progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 60; pointer-events: none; }
.progress span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-light), var(--gold));
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
}

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-inline: var(--gutter);
  transition: transform .5s var(--ease), background .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.is-solid {
  background: linear-gradient(180deg, rgba(3, 11, 25, .88), rgba(3, 11, 25, .62));
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-color: rgba(209, 164, 78, .14);
}
.nav.is-hidden { transform: translateY(-110%); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { border-radius: 50%; box-shadow: 0 0 0 1px rgba(209, 164, 78, .4), 0 0 24px rgba(209, 164, 78, .25); }
.brand span { font-family: var(--font-display); font-weight: 600; font-size: 25px; letter-spacing: .01em; color: var(--gold-soft); }
.nav-links { display: flex; gap: 30px; }
.nav-links a {
  position: relative; font-size: 15px; font-weight: 500; text-decoration: none; color: rgba(243, 238, 227, .78);
  transition: color .3s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--gold); transform: scaleX(0); transition: transform .4s var(--ease);
}
.nav-links a:hover { color: var(--ivory); }
.nav-links a:hover::after { transform: scaleX(1); }

/* ── Phones ──────────────────────────────────────────────────────────────── */

.phone {
  position: relative;
  width: var(--w, 280px);
  padding: 9px;
  border-radius: 46px;
  background: linear-gradient(160deg, #1d2330, #0a0d14 40%, #151a24);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .12),
    inset 0 0 0 1.5px rgba(255, 255, 255, .06),
    0 50px 90px -30px rgba(0, 0, 0, .85),
    0 0 80px -30px rgba(22, 64, 122, .9);
}
.phone > img {
  width: 100%;
  height: auto;
  border-radius: 38px;
  background: #0b1222;
}
.phone::after {  /* glass glare */
  content: "";
  position: absolute; inset: 9px;
  border-radius: 38px;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, .14) 0%, transparent 28%, transparent 70%, rgba(255, 255, 255, .05) 100%);
}

/* ── Hero ────────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100svh;
  padding-top: var(--nav-h);
  overflow: clip;
  isolation: isolate;
  text-align: center;
}
.hero-glow { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-glow i {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .55;
  animation: drift 22s ease-in-out infinite alternate;
}
.hero-glow i:nth-child(1) { width: 52vw; height: 52vw; left: -14vw; top: 6vh; background: radial-gradient(circle, rgba(22, 64, 122, .9), transparent 70%); }
.hero-glow i:nth-child(2) { width: 40vw; height: 40vw; right: -10vw; top: 22vh; background: radial-gradient(circle, rgba(209, 164, 78, .28), transparent 70%); animation-duration: 28s; }
.hero-glow i:nth-child(3) { width: 36vw; height: 36vw; left: 32vw; top: 52vh; background: radial-gradient(circle, rgba(92, 214, 176, .12), transparent 70%); animation-duration: 34s; }
@keyframes drift { to { transform: translate3d(6vw, -4vh, 0) scale(1.12); } }

.moon {
  position: absolute; top: 19vh; right: 15vw; z-index: -1;
  width: clamp(70px, 9vw, 130px); aspect-ratio: 1; border-radius: 50%;
  box-shadow: inset calc(clamp(70px, 9vw, 130px) * -.24) calc(clamp(70px, 9vw, 130px) * .08) 0 0 #f6dfa4;
  filter: drop-shadow(0 0 26px rgba(246, 223, 164, .55));
  transform: rotate(-18deg) translateY(calc(var(--hp, 0) * 60px));
}

.hero-arch {
  position: absolute;
  z-index: -1;
  top: calc(var(--nav-h) + 18px);
  left: 50%;
  width: min(1000px, 104vw);
  transform: translateX(-50%) translateY(calc(var(--hp, 0) * -40px));
  pointer-events: none;
  filter: drop-shadow(0 0 18px rgba(209, 164, 78, .25));
  /* The arch's sides fade out instead of stopping in mid-air. */
  -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 96%);
  mask-image: linear-gradient(180deg, #000 62%, transparent 96%);
}
.arch-line { fill: none; stroke: url(#g-gold); stroke-width: 2; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.8s var(--ease) .2s forwards; opacity: .75; }
.arch-line.thin { stroke-width: 1; opacity: .5; animation-delay: .45s; }
.arch-dots { fill: none; stroke: #d1a44e; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 0 .006; opacity: 0; animation: fadein 1.6s ease 2s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: .55; } }

.lantern { position: absolute; top: 0; z-index: -1; display: flex; flex-direction: column; align-items: center; transform-origin: 50% 0; animation: swing 6s ease-in-out infinite alternate; }
.lantern.l1 { left: 7vw; }
.lantern.l2 { right: 4.5vw; animation-delay: -3s; --chain: 70px; }
.lantern .chain { width: 1px; height: var(--chain, 110px); background: linear-gradient(rgba(209, 164, 78, .2), rgba(209, 164, 78, .8)); }
.lantern .lamp {
  position: relative;
  width: 44px; height: 70px;
  background:
    radial-gradient(ellipse at 50% 60%, #fff3c4 0%, #f2bd5a 30%, rgba(209, 164, 78, .3) 60%, transparent 72%),
    linear-gradient(#8a671e, #5c430f);
  clip-path: polygon(50% 0, 70% 12%, 70% 18%, 92% 30%, 100% 62%, 84% 88%, 60% 100%, 40% 100%, 16% 88%, 0 62%, 8% 30%, 30% 18%, 30% 12%);
  animation: flicker 3.4s ease-in-out infinite;
}
.lantern .lamp::after {
  content: ""; position: absolute; left: 50%; top: 58%; width: 220px; height: 220px; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(242, 189, 90, .35), transparent 65%); pointer-events: none;
}
.lantern::after {
  content: ""; width: 160px; height: 160px; margin-top: -110px; border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 189, 90, .32), transparent 65%);
  pointer-events: none; animation: flicker 3.4s ease-in-out infinite;
}
@keyframes swing { from { transform: rotate(-2.4deg); } to { transform: rotate(2.4deg); } }
@keyframes flicker { 0%, 100% { opacity: 1; } 42% { opacity: .82; } 47% { opacity: .95; } 70% { opacity: .88; } }

.hero-inner {
  position: relative;
  z-index: 3;
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(84px, 14vh, 150px) var(--gutter) 0;
  transform: translateY(calc(var(--hp, 0) * -70px));
  opacity: calc(1 - var(--hp, 0) * .9);
}
.emblem { position: relative; width: 148px; height: 148px; margin: 0 auto 64px; }
.emblem img { position: relative; z-index: 1; width: 148px; height: 148px; border-radius: 50%; filter: drop-shadow(0 0 30px rgba(209, 164, 78, .45)); }
.emblem .rosette {
  position: absolute; left: 50%; top: 50%; width: 256px; height: 256px; margin: -128px 0 0 -128px;
  opacity: .8; animation: spin 90s linear infinite;
}
.emblem::before {
  content: ""; position: absolute; inset: -30px; border-radius: 50%;
  background: radial-gradient(circle, rgba(209, 164, 78, .35), transparent 70%);
  animation: breathe 5s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { transform: scale(1.15); opacity: .6; } }

.hero-kicker { margin-bottom: 14px; }
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(56px, 9.6vw, 150px);
  line-height: .96;
  letter-spacing: -.015em;
}
.hero-title .line { display: block; padding-block: .04em; }
.hero-title .line:first-child { color: var(--ivory); }
.hero-sub { max-width: 640px; margin: 26px auto 0; font-size: clamp(17px, .7vw + 13px, 21px); color: rgba(243, 238, 227, .8); text-wrap: balance; }
.hero .cta-row { justify-content: center; }
.trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; margin-top: 28px; font-size: 14px; color: var(--muted); }
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }

.hero-phones {
  position: relative;
  z-index: 1;
  height: clamp(420px, 56vw, 720px);
  margin-top: clamp(40px, 7vh, 80px);
  perspective: 1600px;
}
.hero-phones .phone {
  position: absolute;
  left: 50%;
  top: 0;
  --w: clamp(230px, 22vw, 310px);
  transition: transform .2s linear;
}
.hero-phones .p-center {
  z-index: 3;
  transform: translateX(-50%) translateY(calc(16% - var(--hp, 0) * 18%)) rotateX(calc(var(--ry, 0) * 1deg)) rotateY(calc(var(--rx, 0) * 1deg));
}
.hero-phones .p-left {
  z-index: 2;
  --w: clamp(200px, 19vw, 270px);
  transform: translateX(calc(-50% - 62% - var(--hp, 0) * 18%)) translateY(calc(26% - var(--hp, 0) * 14%)) rotate(calc(-9deg - var(--hp, 0) * 5deg));
  opacity: .92;
}
.hero-phones .p-right {
  z-index: 2;
  --w: clamp(200px, 19vw, 270px);
  transform: translateX(calc(-50% + 62% + var(--hp, 0) * 18%)) translateY(calc(26% - var(--hp, 0) * 14%)) rotate(calc(9deg + var(--hp, 0) * 5deg));
  opacity: .92;
}

.skyline { position: absolute; left: 0; width: 100%; pointer-events: none; }
.skyline.far { bottom: 0; height: clamp(110px, 15vw, 220px); fill: #0d2a52; opacity: .75; z-index: 0; }
.skyline.near { bottom: -2px; height: clamp(130px, 18vw, 260px); fill: var(--navy-950); z-index: 4; filter: drop-shadow(0 -12px 30px rgba(3, 11, 25, .8)); }

.scroll-cue {
  position: absolute; left: 50%; bottom: 22px; z-index: 5; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--gold-soft); text-decoration: none;
  opacity: calc(1 - var(--hp, 0) * 4);
}
.scroll-cue i { width: 22px; height: 36px; border-radius: 12px; border: 1.5px solid rgba(226, 186, 104, .7); position: relative; }
.scroll-cue i::after { content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 8px; border-radius: 2px; margin-left: -1.5px; background: var(--gold-soft); animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* Load-in: the title rises line by line, the rest follows. */
.js .hero .emblem, .js .hero-kicker, .js .hero-title .line, .js .hero-sub, .js .hero .cta-row, .js .trust, .js .hero-phones {
  animation: rise 1.2s var(--ease) both;
}
.js .hero-kicker { animation-delay: .25s; }
.js .hero-title .line:nth-child(1) { animation-delay: .35s; }
.js .hero-title .line:nth-child(2) { animation-delay: .5s; }
.js .hero-sub { animation-delay: .7s; }
.js .hero .cta-row { animation-delay: .85s; }
.js .trust { animation-delay: 1s; }
.js .hero-phones { animation: rise-far 1.6s var(--ease) .6s both; }
@keyframes rise { from { opacity: 0; transform: translateY(34px); filter: blur(8px); } }
@keyframes rise-far { from { opacity: 0; transform: translateY(140px); } }

/* ── Scroll scenes: a tall section with a sticky stage ───────────────────── */

.scene { position: relative; height: var(--len, 400svh); }
.stage { position: sticky; top: 0; height: 100svh; overflow: clip; }

/* The Mushaf */
.mushaf { --len: 440svh; }
.mushaf .stage {
  display: grid;
  grid-template-columns: minmax(300px, 420px) 1fr;
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: 0 clamp(24px, 4vw, 60px);
  padding: calc(var(--nav-h) + 10px) var(--gutter) 28px;
}
.rays {
  position: absolute; inset: -20%; pointer-events: none;
  background: repeating-conic-gradient(from 0deg at 62% 50%, rgba(246, 223, 164, .14) 0deg 3.5deg, transparent 3.5deg 13deg);
  mask-image: radial-gradient(circle at 62% 50%, #000 0%, rgba(0, 0, 0, .5) 28%, transparent 58%);
  -webkit-mask-image: radial-gradient(circle at 62% 50%, #000 0%, rgba(0, 0, 0, .5) 28%, transparent 58%);
  opacity: calc(var(--open, 1) * .9);
  animation: spin 120s linear infinite;
}
.dust { position: absolute; inset: 0; pointer-events: none; opacity: var(--open, 1); }
.dust i {
  position: absolute; width: var(--s, 3px); height: var(--s, 3px); border-radius: 50%;
  background: #f6dfa4; box-shadow: 0 0 8px #f2bd5a;
  animation: float var(--d, 9s) ease-in-out var(--delay, 0s) infinite;
}
@keyframes float { 0% { transform: translateY(20px); opacity: 0; } 30%, 70% { opacity: .9; } 100% { transform: translateY(-120px); opacity: 0; } }

.mushaf-copy { position: relative; min-height: 270px; grid-row: 1; }
.step {
  position: absolute; inset: 0 auto auto 0;
  opacity: 1;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.js .step { opacity: 0; transform: translateY(-14px); pointer-events: none; transition-duration: .3s; }
/* The outgoing caption fades first, then the new one rises in. */
.js .step.is-active { opacity: 1; transform: none; pointer-events: auto; transition-duration: .8s; transition-delay: .22s; }
.step h2 { font-size: clamp(34px, 3.6vw + 8px, 60px); }
.step p:not(.kicker) { margin-top: 18px; color: rgba(243, 238, 227, .78); max-width: 380px; }
.no-js-hide { display: none; }

.book-wrap { grid-row: 1; perspective: 2400px; display: grid; place-items: center; }
.book {
  --pw: clamp(150px, 24vw, 330px);
  --open: 1;
  position: relative;
  width: calc(var(--pw) * 2);
  height: calc(var(--pw) * 1.42);
  transform-style: preserve-3d;
  transform:
    translateX(calc((1 - var(--open)) * var(--pw) * .5))
    translateY(calc((1 - var(--enter, 1)) * 60px))
    rotateX(calc(4deg + (1 - var(--open)) * 16deg))
    scale(calc(.78 + var(--enter, 1) * .22 + var(--zoom, 0) * .05));
  opacity: var(--enter, 1);
}
.book::before {  /* the soft glow the open Mushaf casts */
  content: ""; position: absolute; inset: -12% -8%; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(246, 223, 164, .35), transparent 65%);
  filter: blur(20px); transform: translateZ(-60px);
  opacity: var(--open);
}
/* The block of pages under the open spread (fills the gap at the spine). */
.book::after {
  content: ""; position: absolute; left: -8px; right: -8px; top: 5px; bottom: -9px;
  border-radius: 10px; transform: translateZ(-2px);
  background: linear-gradient(90deg, #b7a171, #d8c69c 46%, #a8925f 50%, #d8c69c 54%, #b7a171);
  box-shadow: 0 40px 70px -30px rgba(0, 0, 0, .8);
  opacity: var(--open);
}
.page {
  position: absolute; top: 0; width: var(--pw); height: 100%;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(255, 255, 255, .55), transparent 70%),
    linear-gradient(180deg, #faf3e2, #efe1c2);
  color: var(--ink);
  overflow: hidden;
}
.page-left {
  left: 0;
  border-radius: 7px 2px 2px 7px;
  box-shadow:
    inset -18px 0 22px -16px rgba(80, 50, 10, .45),
    -2px 2px 0 #ecdfc1, -4px 4px 0 #dfcfaa, -6px 6px 0 #ccb98d, -8px 8px 0 #b7a171,
    0 40px 70px -30px rgba(0, 0, 0, .8);
}
.leaf {
  position: absolute; left: 0; top: 0; width: var(--pw); height: 100%;
  transform-origin: 100% 50%;
  transform-style: preserve-3d;
  transform: rotateY(calc(var(--open) * 180deg));
}
.leaf-face { position: absolute; inset: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.cover {
  border-radius: 9px 3px 3px 9px;
  background:
    radial-gradient(ellipse at 40% 30%, rgba(255, 255, 255, .1), transparent 55%),
    radial-gradient(circle at 50% 50%, #124066, #0a2a48 55%, #061a30);
  box-shadow: inset 0 0 0 1px rgba(246, 223, 164, .25), inset 10px 0 18px -10px rgba(0, 0, 0, .6), 0 40px 70px -30px rgba(0, 0, 0, .8);
}
.cover::after {  /* darkens as it lifts */
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: rgba(0, 0, 0, calc(var(--open) * .6));
}
.cover-frame {
  position: absolute; inset: 7%;
  border: 2px solid rgba(209, 164, 78, .85);
  border-radius: 6px;
  outline: 1px solid rgba(209, 164, 78, .45);
  outline-offset: 5px;
  display: grid; place-items: center;
}
.cover-rosette { position: absolute; width: 82%; height: auto; aspect-ratio: 1; opacity: .9; }
.cover-title {
  position: relative;
  font-family: var(--font-quran);
  font-size: calc(var(--pw) * .1);
  color: #f6dfa4;
  text-shadow: 0 0 calc(var(--pw) * .06) rgba(246, 223, 164, .55);
}
.cover-star { position: absolute; left: 50%; width: calc(var(--pw) * .07); height: calc(var(--pw) * .07); margin-left: calc(var(--pw) * -.035); fill: #d1a44e; }
.cover-star.top { top: 7%; }
.cover-star.bottom { bottom: 7%; }
.page-right {
  left: 0;
  transform: rotateY(180deg);
  border-radius: 2px 7px 7px 2px;
  box-shadow: inset 18px 0 22px -16px rgba(80, 50, 10, .45), 2px 2px 0 #ecdfc1, 4px 4px 0 #dfcfaa, 6px 6px 0 #ccb98d, 8px 8px 0 #b7a171;
}
.page-right::after {  /* shaded until it faces you */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(60, 40, 10, .5), transparent);
  opacity: calc((1 - var(--open)) * 1.4);
}
.page-frame {
  position: absolute; inset: 7% 8%;
  display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: calc(var(--pw) * .035);
  border: 1.5px solid rgba(166, 124, 52, .75);
  outline: 1px solid rgba(166, 124, 52, .4);
  outline-offset: calc(var(--pw) * .012);
  border-radius: 4px;
  padding: calc(var(--pw) * .04) calc(var(--pw) * .045);
}
.surah-band {
  display: grid; place-items: center;
  height: calc(var(--pw) * .115);
  border: 1px solid rgba(166, 124, 52, .8);
  border-radius: 999px;
  background: linear-gradient(180deg, #f4e4b9, #e2c78b);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
}
.surah-band span { font-family: var(--font-quran); font-size: calc(var(--pw) * .058); color: #6d4c13; line-height: 1; padding-top: .15em; }
.basmala { font-family: var(--font-quran); text-align: center; font-size: calc(var(--pw) * .056); color: #3b2a10; line-height: 1.6; }
.page-text {
  font-family: var(--font-quran);
  font-size: calc(var(--pw) * .061);
  line-height: 2.05;
  text-align: center;
  color: var(--ink);
  flex: 1;
  display: flex; flex-wrap: wrap; align-content: center; justify-content: center;
  column-gap: .28em;
}
.page-text.small { font-size: calc(var(--pw) * .046); line-height: 2; align-content: flex-start; }
.ayah { border-radius: .35em; padding: 0 .1em; transition: color .5s, background .5s, text-shadow .5s; }
.mark { color: #a67c34; font-size: .92em; }
.ayah.is-lit { color: #7a4f00; background: rgba(209, 164, 78, .22); text-shadow: 0 0 .5em rgba(209, 164, 78, .6); }
.ayah.is-read { color: #5b4318; }

.meaning {
  grid-column: 1 / -1; grid-row: 2;
  text-align: center; max-width: 720px; margin: 0 auto; min-height: 92px;
}
.meaning-text { font-family: var(--font-display); font-size: clamp(18px, 1vw + 13px, 24px); line-height: 1.4; color: var(--ivory); transition: opacity .4s; }
.meaning-ref { margin-top: 8px; font-size: 12.5px; font-weight: 650; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-soft); }
.meaning.is-fading .meaning-text { opacity: 0; }

/* Read your way */
.showcase { --len: 380svh; }
.showcase .stage {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 420px);
  align-items: center;
  gap: clamp(30px, 6vw, 100px);
  padding: calc(var(--nav-h) + 20px) max(var(--gutter), calc((100vw - 1200px) / 2 + var(--gutter))) 30px;
}
.showcase-copy { position: relative; max-width: 560px; }
.ways-wrap { position: relative; margin-top: 40px; padding-left: 30px; }
.ways { display: grid; gap: 26px; }
.ways li { display: grid; grid-template-columns: 42px 1fr; gap: 14px; opacity: .38; transition: opacity .6s var(--ease), transform .6s var(--ease); }
.ways li.is-active { opacity: 1; transform: translateX(8px); }
.ways .num { font-family: var(--font-display); font-size: 20px; color: var(--gold); padding-top: 2px; }
.ways p { margin-top: 6px; color: rgba(243, 238, 227, .75); font-size: 16px; }
.ways-bar { position: absolute; left: 0; top: 4px; bottom: 4px; width: 2px; background: rgba(209, 164, 78, .18); border-radius: 2px; }
.ways-bar span { display: block; width: 100%; height: calc(var(--p, 1) * 100%); background: linear-gradient(var(--gold-light), var(--gold)); border-radius: 2px; box-shadow: 0 0 12px var(--gold); }
.showcase-device { position: relative; display: grid; place-items: center; }
.halo {
  position: absolute; width: 140%; aspect-ratio: 1; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(209, 164, 78, .0), rgba(209, 164, 78, .35), rgba(22, 64, 122, .5), rgba(209, 164, 78, .0));
  filter: blur(50px); opacity: .7; animation: spin 24s linear infinite;
}
.phone.big { --w: clamp(250px, 24vw, 340px); transform: rotateY(calc(var(--tilt, 0) * 1deg)) rotateX(calc(var(--tilt, 0) * .4deg)); }
.phone.big .shot { position: absolute; left: 9px; top: 9px; width: calc(100% - 18px); opacity: 0; transform: translateY(24px) scale(.97); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.phone.big .shot:first-child { position: relative; left: 0; top: 0; width: 100%; }
.phone.big .shot.is-active { opacity: 1; transform: none; }
.no-js .phone.big .shot:first-child { opacity: 1; }

/* Listen */
.listen-visual { position: relative; display: grid; place-items: center; min-height: 640px; }
.phone.tilt-l { --w: clamp(240px, 22vw, 300px); transform: rotate(-6deg); }
.now-playing {
  position: absolute; right: 2%; bottom: 18%;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px 14px 14px; border-radius: 22px;
  animation: bob 6s ease-in-out infinite;
}
.np-art img { border-radius: 14px; }
.np-text { display: flex; flex-direction: column; line-height: 1.3; }
.np-text strong { font-weight: 650; }
.np-text span { font-size: 13.5px; color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 26px; margin-left: 6px; }
.bars i { width: 4px; border-radius: 3px; background: var(--gold-soft); animation: eq 1.1s ease-in-out infinite; }
.bars i:nth-child(2) { animation-delay: -.3s; } .bars i:nth-child(3) { animation-delay: -.6s; } .bars i:nth-child(4) { animation-delay: -.15s; } .bars i:nth-child(5) { animation-delay: -.45s; }
@keyframes eq { 0%, 100% { height: 6px; } 50% { height: 26px; } }
@keyframes bob { 50% { transform: translateY(-12px); } }
.wave { position: absolute; left: 0; right: 0; bottom: 0; height: 70px; display: flex; align-items: center; justify-content: center; gap: 6px; opacity: .55; }
.wave i { width: 4px; height: 14px; border-radius: 4px; background: linear-gradient(var(--gold-light), var(--gold-deep)); animation: eq2 1.6s ease-in-out infinite; }
.wave i:nth-child(3n) { animation-delay: -.4s; } .wave i:nth-child(3n+1) { animation-delay: -.8s; } .wave i:nth-child(4n) { animation-delay: -1.2s; }
@keyframes eq2 { 0%, 100% { height: 8px; } 50% { height: 58px; } }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.chips li {
  display: inline-flex; align-items: center; gap: 9px; padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .03); font-size: 15px; color: rgba(243, 238, 227, .88);
}
.chips .ic { width: 18px; height: 18px; color: var(--gold-soft); }

/* A prayer day */
.prayer { --len: 480svh; }
.day-sky {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--sky-a, #061c39) 0%, var(--sky-b, #0d2a52) 58%, var(--sky-c, #16407a) 100%);
}
.day-stars { position: absolute; inset: 0; opacity: var(--night, 1); }
.day-stars span { position: absolute; left: 0; top: 0; width: 2px; height: 2px; border-radius: 50%; background: transparent; }
.sun-path { position: absolute; left: 5%; right: 5%; top: 16%; height: 62%; width: 90%; overflow: visible; }
.sun-path path { fill: none; stroke: rgba(255, 255, 255, .28); stroke-width: 1.5; stroke-dasharray: .006 .01; vector-effect: non-scaling-stroke; }
.sun {
  position: absolute; left: calc(var(--sx, 50) * 1%); top: calc(var(--sy, 30) * 1%);
  width: clamp(70px, 8vw, 120px); aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, #fffbe8 0%, #ffe39a 38%, rgba(255, 200, 100, .6) 52%, rgba(255, 180, 80, 0) 70%);
  box-shadow: 0 0 120px 40px rgba(255, 214, 120, calc(var(--day, 1) * .35));
  opacity: var(--day, 1);
}
.night-moon {
  position: absolute; right: 14%; top: 14%;
  width: 74px; aspect-ratio: 1; border-radius: 50%;
  box-shadow: inset -18px 6px 0 0 #f6dfa4;
  filter: drop-shadow(0 0 22px rgba(246, 223, 164, .6));
  transform: rotate(-20deg);
  opacity: var(--night, 0);
}
.prayer-copy {
  position: absolute; left: max(var(--gutter), calc((100vw - 1200px) / 2 + var(--gutter))); top: calc(var(--nav-h) + 7vh);
  width: min(460px, calc(100% - 2 * var(--gutter)));
  padding: clamp(24px, 2.6vw, 36px);
  z-index: 2;
}
.prayer-copy h2 { font-size: clamp(34px, 3.4vw + 8px, 58px); }
.prayer-copy > p:not(.kicker) { margin-top: 14px; color: rgba(243, 238, 227, .82); }
.ticks { display: grid; gap: 12px; margin-top: 22px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; color: rgba(243, 238, 227, .9); font-size: 16px; line-height: 1.45; }
.ticks .ic { width: 20px; height: 20px; color: var(--gold-soft); margin-top: 1px; }
.prayer-device { position: absolute; right: max(var(--gutter), calc((100vw - 1200px) / 2 + var(--gutter))); top: calc(var(--nav-h) + 6vh); z-index: 2; }
.prayer-device .phone { --w: clamp(220px, 19vw, 280px); transform: rotate(4deg); }
.day-skyline { bottom: -2px; height: clamp(120px, 16vw, 230px); fill: var(--navy-950); z-index: 3; }
.timeline {
  position: absolute; left: 50%; bottom: max(18px, 3.5vh); z-index: 4; transform: translateX(-50%);
  display: flex; gap: clamp(10px, 3vw, 46px);
  padding: 12px clamp(14px, 2.4vw, 30px); border-radius: 999px;
  background: rgba(3, 11, 25, .55); border: 1px solid rgba(209, 164, 78, .2);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.timeline li { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 600; color: rgba(243, 238, 227, .55); transition: color .4s; white-space: nowrap; }
.timeline li.minor { font-weight: 500; font-size: 13px; }
.timeline i { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid currentColor; position: relative; transition: background .4s, border-color .4s, box-shadow .4s; }
.timeline li.is-done { color: rgba(243, 238, 227, .85); }
.timeline li.is-done i { background: var(--emerald); border-color: var(--emerald); }
.timeline li.is-done i::after { content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border: solid var(--navy-950); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.timeline li.is-now { color: var(--gold-light); }
.timeline li.is-now i { border-color: var(--gold-light); box-shadow: 0 0 0 4px rgba(246, 223, 164, .2), 0 0 18px var(--gold); }
.timeline li.minor.is-done i { background: transparent; border-color: currentColor; }
.timeline li.minor.is-done i::after { display: none; }

/* Adhkar and the tasbih */
.verse { margin: 34px auto 0; max-width: 760px; }
.verse blockquote { margin: 0; }
.verse-ar { font-family: var(--font-quran); font-size: clamp(30px, 2.6vw + 14px, 50px); line-height: 1.9; color: var(--gold-light); text-shadow: 0 0 30px rgba(209, 164, 78, .35); }
.verse-en { margin-top: 10px; font-family: var(--font-display); font-size: clamp(18px, .8vw + 14px, 23px); color: rgba(243, 238, 227, .85); }
.verse figcaption { margin-top: 12px; font-size: 12.5px; font-weight: 650; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-soft); }
.verse.big { max-width: 1040px; }
.verse.big .verse-ar { font-size: clamp(30px, 3vw + 12px, 56px); }

.adhkar-grid { align-items: stretch; }
.tasbih-card { padding: clamp(28px, 3vw, 44px); text-align: center; display: flex; flex-direction: column; align-items: center; }
.tasbih-card h3 { margin-top: -4px; }
.tasbih-card .muted { margin-top: 8px; }
.tasbih {
  position: relative; margin: 30px auto 0;
  width: min(290px, 72vw); aspect-ratio: 1; border-radius: 50%;
  border: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: radial-gradient(circle at 50% 35%, rgba(22, 64, 122, .9), rgba(6, 28, 57, .95) 70%);
  box-shadow: 0 0 0 1px rgba(209, 164, 78, .25), 0 30px 60px -20px rgba(0, 0, 0, .8), inset 0 0 60px rgba(209, 164, 78, .08);
  transition: transform .12s ease, box-shadow .4s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}
.tasbih:active { transform: scale(.965); }
.tasbih.pulse { animation: pulse .5s var(--ease); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(246, 223, 164, .5), 0 30px 60px -20px rgba(0, 0, 0, .8); } 100% { box-shadow: 0 0 0 30px rgba(246, 223, 164, 0), 0 30px 60px -20px rgba(0, 0, 0, .8); } }
.tasbih-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.tasbih-ring circle { fill: none; stroke-width: 5; }
.tasbih-ring .track { stroke: rgba(255, 255, 255, .08); }
.tasbih-ring .fill { stroke: url(#g-gold); stroke-linecap: round; stroke-dasharray: var(--t, 0) 1; transition: stroke-dasharray .25s var(--ease); filter: drop-shadow(0 0 6px rgba(209, 164, 78, .6)); }
.tasbih-ar { font-family: var(--font-quran); font-size: clamp(30px, 6vw, 40px); color: var(--gold-light); line-height: 1.5; }
.tasbih-tr { font-size: 14px; font-weight: 600; letter-spacing: .08em; color: var(--muted); }
.tasbih-count { margin-top: 6px; font-size: 15px; color: rgba(243, 238, 227, .7); }
.tasbih-count b { font-family: var(--font-display); font-weight: 600; font-size: 44px; color: var(--ivory); line-height: 1; vertical-align: -6px; }
.tasbih-hint { margin-top: 18px; font-size: 13.5px; color: var(--muted); }
.tasbih-phases { display: flex; gap: 8px; margin-top: 14px; }
.tasbih-phases i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .14); transition: background .4s, box-shadow .4s; }
.tasbih-phases i.on { background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.tasbih-phases i.done { background: var(--emerald); }
.tasbih-done { margin-top: 16px; color: var(--emerald); font-weight: 600; }
.tasbih-reset { margin-top: 10px; }
.tasbih-card.is-complete { border-color: rgba(92, 214, 176, .45); box-shadow: 0 0 80px -20px rgba(92, 214, 176, .5); }
.tasbih-card.is-complete .tasbih { background: radial-gradient(circle at 50% 35%, #12644f, #0e4a3c 70%); }
.tasbih-card.is-complete .tasbih-ring .fill { stroke: var(--emerald); }

.adhkar-side { display: grid; grid-template-columns: auto 1fr; gap: 30px; align-items: center; }
.adhkar-side .phone { --w: clamp(200px, 16vw, 250px); transform: rotate(3deg); }
.feature-list { display: grid; gap: 22px; }
.feature-list li { display: flex; gap: 14px; }
.feature-list .ic { width: 24px; height: 24px; color: var(--gold-soft); margin-top: 3px; }
.feature-list strong { display: block; font-weight: 650; }
.feature-list span { color: rgba(243, 238, 227, .72); font-size: 15.5px; }

/* Hifz */
.hifz-visual { position: relative; min-height: 560px; display: grid; place-items: center; }
.phone.ghost { --w: clamp(220px, 19vw, 270px); position: absolute; right: 2%; top: 0; opacity: .55; transform: rotate(6deg); }
.reveal-card { position: relative; z-index: 1; width: min(520px, 100%); padding: clamp(24px, 3vw, 38px); margin-top: 120px; }
/* Nearly solid, so the light screen behind it reads as a shape, not a glare. */
.reveal-card.glass { background: linear-gradient(160deg, rgba(16, 48, 94, .93), rgba(6, 24, 50, .96)); }
.reveal-card header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.pill { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--gold-soft); }
.hint { font-size: 12.5px; color: var(--muted); letter-spacing: .06em; }
.words { font-family: var(--font-quran); font-size: clamp(28px, 2.4vw + 14px, 44px); line-height: 2; text-align: center; color: var(--ivory); }
.words .w { display: inline-block; transition: filter .6s var(--ease), opacity .6s var(--ease), color .6s, transform .6s var(--ease); }
.js .words .w:not(.stop) { filter: blur(9px); opacity: .32; cursor: pointer; }
.js .words .w:not(.stop):not(.on):hover { opacity: .5; }
.js .words .w.on { filter: none; opacity: 1; cursor: default; color: var(--gold-light); text-shadow: 0 0 22px rgba(209, 164, 78, .45); }
.hifz-ayahs .words, .hifz-meanings .words-en { display: none; }
.hifz-ayahs .words.is-active, .hifz-meanings .words-en.is-active { display: block; }
.words-en { margin-top: 12px; text-align: center; font-family: var(--font-display); font-size: 19px; color: rgba(243, 238, 227, .82); transition: opacity .8s; }
.js .words-en { opacity: .42; }  /* a faint hint while you recall */
.js .reveal-card.is-done .words-en { opacity: 1; }

/* Habit */
.habit-visual { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.streak { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding: 28px; color: var(--gold-soft); }
.streak-num { font-family: var(--font-display); font-weight: 600; font-size: clamp(64px, 6vw, 96px); line-height: 1; color: var(--ivory); margin-top: 8px; }
.streak span { color: var(--muted); font-size: 15px; }
.calendar-box { padding: 20px 20px 14px; display: flex; flex-direction: column; justify-content: center; }
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.calendar > * { aspect-ratio: 1; border-radius: 6px; background: rgba(255, 255, 255, .06); transition: background .5s, box-shadow .5s, transform .3s; transition-delay: calc(var(--i) * 28ms); }
.in .calendar > .on { background: linear-gradient(135deg, var(--gold-light), var(--gold)); box-shadow: 0 0 10px rgba(209, 164, 78, .45); }
.calendar .today { border: 0; padding: 0; cursor: pointer; background: transparent; box-shadow: inset 0 0 0 2px var(--gold-light); animation: today 2s ease-in-out infinite; transition-delay: 0s; }
.calendar .today.met { background: linear-gradient(135deg, #fff1c9, var(--gold)); box-shadow: 0 0 18px rgba(246, 223, 164, .8); animation: none; }
@keyframes today { 50% { box-shadow: inset 0 0 0 2px var(--gold-light), 0 0 0 5px rgba(246, 223, 164, .18); } }
.calendar-hint { margin-top: 12px; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--gold-soft); }
.badges { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 10px; padding: 0 6px; }
.badges button {
  width: clamp(54px, 5.5vw, 74px); aspect-ratio: 1; border-radius: 22px; display: grid; place-items: center;
  background: linear-gradient(145deg, rgba(209, 164, 78, .28), rgba(22, 64, 122, .55));
  border: 1px solid rgba(209, 164, 78, .45); color: var(--gold-light);
  animation: badge 4s ease-in-out infinite; animation-delay: calc(var(--i) * .35s);
}
.badges button { cursor: pointer; padding: 0; transition: transform .3s var(--ease), border-color .3s, background .3s; }
.badges button:hover, .badges button.is-active { animation-play-state: paused; transform: translateY(-6px) scale(1.06); border-color: var(--gold-light); background: linear-gradient(145deg, rgba(209, 164, 78, .5), rgba(22, 64, 122, .6)); }
.badges .ic { width: 28px; height: 28px; }
.badge-tip { grid-column: 1 / -1; min-height: 54px; text-align: center; color: var(--muted); font-size: 14.5px; }
.badge-tip strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 21px; color: var(--gold-light); }
.streak-num.bump { animation: bump .8s var(--ease); }
@keyframes bump { 30% { transform: scale(1.18); color: var(--gold-light); } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@keyframes badge { 0%, 100% { transform: translateY(0); box-shadow: 0 0 0 rgba(209, 164, 78, 0); } 50% { transform: translateY(-8px); box-shadow: 0 14px 30px -10px rgba(209, 164, 78, .6); } }
.habit-copy .small-phone { --w: clamp(200px, 15vw, 230px); margin-top: 34px; transform: rotate(-3deg); }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tile {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 400px; padding: 28px; border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(22, 64, 122, .45), rgba(6, 28, 57, .8));
  border: 1px solid var(--line);
  transition: transform .5s var(--ease), border-color .4s;
}
.tile::before {  /* a soft light that follows the pointer */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(246, 223, 164, .16), transparent 45%);
}
.tile:hover { border-color: rgba(209, 164, 78, .5); transform: translateY(-4px); }
.tile:hover::before { opacity: 1; }
.tile.t-wide { grid-column: span 2; }
.tile-text { position: relative; z-index: 1; max-width: 320px; }
.tile.t-wide .tile-text { max-width: 50%; }
.tile .ic { width: 28px; height: 28px; color: var(--gold-soft); margin-bottom: 18px; }
.tile h3 { font-size: 24px; }
.tile p { margin-top: 10px; color: rgba(243, 238, 227, .74); font-size: 15.5px; }
/* A real screen in its phone, rising from the bottom edge of the tile. */
.peek {
  position: absolute; left: 50%; bottom: -1px; width: min(60%, 230px); height: 46%;
  transform: translateX(-50%);
  overflow: hidden; border-radius: 30px 30px 0 0;
  border: 7px solid #0c111b; border-bottom: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 -20px 50px -20px rgba(0, 0, 0, .9);
  transition: transform .6s var(--ease);
}
.peek img { width: 100%; height: auto; border-radius: 23px 23px 0 0; }
.tile:hover .peek { transform: translateX(-50%) translateY(-10px); }
.tile.t-wide .peek { left: auto; right: 7%; width: min(30%, 230px); height: 80%; transform: none; }
.tile.t-wide:hover .peek { transform: translateY(-10px); }
.tile.mini { min-height: 0; padding: 26px; }
.tile.mini .ic { margin-bottom: 14px; }
.tile.mini h3 { font-size: 21px; }

/* Privacy */
.privacy { text-align: center; }
.shield { position: relative; width: 150px; height: 150px; margin: 0 auto 40px; display: grid; place-items: center; color: var(--gold-light); }
.shield .ic { width: 64px; height: 64px; stroke-width: 1.4; filter: drop-shadow(0 0 18px rgba(209, 164, 78, .6)); }
.shield .ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(209, 164, 78, .5); animation: ripple 3.6s ease-out infinite; }
.shield .r2 { animation-delay: 1.2s; } .shield .r3 { animation-delay: 2.4s; }
@keyframes ripple { from { transform: scale(.55); opacity: 1; } to { transform: scale(1.9); opacity: 0; } }
.no-list { font-size: clamp(44px, 7vw, 108px); line-height: 1; }
.no-list span { display: inline-block; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: clamp(50px, 6vw, 80px); text-align: left; }
.trio > div { padding: 28px; }
.trio .ic { width: 28px; height: 28px; color: var(--gold-soft); margin-bottom: 16px; }
.trio p { margin-top: 8px; color: rgba(243, 238, 227, .74); font-size: 15.5px; }

/* Languages */
.greeting { display: grid; font-size: clamp(42px, 6.4vw, 96px); line-height: 1.25; min-height: 1.5em; margin-top: 4px; }
.greeting span { grid-area: 1 / 1; transition: opacity .8s var(--ease), transform .8s var(--ease), filter .8s; }
.greeting [lang="ta"] { font-family: var(--font-tamil); font-size: .7em; font-weight: 600; }
.greeting [lang="ur"] { font-family: var(--font-urdu); font-size: .85em; }
.js .greeting span { opacity: 0; transform: translateY(24px); filter: blur(8px); }
.js .greeting span.is-active { opacity: 1; transform: none; filter: none; }
.greeting span.is-active { background: linear-gradient(100deg, #f6dfa4, #d1a44e 50%, #f6dfa4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lang-row { display: flex; justify-content: center; gap: 12px; margin-top: 34px; }
.lang-row li { padding: 10px 22px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); font-weight: 600; }
.lang-row [lang="ta"] { font-family: var(--font-tamil); }
.lang-row [lang="ur"] { font-family: var(--font-urdu); }

/* Final */
.final { overflow: clip; padding-bottom: clamp(220px, 26vw, 360px); }
.final-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 60% 50% at 50% 70%, rgba(209, 164, 78, .16), transparent 70%); }
.final-title { font-family: var(--font-display); font-size: clamp(44px, 6.6vw, 104px); line-height: 1; margin-top: 54px; }
.final-title em {
  background: linear-gradient(100deg, #f6dfa4 0%, #d1a44e 30%, #fff1c9 48%, #d1a44e 66%, #b8862b 100%);
  background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 7s linear infinite;
}
.fan { position: relative; height: clamp(380px, 42vw, 560px); margin-top: 70px; }
.fan .phone { position: absolute; left: 50%; top: 0; --w: clamp(190px, 18vw, 260px); transition: transform 1.4s var(--ease); }
.fan .f2 { z-index: 2; transform: translateX(-50%); }
.fan .f1 { transform: translateX(-50%) rotate(0deg); }
.fan .f3 { transform: translateX(-50%) rotate(0deg); }
.fan.in .f1, .no-js .fan .f1 { transform: translateX(-118%) translateY(40px) rotate(-12deg); }
.fan.in .f3, .no-js .fan .f3 { transform: translateX(18%) translateY(40px) rotate(12deg); }
.final .skyline.near { z-index: 3; }

/* Footer */
.footer { position: relative; z-index: 5; background: var(--navy-950); border-top: 1px solid rgba(209, 164, 78, .14); padding: 54px 0 34px; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 30px; align-items: flex-start; }
.footer-brand p { margin-top: 14px; max-width: 360px; color: var(--muted); font-family: var(--font-display); font-size: 18px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px 26px; }
.footer-links a { text-decoration: none; color: rgba(243, 238, 227, .8); font-size: 15px; }
.footer-links a:hover { color: var(--gold-light); }
.credits { margin-top: 38px; display: grid; gap: 6px; font-size: 13px; color: rgba(159, 176, 204, .8); }
.credits a { color: var(--gold-soft); }

/* Scroll reveal */
.js .reveal { opacity: 0; transform: translateY(46px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .no-list.reveal span { opacity: 0; transform: translateY(40px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .no-list.reveal.in span { opacity: 1; transform: none; }
.js .no-list.reveal.in span:nth-child(2) { transition-delay: .18s; }
.js .no-list.reveal.in span:nth-child(3) { transition-delay: .36s; }
.js .trio .reveal:nth-child(2), .js .bento .reveal:nth-child(even) { transition-delay: .12s; }
.js .trio .reveal:nth-child(3) { transition-delay: .24s; }

/* ── Smaller screens ─────────────────────────────────────────────────────── */

@media (max-width: 1040px) {
  .nav-links { display: none; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .lantern { display: none; }
}

@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
  .hero-phones .p-left, .hero-phones .p-right { --w: clamp(150px, 36vw, 230px); }
  .hero-phones .p-center { --w: clamp(190px, 48vw, 270px); }
  .hero-phones { height: clamp(380px, 110vw, 560px); }

  .mushaf { --len: 400svh; }
  .mushaf .stage { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; padding-top: calc(var(--nav-h) + 4px); }
  .mushaf-copy { grid-row: 1; min-height: 150px; text-align: center; }
  .step { left: 0; right: 0; }
  .step h2 { font-size: clamp(28px, 7vw, 40px); }
  .step p:not(.kicker) { margin: 10px auto 0; font-size: 15.5px; }
  .step .kicker { margin-bottom: 10px; }
  .book-wrap { grid-row: 2; }
  .book { --pw: min(45vw, 230px); }
  .meaning { grid-row: 3; min-height: 108px; }
  .meaning-text { font-size: 17px; }

  .showcase { --len: 340svh; }
  .showcase .stage { grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: 14px; padding-top: calc(var(--nav-h) + 10px); text-align: center; }
  .showcase-copy { max-width: none; }
  .showcase-copy h2 { font-size: clamp(28px, 7vw, 40px); }
  .showcase .kicker { margin-bottom: 8px; }
  .ways-wrap { margin-top: 12px; padding: 0; }
  .ways { min-height: 128px; }
  .ways li { grid-area: 1 / 1; grid-template-columns: 1fr; gap: 2px; opacity: 0; transform: translateY(-10px); transition-duration: .3s; }
  .ways li.is-active { opacity: 1; transform: none; transition-duration: .7s; transition-delay: .2s; }
  .ways .num { font-size: 15px; }
  .ways h3 { font-size: 22px; }
  .ways p { font-size: 15px; }
  .ways-bar { display: none; }
  .showcase-device { align-self: start; }
  .phone.big { --w: min(56vw, calc((100svh - 330px) * .46), 280px); }

  .prayer { --len: 440svh; }
  .prayer-copy { left: var(--gutter); right: var(--gutter); top: calc(var(--nav-h) + 8px); width: auto; padding: 20px 22px; }
  .prayer-copy h2 { font-size: clamp(28px, 7.4vw, 40px); }
  .prayer-copy > p:not(.kicker) { font-size: 15px; margin-top: 8px; }
  .prayer-copy .kicker { margin-bottom: 8px; }
  .ticks { gap: 8px; margin-top: 12px; }
  .ticks li { font-size: 14.5px; }
  .prayer-device { display: none; }
  .timeline { gap: 12px; padding: 10px 16px; width: calc(100% - 2 * var(--gutter)); justify-content: space-between; }
  .timeline li { flex-direction: column; gap: 5px; font-size: 12px; }
  .timeline li.minor { font-size: 11px; }

  .listen-visual { min-height: 560px; order: -1; }
  .adhkar-side { grid-template-columns: 1fr; justify-items: center; text-align: left; }
  .hifz-visual { min-height: 0; }
  .phone.ghost { display: none; }
  .reveal-card { margin-top: 0; }
  .habit-visual { order: -1; }
  .habit-copy .small-phone { display: none; }
  .trio { grid-template-columns: 1fr; }
  .fan .phone { --w: clamp(150px, 38vw, 220px); }
}

@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; }
  .tile.t-wide { grid-column: auto; }
  .tile { min-height: 440px; }
  .tile.t-wide .tile-text { max-width: none; }
  .tile.t-wide .peek { left: 50%; right: auto; width: min(60%, 230px); height: 46%; transform: translateX(-50%); }
  .tile.t-wide:hover .peek { transform: translateX(-50%) translateY(-10px); }
  .tile.mini { min-height: 0; }
  .btn-lg { width: 100%; justify-content: center; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .hero-sub { font-size: 16.5px; }
  .trust { font-size: 13px; gap: 8px 16px; }
  .emblem { width: 112px; height: 112px; margin-bottom: 50px; }
  .emblem img { width: 112px; height: 112px; }
  .emblem .rosette { width: 200px; height: 200px; margin: -100px 0 0 -100px; }
  .habit-visual { grid-template-columns: 1fr; }
  .badges span { border-radius: 18px; }
  .no-list span { display: block; }
}

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

/* ── Start states and fallbacks ──────────────────────────────────────────── */

/* With JavaScript, scenes start at their beginning: the Mushaf closed. */
.js .book { --open: 0; --enter: 0; }
.js .mushaf .stage { --open: 0; }

/* Without JavaScript, every scene simply shows its finished state. */
html:not(.js) .step:not(:first-child) { display: none; }
html:not(.js) .scene { height: auto; }
html:not(.js) .stage { position: relative; height: auto; min-height: 100svh; }

/* Reduced motion: no long pinned scrolls; each scene rests in one state. */
.reduce .scene { height: auto; }
.reduce .stage { position: relative; height: auto; min-height: 100svh; }
.reduce .hero-phones .phone { transition: none; }

/* ── Recitation player ───────────────────────────────────────────────────── */

.np-play {
  flex: none; width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; color: var(--navy-950);
  background: linear-gradient(135deg, #f6dfa4, #d1a44e 55%, #b8862b);
  box-shadow: 0 10px 24px -10px rgba(209, 164, 78, .9);
  transition: transform .2s;
}
.np-play:active { transform: scale(.94); }
.np-play .ic { width: 22px; height: 22px; fill: currentColor; stroke: none; }
.np-play .i-pause { display: none; }
[data-player].is-playing .np-play .i-play { display: none; }
[data-player].is-playing .np-play .i-pause { display: block; }
.np-play.invite { animation: invite 1.8s ease-in-out infinite; }
@keyframes invite { 0%, 100% { box-shadow: 0 0 0 0 rgba(246, 223, 164, .55); } 50% { box-shadow: 0 0 0 14px rgba(246, 223, 164, 0); } }
.bars i { animation-play-state: paused; }
[data-player].is-playing .bars i { animation-play-state: running; }
.np-bar { position: absolute; left: 16px; right: 16px; bottom: 8px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.np-bar span { display: block; height: 100%; width: calc(var(--np, 0) * 100%); background: linear-gradient(90deg, var(--gold-deep), var(--gold-light)); }
.now-playing { padding: 14px 20px 20px 14px; }
.np-sub { font-size: 13.5px; color: var(--muted); }
.listen-try { display: flex; gap: 10px; align-items: flex-start; margin-top: 24px; max-width: 520px; font-size: 15px; color: var(--gold-light); }
.listen-try .ic { color: var(--gold-soft); margin-top: 1px; }

.mini-player {
  position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 55;
  width: min(440px, calc(100% - 28px));
  display: flex; align-items: center; gap: 12px; padding: 10px 12px 16px 10px; border-radius: 22px;
  background: linear-gradient(160deg, rgba(22, 64, 122, .94), rgba(6, 28, 57, .96));
  border: 1px solid rgba(209, 164, 78, .3);
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .85);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  opacity: 0; transform: translate(-50%, 150%); pointer-events: none;
  transition: opacity .4s, transform .6s var(--ease);
}
.mini-player.is-shown { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.mini-player .np-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.mini-player .np-title { font-weight: 650; font-size: 15px; }
.mini-player .np-sub { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-close { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; color: var(--muted); background: rgba(255, 255, 255, .07); }
.mp-close .ic { width: 18px; height: 18px; }
.fatiha .ayah { cursor: pointer; }
.fatiha .ayah:hover { background: rgba(209, 164, 78, .14); }

/* ── Meem's Prayer Times screen, rebuilt (sizes in the app's dp) ────────── */

.app-phone { --w: clamp(230px, 19vw, 290px); }
.ps {
  container-type: inline-size;
  position: relative; width: 100%; aspect-ratio: 1080 / 2340; overflow: hidden;
  border-radius: 38px; background: #faf7f1; color: #1b2a41; font-family: var(--font-body);
  display: flex; flex-direction: column;
}
.ps > * { --u: calc(100cqw / 411); }
.ps svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ps-status { position: relative; height: calc(30 * var(--u)); display: flex; align-items: center; justify-content: space-between; padding: 0 calc(24 * var(--u)); font-size: calc(13 * var(--u)); }
.ps-cam { position: absolute; left: 50%; top: calc(8 * var(--u)); width: calc(13 * var(--u)); height: calc(13 * var(--u)); margin-left: calc(-6.5 * var(--u)); border-radius: 50%; background: #0a0a0c; }
.ps-sig { display: flex; align-items: flex-end; gap: calc(2 * var(--u)); height: calc(10 * var(--u)); }
.ps-sig i { width: calc(3 * var(--u)); background: #1c1c1e; border-radius: 1px; }
.ps-sig i:nth-child(1) { height: 35%; } .ps-sig i:nth-child(2) { height: 55%; } .ps-sig i:nth-child(3) { height: 75%; } .ps-sig i:nth-child(4) { height: 100%; }
.ps-bar { display: flex; align-items: center; justify-content: space-between; padding: calc(10 * var(--u)) calc(16 * var(--u)) calc(6 * var(--u)); }
.ps-bar b { font-size: calc(22 * var(--u)); font-weight: 700; letter-spacing: -.01em; }
.ps-icons { display: flex; gap: calc(18 * var(--u)); color: #1b2a41; }
.ps-icons svg { width: calc(21 * var(--u)); height: calc(21 * var(--u)); }
.ps-date { margin: calc(8 * var(--u)) calc(16 * var(--u)) 0; height: calc(46 * var(--u)); padding: 0 calc(16 * var(--u)); border-radius: calc(16 * var(--u)); display: flex; align-items: center; justify-content: space-between; background: #fff; border: 1px solid #e7e1d4; color: #51617a; font-size: calc(17 * var(--u)); }
.ps-date b { color: #1b2a41; font-size: calc(15 * var(--u)); font-weight: 600; }
.ps-next { margin: calc(12 * var(--u)) calc(16 * var(--u)) 0; padding: calc(16 * var(--u)) calc(18 * var(--u)); border-radius: calc(20 * var(--u)); color: #fff; background: linear-gradient(135deg, #1a3f70, #0e2e58 60%, #0b2547); transition: background .5s; }
.ps-next-k { display: flex; align-items: center; gap: calc(8 * var(--u)); font-size: calc(15 * var(--u)); font-weight: 600; }
.ps-next-k svg { width: calc(18 * var(--u)); height: calc(18 * var(--u)); color: #d9a644; }
.ps-streak { margin-left: auto; display: flex; align-items: center; gap: calc(4 * var(--u)); font-style: normal; font-size: calc(13 * var(--u)); color: #d9a644; }
.ps-streak svg { width: calc(13 * var(--u)); height: calc(13 * var(--u)); }
.ps-next-time { margin-top: calc(6 * var(--u)); font-size: calc(30 * var(--u)); font-weight: 700; line-height: 1.15; }
.ps-next-sub { margin-top: calc(2 * var(--u)); font-size: calc(13 * var(--u)); color: rgba(255, 255, 255, .72); }
.ps.all-done .ps-next { background: linear-gradient(135deg, #12876f, #0e6a58); }
.ps-list { margin: calc(12 * var(--u)) calc(16 * var(--u)) 0; display: grid; gap: calc(8 * var(--u)); }
.ps-list li { display: flex; align-items: center; gap: calc(12 * var(--u)); height: calc(50 * var(--u)); padding: 0 calc(14 * var(--u)); border-radius: calc(16 * var(--u)); background: #fff; border: 1px solid #e7e1d4; font-size: calc(15 * var(--u)); transition: background .4s, border-color .4s; }
.ps-list li svg { width: calc(17 * var(--u)); height: calc(17 * var(--u)); color: #51617a; }
.ps-list li b { flex: 1; font-weight: 600; }
.ps-list li.ps-minor b { font-weight: 500; color: #51617a; }
.ps-list time { font-size: calc(14 * var(--u)); color: #51617a; }
.ps-list i { position: relative; width: calc(22 * var(--u)); height: calc(22 * var(--u)); border-radius: 50%; border: calc(2 * var(--u)) solid #93a0b4; transition: background .35s, border-color .35s, transform .35s var(--ease); }
.ps-list li.done i { background: #12876f; border-color: #12876f; transform: scale(1.06); }
.ps-list li.done i::after { content: ""; position: absolute; left: 34%; top: 14%; width: 26%; height: 50%; border: solid #fff; border-width: 0 calc(2.2 * var(--u)) calc(2.2 * var(--u)) 0; transform: rotate(45deg); }
.ps-list li.now { background: #e8eef7; border: calc(1.5 * var(--u)) solid #14335c; }
.ps-stats { margin: calc(12 * var(--u)) calc(16 * var(--u)) 0; padding: calc(12 * var(--u)) 0; border-radius: calc(16 * var(--u)); background: #fff; border: 1px solid #e7e1d4; display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; }
.ps-stats b { display: block; font-size: calc(20 * var(--u)); font-weight: 700; }
.ps-stats span { font-size: calc(11.5 * var(--u)); color: #51617a; }
.ps-nav { margin-top: auto; display: flex; justify-content: space-around; padding: calc(8 * var(--u)) calc(6 * var(--u)) calc(16 * var(--u)); background: #fff; border-top: 1px solid #e7e1d4; font-size: calc(10.5 * var(--u)); color: #93a0b4; }
.ps-nav span { display: flex; flex-direction: column; align-items: center; gap: calc(3 * var(--u)); padding: calc(5 * var(--u)) calc(11 * var(--u)); border-radius: calc(14 * var(--u)); }
.ps-nav span.on { background: #e8eef7; color: #14335c; font-weight: 600; }
.ps-nav svg { width: calc(20 * var(--u)); height: calc(20 * var(--u)); }
.app-phone::after { inset: 9px; }

/* ── Hifz practice ───────────────────────────────────────────────────────── */

.reveal-card header { flex-wrap: wrap; }
.ayah-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.ayah-tabs button, .ways-tabs button {
  padding: 6px 13px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  font-size: 13px; font-weight: 600; transition: background .3s, color .3s, border-color .3s;
}
.ayah-tabs [aria-selected="true"], .ways-tabs [aria-selected="true"] { background: rgba(209, 164, 78, .16); color: var(--gold-light); border-color: rgba(209, 164, 78, .6); }
.hifz-progress { height: 4px; margin-top: 18px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.hifz-progress span { display: block; height: 100%; width: calc(var(--hp, 0) * 100%); background: linear-gradient(90deg, var(--gold-deep), var(--gold-light)); transition: width .4s var(--ease); }
.hifz-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.chip-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 10px 17px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--ivory);
  font-size: 14px; font-weight: 600; transition: background .3s, transform .2s;
}
.chip-btn:hover { background: rgba(209, 164, 78, .14); }
.chip-btn:active { transform: scale(.96); }
.chip-btn.primary { border: 0; color: var(--navy-950); background: linear-gradient(135deg, #f6dfa4, #d1a44e 55%, #b8862b); }
.chip-btn .ic { width: 17px; height: 17px; }
.chip-btn.is-on { border-color: rgba(209, 164, 78, .6); color: var(--gold-light); }
.hifz-count { margin-top: 12px; text-align: center; font-size: 13.5px; color: var(--muted); }
.ways li { cursor: pointer; }
.ways li:not(.is-active):hover { opacity: .7; }
.ways-tabs { display: none; }

/* ── Bento: the 99 Names, the widget and reading themes ─────────────────── */

.names-tile { display: flex; flex-direction: column; }
.name-card {
  margin-top: 22px; padding: 20px 14px; border-radius: 20px; text-align: center; cursor: pointer;
  background: radial-gradient(circle at 50% 0%, rgba(209, 164, 78, .2), rgba(6, 28, 57, .5) 72%);
  border: 1px solid rgba(209, 164, 78, .3);
}
.name-card.flip { animation: flip .55s var(--ease); }
@keyframes flip { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.tile .name-ar { margin-top: 0; font-family: var(--font-quran); font-size: 40px; line-height: 1.55; color: var(--gold-light); text-shadow: 0 0 24px rgba(209, 164, 78, .45); }
.tile .name-tr { margin-top: 2px; font-family: var(--font-display); font-size: 21px; line-height: 1.2; color: var(--ivory); }
.tile .name-en { margin-top: 4px; font-size: 15px; color: rgba(243, 238, 227, .78); }
.tile .name-meta { margin-top: 8px; font-size: 11.5px; font-weight: 650; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-soft); }
.name-nav { display: flex; justify-content: center; gap: 12px; margin-top: 14px; }
.round-btn { width: 42px; height: 42px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--gold-light); transition: background .3s; }
.round-btn:hover { background: rgba(209, 164, 78, .16); }
.round-btn .ic { width: 20px; height: 20px; margin: 0; }
.round-btn[data-name="prev"] .ic { transform: rotate(180deg); }
.tile .round-btn .ic { color: var(--gold-light); margin-bottom: 0; }

.widget-tile { display: flex; flex-direction: column; justify-content: space-between; }
.widget { margin-top: 24px; padding: 15px 14px 12px; border-radius: 20px; background: linear-gradient(0deg, #061c39, #0e2747); border: 1px solid rgba(209, 164, 78, .2); box-shadow: 0 24px 40px -22px rgba(0, 0, 0, .9); }
.widget-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.widget-head span:first-child { font-size: 10.5px; font-weight: 600; letter-spacing: .12em; color: #d1a44e; }
.widget-count { font-size: 12px; color: #9fb0cc; white-space: nowrap; }
.widget-dots { display: flex; justify-content: space-between; margin-top: 14px; }
.widget-dots button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 2px; border: 0; border-radius: 10px; background: none; color: #9fb0cc; font-size: 10.5px; cursor: pointer; }
.widget-dots i { position: relative; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid rgba(159, 176, 204, .5); transition: background .3s, border-color .3s, transform .3s var(--ease); }
.widget-dots .is-next i { border: 2px solid #d1a44e; box-shadow: 0 0 12px rgba(209, 164, 78, .35); }
.widget-dots .is-done i { background: #d1a44e; border-color: #d1a44e; transform: scale(1.05); }
.widget-dots .is-done i::after { content: ""; position: absolute; left: 9px; top: 5px; width: 6px; height: 11px; border: solid #061c39; border-width: 0 2.2px 2.2px 0; transform: rotate(45deg); }
.widget-dots button:active i { transform: scale(.88); }

.themes-tile { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: center; }
.themes-tile .tile-text { max-width: none; }
.swatches { display: grid; grid-template-columns: repeat(4, 32px); gap: 11px; margin-top: 20px; }
.swatches button { width: 32px; height: 32px; border-radius: 50%; padding: 0; cursor: pointer; border: 2px solid transparent; background: linear-gradient(180deg, var(--a), var(--b)); box-shadow: 0 0 0 1px rgba(255, 255, 255, .16); transition: transform .3s var(--ease), border-color .3s; }
.swatches button[aria-checked="true"] { border-color: var(--gold-light); transform: scale(1.14); }
.tile .theme-name { margin-top: 12px; font-size: 12px; font-weight: 650; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-soft); }
.theme-card {
  position: relative; overflow: hidden; min-height: 240px; padding: 26px 22px; border-radius: 24px; text-align: center; color: #fff;
  display: flex; flex-direction: column; justify-content: center;
  background: linear-gradient(180deg, var(--ta, #0d2a50), var(--tb, #061630));
  border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9);
  transition: box-shadow .5s;
}
.tile .theme-ar { margin-top: 0; font-family: var(--font-quran); font-size: 38px; line-height: 1.8; }
.tile .theme-en { margin-top: 4px; font-family: var(--font-display); font-size: 18px; color: var(--tl, rgba(255, 255, 255, .85)); }
.tile .theme-ref { margin-top: 10px; font-size: 11px; font-weight: 650; letter-spacing: .2em; text-transform: uppercase; color: rgba(255, 255, 255, .72); }

/* ── The privacy page ────────────────────────────────────────────────────── */

.doc { max-width: 800px; margin: 0 auto; padding: calc(var(--nav-h) + 60px) var(--gutter) 90px; }
.doc-head { text-align: center; margin-bottom: 40px; }
.doc-shield { width: 76px; height: 76px; margin: 0 auto 24px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(209, 164, 78, .5); color: var(--gold-light); box-shadow: 0 0 46px rgba(209, 164, 78, .28); }
.doc-shield .ic { width: 34px; height: 34px; }
.doc h1 { font-family: var(--font-display); font-size: clamp(40px, 5vw + 10px, 66px); line-height: 1.05; }
.doc-meta { margin-top: 16px; color: var(--muted); font-size: 15px; }
.doc-lead { padding: 24px 26px; border-radius: 22px; font-size: clamp(17px, .5vw + 15px, 20px); color: rgba(243, 238, 227, .92); background: rgba(209, 164, 78, .08); border: 1px solid rgba(209, 164, 78, .26); }
.doc-lead strong { color: var(--gold-light); }
.doc section { margin-top: 40px; }
.doc h2 { font-size: clamp(25px, 1.6vw + 16px, 34px); margin-bottom: 12px; }
.doc p, .doc li { color: rgba(243, 238, 227, .82); }
.doc p + p { margin-top: 12px; }
.doc ul { display: grid; gap: 9px; margin: 14px 0; }
.doc li { position: relative; padding-left: 26px; }
.doc li::before { content: ""; position: absolute; left: 6px; top: .68em; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.doc a { color: var(--gold-light); }
.doc-note { padding: 24px 26px; border-radius: 22px; border: 1px dashed rgba(209, 164, 78, .38); }
.doc-back { margin-top: 46px; text-align: center; }
.doc-back .btn { text-decoration: none; }

@media (max-width: 860px) {
  .themes-tile { grid-template-columns: 1fr; }
  .ways-tabs { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
  .ways li { cursor: default; }

  /* The live Prayer Times screen stays on phones; the list turns into chips. */
  .prayer-device { display: block; left: 50%; right: auto; top: auto; bottom: calc(max(18px, 3.5vh) + 84px); transform: translateX(-50%); }
  .prayer-device .phone { --w: min(46vw, calc((100svh - 380px) * .46), 240px); transform: none; }
  /* One swipeable row of chips, so the card stays short above the phone. */
  .prayer-copy .ticks { display: flex; flex-wrap: nowrap; gap: 6px; margin: 12px -22px 0; padding: 0 22px 2px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 22px, #000 calc(100% - 30px), transparent); mask-image: linear-gradient(90deg, transparent, #000 22px, #000 calc(100% - 30px), transparent); }
  .prayer-copy .ticks::-webkit-scrollbar { display: none; }
  .prayer-copy .ticks li { flex: none; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12.5px; white-space: nowrap; background: rgba(255, 255, 255, .07); border: 1px solid rgba(209, 164, 78, .2); }
  .prayer-copy .ticks .ic { width: 15px; height: 15px; margin-top: 0; }
  .now-playing { right: 0; bottom: 6%; }
}

/* Phones: the hands-on tiles size to their content; the swatches fit one row. */
@media (max-width: 560px) {
  .names-tile, .widget-tile, .themes-tile { min-height: 0; }
  .swatches { grid-template-columns: repeat(7, 32px); gap: 9px; }
}
