/* The Holy Qur'an — landing page.
   A calm dark page in the colours of the printed mushaf: the cover's deep green and
   light-green line work, a touch of gold, an eight-pointed star lattice, and the cover's
   double-ruled frames. Headings are set in a warm serif; real app screenshots in phones. */

:root {
  --bg: #050806;
  --bg-card: #0c110e;
  --bg-card-2: #111813;
  --line: rgba(143, 229, 143, 0.1);
  --text: #eef3ee;
  --muted: #a3ada5;
  --accent: #8fe58f; /* cover line-art green */
  --accent-deep: #157216; /* cover green */
  --gold: #e3b341;

  --display: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --body: 'Manrope', 'Segoe UI', system-ui, sans-serif;

  --max: 1180px;
  --gutter: clamp(18px, 5vw, 48px);

  /* Eight-pointed star lattice (the cover's ornament), as a tile. */
  --stars: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='88' viewBox='0 0 88 88'%3E%3Cg fill='none' stroke='%238fe58f' stroke-width='1'%3E%3Crect x='26' y='26' width='36' height='36'/%3E%3Crect x='26' y='26' width='36' height='36' transform='rotate(45 44 44)'/%3E%3Ccircle cx='44' cy='44' r='5'/%3E%3Cpath d='M0 0 10 10M88 0 78 10M0 88 10 78M88 88 78 78'/%3E%3C/g%3E%3C/svg%3E");
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0;
  font-optical-sizing: auto;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 20;
  background: var(--accent);
  color: #06210a;
  padding: 8px 14px;
  border-radius: 8px;
}
.skip:focus {
  left: 8px;
}

/* ───────────────────────── Navigation ───────────────────────── */

