/* Qibla, Prayer time — site styles. Static, no external requests. */
:root {
  --green-950: #021a14;
  --green-900: #04241c;
  --green-800: #063628;
  --green-700: #0a4a39;
  --green: #00705a;
  --mint: #38cb98;
  --gold: #c9a24b;
  --gold-lt: #e3c57d;
  --gold-dk: #8f6e26;
  --cream: #f6f0e2;
  --paper: #fbf8f1;
  --ink: #10261f;
  --ink-soft: #3c5149;
  --line: rgba(16, 38, 31, 0.12);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 22px;
  --wrap: 1180px;
  --pad: clamp(20px, 5vw, 48px);
  --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke='%23c9a24b' stroke-width='1'%3E%3Crect x='31' y='31' width='34' height='34'/%3E%3Crect x='31' y='31' width='34' height='34' transform='rotate(45 48 48)'/%3E%3Ccircle cx='48' cy='48' r='9'/%3E%3Cpath d='M0 48h24M72 48h24M48 0v24M48 72v24M0 0l19 19M96 0L77 19M0 96l19-19M96 96L77 77'/%3E%3C/g%3E%3C/svg%3E");
}

*, *::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;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--green); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--green-700); }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; letter-spacing: -0.01em; margin: 0; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--gold-lt); color: var(--green-950); padding: 10px 16px; border-radius: 10px; font-weight: 600; }
.skip:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(4, 36, 28, 0.86);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid rgba(201, 162, 75, 0.22);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--cream); text-decoration: none; font-family: var(--serif); font-size: 19px; font-weight: 600; white-space: nowrap; }
.brand:hover { color: #fff; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 0 0 1px rgba(227, 197, 125, 0.45); }
.nav { display: flex; align-items: center; gap: clamp(10px, 2.4vw, 28px); }
.nav a { color: rgba(246, 240, 226, 0.84); text-decoration: none; font-size: 15px; padding: 6px 2px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold-lt); }
.nav a[aria-current="page"] { box-shadow: inset 0 -1px 0 var(--gold); }
.nav .nav-cta { color: var(--green-950); background: var(--gold-lt); padding: 8px 16px; border-radius: 999px; font-weight: 600; }
.nav .nav-cta:hover { background: #f0d79a; color: var(--green-950); }
.nav .nav-features { display: inline; }
@media (max-width: 640px) {
  .brand span { font-size: 16px; }
  .nav .nav-features, .nav .nav-cta, .nav .nav-terms { display: none; }
  .nav a { font-size: 14px; }
  .nav { gap: 14px; }
}
@media (max-width: 370px) { .brand span { display: none; } }

/* ---------- App Store button ---------- */
.store-btn {
  display: inline-flex; align-items: center; gap: 12px;
  background: #000; color: #fff; text-decoration: none;
  padding: 11px 22px 11px 18px; border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
}
.store-btn:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 16px 34px -14px rgba(0, 0, 0, 0.7); }
.store-btn svg { width: 26px; height: 26px; fill: currentColor; flex: none; }
.store-btn small { display: block; font-size: 11.5px; line-height: 1.1; opacity: 0.85; letter-spacing: 0.02em; }
.store-btn strong { display: block; font-size: 20px; line-height: 1.15; font-weight: 600; letter-spacing: -0.01em; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  color: var(--cream);
  background:
    radial-gradient(1200px 700px at 78% 40%, rgba(56, 203, 152, 0.13), transparent 60%),
    radial-gradient(900px 600px at 10% 110%, rgba(201, 162, 75, 0.12), transparent 60%),
    linear-gradient(180deg, var(--green-900), var(--green-950));
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image: var(--star); background-size: 96px 96px; opacity: 0.07;
  -webkit-mask-image: radial-gradient(ellipse at 70% 45%, #000 0%, transparent 70%);
  mask-image: radial-gradient(ellipse at 70% 45%, #000 0%, transparent 70%);
}
html.webgl-ready .hero::before { opacity: 0; }
.hero-canvas { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity 1.2s ease; }
html.webgl-ready .hero-canvas { opacity: 1; }
.hero .wrap {
  display: grid; grid-template-columns: 1.02fr 1fr; align-items: center; gap: 24px;
  min-height: min(calc(100svh - 64px), 860px); padding-top: 48px; padding-bottom: 56px;
}
.hero-copy { max-width: 560px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-lt); margin-bottom: 22px; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.hero h1 { font-size: clamp(40px, 6.2vw, 74px); color: #fbf6ea; margin-bottom: 22px; }
.hero h1 em { font-style: italic; color: var(--gold-lt); font-weight: 500; }
.hero .lede { font-size: clamp(17px, 1.6vw, 19.5px); color: rgba(246, 240, 226, 0.82); max-width: 33em; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; padding: 0; list-style: none; }
.facts li { font-size: 13.5px; color: rgba(246, 240, 226, 0.88); border: 1px solid rgba(227, 197, 125, 0.35); border-radius: 999px; padding: 5px 12px; }
.hero-stage { position: relative; aspect-ratio: 1 / 1; width: 100%; max-width: 620px; justify-self: center; }
.hero-fallback { position: absolute; inset: 8%; opacity: 0; transition: opacity 0.6s ease; }
html.no-webgl .hero-fallback { opacity: 1; }
.hero-caption { position: absolute; left: 0; right: 0; bottom: -6px; text-align: center; font-size: 12.5px; letter-spacing: 0.08em; color: rgba(246, 240, 226, 0.55); }
@media (max-width: 880px) {
  .hero .wrap { grid-template-columns: 1fr; min-height: 0; padding-top: 40px; padding-bottom: 40px; gap: 8px; }
  .hero-copy { max-width: none; }
  .hero-stage { max-width: 440px; width: 100%; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-head { max-width: 680px; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head .kicker { font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-dk); margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.section-head .kicker::before { content: ""; width: 22px; height: 1px; background: currentColor; }
.section-head h2 { font-size: clamp(32px, 4.2vw, 50px); margin-bottom: 16px; color: var(--green-900); }
.section-head p { color: var(--ink-soft); font-size: 18px; margin: 0; }

.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.feature {
  position: relative; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(26px, 3.4vw, 40px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 20px 50px -38px rgba(4, 36, 28, 0.45);
}
.feature::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px;
  background-image: var(--star); background-size: 60px 60px; opacity: 0.12;
  -webkit-mask-image: radial-gradient(circle, #000, transparent 70%); mask-image: radial-gradient(circle, #000, transparent 70%);
}
.feature .icon { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; background: linear-gradient(145deg, var(--green), var(--green-800)); color: var(--gold-lt); margin-bottom: 22px; }
.feature .icon svg { width: 28px; height: 28px; }
.feature h3 { font-size: 26px; color: var(--green-900); margin-bottom: 10px; }
.feature p { color: var(--ink-soft); margin-bottom: 14px; }
.feature ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; font-size: 15.5px; color: var(--ink); }
.feature li { position: relative; padding-left: 20px; }
.feature li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); }
.feature .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.feature .tags span { font-size: 13px; background: var(--cream); color: var(--green-800); border-radius: 8px; padding: 3px 9px; }
@media (max-width: 760px) { .features { grid-template-columns: 1fr; } }

/* ---------- Screens ---------- */
.screens-section { background: linear-gradient(180deg, var(--cream), var(--paper)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.screens {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px);
  margin: 0; padding: 0; list-style: none;
}
.screens figure { margin: 0; }
.phone {
  position: relative; border-radius: 15% / 7%; padding: 3.6%;
  background: linear-gradient(150deg, #2b2f2d, #0c0e0d 40%, #242826);
  box-shadow: 0 0 0 1px rgba(201, 162, 75, 0.35), 0 30px 60px -30px rgba(4, 36, 28, 0.6), inset 0 0 0 2px #3c413e;
}
.phone::before { content: ""; position: absolute; z-index: 2; top: 5.4%; left: 50%; width: 28%; height: 3.2%; transform: translateX(-50%); background: #050605; border-radius: 999px; }
.phone img { width: 100%; height: auto; aspect-ratio: 1206 / 2622; object-fit: cover; object-position: top center; border-radius: 12% / 5.6%; background: #e9e4d8; }
.screens figcaption { text-align: center; margin-top: 18px; }
.screens figcaption strong { display: block; font-family: var(--serif); font-size: 20px; color: var(--green-900); font-weight: 600; }
.screens figcaption span { font-size: 14.5px; color: var(--ink-soft); }
@media (max-width: 900px) {
  .screens {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(62vw, 260px);
    overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px var(--pad) 16px; margin: 0 calc(var(--pad) * -1);
    scrollbar-width: thin;
  }
  .screens li { scroll-snap-align: center; }
}
.swipe-hint { display: none; font-size: 13.5px; color: var(--ink-soft); margin-top: 8px; text-align: center; }
@media (max-width: 900px) { .swipe-hint { display: block; } }

/* ---------- Languages ---------- */
.langs { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.langs li { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 8px 15px; font-size: 16.5px; color: var(--green-900); }

/* ---------- Privacy band ---------- */
.band {
  position: relative; overflow: hidden; color: var(--cream);
  background: radial-gradient(800px 400px at 85% 0%, rgba(56, 203, 152, 0.16), transparent 60%), linear-gradient(180deg, var(--green-800), var(--green-900));
}
.band::before { content: ""; position: absolute; inset: 0; background-image: var(--star); background-size: 96px 96px; opacity: 0.06; pointer-events: none; }
.band .section-head h2 { color: #fbf6ea; }
.band .section-head p { color: rgba(246, 240, 226, 0.8); }
.band .section-head .kicker { color: var(--gold-lt); }
.promises { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 0 0 40px; padding: 0; list-style: none; }
.promises li { border-top: 1px solid rgba(227, 197, 125, 0.45); padding-top: 20px; }
.promises strong { display: block; font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--gold-lt); margin-bottom: 8px; }
.promises span { color: rgba(246, 240, 226, 0.82); font-size: 15.5px; }
.band a.more { color: var(--gold-lt); font-weight: 600; }
.band a.more:hover { color: #fff; }
@media (max-width: 900px) { .promises { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .promises { grid-template-columns: 1fr; } }

/* ---------- Note + CTA ---------- */
.note {
  display: flex; gap: 16px; align-items: flex-start;
  border: 1px solid rgba(201, 162, 75, 0.5); background: #fffaf0; border-radius: 16px; padding: 18px 22px; color: var(--ink-soft); font-size: 15.5px;
}
.note svg { flex: none; width: 22px; height: 22px; color: var(--gold-dk); margin-top: 2px; }
.note p, .cta .note p { margin: 0; color: inherit; }
.cta { text-align: center; }
.cta img.app-icon { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 24px; box-shadow: 0 20px 40px -20px rgba(4, 36, 28, 0.6), 0 0 0 1px rgba(201, 162, 75, 0.4); }
.cta h2 { font-size: clamp(30px, 4vw, 46px); color: var(--green-900); margin-bottom: 14px; }
.cta p { color: var(--ink-soft); margin-bottom: 28px; }
.cta .store-btn { margin: 0 auto; }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-950); color: rgba(246, 240, 226, 0.72); font-size: 14.5px; padding: 48px 0 40px; border-top: 1px solid rgba(201, 162, 75, 0.25); }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: start; }
.site-footer .brand { margin-bottom: 12px; }
.site-footer p { margin: 0 0 6px; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 26px; }
.footer-nav a { color: var(--cream); text-decoration: none; }
.footer-nav a:hover { color: var(--gold-lt); text-decoration: underline; }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid rgba(246, 240, 226, 0.12); padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 13.5px; }
.site-footer a.email { color: var(--gold-lt); }
@media (max-width: 700px) {
  .site-footer .wrap { grid-template-columns: 1fr; }
  .footer-nav { justify-content: flex-start; }
}

/* ---------- Document pages ---------- */
.page-hero { position: relative; overflow: hidden; color: var(--cream); background: linear-gradient(180deg, var(--green-900), var(--green-800)); padding: clamp(48px, 8vw, 92px) 0 clamp(40px, 6vw, 68px); }
.page-hero::before { content: ""; position: absolute; inset: 0; background-image: var(--star); background-size: 96px 96px; opacity: 0.08; -webkit-mask-image: linear-gradient(90deg, transparent 20%, #000); mask-image: linear-gradient(90deg, transparent 20%, #000); }
.page-hero .wrap { position: relative; }
.page-hero h1 { font-size: clamp(36px, 5.4vw, 60px); color: #fbf6ea; margin-bottom: 14px; }
.page-hero p { color: rgba(246, 240, 226, 0.82); max-width: 40em; margin: 0; font-size: 18px; }
.page-hero .meta { margin-top: 18px; font-size: 14.5px; color: var(--gold-lt); }
.doc-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(64px, 9vw, 110px); }
.toc { position: sticky; top: 92px; align-self: start; font-size: 14.5px; }
.toc h2 { font-family: var(--sans); font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-dk); margin-bottom: 12px; font-weight: 600; }
.toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 4px 0 4px 14px; color: var(--ink-soft); text-decoration: none; margin-left: -1px; border-left: 1px solid transparent; }
.toc a:hover { color: var(--green); border-left-color: var(--gold); }
.doc { max-width: 720px; }
.doc h2 { font-size: clamp(25px, 2.8vw, 31px); color: var(--green-900); margin: 2.2em 0 0.6em; scroll-margin-top: 90px; }
.doc h2:first-child { margin-top: 0; }
.doc h3 { font-family: var(--sans); font-size: 18px; font-weight: 650; color: var(--green-900); margin: 1.6em 0 0.5em; }
.doc p, .doc li { color: #24392f; }
.doc ul { padding-left: 1.2em; margin: 0 0 1em; }
.doc li { margin-bottom: 0.45em; }
.doc li::marker { color: var(--gold); }
.doc .callout { border-left: 3px solid var(--gold); background: #fffaf0; padding: 14px 18px; border-radius: 0 12px 12px 0; margin: 1.2em 0; }
.doc .callout p:last-child { margin: 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 0.6em 0 1.4em; font-size: 15.5px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 11px 12px; border-bottom: 1px solid var(--line); }
.doc th { font-weight: 600; color: var(--green-900); background: var(--cream); }
@media (max-width: 860px) {
  .doc-layout { grid-template-columns: 1fr; }
  .toc { position: static; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
}

/* FAQ */
.faq { display: grid; gap: 12px; margin-bottom: 1.4em; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 0 20px; }
.faq details[open] { box-shadow: 0 18px 40px -34px rgba(4, 36, 28, 0.5); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 30px 18px 0; position: relative; font-weight: 600; color: var(--green-900); font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 4px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--gold-dk); border-bottom: 2px solid var(--gold-dk); transform: translateY(-70%) rotate(45deg); transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq .answer { padding-bottom: 18px; color: #24392f; }
.faq .answer ol, .faq .answer ul { padding-left: 1.3em; margin: 0 0 0.8em; }
.faq .answer li { margin-bottom: 0.35em; }
.contact-card { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; justify-content: space-between; background: linear-gradient(140deg, var(--green-800), var(--green-900)); color: var(--cream); border-radius: var(--radius); padding: clamp(24px, 4vw, 36px); margin: 0.4em 0 1.2em; }
.contact-card h2 { color: #fbf6ea; margin: 0 0 6px !important; }
.contact-card p { color: rgba(246, 240, 226, 0.82) !important; margin: 0; }
.contact-card .mail-btn { display: inline-flex; align-items: center; gap: 10px; background: var(--gold-lt); color: var(--green-950); text-decoration: none; font-weight: 600; border-radius: 999px; padding: 12px 22px; word-break: break-all; }
.contact-card .mail-btn:hover { background: #f0d79a; color: var(--green-950); }

/* 404 */
.notfound { min-height: calc(100svh - 64px - 200px); display: grid; place-items: center; text-align: center; padding: 80px 0; }
.notfound .big { font-family: var(--serif); font-size: clamp(80px, 16vw, 160px); line-height: 1; color: var(--gold); margin-bottom: 8px; }
.notfound h1 { font-size: clamp(28px, 4vw, 40px); color: var(--green-900); margin-bottom: 12px; }
.notfound p { color: var(--ink-soft); }
.btn-ghost { display: inline-block; margin: 8px 6px 0; border: 1px solid var(--green); color: var(--green); border-radius: 999px; padding: 10px 20px; text-decoration: none; font-weight: 600; }
.btn-ghost:hover { background: var(--green); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
