/* zikrist.com round 3: the page around the chapters. One screen a step, the scroll landing on each; behind them a
   fixed stage with the sky, the day's hexagon clock, the phone and its caption (r3/page.js). */

:root {
  --night: #030405; --ink: #F4F5F7; --muted: #8E939C; --glow: #F3E3CC; --gut: 16px;
}
@media (min-width: 600px) { :root { --gut: 24px; } }
@media (min-width: 1024px) { :root { --gut: 40px; } }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--night); color-scheme: dark; -webkit-text-size-adjust: 100%; }
/* Lenis smooths the wheel; the browser keeps the scroll (lenis.css) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body { margin: 0; background: var(--night); color: var(--ink); font-family: var(--zk-text); -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale; overflow-x: clip; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---- the page's length: a track for each chapter, sized by page.js; nothing snaps ------------------------------- */
/* Under the stage: the steps hold only the scroll's length and the screen reader's headings, and drawn over the stage
   a phone's browser would keep a screen-sized picture of them. */
.r3-steps { margin: 0; }
.r3-step { height: 100vh; }   /* page.js sizes each chapter's track */
/* the last is as tall as the screen with its bars hidden, so the scroll can always land on it */
.r3-step:last-child { height: 100vh; height: 100lvh; }
/* Paged (phones and tablets, page.js): the page holds still and a swipe goes a chapter. Nothing scrolls, so the
   browser's bars stay and the stage fills the screen they leave; a finger's pan is the page's own, and a pinch still
   zooms. The steps keep only their headings, for screen readers. */
.r3-paged, .r3-paged body { height: 100%; overflow: hidden; overscroll-behavior: none; }
.r3-paged body { touch-action: pinch-zoom; }
.r3-paged .r3-steps { height: 0; overflow: hidden; }
.r3-paged .r3-stage { height: 100vh; height: 100svh; }

/* ---- the stage ---------------------------------------------------------------------------------------------- */
.r3-stage { position: fixed; left: 0; top: 0; width: 100%; height: 100vh; height: 100lvh; overflow: hidden; z-index: 0;
  background: var(--night); }
