/* Noor website. Colors follow the app's dark palette (lib/core/theme.dart). */
@font-face { font-family: "Alexandria"; src: url(fonts/Alexandria-w400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Alexandria"; src: url(fonts/Alexandria-w600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Alexandria"; src: url(fonts/Alexandria-w700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Readex Pro"; src: url(fonts/ReadexPro-w400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Readex Pro"; src: url(fonts/ReadexPro-w500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Readex Pro"; src: url(fonts/ReadexPro-w600.woff2) format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --bg: #0C1D1A;
  --bg-deep: #081512;
  --surface: #132B26;
  --surface-hi: #183630;
  --card-top: #17362F;
  --card-bottom: #10261F;
  --border: #2A4640;
  --border-strong: #2E5048;
  --text: #F3ECDD;
  --text-2: #C9D6CF;
  --muted: #9DB0A7;
  --gold: #D9B26A;
  --gold-hi: #F0CF8E;
  --gold-ink: #1A1405;
  --gold-soft: rgba(217, 178, 106, .14);
  --gold-line: rgba(217, 178, 106, .28);
  --radius: 22px;
  --wrap: 1160px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.75 "Readex Pro", system-ui, sans-serif;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: "Alexandria", "Readex Pro", sans-serif; margin: 0; line-height: 1.3; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; border-radius: 10px; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: 16px; top: -60px; z-index: 50; background: var(--gold); color: var(--gold-ink); padding: 8px 14px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---- header ---- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(12, 29, 26, .82);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid rgba(42, 70, 64, .6);
}
.top__in { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 700 1.35rem/1 "Alexandria", sans-serif; }
.brand img { border-radius: 11px; }
.brand--sm { font-size: 1.1rem; }
.brand--sm img { border-radius: 8px; }
.top__nav { display: flex; gap: 4px; }
.top__nav a { color: var(--text-2); text-decoration: none; padding: 8px 12px; border-radius: 10px; font-weight: 500; transition: color .2s, background-color .2s; }
.top__nav a:hover { color: var(--text); background: var(--surface); }
.top__cta { margin-inline-start: auto; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 12px; font: 600 .95rem/1 "Readex Pro", sans-serif; text-decoration: none; transition: background-color .2s, transform .2s var(--ease); }
.btn--gold { background: var(--gold); color: var(--gold-ink); }
.btn--gold:hover { background: var(--gold-hi); }
.btn:active { transform: translateY(1px); }

/* ---- hero ---- */
.hero { position: relative; overflow: hidden; isolation: isolate; padding: 72px 0 96px; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: url(img/girih.png) center / 220px repeat;
  opacity: .05;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 30% 40%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 80% at 30% 40%, #000 20%, transparent 75%);
}
.hero__glow { position: absolute; z-index: -1; inset-block-start: -10%; inset-inline-end: -5%; width: 60%; aspect-ratio: 1; background: radial-gradient(circle, rgba(217, 178, 106, .18), rgba(111, 194, 170, .06) 45%, transparent 70%); filter: blur(10px); }
.hero__in { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 56px; }
.ayah { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin: 0 0 22px; }
/* The splash screen's ayah: words drawn from the Madinah mushaf font (page 354), gold ornate brackets. */
.ayah img { width: auto; height: clamp(40px, 4.4vw, 56px); margin-block-end: 6px; }
.ayah small { color: var(--muted); font-size: .85rem; }
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 4.1rem); font-weight: 700; letter-spacing: -.01em; }
.hero__intro { margin-block-start: 20px; font-size: clamp(1.02rem, 1.5vw, 1.18rem); color: var(--text-2); max-width: 36rem; }

.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-block-start: 34px; }
.store {
  display: inline-flex; align-items: center; gap: 12px; min-width: 190px; height: 60px; padding: 0 18px 0 20px;
  border-radius: 16px; border: 1px solid var(--gold-line);
  background: linear-gradient(160deg, var(--card-top), var(--card-bottom));
  color: var(--text); text-decoration: none;
  transition: border-color .2s, background-color .2s, transform .25s var(--ease);
}
.store svg { width: 26px; height: 26px; flex: none; fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.store[data-store="play"] svg { fill: var(--gold); stroke: none; }
.store span { display: flex; flex-direction: column; line-height: 1.25; }
.store small { font-size: .74rem; color: var(--muted); }
.store span { min-width: 0; }
.store small, .store b { white-space: nowrap; }
.store b { font: 600 1.08rem/1.2 "Readex Pro", sans-serif; direction: ltr; text-align: start; }
a.store[href]:hover { border-color: var(--gold); transform: translateY(-2px); }
.store[aria-disabled="true"] { cursor: default; }

.hero__device { position: relative; display: grid; place-items: center; min-height: 560px; }
.arch { position: absolute; inset-block-end: -40px; width: min(400px, 92%); height: auto; fill: none; stroke: var(--gold-line); stroke-width: 1.4; }
.arch path + path { stroke: rgba(217, 178, 106, .14); }

.phone {
  position: relative; margin: 0; width: 270px; aspect-ratio: 560 / 1160;
  border-radius: 42px; padding: 10px;
  background: linear-gradient(150deg, #2c3a36, #0d1513 60%, #1d2926);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06) inset, 0 30px 60px -20px rgba(0, 0, 0, .7), 0 0 0 1px #050a09;
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 33px; background: var(--surface); }
.phone::after { content: ""; position: absolute; top: 20px; left: 50%; width: 76px; height: 20px; translate: -50% 0; border-radius: 12px; background: #050a09; }
.phone--hero { width: 290px; }

/* ---- section titles ---- */
.band { position: relative; max-width: 760px; margin: 0 auto 44px; }
.band img { width: 100%; height: auto; opacity: .9; }
.band h2 { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(1.15rem, 2.6vw, 1.75rem); font-weight: 700; color: var(--text); }
.title { text-align: center; font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
.sub { text-align: center; color: var(--muted); margin-block-start: 6px; }

/* ---- features ---- */
.features { padding: 40px 0 96px; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card {
  position: relative; padding: 26px 24px 26px;
  border-radius: var(--radius); border: 1px solid var(--border);
  background: linear-gradient(165deg, var(--card-top), var(--card-bottom));
  transition: border-color .25s, transform .35s var(--ease);
}
.card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.card h3 { font-size: 1.15rem; font-weight: 600; margin-block: 16px 8px; }
.card p { color: var(--text-2); font-size: .97rem; }
/* Eight-point star (khatam) holding the number, as in the app's ayah markers. */
.star {
  position: relative; display: grid; place-items: center; width: 44px; height: 44px;
  font: 600 1.05rem/1 "Alexandria", sans-serif; color: var(--gold-ink);
}
.star::before, .star::after { content: ""; position: absolute; inset: 6px; background: var(--gold); border-radius: 4px; z-index: -1; }
.star::after { rotate: 45deg; }
.star { isolation: isolate; }

/* ---- screens ---- */
.screens { padding: 32px 0 100px; background: linear-gradient(var(--bg), var(--bg-deep) 30%, var(--bg-deep) 70%, var(--bg)); }
.rail {
  display: flex; gap: 28px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: max(16px, calc((100% - var(--wrap)) / 2));
  padding: 40px max(16px, calc((100% - var(--wrap)) / 2)) 24px;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.rail:focus-visible { outline-offset: -4px; }
.shot { flex: none; margin: 0; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.shot .phone { width: 250px; }
.shot figcaption { text-align: center; max-width: 250px; }
.shot figcaption b { display: block; font: 600 1.02rem/1.4 "Alexandria", sans-serif; }
.shot figcaption span { color: var(--muted); font-size: .9rem; }

/* ---- closing ---- */
.cta { padding: 20px 0 110px; }
.cta__in {
  position: relative; overflow: hidden; text-align: center;
  display: flex; flex-direction: column; align-items: center;
  padding: 64px 24px 60px; border-radius: 32px;
  border: 1px solid var(--gold-line);
  background: radial-gradient(ellipse at 50% 0%, rgba(217, 178, 106, .14), transparent 60%), linear-gradient(170deg, var(--surface-hi), var(--card-bottom));
}
.cta__in::before { content: ""; position: absolute; inset: 0; background: url(img/girih.png) center / 180px repeat; opacity: .04; pointer-events: none; }
.cta__orn { width: min(560px, 100%); height: auto; opacity: .55; margin-block-end: -38px; }
.cta__icon { position: relative; border-radius: 26px; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .8); }
.cta h2 { position: relative; margin-block-start: 28px; font-size: clamp(1.35rem, 3vw, 2rem); max-width: 34rem; }
.cta .stores { position: relative; justify-content: center; }

/* ---- footer ---- */
.foot { border-top: 1px solid var(--border); padding: 26px 0 calc(26px + env(safe-area-inset-bottom)); color: var(--muted); font-size: .9rem; }
.foot__in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.foot__mail { direction: ltr; }
.foot__copy { margin-inline-start: auto; }

/* ---- entrance (added by site.js only when motion is allowed) ---- */
.anim .card, .anim .shot { opacity: 0; translate: 0 18px; transition: opacity .6s var(--ease), translate .6s var(--ease), border-color .25s, transform .35s var(--ease); }
.anim .card.in, .anim .shot.in { opacity: 1; translate: 0 0; }

/* ---- smaller screens ---- */
@media (max-width: 960px) {
  .hero { padding: 48px 0 72px; }
  .hero__in { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero__intro { margin-inline: auto; }
  .ayah { align-items: center; }
  .stores { justify-content: center; }
  .hero__device { min-height: 520px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .top__in { gap: 12px; height: 60px; }
  .top__nav { display: none; }
  .grid { grid-template-columns: 1fr; }
  .stores { flex-wrap: nowrap; gap: 10px; }
  .store { flex: 1 1 0; min-width: 0; height: 56px; gap: 8px; padding: 0 10px; justify-content: center; }
  .store svg { width: 22px; height: 22px; }
  .store b { font-size: clamp(.84rem, 3.6vw, .98rem); }
  .cta .stores { width: 100%; }
  .phone--hero { width: 250px; }
  .hero__device { min-height: 470px; }
  .band { margin-block-end: 28px; }
  .shot .phone { width: 220px; }
  .cta__in { padding: 48px 18px 44px; border-radius: 24px; }
  .foot__copy { margin-inline-start: 0; }
}
