@import url("fonts.css");

/* ---------- Tokens ---------- */
:root {
  --paper: #fbf6ea;
  --paper-2: #f4ead3;
  --paper-3: #efe3c8;
  --card: #fffdf7;
  --ink: #1b2826;
  --ink-soft: #55625e;
  --ink-faint: #8a918a;
  --teal: #0f766e;
  --teal-deep: #0a5650;
  --teal-wash: rgba(15, 118, 110, 0.08);
  --gold: #c9a24a;
  --gold-soft: #e9d8aa;
  --line: rgba(27, 40, 38, 0.11);
  --line-strong: rgba(27, 40, 38, 0.2);
  --bezel: #141b1a;
  --shadow-phone:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 2px 4px rgba(40, 32, 12, 0.06),
    0 18px 40px -12px rgba(40, 32, 12, 0.28),
    0 60px 90px -40px rgba(15, 60, 55, 0.35);
  --shadow-card: 0 1px 2px rgba(40, 32, 12, 0.05), 0 12px 32px -18px rgba(40, 32, 12, 0.25);
  --pattern-opacity: 0.55;

  --font-display: "Amiri", "Noto Naskh Arabic", serif;
  --font-body: "IBM Plex Sans Arabic", system-ui, sans-serif;
  --radius: 22px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

:root[lang="en"] {
  --font-display: "Fraunces", Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d1716;
    --paper-2: #122120;
    --paper-3: #172927;
    --card: #142422;
    --ink: #f2ecdc;
    --ink-soft: #b8bcb0;
    --ink-faint: #848c85;
    --teal: #43b5a8;
    --teal-deep: #6ccabe;
    --teal-wash: rgba(67, 181, 168, 0.1);
    --gold: #d8b660;
    --gold-soft: #5d4d24;
    --line: rgba(242, 236, 220, 0.1);
    --line-strong: rgba(242, 236, 220, 0.2);
    --bezel: #050909;
    --shadow-phone: 0 18px 40px -12px rgba(0, 0, 0, 0.6), 0 60px 90px -40px rgba(0, 0, 0, 0.7);
    --shadow-card: 0 12px 32px -18px rgba(0, 0, 0, 0.6);
    --pattern-opacity: 0.35;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #0d1716;
  --paper-2: #122120;
  --paper-3: #172927;
  --card: #142422;
  --ink: #f2ecdc;
  --ink-soft: #b8bcb0;
  --ink-faint: #848c85;
  --teal: #43b5a8;
  --teal-deep: #6ccabe;
  --teal-wash: rgba(67, 181, 168, 0.1);
  --gold: #d8b660;
  --gold-soft: #5d4d24;
  --line: rgba(242, 236, 220, 0.1);
  --line-strong: rgba(242, 236, 220, 0.2);
  --bezel: #050909;
  --shadow-phone: 0 18px 40px -12px rgba(0, 0, 0, 0.6), 0 60px 90px -40px rgba(0, 0, 0, 0.7);
  --shadow-card: 0 12px 32px -18px rgba(0, 0, 0, 0.6);
  --pattern-opacity: 0.35;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

:root[lang="en"] body {
  line-height: 1.6;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  inset-inline-start: 12px;
  top: -60px;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 10px;
  z-index: 100;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

/* ---------- Type ---------- */
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0;
  letter-spacing: 0;
}

:root[lang="en"] h1,
:root[lang="en"] h2,
:root[lang="en"] h3 {
  font-weight: 500;
  letter-spacing: -0.02em;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 18px;
}

:root[lang="en"] .kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12.5px;
}

.kicker::before {
  content: "";
  width: 11px;
  height: 11px;
  background: currentColor;
  -webkit-mask: url("logo-mask.svg") center / contain no-repeat;
  mask: url("logo-mask.svg") center / contain no-repeat;
}

.section-title {
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  line-height: 1.3;
  max-width: 22ch;
}

:root[lang="en"] .section-title {
  line-height: 1.08;
  max-width: 16ch;
}

.section-sub {
  margin: 20px 0 0;
  font-size: clamp(1.02rem, 1.4vw, 1.14rem);
  color: var(--ink-soft);
  max-width: 54ch;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.site-header.scrolled {
  border-bottom-color: var(--line);
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  white-space: nowrap;
}

:root[lang="en"] .brand {
  font-weight: 500;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.brand img {
  width: 34px;
  height: 34px;
}

.nav-links {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  margin-inline-start: auto;
}

.nav-links a {
  display: block;
  padding: 6px 12px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 15px;
  color: var(--ink-soft);
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
  color: var(--ink);
  background: var(--teal-wash);
}

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

.lang-switch {
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  transition: border-color 0.2s, background 0.2s;
}

.lang-switch:hover {
  border-color: var(--teal);
  background: var(--teal-wash);
}

.lang-switch [lang="ar"] {
  font-family: "IBM Plex Sans Arabic", sans-serif;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.theme-toggle:hover {
  border-color: var(--teal);
  background: var(--teal-wash);
}

.theme-toggle svg {
  width: 17px;
  height: 17px;
}

.theme-toggle .moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun {
    display: none;
  }
  :root:not([data-theme="light"]) .theme-toggle .moon {
    display: block;
  }
}

:root[data-theme="dark"] .theme-toggle .sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .moon {
  display: block;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  font: 500 16px/1 var(--font-body);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.btn:active {
  transform: translateY(1px);
}

.btn-store {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 10px 24px -12px rgba(15, 40, 36, 0.6);
  padding-inline: 20px 26px;
}

.btn-store:hover {
  transform: translateY(-1px);
}

.btn-store svg {
  width: 24px;
  height: 24px;
  flex: none;
}

.btn-store .stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: start;
}

.btn-store small {
  font-size: 11.5px;
  opacity: 0.72;
  font-weight: 400;
}

.btn-store b {
  font-size: 17px;
  font-weight: 600;
}

.btn-ghost {
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  border-color: var(--teal);
  background: var(--teal-wash);
}

.btn-ghost .arrow {
  transition: transform 0.25s ease;
}

.btn-ghost:hover .arrow {
  transform: translateY(3px);
}

.btn-sm {
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

/* ---------- Phone frame ---------- */
.phone {
  position: relative;
  width: var(--w, 280px);
  aspect-ratio: 9 / 19.4;
  padding: calc(var(--w, 280px) * 0.032);
  background: var(--bezel);
  border-radius: calc(var(--w, 280px) * 0.15);
  box-shadow: var(--shadow-phone);
  flex: none;
}

.phone::before {
  /* hairline sheen on the bezel */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09);
  pointer-events: none;
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: calc(var(--w, 280px) * 0.12);
  background: #f6f3ec;
}

.phone::after {
  /* camera */
  content: "";
  position: absolute;
  top: calc(var(--w, 280px) * 0.06);
  left: 50%;
  width: calc(var(--w, 280px) * 0.036);
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #0b0f0f;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  padding-block: clamp(36px, 7vw, 88px) clamp(60px, 9vw, 120px);
  overflow: hidden;
}

.hero::before {
  /* lattice of eight-point stars, fading out from the stage */
  content: "";
  position: absolute;
  inset: -10% -10% 0;
  z-index: -2;
  background-image: url("pattern.svg");
  background-size: 92px 92px;
  opacity: var(--pattern-opacity);
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at var(--glow-x, 28%) 46%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse 60% 70% at var(--glow-x, 28%) 46%, #000 0%, transparent 72%);
}

:root[lang="en"] .hero {
  --glow-x: 72%;
}

.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 720px;
  height: 720px;
  inset-inline-end: -160px;
  top: 0;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--gold) 26%, transparent) 0%, transparent 62%);
  filter: blur(10px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(24px, 3vw, 48px);
  align-items: center;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 14px;
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--card) 70%, transparent);
  margin-bottom: 34px;
}

