/* joinjamaah.com: one stylesheet for every page.
   Colours are the app's own (Shared/Theme.swift): Fajr (light) and Isha (dark) token sets.
   The app's rule holds here too: gold is only for the Quran and the adhan, teal is the action colour.
   Fonts are the app's: Readex Pro's Latin letters (as "Jamaah Latin") and Amiri Quran for ayat, served from this site. */

@font-face { font-family: "Jamaah Latin"; src: url("/assets/fonts/readex-latin.woff2") format("woff2"); font-weight: 160 700; font-display: swap; }
@font-face { font-family: "Amiri Quran"; src: url("/assets/fonts/amiri-quran-fatiha.woff2") format("woff2"); font-display: swap; }

:root {
  --ground: #F6F1E7; --surface: #FFFFFF; --raised: #EFE8DA; --line: #E0D7C6;
  --ink: #14242A; --muted: #56645F; --secondary: #34433F;
  --gold: #8A6216; --gold-soft: #F5ECD6; --gold-line: #E2CF9F;
  --teal: #1C6A5A; --teal-soft: #E3EFEA; --teal-line: #B7D6CB; --on-teal: #FFFFFF;
  --warn: #A4501F;
  /* Isha, for the night bands that stay dark in both modes */
  --n-ground: #0E1A1F; --n-surface: #15252B; --n-raised: #1C2F36; --n-line: #2A3F46;
  --n-ink: #EEF2EC; --n-muted: #A2B3B0; --n-gold: #D9B460; --n-gold-soft: #221D12; --n-gold-line: #6E5A2C;
  --n-teal: #6CC3AC; --n-on-teal: #0B1F1A;

  --sans: "Jamaah Latin", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --quran: "Amiri Quran", "Geeza Pro", "Noto Naskh Arabic", serif;
  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 56px);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0E1A1F; --surface: #15252B; --raised: #1C2F36; --line: #2A3F46;
    --ink: #EEF2EC; --muted: #A2B3B0; --secondary: #C9D4D1;
    --gold: #D9B460; --gold-soft: #221D12; --gold-line: #6E5A2C;
    --teal: #6CC3AC; --teal-soft: #173A35; --teal-line: #2F6B5E; --on-teal: #0B1F1A;
    --warn: #F0A868;
    /* the night bands step one shade deeper so they still read as a band */
    --n-ground: #091317; --n-surface: #122126;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 400 17px/1.6 var(--sans); font-variation-settings: "HEXP" 0;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--teal-soft); }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--teal); color: var(--on-teal); padding: 10px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { top: 12px; }

