/* Zikrist site kit: the app's dark phone, drawn from the app's own tokens (palette.ts, contentType.ts,
   pagerLayout.ts, barGeometry.ts, wallLight.ts), the falling light and the eclipse button.
   The phone is authored at the app's 402 x 874 points and scaled with --s. */

:root {
  --zk-night: #030405;
  --zk-ink: #F4F5F7;
  --zk-body: #C9CDD3;
  --zk-muted: #8E939C;
  --zk-faint: #5C6169;
  --zk-surface: #15171B;
  --zk-border: rgba(255, 255, 255, 0.12);
  --zk-star: #FFF7EA;
  --zk-glow: #F3E3CC;
  --zk-glow-soft: #F8EEE0;
  --zk-gold: #FFB85C;
  --zk-ember: #F08A3E;
  --zk-follow: #48CD8C;
  --zk-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --zk-arabic: "Amiri", "Geeza Pro", "Noto Naskh Arabic", "Times New Roman", serif;
  --zk-serif: "Newsreader", Georgia, "Times New Roman", serif;
}

/* ---------------------------------------------------------------- the device ---------------------------------- */
.zk-device {
  --s: 0.8;
  --rim: 0;            /* 0..1: light landing on the frame */
  --rx: 85%;           /* where it lands, in the frame's box */
  --ry: 24%;
  position: relative;
  width: calc(424px * var(--s));
  height: calc(896px * var(--s));
  flex: none;
}
.zk-device .zk-frame {
  position: absolute; inset: 0; border-radius: calc(68px * var(--s));
  background:
    linear-gradient(160deg, #3A3C42 0%, #1D1E22 18%, #121316 50%, #1B1C20 82%, #34363C 100%);
  box-shadow:
    0 0 0 calc(0.6px * var(--s)) rgba(255, 255, 255, 0.10) inset,
    0 calc(40px * var(--s)) calc(90px * var(--s)) calc(-30px * var(--s)) rgba(0, 0, 0, 0.9);
}
/* The rim light: only the frame's band lights, brightest where the light lands. */
.zk-device .zk-rim {
  position: absolute; inset: 0; border-radius: calc(68px * var(--s)); pointer-events: none;
  padding: calc(2.2px * var(--s));
  background:
    radial-gradient(calc(260px * var(--s)) calc(260px * var(--s)) at var(--rx) var(--ry),
      rgba(255, 247, 234, calc(var(--rim) * 1)) 0%, rgba(243, 227, 204, calc(var(--rim) * 0.55)) 22%, rgba(243, 227, 204, 0) 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04) 30%, rgba(255, 255, 255, 0.02) 70%, rgba(255, 255, 255, 0.10));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.zk-device .zk-glass {
  position: absolute; left: calc(11px * var(--s)); top: calc(11px * var(--s));
  width: calc(402px * var(--s)); height: calc(874px * var(--s));
  border-radius: calc(57px * var(--s)); overflow: hidden; background: #000;
}
/* A faint sheen on the glass where the light lands. */
.zk-device .zk-sheen {
  position: absolute; inset: 0; pointer-events: none; z-index: 30; border-radius: inherit;
  background: radial-gradient(calc(340px * var(--s)) calc(220px * var(--s)) at var(--rx) calc(var(--ry) - 4%),
    rgba(255, 247, 234, calc(var(--rim) * 0.10)), rgba(255, 247, 234, 0) 70%);
  mix-blend-mode: screen;
}

/* ---------------------------------------------------------------- the screen ---------------------------------- */
.zk-screen {
  position: absolute; left: 0; top: 0; width: 402px; height: 874px;
  transform: scale(var(--s)); transform-origin: 0 0;
  background: var(--zk-night); color: var(--zk-ink); font-family: var(--zk-sans);
  -webkit-font-smoothing: antialiased; overflow: hidden; isolation: isolate;
  user-select: none; -webkit-user-select: none;
}
.zk-screen canvas { position: absolute; display: block; pointer-events: none; }
.zk-wall { left: 0; top: 0; width: 402px; height: 874px; z-index: 1; transition: opacity 0.6s; }
.zk-starfield { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.zk-star { position: absolute; border-radius: 50%; background: var(--zk-star); box-shadow: 0 0 5px rgba(255, 247, 234, 0.75);
  animation: zk-twinkle var(--leg) ease-in-out var(--delay) infinite alternate; }
/* The twinkle in the star's colour, not its opacity: an opacity animation makes each star a compositing layer of
   its own and pushes everything drawn over it into layers too, at the screen's full size. */
@keyframes zk-twinkle {
  from { background-color: rgba(255, 247, 234, calc(var(--peak) * 0.2)); box-shadow: 0 0 5px rgba(255, 247, 234, calc(var(--peak) * 0.15)); }
  to { background-color: rgba(255, 247, 234, var(--peak)); box-shadow: 0 0 5px rgba(255, 247, 234, calc(var(--peak) * 0.75)); }
}

.zk-status { position: absolute; left: 0; right: 0; top: 0; height: 54px; z-index: 20; pointer-events: none; }
.zk-status .t { position: absolute; left: 50px; top: 17px; font-weight: 600; font-size: 17px; line-height: 22px; letter-spacing: -0.3px; }
.zk-status .island { position: absolute; left: 138px; top: 11px; width: 126px; height: 37px; border-radius: 19px; background: #000; }
.zk-status svg { position: absolute; right: 28px; top: 21px; width: 76px; height: 13px; color: var(--zk-ink); }

.zk-page { position: absolute; inset: 0; z-index: 5; transition: opacity 0.5s, transform 0.6s cubic-bezier(.2, .7, .2, 1), visibility 0s; }
/* a page that is off is hidden once it has faded, so it holds no memory */
.zk-page.off { opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.5s, transform 0.6s cubic-bezier(.2, .7, .2, 1), visibility 0s 0.5s; }

/* Home's landing (HomeLanding.tsx) */
.zk-hdr { position: absolute; left: 24px; right: 24px; top: 74px; display: flex; justify-content: space-between; align-items: flex-start; }
/* the wordmark (ZK.WORDMARK), as tall as the old typed wordmark's line, as the app draws it (Wordmark.tsx) */
.zk-wordmark { height: 26px; }
.zk-wordmark .zk-wm { display: block; width: 80.79px; height: 26px; }
.zk-tagline { margin-top: 8px; font-size: 11px; line-height: 14px; letter-spacing: 2px; color: var(--zk-muted); text-transform: uppercase; }
.zk-qibla { position: relative; width: 46px; height: 46px; margin-top: -8px; margin-right: -6px; }
.zk-qibla svg { position: absolute; inset: 0; width: 46px; height: 46px; overflow: visible; }
.zk-bism { position: absolute; left: 0; right: 0; top: 308px; height: 84px; font: 42px/84px var(--zk-arabic); text-align: center; direction: rtl; color: var(--zk-ink); }
.zk-doors { position: absolute; left: 24px; right: 24px; top: 436px; height: 58px; display: flex; gap: 10px; }
.zk-door { position: relative; flex: 1; min-width: 0; height: 58px; border-radius: 14px; border: 1px solid var(--zk-border); display: flex; align-items: center; gap: 10px; padding: 0 16px; }
.zk-door .g { width: 20px; height: 20px; display: grid; place-items: center; flex: none; color: var(--zk-ink); }
.zk-door .g svg { width: 18px; height: 18px; }
.zk-door b { display: block; font-weight: 500; font-size: 15px; line-height: 20px; }
.zk-door i { display: block; font-style: normal; font-size: 12px; line-height: 16px; color: var(--zk-muted); }
.zk-door .edge { position: absolute; left: -1px; bottom: -1px; height: 16px; overflow: hidden; }
.zk-door .edge::before { content: ""; position: absolute; left: 0; bottom: 0; width: 174px; height: 16px; border-bottom: 1.5px solid rgb(243, 227, 204); border-radius: 0 0 14px 14px; }
.zk-door .tip { position: absolute; bottom: -2px; width: 6px; height: 3px; border-radius: 2px; background: rgb(243, 227, 204); box-shadow: 0 0 3px rgb(243, 227, 204); }
.zk-followbtn {
  position: absolute; left: 50%; top: 648px; transform: translateX(-50%); height: 56px; min-width: 228px; padding: 0 26px;
  border-radius: 14px; border: 1px solid var(--zk-border); background: var(--zk-surface);
  display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 600; font-size: 16px; line-height: 20px; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(243, 227, 204, 0.30); transition: box-shadow 0.4s, transform 0.3s;
}
.zk-followbtn svg { width: 18px; height: 18px; color: rgb(243, 227, 204); }
.zk-followbtn.pressed { transform: translateX(-50%) scale(0.97); box-shadow: inset 0 1px 0 rgba(243, 227, 204, 0.5), 0 0 30px rgba(243, 227, 204, 0.12); }
.zk-beamline { position: absolute; height: 1px; background: linear-gradient(to right, rgba(243, 227, 204, 0), rgba(243, 227, 204, 0.65) 50%, rgba(243, 227, 204, 0)); }
.zk-bar { left: 0; top: 760px; width: 402px; height: 114px; z-index: 12; }

/* The reader while following (PassageReader + reading band, spec 0019; following's ink tide, followTide.ts) */
.zk-rtop { position: absolute; left: 0; right: 0; top: 54px; height: 80px; z-index: 8; }
/* The way out (ExitControl's Done) and the reading settings button across from it: surface squares with a control's
   corner, ring and resting light. */
.zk-rtop .done, .zk-rtop .set { position: absolute; top: 6px; height: 44px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border-radius: 14px; background: #15171B; border: 1px solid rgba(255, 255, 255, 0.12); border-top-color: rgba(243, 227, 204, 0.22); }
.zk-rtop .done { left: 24px; min-width: 72px; padding: 0 16px; font-weight: 600; font-size: 16px; line-height: 20px; color: #ECEEF2; }
.zk-rtop .set { right: 24px; width: 44px; color: #C9CDD3; }
.zk-rtop .set svg { width: 20px; height: 20px; }
.zk-rtop .ttl { position: absolute; left: 0; right: 0; top: 8px; text-align: center; }
.zk-rtop .ttl b { display: block; font-weight: 600; font-size: 17px; line-height: 22px; }
.zk-rtop .ttl i { display: inline-flex; align-items: center; gap: 6px; font-style: normal; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--zk-muted); margin-top: 3px; }
/* The heard dot: filled in the accent while the recitation is heard (ReaderTopRow's HeardDot). */
.zk-rtop .dot { width: 6px; height: 6px; border-radius: 50%; background: #ECEEF2; }
.zk-rtop .hb { position: absolute; left: 0; right: 0; top: 79px; }
.zk-verses { position: absolute; left: 0; right: 0; top: 150px; bottom: 120px; overflow: hidden; z-index: 6;
  /* The passed ayah's last line sits in a long soft fade under the header, never cut through by a short one. */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, transparent 12px, #000 66px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to bottom, transparent 0, transparent 12px, #000 66px, #000 calc(100% - 36px), transparent); }
.zk-vtrack { position: absolute; left: 16px; right: 16px; top: 0; transition: transform 0.9s cubic-bezier(.3, .7, .2, 1); }
.zk-ayah { position: relative; padding: 22px 18px 24px; margin-bottom: 14px; border-radius: 24px; }
.zk-ayah .band { position: absolute; inset: 0; border-radius: 24px; background: rgba(255, 247, 234, 0.03); border: 1px solid rgba(255, 247, 234, 0.05); border-top-color: rgba(255, 247, 234, 0.18); opacity: 0; transition: opacity 0.6s; }
.zk-ayah.on .band { opacity: 1; }
.zk-ar { position: relative; direction: rtl; display: flex; flex-wrap: wrap; justify-content: center; column-gap: 6px; font: 26px/56px var(--zk-arabic); }
.zk-w { position: relative; display: inline-block; color: rgba(244, 245, 247, 0.26); transition: color 0.35s, text-shadow 0.35s; }
.zk-w.lit { color: var(--zk-ink); }
.zk-w.crest { color: #FFF8EE; text-shadow: 0 0 14px rgba(243, 227, 204, 0.75), 0 0 2px rgba(255, 247, 234, 0.6); }
.zk-tr { position: relative; margin-top: 10px; text-align: center; font-size: 20px; line-height: 31px; }
.zk-t { color: rgba(201, 205, 211, 0.38); transition: color 0.35s; }
.zk-t.lit { color: var(--zk-ink); }
/* The app shows no ayah reference while following (the header says "Ayah N"), so this only keeps the space under an ayah. */
.zk-num { display: block; height: 13px; margin-top: 10px; }
.zk-endbar { position: absolute; left: 50%; bottom: 46px; transform: translateX(-50%); height: 48px; padding: 0 22px; border-radius: 14px;
  border: 1px solid var(--zk-border); background: var(--zk-surface); display: flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 15px; z-index: 9; box-shadow: inset 0 1px 0 rgba(243, 227, 204, 0.22); }
.zk-endbar i { width: 10px; height: 10px; border-radius: 2.5px; background: var(--zk-ink); }
.zk-rlight { left: 0; top: 0; width: 402px; height: 874px; z-index: 2; }

/* ---------------------------------------------------------------- the falling light ---------------------------- */
.zk-light { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: screen; }

/* ---------------------------------------------------------------- the eclipse button --------------------------- */
/* After huly.io's: a moonstone key with a small sun inside it. The sun passes behind the words at one steady speed,
   as the launch's light passes behind the logo, and follows a pointer or a thumb; its heat bleeds past the edge. */
.zk-ctawrap { position: relative; display: inline-flex; isolation: isolate; }
.zk-ctawrap .bleed { position: absolute; z-index: -1; top: 50%; left: 0; width: 150px; height: 90px; margin: -45px 0 0 -75px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 196, 120, 0.55), rgba(240, 138, 62, 0.18) 55%, rgba(240, 138, 62, 0)); filter: blur(10px);
  pointer-events: none; will-change: transform; }
.zk-cta {
  --h: 54px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 34px 0 30px; border-radius: 14px; overflow: hidden; isolation: isolate;
  color: #3B1D0A; background: #CECBC6; border: 1px solid rgba(255, 255, 255, 0.62);
  font: 600 16px/1 var(--zk-sans); letter-spacing: -0.15px; text-decoration: none; white-space: nowrap;
  -webkit-tap-highlight-color: transparent; cursor: pointer; transition: transform 0.25s cubic-bezier(.3, .7, .2, 1);
}
.zk-cta:active { transform: scale(0.975); }
.zk-cta .orb { position: absolute; z-index: -1; top: 50%; left: 0; width: 204px; height: 121px; margin: -60.5px 0 0 -102px; pointer-events: none; will-change: transform; }
.zk-cta .orb::before { content: ""; position: absolute; left: 41.5px; top: 0; width: 121px; height: 121px; border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, #FFFFF5 3.5%, #FFB97E 26.5%, #FFDBA0 37.5%, rgba(255, 176, 110, 0.5) 49%, rgba(214, 120, 58, 0) 92.5%); }
.zk-cta .orb::after { content: ""; position: absolute; left: 0; top: 9px; width: 204px; height: 103px; border-radius: 50%; filter: blur(5px);
  background: radial-gradient(43.3% 44.23% at 50% 49.51%, #FFFFF7 29%, #FFFACD 48.5%, #F4D6BF 60.71%, rgba(214, 211, 210, 0) 100%); }
.zk-cta .lbl, .zk-cta svg { position: relative; z-index: 1; }
.zk-cta svg { width: 16px; height: 16px; }
.zk-cta.dark { color: var(--zk-ink); background: #101114; border-color: rgba(255, 255, 255, 0.16); box-shadow: inset 0 1px 0 rgba(243, 227, 204, 0.22); }
.zk-cta.dark .orb { opacity: 0.5; mix-blend-mode: screen; }

/* Store marks (the final site uses Apple's and Google's official badges) */
.zk-stores { display: flex; gap: 10px; flex-wrap: wrap; }
.zk-store { display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 16px 0 13px; border-radius: 12px; color: var(--zk-ink);
  border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.03); text-decoration: none; font-family: var(--zk-sans); }
.zk-store svg { width: 22px; height: 22px; flex: none; }
.zk-store small { display: block; font-size: 10px; line-height: 12px; color: var(--zk-muted); letter-spacing: 0.2px; }
.zk-store b { display: block; font-size: 15px; line-height: 18px; font-weight: 600; letter-spacing: -0.2px; }

@media (prefers-reduced-motion: reduce) {
  .zk-star { animation: none; opacity: 0.5; }
}
