/* Prayer Keeper — one stylesheet, no build step.
 *
 * The palette is sampled from the app's SkyPalette (the iOS source of
 * truth, ColorScheme.swift): light mode is the Dhuhr/midday stop (12.5),
 * dark mode is the night face the Quran surfaces use (hour 21.0, the
 * blend of the 19.75 and 22.0 stops). The gradient stop offsets
 * (0 / 32% / 60% / 100%) are the app's own.
 */

:root {
  --sky-top: #3fa3e6;
  --sky-upper: #6ab8eb;
  --sky-mid: #9fd2f2;
  --sky-bottom: #fdf0cd;
  --accent: #1f78b5;
  --accent-soft: #84b6dd;
  --on-accent: #ffffff;
  --fg: #1d1a2c;                      /* the ink */
  --fg-muted: rgba(29, 26, 44, 0.62);
  --fg-faint: rgba(29, 26, 44, 0.42);
  --card: rgba(255, 255, 255, 0.5);
  --card-border: rgba(255, 255, 255, 0.65);
  --land-far: #c7dcaf;
  --land-near: #9dc189;
  --stars-opacity: 0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --sky-top: #2e2a6c;
    --sky-upper: #2d2b6c;
    --sky-mid: #2c2c6b;
    --sky-bottom: #2c2f6b;
    --accent: #a09ee3;                /* the night face's periwinkle */
    --accent-soft: #c7c4ef;
    --on-accent: #1d1a2c;             /* ink glyph on the light accent */
    --fg: #ffffff;
    --fg-muted: rgba(255, 255, 255, 0.7);
    --fg-faint: rgba(255, 255, 255, 0.45);
    --card: rgba(255, 255, 255, 0.08);
    --card-border: rgba(255, 255, 255, 0.14);
    --land-far: #2b2957;
    --land-near: #221f49;
    --stars-opacity: 1;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color: var(--fg);
  background: linear-gradient(
    180deg,
    var(--sky-top) 0%,
    var(--sky-upper) 32%,
    var(--sky-mid) 60%,
    var(--sky-bottom) 100%
  );
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

/* The night's still stars: one element, drawn with box-shadows. */
.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: var(--stars-opacity);
}
.stars::before {
  content: "";
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    8vw 9vh 0 0 rgba(255, 255, 255, 0.85),
    22vw 4vh 0 -0.5px rgba(255, 255, 255, 0.5),
    31vw 16vh 0 0 rgba(255, 255, 255, 0.7),
    45vw 7vh 1px 0 rgba(255, 255, 255, 0.9),
    58vw 13vh 0 -0.5px rgba(255, 255, 255, 0.45),
    69vw 5vh 0 0 rgba(255, 255, 255, 0.75),
    81vw 11vh 0 -0.5px rgba(255, 255, 255, 0.6),
    92vw 6vh 1px 0 rgba(255, 255, 255, 0.8),
    15vw 24vh 0 -1px rgba(255, 255, 255, 0.4),
    52vw 22vh 0 -0.5px rgba(255, 255, 255, 0.5),
    88vw 22vh 0 -1px rgba(255, 255, 255, 0.45),
    73vw 19vh 0 0 rgba(255, 255, 255, 0.65);
}

.page {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

/* MARK: - Header */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--fg);
  font-weight: 600;
  font-size: 17px;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

nav a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  margin-left: 18px;
}

nav a:hover { color: var(--fg); }

/* MARK: - Hero */

.hero {
  text-align: center;
  padding: 64px 0 48px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

h1 {
  font-size: clamp(38px, 7vw, 64px);
  font-weight: 200; /* the app's thin large titles */
  letter-spacing: -0.01em;
  line-height: 1.12;
  margin: 14px 0 18px;
}

.lede {
  font-size: 18px;
  color: var(--fg-muted);
  max-width: 560px;
  margin: 0 auto 32px;
}

.badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}

.badge.quiet {
  background: var(--card);
  color: var(--fg);
  border: 0.5px solid var(--card-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.platforms {
  margin-top: 16px;
  font-size: 13px;
  color: var(--fg-faint);
}

/* MARK: - The oasis at the hero's foot */

.oasis {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 28px;
}
.oasis .far { fill: var(--land-far); }
.oasis .near { fill: var(--land-near); }

/* MARK: - Feature cards (the app's glass) */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  padding: 8px 0 48px;
}

.card {
  background: var(--card);
  border: 0.5px solid var(--card-border);
  border-radius: 24px;
  padding: 24px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.card h3 {
  font-size: 16px;
  font-weight: 650;
  margin-bottom: 6px;
}

.card p {
  font-size: 14px;
  color: var(--fg-muted);
}

/* MARK: - Legal prose pages */

main.prose {
  background: var(--card);
  border: 0.5px solid var(--card-border);
  border-radius: 28px;
  padding: 40px clamp(24px, 5vw, 56px);
  margin: 16px 0 48px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.prose h1 {
  font-size: 34px;
  text-align: left;
  margin: 0 0 4px;
}

.prose .updated {
  font-size: 13px;
  color: var(--fg-faint);
  margin-bottom: 28px;
}

.prose h2 {
  font-size: 19px;
  font-weight: 650;
  margin: 28px 0 8px;
}

.prose p, .prose li {
  font-size: 15px;
  color: var(--fg-muted);
  margin-bottom: 10px;
}

.prose ul { padding-left: 22px; }

.prose a { color: var(--accent); }

/* MARK: - Footer */

footer {
  text-align: center;
  padding: 28px 0 40px;
  font-size: 13px;
  color: var(--fg-faint);
}

footer a {
  color: var(--fg-muted);
  text-decoration: none;
  margin: 0 6px;
}

footer a:hover { color: var(--fg); }