.r3-stage > * { position: absolute; }
.r3-sky, .r3-sky-l { pointer-events: none; }
.r3-sky { inset: 0; background: radial-gradient(120% 80% at 50% 0%, #0A0E16 0%, #05070B 55%, #030405 100%); }
/* The soft lights of the stage (the sky's hours, the whole day's glow, the light's own glows) are each a small layer
   of their own scaled up to their size: a soft gradient loses nothing, the browser fades or moves it without
   repainting the screen, and it holds a sixteenth of the memory. page.js hides each one while it is out. */
.r3-sky-l { left: 0; top: 0; width: 25%; height: 25%; transform: scale(4); transform-origin: 0 0; opacity: 0; visibility: hidden;
  will-change: opacity; }
.r3-sky-dawn { background: radial-gradient(70% 55% at 12% 88%, rgba(196, 128, 74, 0.32), rgba(120, 70, 50, 0.10) 50%, rgba(0, 0, 0, 0) 75%),
  linear-gradient(180deg, rgba(14, 18, 30, 0) 30%, rgba(40, 28, 26, 0.45)); }
.r3-sky-day { background: radial-gradient(110% 80% at 50% 0%, #1C2A40 0%, #121B2B 45%, #0A0F18 100%); }
.r3-sky-dusk { background: radial-gradient(75% 60% at 88% 86%, rgba(214, 116, 70, 0.30), rgba(120, 52, 60, 0.12) 50%, rgba(0, 0, 0, 0) 78%),
  linear-gradient(180deg, rgba(10, 12, 22, 0) 35%, rgba(46, 22, 30, 0.5)); }
.r3-sky-deep { background: #010203; }
.r3-stars { inset: 0; pointer-events: none; }
.r3-stars i { position: absolute; border-radius: 50%; background: #FFF7EA; box-shadow: 0 0 5px rgba(255, 247, 234, 0.7);
  animation: r3-twinkle var(--leg) ease-in-out var(--delay) infinite alternate; opacity: 0.2; }
@keyframes r3-twinkle { to { opacity: var(--peak); } }

/* the day's clock: the logo's hexagon, clean; the light rides it with the time, hour ticks only near the light */
.r3-hex { left: 0; top: 0; overflow: visible; pointer-events: none; will-change: transform; }
.r3-hex path, .r3-hex line { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.r3-hex .ring { stroke: rgba(244, 245, 247, 0.12); }
.r3-hex .trail { stroke: rgba(243, 227, 204, calc(0.20 + 0.45 * var(--whole, 0))); }
.r3-hex .tick { stroke: #F3E3CC; }
/* The hexagon's halo and its beam near the light: each a still picture of the hexagon (its mask; the halo's blurred)
   lit by a spot riding with the light, so the light moves without the hexagon being drawn and blurred again every
   frame. page.js draws the masks and places the spots. */
.r3-glint { left: 0; top: 0; transform-origin: 0 0; pointer-events: none;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.r3-glint.halo { opacity: 0.8; }
.r3-glint i { position: absolute; left: 0; top: 0; border-radius: 50%; will-change: transform;
  background: radial-gradient(closest-side, #F9F1E6, #F3E3CC 6.67%, rgba(243, 227, 204, 0.4) 31.1%, rgba(243, 227, 204, 0)); }
.r3-light { left: 0; top: 0; width: 0; height: 0; pointer-events: none; }
.r3-light::before { content: ""; position: absolute; left: -37.5px; top: -37.5px; width: 75px; height: 75px; border-radius: 50%;
  transform: scale(4); will-change: transform;
  background: radial-gradient(closest-side, rgba(255, 244, 226, 0.30), rgba(243, 227, 204, 0.08) 55%, rgba(243, 227, 204, 0)); }
.r3-light::after { content: ""; position: absolute; left: -3.5px; top: -3.5px; width: 7px; height: 7px; border-radius: 50%;
  background: #FFFBF4; box-shadow: 0 0 10px 3px rgba(255, 241, 218, 0.85), 0 0 26px 8px rgba(243, 227, 204, 0.35); }
.r3-light i { position: absolute; left: -80px; top: -80px; width: 160px; height: 160px; border-radius: 50%; transform: scale(4);
  background: radial-gradient(closest-side, rgba(243, 227, 204, 0.10), rgba(243, 227, 204, 0)); animation: r3-breathe 5.5s ease-in-out infinite alternate; }
@keyframes r3-breathe { from { transform: scale(3.52); opacity: 0.7; } to { transform: scale(4.32); opacity: 1; } }
.r3-whole { left: 0; top: 0; width: 25%; height: 25%; transform: scale(4); transform-origin: 0 0; pointer-events: none;
  opacity: 0; visibility: hidden; will-change: opacity;
  background: radial-gradient(42% 46% at var(--wx, 50%) var(--wy, 50%), rgba(243, 227, 204, 0.10), rgba(243, 227, 204, 0) 70%); }

.r3-phone, .r3-phone.zk-device { position: absolute; left: 0; top: 0; z-index: 5; transform-origin: 50% 50%; will-change: transform; }
/* the travel camera's lens round the phone: page.js fades it out under the caption (the header on wide screens) */
.r3-lens { inset: 0; z-index: 5; pointer-events: none; }
.r3-lens.on { -webkit-mask-image: var(--lens); mask-image: var(--lens); }
.r3-veil { left: 0; right: 0; bottom: 0; z-index: 6; pointer-events: none; opacity: 0;
  background: linear-gradient(to bottom, rgba(3, 4, 5, 0), var(--night) 32px); }

/* ---- the caption: two beats, the second dimmed; they sharpen from a blur (Nur's glass) ---------- */
.r3-caps { left: 0; top: 0; z-index: 8; pointer-events: none; }
.r3-cap { position: absolute; left: 0; top: 0; width: 100%; }
.r3-cap h2 { margin: 0; font-family: var(--zk-display); font-weight: 600; letter-spacing: -0.03em; line-height: 1.06;
  font-size: 30px; color: var(--ink); }
.r3-cap h2 span { display: block; text-wrap: balance; }
.r3-cap h2 .b { color: rgba(244, 245, 247, 0.40); }
.r3-cap.c { text-align: center; }
@media (min-width: 600px) { .r3-cap h2 { font-size: 40px; } }
.r3-wide .r3-cap h2 { font-size: clamp(36px, 3.2vw, 54px); line-height: 1.02; }
/* ---- the header: the app's icon as its eclipse, and More ------------------------------------------------------- */
.r3-top { position: fixed; z-index: 70; left: 0; right: 0; top: 0; height: calc(64px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) var(--gut) 0; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.r3-top > * { pointer-events: auto; }
.r3-brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); -webkit-tap-highlight-color: transparent; }
/* lifted so the letters' body (not the box, which holds the k's and t's tops and the dot) centres on the hexagon */
.r3-brand .zk-wm { display: block; width: 68.36px; height: 22px; translate: 0 -3.4px; }
.r3-mark { width: 32px; height: 32px; display: block; overflow: visible; }
.r3-more { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; cursor: pointer; padding: 0;
  color: var(--ink); background: rgba(21, 23, 27, 0.5); border: 1px solid rgba(255, 255, 255, 0.11); border-top-color: rgba(243, 227, 204, 0.26);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: transform .25s cubic-bezier(.3, .7, .2, 1), background .2s;
  -webkit-tap-highlight-color: transparent; }
.r3-more:hover { background: rgba(29, 32, 37, 0.72); }
.r3-more:active { transform: scale(0.96); }
.r3-more svg { width: 22px; height: 22px; }
.r3-more .x { display: none; }
.r3-more[aria-expanded="true"] .comb { display: none; }
.r3-more[aria-expanded="true"] .x { display: block; }
:focus-visible { outline: 2px solid rgba(243, 227, 204, 0.8); outline-offset: 3px; }

/* ---- the opening and the close: the line, Get Zikrist and the one promise at a time ---------------------------- */
.r3-front { position: fixed; z-index: 20; left: 0; right: 0; top: 0; display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: calc(64px + env(safe-area-inset-top) + 3.2vh) var(--gut) 0; pointer-events: none; }
.r3-front > * { pointer-events: auto; }
.r3-front[inert] > * { pointer-events: none; }
.r3-h1 { margin: 0; font-family: var(--zk-display); font-weight: 600; letter-spacing: -0.035em; line-height: 1.02;
  font-size: clamp(34px, 9.4vw, 44px); text-wrap: balance; max-width: 15ch; }
.r3-h1 span { display: block; }
.r3-h1 .a { background: linear-gradient(to bottom right, #FFFFFF 30%, #EFE1CC 78%, #FFF7EA); -webkit-background-clip: text;
  background-clip: text; color: transparent; }
.r3-h1 .b { color: rgba(244, 245, 247, 0.40); }
@media (min-width: 600px) { .r3-h1 { font-size: clamp(50px, 7.2vw, 64px); max-width: 16ch; } }
@media (min-width: 1024px) { .r3-h1 { font-size: clamp(58px, 5vw, 78px); line-height: 0.98; max-width: 18ch; } }
.r3-front.r3-end { bottom: 0; justify-content: center; padding-top: 0; }
.r3-act { margin-top: 26px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.r3-act .zk-cta { --h: 54px; font-family: var(--zk-text); }

.r3-ticker { display: grid; place-items: center; height: 22px; min-width: 280px; font: 500 15px/22px var(--zk-text);
  color: rgba(244, 245, 247, 0.62); letter-spacing: -0.005em; }
.r3-ticker > span { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; opacity: 0; }
.r3-ticker > span::before { content: ""; width: 6px; height: 6px; border-radius: 1.5px; background: var(--glow); transform: rotate(45deg);
  box-shadow: 0 0 8px rgba(243, 227, 204, 0.85); }
.r3-ticker > span.on { opacity: 1; }

/* the room between the promises and the hexagon's top point */
.r3-cue { margin-top: 18px; width: 1px; height: 40px; }

/* ---- the one floating button: Get Zikrist through the day, Back to top at the close ------------------------------- */
.r3-pill { position: fixed; z-index: 30; left: 0; right: 0; margin: 0 auto; width: max-content; bottom: max(18px, calc(env(safe-area-inset-bottom) + 10px)); height: 50px;
  display: inline-flex; align-items: center; gap: 10px; padding: 0 20px 0 11px; border-radius: 14px; text-decoration: none; cursor: pointer;
  color: var(--ink); background: rgba(16, 17, 20, 0.72); border: 1px solid rgba(255, 255, 255, 0.12); border-top-color: rgba(243, 227, 204, 0.30);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 20px 50px -18px rgba(0, 0, 0, 0.8); font: 600 15px/1 var(--zk-text); letter-spacing: -0.1px;
  opacity: 0; visibility: hidden; -webkit-tap-highlight-color: transparent; }
.r3-pill .r3-mark { width: 28px; height: 28px; }
.r3-pill .up { width: 28px; height: 28px; display: none; place-items: center; }
.r3-pill .up svg { width: 18px; height: 18px; }
.r3-pill.top .r3-mark { display: none; }
.r3-pill.top .up { display: grid; }
.r3-pill:active { scale: 0.97; }

/* ---- More: the site's pages, the credits ------------------------------------------------------------------------ */
.r3-menu { position: fixed; inset: 0; z-index: 60; }
.r3-menu[hidden] { display: none; }
.r3-menu .scrim { position: absolute; inset: 0; background: rgba(1, 2, 3, 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.r3-menu .card { position: absolute; left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); border-radius: 28px; padding: 20px 8px 14px;
  background: rgba(19, 21, 25, 0.92); border: 1px solid rgba(255, 255, 255, 0.10); border-top-color: rgba(243, 227, 204, 0.28);
  -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4);
  box-shadow: 0 30px 90px -20px rgba(0, 0, 0, 0.9); transform-origin: 50% 100%; }
@media (min-width: 720px) {
  .r3-menu .scrim { background: rgba(1, 2, 3, 0.35); }
  .r3-menu .card { left: auto; right: var(--gut); bottom: auto; top: calc(64px + env(safe-area-inset-top) + 6px); width: 340px; border-radius: 24px;
    transform-origin: calc(100% - 22px) 0; }
}
.r3-menu .head { display: flex; align-items: center; gap: 14px; padding: 2px 14px 16px; }
.r3-menu .head .r3-mark { width: 40px; height: 40px; flex: none; }
.r3-menu .head b { display: block; font: 600 17px/1.25 var(--zk-display); letter-spacing: -0.01em; }
.r3-menu .head span { display: block; font: 400 13px/1.35 var(--zk-text); color: var(--muted); margin-top: 2px; }
.r3-menu nav { display: flex; flex-direction: column; border-top: 1px solid rgba(255, 255, 255, 0.07); margin: 0 6px; }
.r3-menu nav a { display: flex; align-items: center; justify-content: space-between; height: 52px; padding: 0 8px; text-decoration: none;
  font: 500 16px/1 var(--zk-text); border-bottom: 1px solid rgba(255, 255, 255, 0.07); transition: background .2s; }
.r3-menu nav a:last-child { border-bottom: 0; }
.r3-menu nav a:hover { background: rgba(255, 255, 255, 0.04); }
.r3-menu nav a svg { width: 16px; height: 16px; color: var(--muted); }
.r3-menu .foot { margin: 12px 14px 4px; font: 400 12px/1.6 var(--zk-text); color: #5E636C; }
.r3-menu .foot a { color: #8E939C; text-decoration: none; }
.r3-menu .foot a:hover { color: var(--ink); }

/* ---- Reduce Motion: things arrive by fading, nothing travels ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .r3-stars i, .r3-light i { animation: none; }
}

/* the app's button with no store link: lit but not a link */
.zk-cta[aria-disabled="true"] { cursor: default; }
.r3-wide .r3-pill { right: auto; margin: 0; bottom: 32px; }
/* a caption that changes as its chapter's story goes on: its lines stacked, the one the story is at shown */
.r3-lines { display: grid; }
.r3-lines > h2 { grid-area: 1 / 1; transition: opacity 0.45s ease, filter 0.45s ease, translate 0.45s ease; }
.r3-lines > h2.off { opacity: 0; filter: blur(4px); translate: 0 8px; }
@media (prefers-reduced-motion: reduce) { .r3-lines > h2 { transition: none; } }
/* at the close on wide screens, Back to top sits under the hexagon's middle, not beside the caption */
.r3-wide .r3-pill.top { left: 0 !important; right: 0; margin: 0 auto; }
.r3-sharp .r3-phone, .r3-sharp .r3-fxw { will-change: auto; }