:root[dir="rtl"] .eyebrow {
  padding: 6px 6px 6px 14px;
}

.eyebrow .dot {
  display: inline-grid;
  place-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.hero h1 {
  font-size: clamp(2.6rem, 5.4vw, 4.7rem);
  line-height: 1.32;
}

:root[lang="en"] .hero h1 {
  line-height: 1.02;
  font-size: clamp(2.5rem, 5.4vw, 4.4rem);
}

.hero h1 .accent {
  color: var(--teal);
  position: relative;
  white-space: nowrap;
}

:root[lang="en"] .hero h1 .accent {
  font-style: italic;
  font-weight: 400;
}

.hero h1 .accent::after {
  content: "";
  position: absolute;
  inset-inline: 2%;
  bottom: 0.2em;
  height: 0.07em;
  border-radius: 99px;
  background: var(--gold);
  opacity: 0.75;
  transform-origin: right;
  animation: underline 1.1s 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

:root[lang="en"] .hero h1 .accent::after {
  bottom: -0.04em;
  transform-origin: left;
}

@keyframes underline {
  from {
    transform: scaleX(0);
  }
}

.hero-sub {
  margin: 26px 0 0;
  font-size: clamp(1.06rem, 1.5vw, 1.24rem);
  color: var(--ink-soft);
  max-width: 46ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14.5px;
  color: var(--ink-soft);
}

.hero-facts li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-facts svg {
  width: 17px;
  height: 17px;
  color: var(--teal);
  flex: none;
}

/* stage: three phones staged in depth */
.stage {
  position: relative;
  height: clamp(520px, 52vw, 640px);
  perspective: 1800px;
  perspective-origin: 50% 40%;
}

.stage .phone {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-style: preserve-3d;
  will-change: transform;
}

.stage .p-main {
  --w: clamp(230px, 22vw, 284px);
  z-index: 3;
  transform: translate(-50%, -50%) rotateY(-14deg) rotateX(4deg) rotateZ(1.5deg);
  animation: float-main 9s ease-in-out infinite;
}

.stage .p-back {
  --w: clamp(190px, 18vw, 236px);
  z-index: 1;
  transform: translate(-112%, -58%) rotateY(-24deg) rotateX(5deg) rotateZ(-4deg) translateZ(-140px);
  filter: saturate(0.92);
  animation: float-back 11s ease-in-out infinite;
}

.stage .p-side {
  --w: clamp(190px, 18vw, 236px);
  z-index: 2;
  transform: translate(8%, -38%) rotateY(-8deg) rotateX(3deg) rotateZ(5deg) translateZ(-90px);
  animation: float-side 10s ease-in-out infinite;
}

@keyframes float-main {
  50% {
    transform: translate(-50%, -52.5%) rotateY(-11deg) rotateX(4deg) rotateZ(1deg);
  }
}

@keyframes float-back {
  50% {
    transform: translate(-112%, -56%) rotateY(-22deg) rotateX(5deg) rotateZ(-3.4deg) translateZ(-140px);
  }
}

@keyframes float-side {
  50% {
    transform: translate(8%, -40.5%) rotateY(-10deg) rotateX(3deg) rotateZ(4.4deg) translateZ(-90px);
  }
}

.stage .chip {
  position: absolute;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.stage .chip .ico {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--teal-wash);
  color: var(--teal);
}

.stage .chip svg {
  width: 17px;
  height: 17px;
}

.stage .chip small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-faint);
  line-height: 1.3;
}

.stage .chip b {
  display: block;
  font-weight: 600;
  line-height: 1.3;
}

.chip-a {
  top: 12%;
  inset-inline-start: 2%;
  animation: bob 7s ease-in-out infinite;
}

.chip-b {
  bottom: 9%;
  inset-inline-end: 0;
  animation: bob 8s 1s ease-in-out infinite;
}

@keyframes bob {
  50% {
    transform: translateY(-8px);
  }
}

/* ---------- Sections ---------- */
section {
  scroll-margin-top: 80px;
}

.band {
  padding-block: clamp(72px, 10vw, 140px);
}

.band-tint {
  background: linear-gradient(180deg, var(--paper-2), var(--paper));
  border-top: 1px solid var(--line);
}

.head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 48px;
  flex-wrap: wrap;
  margin-bottom: clamp(40px, 6vw, 72px);
}

/* ---------- Moments: an ordinary day ---------- */
.day {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2.2vw, 28px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.day::before {
  /* the line of the day */
  content: "";
  position: absolute;
  top: 17px;
  inset-inline: 8px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong) 8%, var(--line-strong) 92%, transparent);
}

.moment {
  position: relative;
  display: flex;
  flex-direction: column;
}

.moment .time {
  position: relative;
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px 0 10px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

:root[dir="rtl"] .moment .time {
  padding: 0 10px 0 14px;
}

.moment .time svg {
  width: 15px;
  height: 15px;
  color: var(--gold);
}

.moment .shot {
  margin-top: 26px;
  border-radius: var(--radius);
  background: var(--paper-3);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: end center;
  position: relative;
  border: 1px solid var(--line);
}

.moment .shot .phone {
  --w: 78%;
  width: 78%;
  margin-bottom: -38%;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  border-radius: 34px;
  padding: 7px;
}

.moment .shot .phone img {
  border-radius: 28px;
}

.moment .shot .phone::after {
  top: 15px;
  width: 8px;
}

.moment:hover .shot .phone {
  transform: translateY(-14px);
}

.moment h3 {
  margin-top: 22px;
  font-size: 1.55rem;
  line-height: 1.3;
}

:root[lang="en"] .moment h3 {
  font-size: 1.4rem;
}

.moment p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 15.5px;
}

/* notification mock inside the fourth moment */
.shot-notify {
  place-items: center !important;
  background:
    radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--teal) 22%, transparent), transparent 60%),
    var(--paper-3) !important;
}

.notif {
  width: 86%;
  background: #fffdf8;
  color: #1b2826;
  border-radius: 22px;
  padding: 14px 16px 12px;
  box-shadow: 0 20px 40px -18px rgba(10, 40, 36, 0.45);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.moment:hover .notif {
  transform: translateY(-8px);
}

.notif + .notif {
  margin-top: -64%;
}

.notif-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #6b736f;
}

.notif-head img {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: #fbf6ea;
}

.notif-head b {
  color: #1b2826;
  font-weight: 600;
}

.notif .ayah-img {
  margin: 12px auto 4px;
  width: 92%;
  aspect-ratio: 807 / 450;
  background: #1b2826;
  -webkit-mask: url("screens/ayah-18-66.webp") center / contain no-repeat;
  mask: url("screens/ayah-18-66.webp") center / contain no-repeat;
}

.notif-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(27, 40, 38, 0.08);
  font-size: 12.5px;
  font-weight: 600;
  color: #0f766e;
}

.notif-actions span {
  flex: 1;
  text-align: center;
}

