/* Tahir — site styles. Colours follow the app's Sky Clock palette. */

@font-face { font-family: "Sora"; font-weight: 600; font-display: swap; src: url("fonts/Sora-SemiBold.woff") format("woff"); }
@font-face { font-family: "Sora"; font-weight: 700; font-display: swap; src: url("fonts/Sora-Bold.woff") format("woff"); }
@font-face { font-family: "DM Sans"; font-weight: 400; font-display: swap; src: url("fonts/DMSans-Regular.woff") format("woff"); }
@font-face { font-family: "DM Sans"; font-weight: 500; font-display: swap; src: url("fonts/DMSans-Medium.woff") format("woff"); }
@font-face { font-family: "DM Sans"; font-weight: 600; font-display: swap; src: url("fonts/DMSans-SemiBold.woff") format("woff"); }

:root {
  /* The live sky (set by sky.js from the visitor's local time; Asr until then). */
  --sky: #F3B56E;
  --ground: #8C4F27;
  --ink: #16120E;
  --ink-soft: rgba(22, 18, 14, 0.78);

  --canvas: #FFFFFF;
  --surface: #F6F3EE;
  --text: #16120E;
  --muted: #4B5160;
  --line: rgba(22, 18, 14, 0.10);
  --accent: #3B4A7D;
  --night: #141833;

  --stone-l: #F4EBDA; --stone-r: #D4CCBE;
  --black-l: #17161B; --black-r: #2B2E33;
  --gold-l: #E9A53A;  --gold-r: #F6D07F;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #10132A;
    --surface: #1A1F3D;
    --text: #F6F2EA;
    --muted: #B9BCD6;
    --line: rgba(246, 242, 234, 0.12);
    --accent: #9AA6E0;
  }
}
:root[data-theme="dark"] {
  --canvas: #10132A; --surface: #1A1F3D; --text: #F6F2EA; --muted: #B9BCD6;
  --line: rgba(246, 242, 234, 0.12); --accent: #9AA6E0;
}

/* Night sky: moonlit stone, softened gold (as in the app). */
.is-night {
  --stone-l: #9A9DBE; --stone-r: #6E7196;
  --black-l: #07070C; --black-r: #1A1C2E;
  --gold-l: #C99A45;  --gold-r: #E9D9A6;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font: 400 17px/1.6 "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: "Sora", "DM Sans", sans-serif; font-weight: 600; line-height: 1.15; margin: 0; }
a { color: var(--accent); }
img { max-width: 100%; display: block; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* ---- Sky header ---- */
.sky {
  background: var(--sky);
  color: var(--ink);
  transition: background-color 1.2s ease, color 1.2s ease;
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-family: "Sora", sans-serif; font-weight: 700; font-size: 22px; }
.brand svg { width: 30px; height: auto; }
.nav-links { display: flex; gap: 20px; }
.nav-links a { color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

.hero { display: grid; gap: 32px; padding-top: 24px; }
@media (min-width: 880px) { .hero { padding-top: 40px; } }
.hero-copy { padding-bottom: 8px; }
@media (min-width: 880px) { .hero-copy { padding-bottom: 72px; max-width: 600px; } }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--ink-soft); margin: 0 0 10px; }
.hero h1 { font-size: clamp(40px, 7vw, 64px); letter-spacing: -0.02em; }
.hero p.lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--ink-soft); margin: 18px 0 28px; max-width: 34ch; }

.store {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: 999px;
  background: var(--ink); color: var(--sky);
  font-weight: 600; font-size: 16px; text-decoration: none;
}
.store svg { width: 18px; height: 18px; fill: currentColor; }

/* Horizon: two minarets and the Kaabah on curved ground, as in the app */
.horizon { position: relative; height: 285px; margin-top: 8px; overflow: hidden; }
.landmark { position: absolute; bottom: 18px; left: 50%; width: 230px; transform: translateX(-50%); }
/* Wide screens: the horizon rises beside the headline instead of below it. */
@media (min-width: 880px) {
  .hero { position: relative; z-index: 1; }
  .horizon { height: 470px; margin-top: -380px; pointer-events: none; }
  .landmark { left: 76%; width: 300px; }
}
.ground { position: absolute; bottom: 0; left: 0; width: 100%; height: 44px; }
.sl { fill: var(--stone-l); } .sr { fill: var(--stone-r); }
.bl { fill: var(--black-l); } .br { fill: var(--black-r); }
.gl { fill: var(--gold-l); }  .gr { fill: var(--gold-r); }
.gd { fill: var(--ground); transition: fill 1.2s ease; }
#sun { position: absolute; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: #FFF4D6; left: 82%; top: 30%; }
#moon { position: absolute; width: 52px; height: 52px; right: 5%; top: 5%; }
#moon[hidden], #sun[hidden] { display: none; }

