/* Al-Uns Billah website. No frameworks, no third-party fonts, no trackers.
   Colours are the app's own Najm theme (design/tokens.json), in its dark form. */
:root {
  --night: #06120d;      /* page */
  --ink: #0c2018;        /* cards */
  --ash: #123526;        /* raised */
  --line: #1c4434;
  --gold: #e9c869;       /* accent, 10:1 on the page */
  --gold-deep: #b8922e;
  --cream: #f6f0e1;      /* headings */
  --mint: #6fd0ac;
  --grey: #a9b8ad;       /* muted text, 8:1 on the page */
  --soft: #d5dccf;       /* body text in sections */
  --text: #ebe9dc;
  --radius: 18px;
  --max: 1120px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--night); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--night); color: var(--text); font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--gold); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--cream); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; color: var(--cream); margin: 0 0 .5em; }
h1 { font-size: clamp(2.6rem, 7vw, 4.4rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); letter-spacing: -.01em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.muted { color: var(--grey); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--ash); padding: 8px 12px; z-index: 10; }

/* ---- header / footer ---- */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(6,18,13,.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid #0f2a1f; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--cream); text-decoration: none; font-family: var(--serif); font-size: 1.3rem; font-weight: 600; white-space: nowrap; }
.brand svg { width: 30px; height: 30px; flex: none; color: var(--gold); }
.nav { display: flex; gap: 20px; font-size: .95rem; }
.nav a { color: var(--grey); text-decoration: none; padding: 6px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold); }
.site-footer { border-top: 1px solid #0f2a1f; margin-top: 96px; padding: 40px 0 56px; color: var(--grey); font-size: .9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer a { color: var(--grey); }
.site-footer a:hover { color: var(--gold); }
.site-footer p { margin: 0; }

/* ---- buttons / badges ---- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 28px; }
.badge {
  display: inline-flex; align-items: center; gap: 10px; min-width: 186px; height: 56px; padding: 0 20px;
  border: 1px solid #2f5a48; border-radius: 12px; color: var(--cream); text-decoration: none; background: var(--ink);
  font-size: .8rem; line-height: 1.15;
}
.badge strong { display: block; font-size: 1.1rem; font-weight: 600; }
.badge svg { width: 24px; height: 24px; flex: none; }
.badge[aria-disabled="true"] { cursor: default; }
a.badge[href] { background: var(--gold); color: #1a2a12; border-color: var(--gold); }
a.badge[href]:hover { background: var(--cream); }
.btn { display: inline-flex; align-items: center; height: 56px; padding: 0 22px; border-radius: 12px; border: 1px solid #2f5a48; color: var(--cream); text-decoration: none; font-weight: 600; }
.btn:hover { border-color: var(--gold); color: var(--gold); }
.note { font-size: .88rem; color: var(--grey); margin-top: 12px; }

/* ---- hero: the Today screen through the five prayers ---- */
.hero { position: relative; padding: 64px 0 56px; overflow: hidden; isolation: isolate; --glow: 233,200,105; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none; background: url("/assets/pattern.svg") 0 0 / 120px 120px; opacity: .5;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%); mask-image: linear-gradient(180deg, #000 0%, transparent 85%); }
.hero::after { content: ""; position: absolute; inset: -20% -10% auto; height: 120%; z-index: -1; pointer-events: none;
  background: radial-gradient(42% 46% at 74% 44%, rgba(var(--glow), .22), rgba(var(--glow), 0) 70%); transition: opacity .6s; }
.hero[data-prayer="fajr"] { --glow: 150,120,210; }
.hero[data-prayer="dhuhr"] { --glow: 110,180,235; }
.hero[data-prayer="asr"] { --glow: 233,200,105; }
.hero[data-prayer="maghrib"] { --glow: 226,120,84; }
.hero[data-prayer="isha"] { --glow: 90,110,200; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero-mark { width: 76px; height: 76px; border-radius: 18px; margin-bottom: 20px; box-shadow: 0 8px 30px rgba(0,0,0,.4); }
.tagline { color: var(--gold); font-family: var(--serif); font-style: italic; font-size: clamp(1.35rem, 2.8vw, 1.8rem); margin: -.1em 0 .7em; }
.lead { font-size: 1.22rem; max-width: 36ch; }
.phone { position: relative; width: 100%; max-width: 310px; margin: 0 auto; border-radius: 46px; padding: 10px; background: linear-gradient(145deg, #24483a, #081710); box-shadow: 0 30px 80px rgba(0,0,0,.6), inset 0 0 0 1px #2f5a48; }
.phone .screen { position: relative; border-radius: 37px; overflow: hidden; background: #f6f0e1; aspect-ratio: 1206 / 2622; }
.phone .screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.phone .screen img:first-child, .phone .screen img.on { opacity: 1; }
.phone .screen.live img:first-child:not(.on) { opacity: 0; }
@media (prefers-reduced-motion: no-preference) { .phone .screen.live img { transition: opacity .7s ease-in-out; } }
.cycle { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 16px; }
.cycle button {
  font: inherit; font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; cursor: pointer;
  min-height: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid #24483a;
  background: transparent; color: var(--grey); transition: color .15s, border-color .15s, background-color .15s;
}
.cycle button:hover { color: var(--cream); border-color: #3f7560; }
.cycle button[aria-pressed="true"] { color: var(--gold); border-color: var(--gold-deep); }
.cycle.chosen button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #1a2a12; }

/* ---- sections ---- */
section { padding: 64px 0; scroll-margin-top: 64px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; color: var(--gold); margin-bottom: 10px; }
.intro { max-width: 60ch; color: var(--soft); }

/* feature tour: alternating rows */
.tour { display: grid; gap: 80px; margin-top: 48px; }
.row { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: center; }
.row:nth-child(even) { grid-template-columns: 1.2fr .8fr; }
.row:nth-child(even) .shotframe, .row:nth-child(even) .pair { order: 2; }
.row h3 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.row p { color: var(--soft); max-width: 56ch; }
.row ul { margin: 0; padding-left: 1.1em; color: var(--soft); max-width: 56ch; }
.row li { margin: .3em 0; }
.row .tag { display: inline-block; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); border: 1px solid #2f5a48; border-radius: 999px; padding: 2px 10px; margin-bottom: 12px; }
.row.mint h3, .row.mint .tag { color: var(--mint); }
.shotframe { margin: 0 auto; width: 100%; max-width: 290px; border-radius: 40px; padding: 8px; background: linear-gradient(145deg, #1d3f31, #07140f); box-shadow: inset 0 0 0 1px #24483a, 0 24px 60px rgba(0,0,0,.45); }
.shotframe img { width: 100%; height: auto; border-radius: 32px; background: #f6f0e1; }
.shotframe figcaption { font-size: .85rem; color: var(--grey); padding: 10px 10px 6px; text-align: center; }
.pair { display: flex; align-items: flex-end; justify-content: center; gap: 18px; }
.pair .shotframe { margin: 0; max-width: 250px; }
.shotframe.watch { max-width: 150px; border-radius: 34px; padding: 9px; }
.shotframe.watch img { border-radius: 25px; background: #000; }

/* promises */
.pledge { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 28px; list-style: none; padding: 0; }
.pledge li { background: var(--ink); border: 1px solid #143424; border-radius: 14px; padding: 18px; }
.pledge strong { display: block; color: var(--cream); font-family: var(--serif); font-size: 1.15rem; margin-bottom: 4px; }
.pledge span { color: var(--grey); font-size: .93rem; }

/* the plain account of what leaves the phone */
.band { margin-top: 48px; padding: 32px; border-radius: 24px; background: linear-gradient(180deg, #0c2018, #0a1b14 60%, #07140f); border: 1px solid var(--line); }
.band h3 { color: var(--mint); font-size: 1.5rem; }
.band p { color: var(--soft); max-width: 66ch; }
.band p:last-child { margin-bottom: 0; }

.ideas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 24px; list-style: none; padding: 0; }
.ideas li { background: var(--ink); border: 1px dashed #2f5a48; border-radius: 14px; padding: 18px; }
.ideas .label { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--grey); }
.ideas h3 { font-size: 1.1rem; margin: 6px 0 6px; }
.ideas p { color: var(--soft); font-size: .93rem; margin: 0; }

/* closing call to action */
.cta { text-align: center; }
.cta .panel { padding: 56px 24px; border-radius: 28px; background: radial-gradient(60% 80% at 50% 0%, rgba(233,200,105,.16), rgba(0,0,0,0) 70%), var(--ink); border: 1px solid var(--line); }
.cta .star { width: 72px; height: 72px; margin: 0 auto 18px; color: var(--gold); }
.cta .actions { justify-content: center; }
.cta p { color: var(--soft); max-width: 52ch; margin-left: auto; margin-right: auto; }

/* ---- prose pages ---- */
.page { padding: 56px 0 0; }
.prose { max-width: 720px; }
.prose h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); }
.prose h2 { margin-top: 1.8em; font-size: 1.6rem; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin: .35em 0; }
.prose code { background: var(--ash); padding: 1px 6px; border-radius: 6px; font-size: .9em; overflow-wrap: break-word; }
.prose .shotframe { margin: 22px auto; }
.updated { color: var(--grey); font-size: .9rem; }
.callout { background: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin: 32px 0 8px; }
.callout p:last-child { margin-bottom: 0; }
.mail { display: inline-flex; align-items: center; gap: 10px; margin-top: 4px; padding: 12px 20px; border-radius: 999px; background: var(--gold); color: #1a2a12; font-weight: 600; text-decoration: none; }
.mail:hover { background: var(--cream); color: #1a2a12; }

details { background: var(--ink); border: 1px solid #143424; border-radius: 14px; padding: 14px 18px; margin: 10px 0; }
details summary { cursor: pointer; color: var(--cream); font-weight: 600; }
details[open] summary { margin-bottom: 8px; }
details p:last-child { margin-bottom: 0; }

.toc { columns: 2; column-gap: 32px; padding-left: 1.2em; margin: 18px 0 8px; }
.toc li { break-inside: avoid; margin: 2px 0; }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 36px; text-align: center; }
  .hero-mark { margin: 0 auto 18px; }
  .lead { margin: 0 auto 1em; }
  .hero .actions { justify-content: center; }
  .row, .row:nth-child(even) { grid-template-columns: 1fr; gap: 24px; }
  .row:nth-child(even) .shotframe, .row:nth-child(even) .pair { order: 0; }
  .pledge, .ideas { grid-template-columns: 1fr 1fr; }
  .nav { gap: 14px; }
}
@media (max-width: 640px) { .toc { columns: 1; } }
@media (max-width: 560px) {
  body { font-size: 16px; }
  .pledge, .ideas { grid-template-columns: 1fr; }
  section { padding: 48px 0; scroll-margin-top: 0; }
  .badge, .btn { width: 100%; justify-content: center; }
  .hero { padding-top: 40px; }
  .hero-mark { width: 60px; height: 60px; }
  .band { padding: 22px; }
  /* Small phones: name on its own row, links on a second row that may wrap. Not sticky here. */
  .site-header { position: static; }
  .site-header .wrap { height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 2px; row-gap: 0; }
  .brand { min-height: 44px; }
  .nav { width: 100%; flex-wrap: wrap; gap: 0 20px; }
  .nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0; }
}
[hidden] { display: none !important; }