/* ---------- Feature split (meaning, listening) ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(40px, 7vw, 110px);
  align-items: center;
}

.split.flip .split-media {
  order: -1;
}

.points {
  display: grid;
  gap: 0;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.points li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 4px 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.points .ico {
  grid-row: span 2;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--teal-wash);
  color: var(--teal);
}

.points svg {
  width: 20px;
  height: 20px;
}

.points b {
  font-weight: 600;
  font-size: 16.5px;
}

.points span {
  color: var(--ink-soft);
  font-size: 15.5px;
}

.split-media {
  position: relative;
  min-height: 600px;
  display: grid;
  place-items: center;
}

.split-media .disc {
  position: absolute;
  inset: 6% 4%;
  border-radius: 40px;
  background:
    radial-gradient(90% 70% at 50% 100%, color-mix(in srgb, var(--teal) 16%, transparent), transparent 70%),
    var(--paper-2);
  border: 1px solid var(--line);
  overflow: hidden;
}

.split-media .disc::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("pattern.svg");
  background-size: 74px 74px;
  opacity: calc(var(--pattern-opacity) * 0.8);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 75%);
  mask-image: linear-gradient(180deg, #000, transparent 75%);
}

.duo {
  position: relative;
  width: 100%;
  height: 100%;
  /* the 3D space belongs to the phones only, so tags and controls stay on top */
  perspective: 1600px;
}

.duo .phone {
  position: absolute;
  top: 50%;
  left: 50%;
}

.duo .d1 {
  --w: clamp(200px, 19vw, 246px);
  transform: translate(-96%, -50%) rotateY(16deg) rotateZ(-3deg) translateZ(-60px);
}

.duo .d2 {
  --w: clamp(220px, 21vw, 268px);
  transform: translate(-12%, -48%) rotateY(-12deg) rotateZ(2.5deg);
}

.split.flip .duo .d1 {
  transform: translate(-4%, -50%) rotateY(-16deg) rotateZ(3deg) translateZ(-60px);
}

.split.flip .duo .d2 {
  transform: translate(-88%, -48%) rotateY(12deg) rotateZ(-2.5deg);
}

/* tap ripple between reader and tafsir */
.tap {
  position: absolute;
  z-index: 4;
  top: 30%;
  left: 27%;
  width: 54px;
  height: 54px;
  pointer-events: none;
}

.tap::before,
.tap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--gold);
  animation: ripple 2.6s ease-out infinite;
}

.tap::after {
  animation-delay: 0.6s;
}

.tap i {
  position: absolute;
  inset: 17px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--gold) 30%, transparent);
}

@keyframes ripple {
  from {
    transform: scale(0.4);
    opacity: 1;
  }
  to {
    transform: scale(1.7);
    opacity: 0;
  }
}

.tag {
  position: absolute;
  z-index: 5;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-card);
  white-space: nowrap;
}

.tag-1 {
  bottom: 12%;
  left: 8%;
}

.tag-2 {
  top: 11%;
  right: 6%;
  background: var(--teal);
  color: #fff;
}

/* ---------- Bento ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: minmax(0, auto);
  gap: 18px;
}

.tile {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: var(--card);
  border: 1px solid var(--line);
  padding: clamp(24px, 3vw, 36px);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.tile h3 {
  font-size: 1.6rem;
  line-height: 1.3;
}

:root[lang="en"] .tile h3 {
  font-size: 1.45rem;
}

.tile p {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 15.5px;
  max-width: 44ch;
}

.tile .tile-media {
  margin-top: auto;
  padding-top: 28px;
  display: flex;
  justify-content: center;
}

.tile .phone {
  --w: 230px;
  margin-bottom: calc(var(--w) * -1.05);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tile:hover .phone {
  transform: translateY(-10px);
}

.t-recite {
  grid-column: span 3;
  grid-row: span 2;
  background:
    radial-gradient(80% 60% at 50% 110%, color-mix(in srgb, var(--teal) 20%, transparent), transparent 70%),
    var(--card);
}

.t-recite .phone {
  --w: 270px;
  margin-bottom: calc(var(--w) * -0.62);
}

.t-tajweed {
  grid-column: span 3;
}

.t-zen {
  grid-column: span 3;
}

.t-tajweed,
.t-zen {
  flex-direction: row;
  gap: 24px;
  align-items: flex-start;
  min-height: 300px;
}

.t-tajweed .tile-text,
.t-zen .tile-text {
  flex: 1;
}

.t-tajweed .tile-media,
.t-zen .tile-media {
  margin: 0;
  padding: 0;
  align-self: stretch;
  position: relative;
  width: 190px;
  flex: none;
}

.t-tajweed .phone,
.t-zen .phone {
  --w: 190px;
  position: absolute;
  top: 0;
  margin: 0;
}

.t-riwayat {
  grid-column: span 4;
}

.t-voice {
  grid-column: span 2;
  background: var(--teal);
  color: #fff;
  border-color: transparent;
}

.t-voice p {
  color: rgba(255, 255, 255, 0.82);
}

.riwayat {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.riwayat li {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.4;
  background: var(--paper);
}

:root[lang="en"] .riwayat li {
  font-family: var(--font-body);
  font-size: 15px;
}

.riwayat li:first-child {
  border-color: var(--teal);
  color: var(--teal);
}

.wave {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 56px;
  margin-top: auto;
  padding-top: 24px;
}

.wave span {
  flex: 1;
  max-width: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.85);
  height: 30%;
  animation: wave 1.6s ease-in-out infinite;
}

@keyframes wave {
  50% {
    height: 100%;
  }
}

.mic {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.16);
  margin-bottom: 18px;
}

.mic svg {
  width: 24px;
  height: 24px;
}

/* ---------- Progress ---------- */
.progress-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.niyyah-card {
  position: relative;
  border-radius: 32px;
  padding: clamp(26px, 3.4vw, 42px);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

.niyyah-card .label {
  font-size: 13.5px;
  color: var(--ink-faint);
}

.niyyah-card .goal {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  line-height: 1.35;
  margin-top: 6px;
}

:root[lang="en"] .niyyah-card .goal {
  line-height: 1.15;
  font-weight: 500;
}

.niyyah-card .goal em {
  font-style: normal;
  color: var(--teal);
}

.ring-row {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 26px;
}

.ring {
  width: 108px;
  height: 108px;
  flex: none;
}

.ring circle {
  fill: none;
  stroke-width: 9;
}

.ring .track {
  stroke: var(--line);
}

.ring .fill {
  stroke: var(--teal);
  stroke-linecap: round;
  stroke-dasharray: 289;
  stroke-dashoffset: 206;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 1.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}


.ring text {
  font: 600 20px var(--font-body);
  fill: var(--ink);
}

.acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.acts li {
  font-size: 13.5px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink-soft);
}

.acts li.on {
  background: var(--teal-wash);
  color: var(--teal);
  font-weight: 600;
}

.gentle {
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--gold) 14%, transparent);
  font-size: 15px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.gentle svg {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 4px;
  color: var(--gold);
}

/* ---------- Privacy + sources ---------- */
.trust {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 56px;
}

.trust .tile {
  box-shadow: none;
  background: transparent;
}

.trust .ico {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--teal-wash);
  color: var(--teal);
  margin-bottom: 22px;
}

.trust svg {
  width: 22px;
  height: 22px;
}

.trust h3 {
  font-size: 1.35rem;
}

.sources {
  margin-top: 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px 28px;
  align-items: center;
  padding: clamp(24px, 3vw, 36px);
  border-radius: 28px;
  border: 1px dashed var(--line-strong);
}

.sources .seal {
  width: 64px;
  height: 64px;
}

.sources p {
  margin: 0;
  color: var(--ink-soft);
}