.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(5, 8, 6, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
}
.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.5vw, 30px);
  font-weight: 500;
}
.nav-links a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--text);
}
.nav-links .pill {
  color: #06210a;
  background: var(--accent);
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 999px;
  box-shadow: 0 0 28px -6px rgba(143, 229, 143, 0.55);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.nav-links .pill:hover {
  color: #06210a;
  transform: translateY(-1px);
  box-shadow: 0 0 36px -4px rgba(143, 229, 143, 0.75);
}

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

.hero {
  position: relative;
  text-align: center;
  padding: clamp(64px, 10vw, 120px) var(--gutter) 48px;
}
.stars {
  position: absolute;
  inset: 0;
  background-image: var(--stars);
  background-size: 88px 88px;
  opacity: 0.1;
  mask-image: radial-gradient(60% 70% at 50% 40%, #000 20%, transparent 75%);
  pointer-events: none;
}
.hero > :not(.stars) {
  position: relative;
}
.hero h1 {
  display: grid;
  justify-items: center;
  gap: 6px;
}
.rotator {
  display: grid;
  font-size: clamp(3rem, 8.4vw, 5.8rem);
  line-height: 1.05;
  font-weight: 800;
}
/* All words share one grid cell; the active one is sharp, the others blurred away. */
.word {
  grid-area: 1 / 1;
  color: var(--c);
  opacity: 0;
  filter: blur(14px);
  transform: translateY(12px) scale(0.98);
  transition:
    opacity 0.7s ease,
    filter 0.7s ease,
    transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.word.is-active {
  opacity: 1;
  filter: none;
  transform: none;
}
.with {
  font-size: clamp(2rem, 4.8vw, 3.4rem);
  line-height: 1.1;
  font-weight: 700;
  background: linear-gradient(180deg, #e2e8e3, #95a098);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.sub {
  color: #c5cec7;
  font-size: clamp(1.15rem, 1.9vw, 1.4rem);
  line-height: 1.55;
  margin: 26px auto 38px;
  max-width: 34em;
}
.cta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 11px 24px 11px 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  background: #000;
  text-decoration: none;
  font-family: var(--body);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.05;
  text-align: left;
  transition:
    border-color 0.2s,
    transform 0.2s,
    box-shadow 0.2s;
}
.store-badge svg {
  width: 30px;
  height: 30px;
  fill: var(--accent);
  flex: none;
}
.store-badge small {
  display: block;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #d9ded9;
  margin-bottom: 2px;
}
a.store-badge:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -12px rgba(143, 229, 143, 0.6);
}
.store-badge.is-muted {
  border-color: rgba(255, 255, 255, 0.18);
  color: #8d958f;
  cursor: default;
}
.store-badge.is-muted svg {
  fill: #8d958f;
}
.meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 18px 0 0;
}

/* ───────────────────────── Phone carousel ───────────────────────── */

.carousel {
  max-width: 1240px;
  margin: 0 auto;
  overflow: hidden;
  padding: 30px 0 100px;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.track {
  display: flex;
  width: max-content;
  animation: marquee 60s linear infinite;
}
.carousel:hover .track {
  animation-play-state: paused;
}
.set {
  display: flex;
  gap: clamp(20px, 3vw, 40px);
  padding-right: clamp(20px, 3vw, 40px);
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

.phone {
  margin: 0;
  width: clamp(210px, 22vw, 290px);
  padding: 8px;
  border-radius: 38px;
  background: #151a17;
  border: 1px solid rgba(143, 229, 143, 0.12);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9);
}
.phone img {
  width: 100%;
  height: auto;
  aspect-ratio: 540 / 1096;
  object-fit: cover;
  border-radius: 30px;
}

/* ───────────────────────── Statement ───────────────────────── */

.statement {
  text-align: center;
  padding: clamp(40px, 8vw, 90px) var(--gutter) clamp(80px, 10vw, 130px);
}
/* A small gold star above the statement, like a verse ornament. */
.statement::before {
  content: '✦';
  display: block;
  color: var(--gold);
  font-size: 1.4rem;
  margin-bottom: 18px;
}
.statement h2 {
  font-size: clamp(2.3rem, 5.2vw, 3.9rem);
  line-height: 1.12;
}
.statement p {
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.9;
  margin: 26px 0 0;
}
.statement strong {
  color: var(--text);
  font-weight: 700;
}

/* ───────────────────────── Feature cards ───────────────────────── */

.cards {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.card {
  position: relative;
  overflow: hidden;
  height: clamp(460px, 34vw, 520px);
  border-radius: 30px;
  background: linear-gradient(160deg, var(--bg-card-2), var(--bg-card));
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 24px;
  padding: 0 clamp(24px, 3vw, 44px) 0 clamp(28px, 4vw, 60px);
}
/* The cover's double-ruled frame, drawn faintly inside each card. */
.card::after {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(143, 229, 143, 0.06);
  border-radius: 22px;
  pointer-events: none;
}
.card::before {
  content: '';
  position: absolute;
  width: 380px;
  height: 380px;
  right: -80px;
  top: -100px;
  background: radial-gradient(circle, color-mix(in srgb, var(--k) 22%, transparent), transparent 70%);
  pointer-events: none;
}
.kicker {
  color: var(--k);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 14px;
}
.card h3 {
  font-size: clamp(1.8rem, 2.5vw, 2.35rem);
  line-height: 1.1;
  margin-bottom: 18px;
}
.card-text p:not(.kicker) {
  color: #bec8c0;
  font-size: 1.08rem;
  margin: 0 0 12px;
}
/* The phone stands in the card and runs off its bottom edge. */
.card-phone {
  position: relative;
  align-self: end;
  justify-self: center;
  width: min(100%, 300px);
  margin: 0 0 -170px;
  padding: 8px;
  border-radius: 38px;
  background: #1a201c;
  border: 1px solid rgba(143, 229, 143, 0.12);
  box-shadow: 0 -10px 40px -20px rgba(0, 0, 0, 0.8);
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.card-phone img {
  border-radius: 30px;
  width: 100%;
  height: auto;
}
.card:hover .card-phone {
  transform: translateY(-14px);
}

/* ───────────────────────── Privacy trio ───────────────────────── */

.trio {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(90px, 12vw, 150px) var(--gutter) clamp(50px, 8vw, 90px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
}
.trio-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: #121914;
  border: 1px solid var(--line);
  margin-bottom: 22px;
}
.trio-icon svg {
  width: 24px;
  height: 24px;
  fill: var(--k);
}
.trio h3 {
  font-size: 1.35rem;
  margin-bottom: 8px;
}
.trio p {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0;
}

/* ───────────────────────── Numbers ───────────────────────── */

.numbers {
  text-align: center;
  padding: clamp(40px, 8vw, 80px) var(--gutter);
}
.numbers h2,
.install h2 {
  font-size: clamp(2.1rem, 4.6vw, 3.3rem);
  margin-bottom: 42px;
}
.stats {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.stat {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 32px 18px;
  overflow: hidden;
}
.stat::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--stars);
  background-size: 66px 66px;
  opacity: 0.05;
}
.stat strong {
  position: relative;
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.4rem, 4.4vw, 3.4rem);
  line-height: 1;
  color: var(--accent);
}
.stat span {
  position: relative;
  display: block;
  color: var(--muted);
  font-size: 1.02rem;
  margin-top: 10px;
}
.edition {
  color: var(--muted);
  font-size: 1rem;
  max-width: 40em;
  margin: 34px auto 0;
}

/* ───────────────────────── Install ───────────────────────── */

.install {
  max-width: var(--max);
  margin: 0 auto;
  text-align: center;
  padding: clamp(50px, 9vw, 100px) var(--gutter) clamp(80px, 10vw, 130px);
}
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  text-align: left;
}
.steps li {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 30px 28px;
}
.steps li > span {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #06210a;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 16px;
}
.steps h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}
.steps p {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0;
}
.steps a {
  color: var(--accent);
}
.steps b {
  color: var(--text);
  font-weight: 600;
}
.ios {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 30px 0 0;
}

