/* Muslim Prepared · Night Shift brand system
   Layout idea: night-street pages. Tall signage headlines, plain readable body, data set in mono like labels on kit.
   Fonts are self-hosted (no requests to Google): Big Shoulders Display, IBM Plex Sans, IBM Plex Mono, all SIL Open Font Licence. */
@font-face { font-family: "Big Shoulders Display"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/big-shoulders-display-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Big Shoulders Display"; font-weight: 800; font-style: normal; font-display: swap; src: url("fonts/big-shoulders-display-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }
/* Just the ﷺ glyph, subset from Noto Naskh Arabic (SIL OFL); only downloaded on pages that use it */
@font-face { font-family: "MP Honorific"; font-weight: 400 700; font-style: normal; font-display: swap; src: url("fonts/honorific.woff2") format("woff2"); unicode-range: U+FDFA; }
:root {
  --night: #10201f;      /* ground */
  --deep: #0b1615;       /* panels sunk below the ground */
  --slate: #1d3533;      /* raised panels */
  --line: #2c4442;       /* rules and borders */
  --fog: #dfe7e5;        /* headlines and key text */
  --text: #c3d0cd;       /* body text */
  --muted: #9fb3b0;      /* secondary text */
  --concrete: #7d918e;   /* tertiary */
  --amber: #e39b2d;      /* sodium amber: the one accent */
  --amber-bright: #f2b552;
  --on-amber: #10201f;
  --font-display: "Big Shoulders Display", Impact, "Arial Narrow", sans-serif;
  --font-body: "MP Honorific", "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-data: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --radius: 8px;
  --max: 1120px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--night); color: var(--text);
  font-family: var(--font-body); font-size: 17px; line-height: 1.6;
}
a { color: var(--amber); text-underline-offset: 3px; }
a:hover { color: var(--amber-bright); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
img, svg { max-width: 100%; }

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

/* Type */
.display, h1, h2 {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  color: var(--fog); letter-spacing: 0.01em; text-wrap: balance; margin: 0;
}
h1 { font-size: clamp(3rem, 9vw, 6rem); line-height: 0.9; }
h2 { font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 0.95; }
h3 { font-family: var(--font-body); font-weight: 600; font-size: 1.15rem; color: var(--fog); margin: 0; }
.eyebrow {
  font-family: var(--font-data); font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber);
}
.data { font-family: var(--font-data); font-variant-numeric: tabular-nums; }
.lead { font-size: 1.15rem; max-width: 52ch; }
.muted { color: var(--muted); }
p { margin: 0; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; padding-block: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--fog); }
.brand:hover { color: var(--fog); }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand span { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; text-transform: uppercase; letter-spacing: 0.02em; line-height: 1; }
.site-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 0.95rem; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--fog); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 24px; border-radius: 6px; border: 0;
  background: var(--amber); color: var(--on-amber); font-family: var(--font-body);
  font-weight: 600; font-size: 1.02rem; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--amber-bright); color: var(--on-amber); }
.btn.ghost { background: transparent; color: var(--fog); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--concrete); }

/* Sections */
.band { padding-block: 72px; border-bottom: 1px solid var(--line); }
.band.sunk { background: var(--deep); }
.panel { background: var(--slate); border: 1px solid var(--line); border-radius: var(--radius); }

/* Sign-up */
.signup { display: grid; gap: 12px; max-width: 560px; }
.signup .row { display: flex; flex-wrap: wrap; gap: 10px; }
.signup input[type="email"] {
  flex: 1 1 240px; min-width: 0; min-height: 48px; padding: 12px 14px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--deep); color: var(--fog); font: inherit;
}
.signup input[type="email"]::placeholder { color: var(--concrete); }
.consent { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; font-size: 0.88rem; color: var(--muted); align-items: start; }
.consent input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--amber); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 20; background: var(--amber); color: var(--on-amber); padding: 10px 14px; border-radius: 6px; font-weight: 600; }
.skip:focus { left: max(16px, env(safe-area-inset-left, 0px)); }
.form-msg { min-height: 1.5em; font-size: 0.92rem; font-weight: 600; color: var(--fog); }

/* Footer */
.site-footer { padding-block: 48px 64px; font-size: 0.88rem; color: var(--muted); }
.site-footer .wrap { display: grid; gap: 18px; }
.site-footer .closing { font-family: var(--font-display); font-weight: 800; font-size: 2rem; text-transform: uppercase; color: var(--fog); line-height: 1; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-footer nav a { color: var(--muted); }

/* Prose pages (privacy, terms) */
.prose { max-width: 68ch; display: grid; gap: 16px; padding-block: 56px 72px; }
.prose h1 { font-size: clamp(2.6rem, 7vw, 4.2rem); }
.prose h2 { font-size: 1.7rem; margin-top: 18px; }
.prose ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.placeholder { background: rgba(227, 155, 45, 0.15); color: var(--amber-bright); padding: 0 4px; border-radius: 3px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Motion and interface layer ----------
   Everything below is additive. Reveals only hide content once site.js has
   added the "js" class to <html>, so the page is complete without script, and
   prefers-reduced-motion switches every effect off. */
:root { --header-h: 72px; --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1); }

/* Header: sticky, frosted, shrinks on scroll */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(16, 32, 31, 0.84); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.site-header .wrap { transition: padding 0.25s ease; }
.scrolled .site-header .wrap { padding-block: 10px; }
.site-nav a { position: relative; padding-block: 4px; transition: color 0.2s ease; }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--amber); transform: scaleX(0); transform-origin: left; transition: transform 0.25s var(--ease-out); }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }

/* Buttons and panels */
.btn { transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(227, 155, 45, 0.28); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn.ghost:hover { box-shadow: none; }
.panel.lift { transition: transform 0.25s var(--ease-out), border-color 0.25s ease; }
.panel.lift:hover { transform: translateY(-3px); border-color: var(--concrete); }

/* Icons: external sprite, stroke follows text colour */
.icon { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-badge { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; background: rgba(227, 155, 45, 0.12); color: var(--amber); }

/* Scroll reveals */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s var(--ease-out); }
.js [data-reveal].in { opacity: 1; transform: none; }
.js [data-reveal-stagger] > * { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s var(--ease-out); }
.js [data-reveal-stagger].in > * { opacity: 1; transform: none; }
.js [data-reveal-stagger].in > :nth-child(2) { transition-delay: 0.08s; }
.js [data-reveal-stagger].in > :nth-child(3) { transition-delay: 0.16s; }
.js [data-reveal-stagger].in > :nth-child(4) { transition-delay: 0.24s; }
.js [data-reveal-stagger].in > :nth-child(5) { transition-delay: 0.32s; }
.js [data-reveal-stagger].in > :nth-child(6) { transition-delay: 0.4s; }
.js [data-reveal-stagger].in > :nth-child(7) { transition-delay: 0.48s; }
.js [data-reveal-stagger].in > :nth-child(8) { transition-delay: 0.56s; }
.js [data-reveal-stagger].in > :nth-child(9) { transition-delay: 0.64s; }

/* Keyframes shared by pages */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes lineUp { from { transform: translateY(110%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(-6%, -8%) scale(1.08); } }
@keyframes pulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@keyframes ticker { to { transform: translateX(-50%); } }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(227, 155, 45, 0.6); } 100% { box-shadow: 0 0 0 14px rgba(227, 155, 45, 0); } }

/* Ticker strip */
.ticker { overflow: hidden; border-bottom: 1px solid var(--line); background: var(--deep); font-family: var(--font-data); font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.ticker-track { display: flex; width: max-content; animation: ticker 55s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track > div { display: flex; gap: 48px; padding: 12px 48px 12px 0; }
.ticker span { white-space: nowrap; }
.ticker span b { color: var(--amber); font-weight: 500; margin-right: 10px; }

/* Folds (details) used for "more" text, accordions and long tables */
.fold { border-top: 1px solid var(--line); }
.fold summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; font-weight: 600; color: var(--fog); }
.fold summary::-webkit-details-marker { display: none; }
.fold summary::after { content: "+"; font-family: var(--font-data); color: var(--amber); font-size: 1.2rem; line-height: 1; transition: transform 0.25s var(--ease-out); }
.fold[open] summary::after { transform: rotate(45deg); }
.fold .fold-body { padding-bottom: 16px; display: grid; gap: 10px; color: var(--text); }
.fold[open] .fold-body { animation: fadeUp 0.35s ease both; }

/* Stat rows and pull stats */
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.stat { padding: 18px 20px; display: grid; gap: 4px; align-content: start; }
.stat strong { font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; line-height: 0.9; color: var(--amber); font-variant-numeric: tabular-nums; }
.stat > span { font-size: 0.88rem; color: var(--muted); }
@media (max-width: 600px) { .stat-row { grid-template-columns: minmax(0, 1fr); } }

/* Pull quote */
.pull { margin: 0; padding: 22px 26px; border-left: 3px solid var(--amber); background: var(--deep); border-radius: 0 var(--radius) var(--radius) 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1; text-transform: uppercase; color: var(--fog); letter-spacing: 0.01em; }
.pull cite { display: block; margin-top: 12px; font-family: var(--font-data); font-size: 0.78rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-style: normal; }

/* Progress ring */
.ring { width: 56px; height: 56px; transform: rotate(-90deg); flex: none; }
.ring circle { fill: none; stroke-width: 3.5; }
.ring .track { stroke: var(--line); }
.ring .fill { stroke: var(--amber); stroke-linecap: round; stroke-dasharray: 97.4; stroke-dashoffset: 97.4; transition: stroke-dashoffset 0.6s var(--ease-out); }

/* Custom checkbox */
.tickbox { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; border: 1.5px solid var(--concrete); border-radius: 5px; background: var(--deep); display: grid; place-items: center; cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease; }
.tickbox::after { content: ""; width: 10px; height: 6px; border-left: 2.5px solid var(--on-amber); border-bottom: 2.5px solid var(--on-amber); transform: translateY(-1px) rotate(-45deg) scale(0); transition: transform 0.2s var(--ease-out); }
.tickbox:checked { background: var(--amber); border-color: var(--amber); }
.tickbox:checked::after { transform: translateY(-1px) rotate(-45deg) scale(1); }
.tickbox:active { transform: scale(0.9); }

/* Small utilities (keep markup free of inline styles) */
.fine { font-size: 0.88rem; }
.mt-12 { margin-top: 12px; }
.mt-32 { margin-top: 32px; }

/* Jump list for long pages */
.jump { display: flex; flex-wrap: wrap; gap: 8px; }
.jump a { font-family: var(--font-data); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease; }
.jump a:hover { color: var(--fog); border-color: var(--amber); transform: translateY(-1px); }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal], .js [data-reveal-stagger] > * { opacity: 1; transform: none; }
  .ring .fill, .btn, .panel.lift { transition: none; }
}