.sources b {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- Final CTA ---------- */
.final {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  margin: 0 var(--gutter);
  border-radius: 40px;
  background: #0d1716;
  color: #f2ecdc;
  padding: clamp(64px, 9vw, 120px) var(--gutter);
  text-align: center;
}

.final::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("pattern-light.svg");
  background-size: 92px 92px;
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 40%, #000, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 70% at 50% 40%, #000, transparent 75%);
}

.final::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 30%;
  width: 640px;
  height: 640px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(201, 162, 74, 0.28), transparent 60%);
}

.final .mark {
  width: 120px;
  height: 120px;
  margin: 0 auto 30px;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.5));
  animation: turn 60s linear infinite;
}

@keyframes turn {
  to {
    transform: rotate(360deg);
  }
}

.final h2 {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.2;
}

.final p {
  margin: 18px auto 0;
  max-width: 44ch;
  color: rgba(242, 236, 220, 0.72);
  font-size: 1.12rem;
}

.final .hero-cta {
  justify-content: center;
}

.final .btn-store {
  background: #f2ecdc;
  color: #0d1716;
}

.final .btn-ghost {
  color: #f2ecdc;
  border-color: rgba(242, 236, 220, 0.3);
}

.final .btn-ghost:hover {
  background: rgba(242, 236, 220, 0.08);
  border-color: rgba(242, 236, 220, 0.6);
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 48px 0 40px;
  font-size: 14px;
  color: var(--ink-faint);
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}

.foot .brand {
  color: var(--ink);
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.foot a {
  text-decoration: none;
}

.foot a:hover {
  color: var(--ink);
}

.fine {
  margin: 22px 0 0;
  max-width: 80ch;
  line-height: 1.7;
}

/* ---------- Reveal on scroll ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: var(--d, 0s);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav-links {
    display: none;
  }
  .nav-tools {
    margin-inline-start: auto;
  }
  .day {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 48px;
  }
  .day::before {
    display: none;
  }
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .t-recite,
  .t-tajweed,
  .t-zen,
  .t-riwayat,
  .t-voice {
    grid-column: span 2;
    grid-row: auto;
  }
  .t-recite {
    min-height: 620px;
  }
}

@media (max-width: 900px) {
  .hero-grid,
  .split,
  .progress-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .split.flip .split-media {
    order: 0;
  }
  .stage {
    height: 540px;
    margin-top: 12px;
  }
  .split-media {
    min-height: 540px;
  }
  .trust {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .trust .tile {
    border-radius: 0;
    border-inline: 0;
    border-top: 0;
    padding-inline: 0;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 16px;
  }
  .nav {
    height: 60px;
    gap: 12px;
  }
  .brand {
    font-size: 19px;
  }
  .brand img {
    width: 30px;
    height: 30px;
  }
  .nav-tools .btn-sm {
    display: none;
  }
  .hero-cta .btn {
    flex: 1 1 100%;
    justify-content: center;
  }
  .stage {
    height: 470px;
  }
  .stage .p-main {
    --w: 214px;
  }
  .stage .p-back,
  .stage .p-side {
    --w: 172px;
  }
  .chip-a {
    top: 3%;
    inset-inline-start: -2%;
  }
  .chip-b {
    bottom: 2%;
    inset-inline-end: -2%;
  }
  .day {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    gap: 14px;
    scrollbar-width: none;
  }
  .day::-webkit-scrollbar {
    display: none;
  }
  .moment {
    flex: 0 0 78%;
    scroll-snap-align: center;
  }
  .split-media {
    min-height: 470px;
  }
  .duo .d1 {
    --w: 172px;
  }
  .duo .d2 {
    --w: 194px;
  }
  .tile .phone {
    --w: 200px;
  }
  .t-recite {
    min-height: 560px;
  }
  .t-recite .phone {
    --w: 232px;
  }
  .t-tajweed,
  .t-zen {
    flex-direction: column;
    min-height: 0;
  }
  .t-tajweed .tile-media,
  .t-zen .tile-media {
    width: 100%;
    height: 230px;
    margin-top: 8px;
    display: flex;
    justify-content: center;
  }
  .t-tajweed .phone,
  .t-zen .phone {
    --w: 200px;
    left: 50%;
    transform: translateX(-50%);
    top: 10px;
  }
  .tile:hover .t-tajweed .phone {
    transform: translateX(-50%);
  }
  .sources {
    grid-template-columns: minmax(0, 1fr);
  }
  .final {
    margin: 0 10px;
    border-radius: 30px;
  }
  .tag-1 {
    left: 2%;
  }
  .tag-2 {
    right: 2%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  html {
    scroll-behavior: auto;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* =====================================================================
   Interactions: things the visitor can try with their own hands.
   Every state here is a real screenshot of the app; nothing is redrawn.
   ===================================================================== */

:root[lang="en"] .kicker {
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
}

.nav-links a[aria-current="true"] {
  color: var(--ink);
  background: var(--teal-wash);
}

.btn-try {
  background: var(--teal);
  color: var(--paper);
  font-weight: 600;
  box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--teal) 80%, transparent);
}

.btn-try:hover {
  transform: translateY(-1px);
  background: var(--teal-deep);
}

.btn-try svg {
  width: 20px;
  height: 20px;
}

/* a phone screen made of stacked screenshots */
.screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: calc(var(--w, 280px) * 0.12);
  background: #f6f3ec;
}

.screen .layer {
  position: absolute;
  inset: 0;
  border-radius: 0;
  -webkit-user-drag: none;
  user-select: none;
}

.hot {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: none;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: inherit;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}

.hot:focus-visible {
  outline-offset: -5px;
  border-radius: calc(var(--w, 280px) * 0.12);
}

.ping {
  position: absolute;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  pointer-events: none;
}

.ping::before,
.ping::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--gold);
  animation: ripple 2.4s ease-out infinite;
}

.ping::after {
  animation-delay: 0.7s;
}

/* ---------- Hero: unlock the phone yourself ---------- */
.stage .phone,
.stage .chip {
  transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s ease;
}

button.chip {
  font: inherit;
  color: inherit;
  text-align: start;
  cursor: pointer;
  border-color: color-mix(in srgb, var(--teal) 45%, transparent);
}

button.chip:hover {
  border-color: var(--teal);
}

button.chip .ico {
  background: var(--teal);
  color: var(--paper);
}

#demo .l-home {
  z-index: 1;
}

#demo .l-overlay {
  z-index: 2;
  transition: opacity 0.45s ease 0.18s, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.18s;
}

#demo .l-lock {
  z-index: 3;
  transform: translateY(var(--drag, 0px));
  transition: transform 0.55s cubic-bezier(0.3, 0.7, 0.2, 1);
}

#demo .l-rest {
  z-index: 4;
  transition: opacity 0.5s ease;
}

#demo.dragging .l-lock {
  transition: none;
}

#demo:not([data-state="idle"]) .l-rest {
  opacity: 0;
}

#demo[data-state="lock"] .l-overlay {
  opacity: 0;
  transform: scale(0.95);
}

#demo[data-state="overlay"] .l-lock,
#demo[data-state="home"] .l-lock {
  transform: translateY(-102%);
}

#demo[data-state="home"] .l-overlay {
  opacity: 0;
  transform: translateY(5%);
  transition-delay: 0s;
}

#demo[data-state="idle"] .hot-start,
#demo[data-state="lock"] .hot-unlock,
#demo[data-state="overlay"] .hot-read {
  display: block;
}

#demo .hot-unlock {
  touch-action: none;
}

#demo .hot-read {
  top: 84%;
}

#demo .hot-read .ping {
  top: 50% !important;
}