/* type */
h1, h2, h3 { font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
.display { font-size: clamp(40px, 6.4vw, 82px); font-variation-settings: "HEXP" 38; letter-spacing: -0.035em; line-height: 1.0; }
h2 { font-size: clamp(30px, 3.9vw, 50px); font-variation-settings: "HEXP" 28; letter-spacing: -0.03em; margin-bottom: 20px; }
h3 { font-size: 21px; letter-spacing: -0.01em; line-height: 1.25; }
p { margin: 0 0 1em; text-wrap: pretty; }
.lede { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--secondary); max-width: 34em; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); margin: 0 0 18px; display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 22px; height: 1.5px; background: currentColor; }
.muted { color: var(--muted); }
.small { font-size: 15px; }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--ground) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 19px; letter-spacing: -0.01em; font-variation-settings: "HEXP" 30; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { color: var(--secondary); text-decoration: none; font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--teal); text-decoration-thickness: 2px; text-underline-offset: 8px; }
.top .btn { padding: 10px 16px; font-size: 15px; }
.menu { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 10px; font: inherit; font-size: 15px; padding: 7px 12px; }
@media (max-width: 860px) {
  .nav { display: none; position: absolute; left: 0; right: 0; top: 68px; background: var(--ground); flex-direction: column; gap: 0; padding: 8px var(--gutter) 20px; border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a { padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .menu { display: block; }
  .top .btn { display: none; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; cursor: pointer; text-decoration: none;
  background: var(--teal); color: var(--on-teal); font: 600 17px/1.2 var(--sans); padding: 16px 24px; border-radius: 14px;
  transition: transform .15s ease, background-color .15s ease; }
.btn:hover { background: color-mix(in srgb, var(--teal) 88%, var(--ink)); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--teal); background: transparent; }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* facts line: "Free · No ads · ..." */
.facts { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 15px; color: var(--secondary); }
.facts li { display: flex; align-items: center; gap: 8px; }
.facts li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }

/* the star lattice from the app icon (8-point stars with crosses between), as a faint texture */
.lattice { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; color: var(--teal); opacity: .13;
  -webkit-mask-image: radial-gradient(120% 90% at 85% 10%, #000 20%, transparent 70%); mask-image: radial-gradient(120% 90% at 85% 10%, #000 20%, transparent 70%); }
@media (prefers-color-scheme: dark) { .lattice { opacity: .12; } }

/* phones: real simulator screenshots in a drawn frame */
.phone { position: relative; width: var(--w, 300px); aspect-ratio: 1320 / 2868; border-radius: calc(var(--w, 300px) * .155);
  padding: calc(var(--w, 300px) * .03); background: #0B1316;
  box-shadow: 0 0 0 1.5px #2D3A3E inset, 0 1px 0 1px rgba(255,255,255,.06), 0 40px 80px -30px rgba(20,36,42,.45), 0 18px 36px -18px rgba(20,36,42,.35); }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--w, 300px) * .128); background: var(--raised); }
@media (prefers-color-scheme: dark) { .phone { box-shadow: 0 0 0 1.5px #34464B inset, 0 40px 90px -30px rgba(0,0,0,.7); } }
.shot-light, .shot-dark { }
.shot-dark { display: none; }
@media (prefers-color-scheme: dark) { .has-dark .shot-light { display: none; } .has-dark .shot-dark { display: block; } }

/* sections */
section { position: relative; }
.band { padding: clamp(60px, 8vw, 108px) 0; }
.rule { border: 0; height: 1px; background: var(--line); margin: 0; }
.night { background: var(--n-ground); color: var(--n-ink); --ink: var(--n-ink); --muted: var(--n-muted); --secondary: #C9D4D1; --line: var(--n-line);
  --teal: var(--n-teal); --on-teal: var(--n-on-teal); --gold: var(--n-gold); --gold-soft: var(--n-gold-soft); --gold-line: var(--n-gold-line); --surface: var(--n-surface); --raised: var(--n-raised); }
.night ::selection { background: #173A35; }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 48px 0 56px; font-size: 15px; color: var(--muted); }
.foot .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.foot h4 { margin: 0 0 10px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--secondary); }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin: 6px 0; }
.foot a { color: var(--secondary); text-decoration: none; }
.foot a:hover { color: var(--teal); text-decoration: underline; }
@media (max-width: 700px) { .foot .wrap { grid-template-columns: 1fr 1fr; } .foot .wrap > :first-child { grid-column: 1 / -1; } }

/* reveal on scroll (only when JS is on and motion is fine) */
.js .rise { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.js .rise.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .rise { opacity: 1; transform: none; transition: none; } }

/* sticky "Join the beta" on phones (not on the join page itself) */
.pill { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translate(-50%, 140%); z-index: 30; display: none;
  padding: 14px 22px; border-radius: 999px; box-shadow: 0 12px 30px -8px rgba(20,36,42,.45); transition: transform .3s cubic-bezier(.2,.7,.2,1); white-space: nowrap; }
.pill.show { transform: translate(-50%, 0); }
@media (max-width: 860px) { .pill { display: inline-flex; } }
@media (prefers-reduced-motion: reduce) { .pill { transition: none; } }