/* ───────────────────────── Footer ───────────────────────── */

.footer {
  padding: 20px var(--gutter) calc(34px + env(safe-area-inset-bottom, 0px));
}
.footer-card {
  position: relative;
  overflow: hidden;
  max-width: 1080px;
  margin: 0 auto;
  background: var(--accent);
  color: #06210a;
  border-radius: 44px;
  padding: clamp(34px, 4vw, 52px) clamp(30px, 4vw, 56px) clamp(38px, 4.5vw, 56px);
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr 1fr;
  gap: 30px;
  align-items: start;
  box-shadow: 0 30px 80px -40px rgba(143, 229, 143, 0.45);
}
/* The star lattice, embossed faintly into the card. */
.footer-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--stars);
  background-size: 88px 88px;
  opacity: 0.16;
  filter: brightness(0.2);
  mask-image: linear-gradient(90deg, transparent 20%, #000);
  pointer-events: none;
}
.footer-card > * {
  position: relative;
}
.brand-dark {
  font-size: 1.2rem;
}
.brand-dark img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.45);
}
.footer-col {
  display: grid;
  gap: 10px;
}
.footer-col h4 {
  font-size: 1.2rem;
  margin-bottom: 4px;
}
.footer-col a {
  text-decoration: none;
  font-size: 1.05rem;
  opacity: 0.88;
}
.footer-col a:hover {
  opacity: 1;
  text-decoration: underline;
}
.copyright {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  margin: 28px 0 0;
}

/* ───────────────────────── Scroll reveal ───────────────────────── */

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* ───────────────────────── Responsive ───────────────────────── */

@media (max-width: 1060px) {
  .cards {
    grid-template-columns: 1fr;
    max-width: 820px;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-card {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .footer-card .brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  /* Top bar: name and button each stay on one line. */
  .nav {
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .nav-links a:not(.pill) {
    display: none;
  }
  .brand,
  .nav-links .pill {
    white-space: nowrap;
  }
  .brand {
    font-size: 1.05rem;
    gap: 10px;
  }
  .nav-links .pill {
    padding: 9px 16px;
    font-size: 0.95rem;
  }
  .br {
    display: none;
  }

  /* Hero: compact, centred badges rather than full-width buttons. */
  .hero {
    padding-top: 48px;
  }
  .rotator {
    font-size: clamp(2.4rem, 11vw, 3rem);
  }
  .with {
    font-size: clamp(1.6rem, 7.4vw, 2rem);
  }
  .sub {
    font-size: 1.1rem;
    margin: 18px auto 28px;
  }
  .store-badge {
    font-size: 1.1rem;
    padding: 8px 16px 8px 12px;
    gap: 9px;
  }
  .store-badge svg {
    width: 24px;
    height: 24px;
  }
  .store-badge small {
    font-size: 0.55rem;
  }
  .meta {
    font-size: 0.85rem;
  }

  /* Phone row: narrower phones so about three are in view. */
  .carousel {
    padding: 22px 0 70px;
  }
  .phone {
    width: 180px;
    padding: 6px;
    border-radius: 28px;
  }
  .phone img {
    border-radius: 22px;
  }
  .set {
    gap: 16px;
    padding-right: 16px;
  }

  /* Cards keep text on the left and the phone peeking in at the bottom right. */
  .cards {
    gap: 18px;
    padding: 0 12px;
  }
  .card {
    height: auto;
    min-height: 380px;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 14px;
    padding: 0 0 0 24px;
    border-radius: 26px;
  }
  .card::after {
    inset: 8px;
    border-radius: 19px;
  }
  .card-text {
    padding: 44px 0;
  }
  .kicker {
    font-size: 0.78rem;
    margin-bottom: 10px;
  }
  .card h3 {
    font-size: 1.75rem;
    margin-bottom: 14px;
  }
  .card-text p:not(.kicker) {
    font-size: 1rem;
    line-height: 1.55;
  }
  .card-phone {
    width: 100%;
    margin: 0 -18px -70px 0;
    padding: 5px;
    border-radius: 24px;
  }
  .card-phone img {
    border-radius: 19px;
  }
  .card:hover .card-phone {
    transform: none;
  }

  .trio,
  .steps {
    grid-template-columns: 1fr;
  }

  /* Footer: one column, sections stacked. */
  .footer-card {
    grid-template-columns: 1fr;
    gap: 26px;
    border-radius: 36px;
    padding: 32px;
  }
}

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