.swipe {
  position: absolute;
  left: 50%;
  top: 74%;
  width: 22px;
  margin-left: -11px;
  display: grid;
  gap: 2px;
  animation: nudge 1.8s ease-in-out infinite;
}

.swipe i {
  display: block;
  width: 14px;
  height: 14px;
  margin: 0 auto -6px;
  border-top: 2.5px solid rgba(27, 40, 38, 0.75);
  border-left: 2.5px solid rgba(27, 40, 38, 0.75);
  transform: rotate(45deg);
}

.swipe i + i {
  opacity: 0.45;
}

@keyframes nudge {
  50% {
    transform: translateY(-9px);
  }
}

.stage.demo .p-main {
  animation: none;
  transform: translate(-50%, -57%) scale(0.86);
}

.stage.demo .p-back,
.stage.demo .p-side,
.stage.demo .chip {
  opacity: 0;
  pointer-events: none;
}

.demo-bar {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 6;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.5s ease 0.25s, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.25s;
}

.stage.demo .demo-bar {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.demo-caption {
  margin: 0 auto;
  max-width: 40ch;
  min-height: 3.1em;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
}

.demo-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
}

.demo-dots {
  display: inline-flex;
  gap: 5px;
  margin-inline-end: 10px;
}

.demo-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line-strong);
  transition: background 0.3s, width 0.3s;
}

#demo[data-state="lock"] .demo-dots i:nth-child(1),
#demo[data-state="overlay"] .demo-dots i:nth-child(2),
#demo[data-state="home"] .demo-dots i:nth-child(3) {
  width: 20px;
  border-radius: 99px;
  background: var(--teal);
}

.demo-btn {
  font: 500 13.5px var(--font-body);
  color: var(--ink-soft);
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 5px 13px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.demo-btn:hover {
  color: var(--ink);
  border-color: var(--teal);
  background: var(--teal-wash);
}

#demo[data-state="home"] .demo-restart {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--paper);
}

/* ---------- Meaning: touch the ayah, then pick what shows under it ---------- */
.duo .hot {
  display: block;
}

#meaning-demo .duo .phone {
  transition: transform 0.85s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.45s ease;
}

#meaning-demo .tag,
#meaning-demo .seg {
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#meaning-demo .tag-1 {
  left: 50%;
  bottom: 7%;
  transform: translateX(-50%);
}

#meaning-demo[data-open="false"] .d1 {
  transform: translate(-50%, -50%) rotateZ(-2deg);
}

#meaning-demo[data-open="false"] .d2 {
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  pointer-events: none;
}

#meaning-demo[data-open="false"] .tag-2,
#meaning-demo[data-open="false"] .seg,
#meaning-demo:not([data-open="false"]) .tag-1,
#meaning-demo:not([data-open="false"]) .hot-ayah .ping {
  opacity: 0;
  pointer-events: none;
}

.tab-layer {
  opacity: 0;
  transform: translateX(-5%);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-tab="0"] .tab-layer:nth-of-type(1),
[data-tab="1"] .tab-layer:nth-of-type(2),
[data-tab="2"] .tab-layer:nth-of-type(3) {
  opacity: 1;
  transform: none;
}

.seg {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: -18px;
  transform: translateX(-50%);
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  white-space: nowrap;
}

.seg button {
  font: 500 14px var(--font-body);
  color: var(--ink-soft);
  background: none;
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}

.seg button:hover {
  color: var(--ink);
}

.seg button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- Listening: press play ---------- */
#listen-demo .l-playing {
  opacity: 0;
  transition: opacity 0.35s ease;
}

#listen-demo[data-playing="true"] .l-playing {
  opacity: 1;
}

#listen-demo[data-playing="true"] .ping {
  display: none;
}

#listen-demo .tag-2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.eq {
  display: none;
  align-items: center;
  gap: 2px;
  height: 14px;
}

.eq i {
  width: 3px;
  height: 40%;
  border-radius: 2px;
  background: currentColor;
  animation: wave 0.9s ease-in-out infinite;
}

.eq i:nth-child(2) {
  animation-delay: -0.3s;
}

.eq i:nth-child(3) {
  animation-delay: -0.6s;
}

#listen-demo[data-playing="true"] .eq {
  display: inline-flex;
}

.demo-note {
  position: absolute;
  z-index: 6;
  inset-inline: 8%;
  bottom: -14px;
  margin: 0;
  text-align: center;
  font-size: 13.5px;
  color: var(--ink-soft);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

#listen-demo[data-playing="true"] .demo-note {
  opacity: 1;
  transform: none;
}

