/* nazarapp.co
   Layout concept: one night sky you scroll down through; the bead sits in a
   ring of fifteen stars (one per recitation of the daily routine), and every
   section below is a quiet panel under that sky.
   Dark only, on purpose: the app's world is the evening sky. */

:root {
  color-scheme: dark;
  --sky-0: #04060f;
  --sky-1: #070c20;
  --sky-2: #0b1433;
  --panel: #0c1430;
  --panel-2: #111b3d;
  --line: rgba(214, 224, 255, 0.10);
  --line-strong: rgba(214, 224, 255, 0.18);
  --ink: #eef2fa;
  --ink-2: #b4bdd4;
  --ink-3: #8a95ad;
  --tint: #8fb0ff;
  --tint-fill: #2f5bd8;
  --tint-fill-hover: #3a68ea;
  --star: #fff3d6;
  --gold: #f2d08a;
  --gold-surface: rgba(242, 208, 138, 0.08);
  --gold-line: rgba(242, 208, 138, 0.30);

  --display: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --body: "Figtree", -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
  --arabic: "Amiri", "Geeza Pro", "Traditional Arabic", "Noto Naskh Arabic", serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.625rem;
  --step-3: clamp(2rem, 1.4rem + 2.6vw, 2.75rem);
  --step-4: clamp(2.5rem, 1.6rem + 4vw, 4.25rem);

  --radius: 16px;
  --wrap: 72rem;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--sky-1);
  background-image:
    url("img/stars.svg"),
    radial-gradient(60rem 40rem at 70% 8rem, rgba(60, 90, 190, 0.22), transparent 70%),
    linear-gradient(180deg, var(--sky-0) 0, var(--sky-1) 40rem, var(--sky-2) 100%);
  background-repeat: repeat-y, no-repeat, no-repeat;
  background-size: 100% auto, auto, auto;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--tint); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

.skip { position: absolute; left: -999px; top: 8px; background: var(--panel); color: var(--ink); padding: 8px 12px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 12px; }