.phone {
  border-radius: 44px; padding: 8px; background: #16120E;
  box-shadow: 0 30px 60px -20px rgba(16, 19, 42, 0.45);
}
.phone img { border-radius: 36px; width: 100%; height: auto; }

/* ---- Sections ---- */
main section { padding: 72px 0; }
.section-label { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
h2 { font-size: clamp(28px, 4vw, 38px); letter-spacing: -0.01em; max-width: 22ch; }
.section-intro { color: var(--muted); max-width: 56ch; margin: 14px 0 0; }

.features { display: grid; gap: 16px; margin-top: 36px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .features { grid-template-columns: 1fr 1fr 1fr; } }
.feature { background: var(--surface); border-radius: 22px; padding: 22px; }
.feature .dot { width: 28px; height: 28px; border-radius: 50%; margin-bottom: 14px; background: var(--dot); }
/* Prayer colours; Fajr and Isha lighten on dark backgrounds, as in the app. */
:root { --c-fajr: #3B4A7D; --c-dhuhr: #9CCDEB; --c-asr: #F3B56E; --c-maghrib: #E0714F; --c-isha: #1A1F3D; --c-moon: #E9D9A6; --c-kaabah: #17161B; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --c-fajr: #7584C4; --c-isha: #5F66A3; --c-kaabah: #E9A53A; } }
:root[data-theme="dark"] { --c-fajr: #7584C4; --c-isha: #5F66A3; --c-kaabah: #E9A53A; }
.feature h3 { font-size: 19px; margin-bottom: 6px; }
.feature p { margin: 0; color: var(--muted); font-size: 16px; }

.shots { display: grid; gap: 20px; margin-top: 36px; grid-template-columns: repeat(3, minmax(220px, 1fr)); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.shots figure { margin: 0; scroll-snap-align: start; }
.shots figcaption { margin-top: 12px; font-size: 15px; color: var(--muted); text-align: center; }

.widgets { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-end; margin-top: 32px; }
.widgets img { height: auto; filter: drop-shadow(0 18px 30px rgba(16, 19, 42, 0.25)); }
.widgets .w-medium { width: min(420px, 100%); }
.widgets .w-small { width: min(196px, 46%); }

.promise { background: var(--night); color: #F6F2EA; border-radius: 28px; padding: 40px 28px; }
@media (min-width: 720px) { .promise { padding: 56px; } }
.promise h2 { color: #F6F2EA; }
.promise p { color: #D5D8EA; max-width: 56ch; margin: 14px 0 0; }
.promise a { color: #E9D9A6; }

/* ---- Prose pages (privacy, support) ---- */
.page-head { padding-top: 24px; padding-bottom: 48px; }
.page-head h1 { font-size: clamp(34px, 5vw, 48px); }
.page-head p { color: var(--ink-soft); margin: 10px 0 0; }
.prose { padding-top: 40px; padding-bottom: 72px; }
.prose > * { max-width: 720px; }
.prose h2 { font-size: 22px; margin: 40px 0 10px; max-width: none; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--text); }
.prose ul { padding-left: 22px; }
.prose .muted { color: var(--muted); }

.contact-card { background: var(--surface); border-radius: 22px; padding: 24px; margin-bottom: 40px; }
.contact-card p { margin: 0; }
.contact-card .email { font-family: "Sora", sans-serif; font-weight: 600; font-size: clamp(18px, 3.4vw, 22px); overflow-wrap: anywhere; }

details { border-top: 1px solid var(--line); padding: 16px 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: "Sora", sans-serif; color: var(--muted); }
details[open] summary::after { content: "–"; }
details p, details ul { margin: 10px 0 0; color: var(--muted); }

/* ---- Footer ---- */
footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
footer a { color: var(--muted); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { .sky { transition: none; } }