/* ---------- Niyyah: build one and log your days ---------- */
.ny-controls {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.ny-controls:empty {
  display: none;
}

.pick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.pick legend {
  float: inline-start;
  width: 4.6em;
  padding: 0;
  margin-top: 5px;
  font-size: 13.5px;
  color: var(--ink-faint);
}

.opt {
  position: relative;
  cursor: pointer;
}

.opt input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.opt span {
  display: block;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 14px;
  background: var(--paper-2);
  color: var(--ink-soft);
  transition: background 0.25s, color 0.25s, transform 0.2s;
}

.opt:hover span {
  color: var(--ink);
}

.opt input:checked + span {
  background: var(--teal);
  color: var(--paper);
  font-weight: 500;
}

.opt input:focus-visible + span {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.niyyah-card .goal {
  transition: opacity 0.25s ease;
}

.niyyah-card .goal.swap {
  opacity: 0;
}

.ring .fill {
  transition: stroke-dashoffset 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), stroke 0.4s;
}

.niyyah-card.reached .ring .fill {
  stroke: var(--gold);
}

.ny-log {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.ny-count {
  margin: 0;
  font-size: 15px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.niyyah-card.reached .ny-count {
  color: var(--ink);
  font-weight: 600;
}

.btn-log {
  background: var(--teal-wash);
  color: var(--teal);
  border-color: color-mix(in srgb, var(--teal) 40%, transparent);
  font-weight: 600;
}

.btn-log:hover {
  background: var(--teal);
  color: var(--paper);
}

/* ---------- Page-level transitions ---------- */
@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.3s;
}

html.theme-vt::view-transition-old(root) {
  animation: none;
}

html.theme-vt::view-transition-new(root) {
  animation: vt-reveal 0.65s cubic-bezier(0.3, 0.7, 0.2, 1);
}

@keyframes vt-reveal {
  from {
    clip-path: circle(0 at var(--vt-x, 50%) var(--vt-y, 0%));
  }
  to {
    clip-path: circle(150vmax at var(--vt-x, 50%) var(--vt-y, 0%));
  }
}

@media (max-width: 620px) {
  .stage.demo {
    height: 550px;
  }
  .stage {
    transition: height 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .seg button {
    padding: 8px 12px;
    font-size: 13.5px;
  }
  .demo-note {
    bottom: -40px;
  }
  .pick legend {
    width: 100%;
    float: none;
    margin: 0 0 2px;
  }
}

/* ---------- Pass 3: straight-on phones, counter, quiet rules, platforms ---------- */

/* Phones face the reader. Depth comes from size and overlap, not tilt. */
.stage .p-main {
  transform: translate(-50%, -50%);
  animation: none;
}

.stage .p-back {
  transform: translate(-128%, -44%);
  animation: none;
}

.stage .p-side {
  transform: translate(28%, -44%);
  animation: none;
}

.duo .d1,
.split.flip .duo .d2 {
  transform: translate(-102%, -50%);
}

.duo .d2,
.split.flip .duo .d1 {
  transform: translate(2%, -50%);
}

#meaning-demo[data-open="false"] .d1 {
  transform: translate(-50%, -50%);
}

/* hero counter */
.count {
  margin-top: 26px;
  padding: 18px 20px 16px;
  max-width: 520px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
}

html:not(.js) .count {
  display: none;
}

.count label {
  display: block;
  font-weight: 600;
  color: var(--ink);
}

.count output {
  display: inline-block;
  min-width: 2.2em;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.7em;
  line-height: 1;
  color: var(--teal);
  font-variant-numeric: tabular-nums;
}

.count input[type="range"] {
  width: 100%;
  margin: 12px 0 14px;
  accent-color: var(--teal);
  cursor: pointer;
}

.count-lead,
.count-note {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.count-rows {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  margin: 10px 0 12px;
}

.count-rows dt {
  font-weight: 600;
  color: var(--ink);
}

.count-rows dd {
  margin: 0;
  color: var(--teal-deep);
  font-variant-numeric: tabular-nums;
}

.count-note {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
}

/* when the ayah stays away */
.quiet {
  margin-top: clamp(36px, 5vw, 64px);
  padding: clamp(22px, 3vw, 36px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 18px clamp(24px, 4vw, 56px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.quiet h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 1.3;
}

.quiet p {
  margin: 0;
  color: var(--ink-soft);
}

.quiet-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: start;
}

.quiet-list li {
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.95rem;
  color: var(--ink);
}

.quiet-snooze {
  grid-column: 1 / -1;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* platforms */
.plat {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 16px;
  margin-top: clamp(28px, 4vw, 48px);
}

.plat .tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.plat .tile h3,
.plat .tile p {
  margin: 0;
}

.plat .tile p {
  color: var(--ink-soft);
}

.plat .btn {
  margin-top: auto;
}

.plat .status {
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
}

.plat .status.on {
  border-color: transparent;
  background: var(--teal-wash);
  color: var(--teal-deep);
  font-weight: 600;
}

.plat-web {
  border-color: var(--teal);
}

a.btn-try {
  text-decoration: none;
}

@media (max-width: 900px) {
  .quiet {
    grid-template-columns: 1fr;
  }

  .plat {
    grid-template-columns: 1fr 1fr;
  }

  .plat-web {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .plat {
    grid-template-columns: 1fr;
  }
}

.cta-note {
  margin: 12px 0 0;
  max-width: 520px;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

main > section {
  overflow-x: clip;
}

/* five moments, the real notification, the web app in a browser frame */
.day {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.notif-shot {
  width: 92%;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 20px 40px -18px rgba(10, 40, 36, 0.45);
}

#demo video.l-rest {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--w, 280px) * 0.12);
  background: #0d1426;
}

.browser {
  margin: clamp(28px, 4vw, 48px) 0 0;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.browser-bar {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.browser-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-strong);
}

.browser img {
  display: block;
  width: 100%;
  height: auto;
}

.plat {
  margin-top: 16px;
}

@media (max-width: 1100px) and (min-width: 901px) {
  .day {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* moments show the whole phone: on Samsung the ayah sits low on the screen */
.moment .shot {
  aspect-ratio: auto;
  padding: 18px 0;
  place-items: center;
}

.moment .shot .phone {
  --w: 70%;
  width: 70%;
  margin-bottom: 0;
  border-radius: 26px;
  padding: 5px;
}

.moment .shot .phone img {
  border-radius: 21px;
}

.moment .shot .phone::after {
  display: none;
}

.moment:hover .shot .phone {
  transform: none;
}

.shot-notify {
  aspect-ratio: auto;
  align-self: stretch;
}

.moment {
  display: flex;
  flex-direction: column;
}

.chip-a {
  top: 0;
}

.stage .p-back {
  transform: translate(-140%, -44%);
}

.stage .p-side {
  transform: translate(40%, -44%);
}

/* survey chart above the counter */
.stat {
  margin: 0 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.stat figcaption {
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}

.stat-bars {
  display: grid;
  gap: 6px;
}

.stat-bars button {
  display: grid;
  grid-template-columns: 3.2em 1fr 2.6em;
  align-items: center;
  gap: 10px;
  padding: 3px 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--ink-soft);
  cursor: pointer;
  text-align: start;
}

.stat-bars .bar {
  height: 14px;
  width: calc(var(--v) / 205 * 100%);
  border-radius: 4px;
  background: var(--gold-soft);
  transition: background 0.2s ease;
}

.stat-bars button:hover .bar,
.stat-bars button:focus-visible .bar {
  background: var(--gold);
}

.stat-bars button[aria-pressed="true"] .bar {
  background: var(--teal);
}

.stat-bars button[aria-pressed="true"] b {
  color: var(--teal-deep);
}

.stat-bars b {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.stat-src {
  margin: 10px 0 0;
  font-size: 0.78rem;
  color: var(--ink-faint);
}

.stat-src a {
  color: inherit;
}

/* squarer phone corners, like the real handset, so the status bar is never clipped */
.phone {
  border-radius: calc(var(--w, 280px) * 0.1);
  padding: calc(var(--w, 280px) * 0.026);
}

.phone img,
#demo video.l-rest,
.phone .screen {
  border-radius: calc(var(--w, 280px) * 0.07);
}

.phone::after {
  display: none;
}

.moment .shot .phone {
  border-radius: 18px;
  padding: 4px;
}

.moment .shot .phone img {
  border-radius: 14px;
}

.chip-a {
  top: -46px;
}

/* unlocking goes straight from the lock screen to the ayah, as on the phone:
   the home screen never flashes in between */
#demo[data-state="lock"] .l-overlay {
  opacity: 1;
  transform: none;
}

#demo .l-lock {
  transition: transform 0.55s cubic-bezier(0.3, 0.7, 0.2, 1), opacity 0.45s ease;
}

#demo[data-state="overlay"] .l-lock,
#demo[data-state="home"] .l-lock {
  transform: translateY(-4%);
  opacity: 0;
  pointer-events: none;
}

/* Pass 4: hifz tiles show whole phones; riwayat picker */
.t-recite,
.t-tajweed {
  grid-column: span 3;
  grid-row: auto;
  flex-direction: column;
  gap: 0;
  min-height: 0;
}

.t-recite .tile-media,
.t-tajweed .tile-media {
  position: static;
  align-self: auto;
  width: auto;
  height: auto;
  margin: auto 0 0;
  padding: 28px 0 0;
  display: flex;
  justify-content: center;
}

.t-recite .phone,
.t-tajweed .phone,
.tile:hover .t-tajweed .phone {
  --w: 250px;
  position: static;
  margin: 0;
  transform: none;
}

.t-riwayat {
  grid-column: span 4;
}

.rw-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.rw-pick button {
  padding: 9px 17px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.12rem;
  line-height: 1.4;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

:root[lang="en"] .rw-pick button {
  font-family: var(--font-body);
  font-size: 15px;
}

.rw-pick button:hover {
  border-color: var(--teal);
}

.rw-pick button[aria-pressed="true"] {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.rw-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 22px;
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.rw-card.swap {
  animation: rw-in 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes rw-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.rw-card dt {
  font-size: 0.8rem;
  color: var(--ink-faint);
}

.rw-card dd {
  margin: 4px 0 0;
  font-weight: 600;
  color: var(--ink);
}

@media (max-width: 900px) {
  .t-recite .phone,
  .t-tajweed .phone {
    --w: 220px;
  }
  .rw-card {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rw-card.swap {
    animation: none;
  }
}

/* Pass 5: niyyah card follows the app's compose screen; voice search try-out */
.ny-head {
  font-weight: 600;
  color: var(--ink);
}

.ny-sentence {
  margin: 14px 0 0;
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  line-height: 1.5;
  font-weight: 500;
  color: var(--ink);
}

.ny-line {
  display: block;
  margin-top: 8px;
}

.ny-sentence .slot {
  padding: 0 2px 4px;
  border: 0;
  border-bottom: 2px dashed var(--teal);
  background: none;
  font: inherit;
  color: var(--teal);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.ny-sentence .slot:hover,
.ny-sentence .slot:focus-visible {
  color: var(--teal-deep);
  border-bottom-style: solid;
}

.ny-sentence .slot.swap {
  animation: rw-in 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ny-note {
  margin: 18px 0 0;
  font-size: 15px;
  color: var(--ink-soft);
}

.ny-drive {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.ny-drive strong {
  display: block;
  font-weight: 500;
  color: var(--ink);
}

.ny-drive small {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  color: var(--ink-faint);
}

.ny-yes {
  flex: none;
  min-width: 76px;
  padding: 10px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink-soft);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.ny-yes[aria-pressed="true"] {
  background: var(--teal);
  color: #fff;
}

.ny-seal {
  display: block;
  width: 100%;
  margin-top: 22px;
  padding: 16px;
  border: 0;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.ny-seal:hover {
  transform: translateY(-1px);
}

.niyyah-card.sealed .ny-seal {
  background: var(--gold);
}

.ny-done {
  margin: 12px 0 0;
  min-height: 1.6em;
  text-align: center;
  font-size: 15px;
  color: var(--ink-soft);
}

.t-voice .mic {
  display: none;
}

.voice-try {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
}

.t-voice .voice-try .mic {
  display: grid;
  place-items: center;
  flex: none;
  width: 56px;
  height: 56px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.3s ease;
}

.voice-try .mic svg {
  width: 26px;
  height: 26px;
}

.voice-try[data-state="listening"] .mic {
  background: #fff;
  color: var(--teal);
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.18);
}

.voice-say {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.9);
}

.voice-try[data-state="found"] .voice-say {
  font-weight: 600;
  color: #fff;
}

.t-voice:not([data-voice="listening"]) .wave span {
  animation-play-state: paused;
  opacity: 0.45;
}

@media (prefers-reduced-motion: reduce) {
  .ny-sentence .slot.swap {
    animation: none;
  }
}

/* riwayat picker: the same ayah as the app shows it in each riwayah */
.rw-ayah {
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
  margin: 22px auto 0;
  border-radius: 20px;
  border: 1px solid var(--line);
}

.rw-card {
  margin-top: 18px;
}

/* meaning: one phone playing the app's own tap-to-tafsir recording */
#meaning-demo .solo {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

#meaning-demo .solo .phone {
  --w: clamp(230px, 22vw, 290px);
}

#meaning-demo .solo video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#meaning-demo .solo .hot {
  display: block;
}

#meaning-demo[data-open="true"] .hot-ayah .ping,
#meaning-demo[data-open="true"] .tag-1 {
  opacity: 0;
}

#meaning-demo:not([data-open="true"]) .tag-2 {
  opacity: 0;
}

#meaning-demo .tag-1,
#meaning-demo .tag-2 {
  pointer-events: none;
}

#meaning-demo .tag-2 {
  top: 2%;
  right: auto;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

/* recite tile plays the app's own recording */
.tile .phone video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: calc(var(--w, 280px) * 0.07);
}

/* hero: the three phones are a carousel; whichever is picked comes to the front */
.stage {
  margin-bottom: 64px;
  touch-action: pan-y;
}

.stage .phone {
  --w: clamp(230px, 22vw, 284px);
  cursor: pointer;
}

.stage .phone[data-slot="c"] {
  z-index: 3;
  transform: translate(-50%, -50%);
  filter: none;
  cursor: default;
}

.stage .phone[data-slot="l"] {
  z-index: 1;
  transform: translate(-125%, -46%) scale(0.83);
}

.stage .phone[data-slot="r"] {
  z-index: 2;
  transform: translate(25%, -46%) scale(0.83);
}

.stage .phone:not([data-slot="c"]) .hot {
  pointer-events: none;
}

.stage.demo .phone[data-slot="c"] {
  transform: translate(-50%, -57%) scale(0.86);
}

.stage.demo .phone:not([data-slot="c"]),
.stage.demo .stage-nav {
  opacity: 0;
  pointer-events: none;
}

.stage-nav {
  position: absolute;
  left: 50%;
  bottom: -54px;
  z-index: 6;
  display: flex;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  transform: translateX(-50%);
  white-space: nowrap;
  transition: opacity 0.4s ease;
}

.stage-nav button {
  padding: 7px 14px;
  border: 0;
  border-radius: 999px;
  background: none;
  font: inherit;
  font-size: 14px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.stage-nav button:hover {
  color: var(--ink);
}

.stage-nav button[aria-pressed="true"] {
  background: var(--teal);
  color: #fff;
  font-weight: 500;
}

@media (max-width: 900px) {
  /* the "real recording" chip sits above the phone, clear of the text before it */
  .stage {
    margin-top: 64px;
  }
}

@media (max-width: 620px) {
  .stage .phone {
    --w: 214px;
  }
  .stage-nav button {
    padding: 7px 11px;
    font-size: 13px;
  }
}

/* moments: no timeline; each surface carries its own on/off switch instead */
.day::before {
  display: none;
}

.opt-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  font-size: 14.5px;
  color: var(--ink-soft);
}

.opt-hint svg {
  width: 26px;
  height: 26px;
  color: var(--teal);
  flex: none;
}

.moment .opt {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 9px;
  height: 34px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--teal);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.moment .opt i {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: var(--teal);
  transition: background 0.25s ease;
}

.moment .opt i::after {
  content: "";
  position: absolute;
  top: 3px;
  inset-inline-end: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: inset-inline-end 0.25s ease;
}

.moment .opt[aria-checked="false"] {
  color: var(--ink-soft);
}

.moment .opt[aria-checked="false"] i {
  background: var(--line-strong);
}

.moment .opt[aria-checked="false"] i::after {
  inset-inline-end: 21px;
}

.moment .shot {
  margin-top: 14px;
}

.moment .shot,
.moment h3,
.moment p {
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.moment.off .shot {
  opacity: 0.4;
  filter: grayscale(1);
}

.moment.off h3,
.moment.off p {
  opacity: 0.5;
}

:root[dir="rtl"] .opt-hint svg {
  transform: scaleX(-1);
}

/* review round: smaller source line, room for the tanwin, a slimmer browser bar */
.stat-src {
  font-size: 0.68rem;
  line-height: 1.5;
}

.final h2 {
  line-height: 1.35;
}

.browser-bar {
  gap: 5px;
  padding: 7px 11px;
}

.browser-bar i {
  width: 7px;
  height: 7px;
}

@media (max-width: 620px) {
  .browser {
    border-radius: 10px;
  }
  .browser-bar {
    gap: 3px;
    padding: 4px 7px;
  }
  .browser-bar i {
    width: 4px;
    height: 4px;
  }
}

/* hero demo follows the phone: screen off (AOD), lock screen, then the recorded
   unlock where the ayah glides up and the tafsir comes in */
#demo .l-aod {
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

#demo[data-state="aod"] .l-aod {
  opacity: 1;
}

#demo[data-state="aod"] .hot-wake {
  display: block;
}

#demo[data-state="overlay"] .l-rest {
  opacity: 1;
  transition: none;
}

#demo[data-state="overlay"] .l-lock {
  transition: none;
}

#demo[data-state="lock"] .demo-dots i:nth-child(1),
#demo[data-state="overlay"] .demo-dots i:nth-child(2),
#demo[data-state="home"] .demo-dots i:nth-child(3) {
  width: 7px;
  border-radius: 50%;
  background: var(--line-strong);
}

#demo[data-state="aod"] .demo-dots i:nth-child(1),
#demo[data-state="lock"] .demo-dots i:nth-child(2),
#demo[data-state="overlay"] .demo-dots i:nth-child(3),
#demo[data-state="home"] .demo-dots i:nth-child(4) {
  width: 20px;
  border-radius: 99px;
  background: var(--teal);
}

/* "coming soon" store badges: quiet outlined pills on one line, not black buttons */
.btn-store {
  min-height: 44px;
  padding-inline: 14px 18px;
  gap: 9px;
  background: transparent;
  color: var(--ink-soft);
  border: 1px dashed var(--line-strong);
  box-shadow: none;
  cursor: default;
}

.btn-store:hover {
  transform: none;
}

.btn-store svg {
  width: 18px;
  height: 18px;
}

.btn-store .stack {
  flex-direction: row;
  align-items: baseline;
  gap: 6px;
}

.btn-store small {
  font-size: 13px;
  opacity: 1;
}

.btn-store b {
  font-size: 14.5px;
  color: var(--ink);
}

.final .btn-store {
  background: transparent;
  color: rgba(242, 236, 220, 0.75);
  border-color: rgba(242, 236, 220, 0.35);
}

.final .btn-store b {
  color: #f2ecdc;
}

#demo[data-state="overlay"] .hot-read .ping {
  animation: ping-late 0.4s ease 1.4s both;
}

@keyframes ping-late {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* moments: switching a surface off removes the ayah from that screen */
.moment.off .shot {
  opacity: 1;
  filter: none;
}

.moment .shot .phone .alt-off {
  position: absolute;
  inset: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  opacity: 0;
  transition: opacity 0.45s ease;
}

.moment.off .shot .phone .alt-off {
  opacity: 1;
}

.opt-hint svg {
  display: none;
}

/* hands-on demo: the phone takes over the screen so it feels like holding it */
html.demo-open {
  overflow: hidden;
}

.stage.demo {
  perspective: none;
  z-index: 90;
}

.stage.demo::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: rgba(8, 18, 17, 0.86);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.stage.demo .phone[data-slot="c"] {
  --w: min(84vw, calc((100vh - 190px) * 0.4639));
  --w: min(84vw, calc((100dvh - 190px) * 0.4639));
  position: fixed;
  top: calc(50% - 62px);
  left: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8);
}

.stage.demo .demo-bar {
  position: fixed;
  inset-inline: 16px;
  bottom: 16px;
  z-index: 2;
}

.stage.demo .demo-caption {
  color: #f2ecdc;
  min-height: 3.1em;
}

.stage.demo .demo-btn {
  color: #f2ecdc;
  border-color: rgba(242, 236, 220, 0.4);
}

.stage.demo .demo-dots i {
  background: rgba(242, 236, 220, 0.3);
}

html.demo-open main > section:first-of-type {
  position: relative;
  z-index: 90;
}

/* six moments now that the home-screen wallpaper has its own card */
@media (min-width: 1101px) {
  .day {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
  }
  .moment h3 {
    font-size: 1.3rem;
  }
  .moment p {
    font-size: 0.92rem;
  }
}

/* quiet rules are real switches, like the app's "when to pause" screen */
.quiet-list li {
  padding: 0;
  border: 0;
}

.q-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: none;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.q-chip[role="switch"]::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.q-chip[aria-checked="true"] {
  background: var(--teal-wash);
  border-color: color-mix(in srgb, var(--teal) 55%, transparent);
  color: var(--ink);
}

.q-chip[aria-checked="true"]::before {
  border-color: var(--teal);
  background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5 10 17l9-10'/%3E%3C/svg%3E") center / 11px no-repeat;
}

.q-icons {
  display: inline-flex;
  gap: 4px;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-width 0.35s ease, opacity 0.3s ease;
}

.q-chip[aria-checked="true"] .q-icons {
  max-width: 90px;
  opacity: 1;
}

.q-icons i {
  width: 22px;
  height: 22px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 6px;
}

.q-icons svg {
  width: 14px;
  height: 14px;
}

.q-icons .a1 {
  background: #2fb673;
}

.q-icons .a2 {
  background: #3b6fd4;
}

.q-icons .a3 {
  background: #e0574a;
}

.q-cool {
  color: var(--ink);
}

.q-cool b {
  color: var(--teal);
  font-weight: 600;
}

/* labels sit under the phone as a quiet caption, never on top of the screen */
#meaning-demo,
#listen-demo {
  margin-bottom: 64px;
}