/* Header */
.site-head { position: relative; z-index: 2; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 1.5rem; letter-spacing: 0.01em; line-height: 1; }
.brand img { width: 32px; height: 32px; }
.nav { display: flex; align-items: center; gap: 4px 6px; flex-wrap: wrap; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 0.95rem; padding: 10px 10px; border-radius: 10px; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav .lang { border: 1px solid var(--line-strong); padding-inline: 12px; margin-left: 4px; font-weight: 600; font-size: 0.85rem; letter-spacing: 0.06em; }

/* Type */
h1, h2, h3 { text-wrap: balance; margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 600; letter-spacing: -0.005em; }
h1 { font-size: var(--step-4); line-height: 1.04; }
h2 { font-size: var(--step-3); line-height: 1.1; }
h3 { font-size: var(--step-1); line-height: 1.3; font-weight: 600; }
p { margin: 0; }
.lead { font-size: var(--step-1); color: var(--ink-2); line-height: 1.55; max-width: 36rem; }
.muted { color: var(--ink-3); }
.small { font-size: var(--step--1); }
.prose { max-width: 42rem; display: grid; gap: 1rem; }
.prose h2 { font-size: var(--step-2); margin-top: 1.5rem; }
.prose h3 { margin-top: 0.5rem; }
.prose ul, .prose ol { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.4rem; }
.prose li::marker { color: var(--ink-3); }

/* Buttons */
.stores { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 20px 8px 16px; border-radius: 14px; text-decoration: none; color: var(--ink); background: var(--panel-2); border: 1px solid var(--line-strong); transition: background 200ms var(--ease), border-color 200ms var(--ease); }
.btn:hover { background: #18244f; color: var(--ink); border-color: rgba(214,224,255,.3); }
.btn svg { width: 24px; height: 24px; flex: none; }
.btn span { display: grid; line-height: 1.15; }
.btn small { font-size: 0.72rem; color: var(--ink-2); letter-spacing: 0.02em; }
.btn strong { font-size: 1.05rem; font-weight: 600; }
.btn.primary { background: var(--tint-fill); border-color: transparent; }
.btn.primary:hover { background: var(--tint-fill-hover); }
.btn.primary small { color: rgba(238,242,250,.8); }
.btn[aria-disabled="true"] { opacity: 0.7; pointer-events: none; }

/* Hero */
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 32px; align-items: center; padding-block: 24px 72px; }
.hero-copy { display: grid; gap: 22px; min-width: 0; }
.hero-meta { color: var(--ink-3); font-size: var(--step--1); }
.ring { position: relative; width: min(100%, 460px); aspect-ratio: 1; margin-inline: auto; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ring .bead { position: absolute; inset: 24%; border-radius: 50%; filter: drop-shadow(0 18px 40px rgba(30, 60, 170, 0.55)); }
.ring .bead img { width: 100%; height: 100%; object-fit: contain; }

/* Sections */
.section { padding-block: 72px; }
.section-head { display: grid; gap: 12px; margin-bottom: 36px; max-width: 44rem; }
.section-head p { color: var(--ink-2); }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* Routine list */
.routine { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(12, 20, 48, 0.72); overflow: hidden; max-width: 46rem; }
.routine li + li { border-top: 1px solid var(--line); }
.routine a { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 18px; min-height: 60px; color: var(--ink); text-decoration: none; }
.routine a:hover { background: rgba(143, 176, 255, 0.06); }
.routine .n { font-variant-numeric: tabular-nums; color: var(--ink-3); font-size: var(--step--1); }
.routine .t { display: grid; min-width: 0; }
.routine .t small { color: var(--ink-3); font-size: var(--step--1); }
.routine .x { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); font-variant-numeric: tabular-nums; font-size: var(--step--1); }
.routine .x svg { width: 12px; height: 12px; color: var(--star); }
.routine-total { margin-top: 14px; color: var(--ink-3); font-size: var(--step--1); }

/* Screens */
.screens { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; max-width: 60rem; }
.screen { display: grid; gap: 14px; align-content: start; }
.screen figure { margin: 0; border-radius: 28px; overflow: hidden; border: 1px solid var(--line-strong); background: var(--sky-0); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8); aspect-ratio: 1206 / 2504; }
.screen figure img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.screen h3 { font-size: 1.05rem; }
.screen p { color: var(--ink-2); font-size: 0.95rem; }

/* Groups */
.groups { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.group { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 20px 10px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(12, 20, 48, 0.6); }
.group img { width: 72px; height: 72px; }
.group strong { font-size: 0.95rem; font-weight: 600; line-height: 1.25; }
.group small { color: var(--ink-3); font-size: 0.8rem; font-variant-numeric: tabular-nums; }

/* Split */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.split > * { min-width: 0; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checks li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; color: var(--ink-2); }
.checks svg { width: 16px; height: 16px; margin-top: 5px; color: var(--star); }
.checks strong { color: var(--ink); font-weight: 600; }

/* Plans */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 52rem; }
.plan { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; background: rgba(12, 20, 48, 0.72); display: grid; gap: 16px; align-content: start; }
.plan.gold { border-color: var(--gold-line); background: linear-gradient(180deg, var(--gold-surface), rgba(12, 20, 48, 0.72)); }
.plan h3 { font-family: var(--display); font-size: var(--step-2); font-weight: 600; }
.plan.gold h3 { color: var(--gold); }
.price { display: grid; gap: 4px; }
.price strong { font-size: var(--step-1); font-variant-numeric: tabular-nums; }
.price span { color: var(--ink-3); font-size: var(--step--1); }