#meaning-demo .tag-1,
#meaning-demo .tag-2,
#listen-demo .tag-2 {
  top: auto;
  right: auto;
  left: 50%;
  bottom: -52px;
  transform: translateX(-50%);
  background: var(--card);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  box-shadow: none;
  font-weight: 400;
}

#listen-demo .demo-note {
  bottom: -88px;
}

.stage {
  margin-top: 64px;
  margin-bottom: 132px;
}

.stage .chip-a {
  top: -60px;
  inset-inline: auto;
  left: 50%;
  transform: translateX(-50%);
  animation: none;
  white-space: nowrap;
}

.stage .chip-b {
  bottom: -118px;
  inset-inline: auto;
  left: 50%;
  transform: translateX(-50%);
  animation: none;
  white-space: nowrap;
}

/* listen: pick whose voice you hear for the ayah on screen */
#listen-demo {
  margin-bottom: 124px;
}

.rc-pick {
  position: absolute;
  left: 50%;
  bottom: -108px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.rc-pick button {
  padding: 7px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: none;
  font: inherit;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.rc-pick button[aria-pressed="true"] {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

@media (max-width: 620px) {
  .rc-pick {
    font-size: 12.5px;
    gap: 4px;
  }
  .rc-pick button {
    padding: 6px 9px;
  }
}

/* hifz: three phones in a row now that text size has its own tile */
@media (min-width: 1101px) {
  .t-recite,
  .t-tajweed {
    grid-column: span 2;
  }
  .t-recite .phone,
  .t-tajweed .phone {
    --w: 220px;
  }
}

.t-font .phone {
  position: relative;
}

.t-font .phone .font-big {
  position: absolute;
  inset: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  opacity: 0;
  animation: font-swap 6s ease-in-out infinite;
}

@keyframes font-swap {
  0%, 38% { opacity: 0; }
  50%, 88% { opacity: 1; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .t-font .phone .font-big {
    animation: none;
  }
}

/* tajweed tile: press and hold the coloured letter to open its rule card */
#tj-demo {
  position: relative;
}

#tj-demo .hot {
  display: block;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

#tj-demo .tj-card {
  position: absolute;
  inset: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

#tj-demo[data-open="true"] .tj-card {
  opacity: 1;
}

#tj-demo[data-open="true"] .ping {
  display: none;
}

#tj-demo .ping {
  transition: transform 0.45s ease;
}

#tj-demo.holding .ping {
  transform: scale(0.55);
}

.tj-say {
  margin: 14px 0 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
  min-height: 2.6em;
}

/* phones that hold a second layer stay centred on small screens */
.t-font .phone,
#tj-demo {
  left: auto;
  top: auto;
}

.t-tajweed .tile-media {
  align-self: stretch;
}