/* Prayer page */
.crumbs { font-size: var(--step--1); color: var(--ink-3); display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--ink-3); }
.prayer-head { display: grid; gap: 14px; padding-block: 24px 32px; max-width: 46rem; }
.prayer-head .meta { color: var(--ink-3); font-size: var(--step--1); }
.player { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(12, 20, 48, 0.8); max-width: 30rem; }
.player button { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--tint-fill); color: #fff; display: grid; place-items: center; cursor: pointer; }
.player button:hover { background: var(--tint-fill-hover); }
.player button svg { width: 20px; height: 20px; }
.player .bar { flex: 1; height: 4px; border-radius: 4px; background: rgba(214, 224, 255, 0.14); position: relative; overflow: hidden; cursor: pointer; }
.player .bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--ink); border-radius: 4px; }
.player time { font-variant-numeric: tabular-nums; color: var(--ink-3); font-size: var(--step--1); min-width: 3.2rem; text-align: right; }
.text-block { border-top: 1px solid var(--line); padding-block: 28px; display: grid; gap: 12px; max-width: 46rem; }
.text-block h2 { font-family: var(--body); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.arabic { font-family: var(--arabic); font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem); line-height: 2.1; direction: rtl; text-align: right; color: var(--ink); white-space: pre-line; }
.lines { white-space: pre-line; }
.translit { font-style: italic; color: var(--ink); font-size: var(--step-1); line-height: 1.7; white-space: pre-line; }
.next { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 10px; }
.next a { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; text-decoration: none; color: var(--ink); background: rgba(12, 20, 48, 0.6); min-height: 44px; }
.next a:hover { border-color: var(--line-strong); }

/* Call to action panel */
.cta { border: 1px solid var(--line-strong); border-radius: 24px; padding: 32px; background: radial-gradient(30rem 16rem at 85% 0, rgba(60, 90, 190, 0.25), transparent 70%), rgba(12, 20, 48, 0.85); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: center; }
.cta img { width: 96px; height: 96px; }
.cta > div { display: grid; gap: 14px; min-width: 0; }
.cta h2 { font-size: var(--step-2); }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 46rem; }
.faq details { border: 1px solid var(--line); border-radius: 14px; background: rgba(12, 20, 48, 0.6); }
.faq summary { cursor: pointer; padding: 16px 18px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ink-3); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq .a { padding: 0 18px 18px; color: var(--ink-2); display: grid; gap: 10px; }

.legal-head { padding-block: 24px 24px; display: grid; gap: 10px; }
.legal-head p { color: var(--ink-3); font-size: var(--step--1); }
.legal { padding-bottom: 72px; }
.legal .prose { color: var(--ink-2); }
.legal .prose strong, .legal .prose h2, .legal .prose h3 { color: var(--ink); }
.legal table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-top: 1px solid var(--line); }
.legal th { color: var(--ink); font-weight: 600; }
.table-scroll { overflow-x: auto; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); margin-top: 24px; background: rgba(4, 6, 15, 0.6); }
.site-foot .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 32px; padding-block: 40px 48px; }
.site-foot h2 { font-family: var(--body); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-bottom: 10px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.site-foot a { color: var(--ink-2); text-decoration: none; display: inline-block; padding-block: 6px; }
.site-foot a:hover { color: var(--ink); }
.site-foot .brand { display: inline-flex; color: var(--ink); padding: 0; }
.site-foot p { color: var(--ink-3); font-size: var(--step--1); }
.site-foot .about { display: grid; gap: 10px; align-content: start; }

@media (max-width: 900px) {
  .groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); padding-block: 8px 48px; gap: 8px; }
  .ring { width: min(78vw, 340px); order: -1; }
  .screens { grid-template-columns: minmax(0, 1fr); max-width: 22rem; margin-inline: auto; gap: 36px; }
  .plans { grid-template-columns: minmax(0, 1fr); }
  .section { padding-block: 52px; }
  .cta { grid-template-columns: minmax(0, 1fr); padding: 24px; }
  .cta img { width: 72px; height: 72px; }
  .site-foot .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .site-foot .about { grid-column: 1 / -1; }
  .nav a { padding-inline: 8px; }
}
@media (max-width: 400px) {
  .site-head .brand span { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .ring .lit { animation: light 900ms var(--ease) both; }
  @keyframes light { from { opacity: 0.15; transform: scale(0.6); } to { opacity: 1; transform: scale(1); } }
}
