/* Aqimis Salah website. Colours are the app's own themes:
   light = Warm Sand, dark = Fajr Calm (lib/core/theme/themes). */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/assets/fonts/plus-jakarta-sans.woff2") format("woff2");
  font-weight: 200 700;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans Tamil";
  src: url("/assets/fonts/noto-sans-tamil.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Amiri Ayah";
  src: url("/assets/fonts/amiri-ayah.woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg: #f7f3ea;
  --bg-alt: #efe8d9;
  --surface: #ffffff;
  --raised: #efeae0;
  --line: #e4dcd0;
  --text: #2c221e;
  --muted: #6e6259;
  --accent: #1f5c4a;
  --accent-strong: #174a3b;
  --accent-soft: #e8f2ee;
  --on-accent: #ffffff;
  --gold: #8a5f1a;
  --pending: #b9603e;
  --hero-a: #fbe6b8;
  --hero-b: #f7f3ea;
  --hero-c: #d7eee0;
  --shadow: 0 1px 2px rgba(44, 34, 30, 0.06), 0 12px 32px rgba(44, 34, 30, 0.08);
  --radius: 20px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1a1a;
    --bg-alt: #132020;
    --surface: #162424;
    --raised: #203131;
    --line: #243434;
    --text: #f2ede4;
    --muted: #9db0aa;
    --accent: #79d9b0;
    --accent-strong: #a3e8c9;
    --accent-soft: #1a2f2b;
    --on-accent: #0f1a1a;
    --gold: #d9b872;
    --pending: #d98a6a;
    --hero-a: #1d2a22;
    --hero-b: #0f1a1a;
    --hero-c: #12302a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1a1a;
  --bg-alt: #132020;
  --surface: #162424;
  --raised: #203131;
  --line: #243434;
  --text: #f2ede4;
  --muted: #9db0aa;
  --accent: #79d9b0;
  --accent-strong: #a3e8c9;
  --accent-soft: #1a2f2b;
  --on-accent: #0f1a1a;
  --gold: #d9b872;
  --pending: #d98a6a;
  --hero-a: #1d2a22;
  --hero-b: #0f1a1a;
  --hero-c: #12302a;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", "Noto Sans Tamil", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
html:lang(ta) body {
  font-family: "Noto Sans Tamil", "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.8;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  background: var(--accent); color: var(--on-accent);
  padding: 8px 14px; border-radius: 10px; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 32px; } }
.narrow { max-width: 780px; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font-weight: 700; font-size: 18px; letter-spacing: -0.01em; white-space: nowrap;
}
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand:hover { color: var(--text); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav > a {
  color: var(--muted); text-decoration: none; font-size: 15px;
  padding: 8px 12px; border-radius: 999px;
}
.nav > a:hover { color: var(--text); background: var(--raised); }
.lang-switch {
  display: inline-flex; padding: 3px; margin-left: 6px;
  background: var(--raised); border-radius: 999px; border: 1px solid var(--line);
}
.lang-switch a {
  font-size: 14px; line-height: 1; padding: 8px 12px; border-radius: 999px;
  color: var(--muted); text-decoration: none; white-space: nowrap;
}
.lang-switch a[aria-current="page"] {
  background: var(--surface); color: var(--text); font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
@media (max-width: 640px) {
  .nav > a.hide-sm { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 500px at 0% 0%, var(--hero-a), transparent 60%),
    radial-gradient(900px 500px at 100% 100%, var(--hero-c), transparent 60%),
    var(--hero-b);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero .wrap {
  display: grid; gap: 48px; align-items: center;
  padding-top: 56px; padding-bottom: 64px;
}
@media (min-width: 920px) {
  .hero .wrap { grid-template-columns: 1.1fr 0.9fr; padding-top: 72px; padding-bottom: 80px; }
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 600; color: var(--accent);
  margin: 0 0 18px;
}
.eyebrow img { width: 28px; height: 28px; border-radius: 7px; }
.hero h1 {
  font-size: clamp(36px, 5.6vw, 60px);
  line-height: 1.08; letter-spacing: -0.03em;
  margin: 0 0 20px; font-weight: 700;
}
html:lang(ta) .hero h1 { font-size: clamp(30px, 4.4vw, 48px); line-height: 1.3; letter-spacing: 0; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lede { font-size: 19px; color: var(--muted); margin: 0 0 30px; max-width: 34em; }
html:lang(ta) .lede { font-size: 17px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px;
  font-weight: 600; font-size: 16px; text-decoration: none; line-height: 1.2;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); color: var(--on-accent); }
.btn-play { cursor: default; }
.btn-play small { display: block; font-size: 12px; font-weight: 500; opacity: 0.8; }
.btn-play svg { width: 22px; height: 22px; flex: none; }
.btn-ghost { color: var(--text); border: 1px solid var(--line); background: var(--surface); }
.btn-ghost:hover { color: var(--text); border-color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.chips li {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; color: var(--muted);
  padding: 6px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border: 1px solid var(--line);
}
.chips svg { width: 15px; height: 15px; color: var(--accent); }

/* ---------- Phone mockup (always the app's dark Fajr Calm theme) ---------- */
.stage { position: relative; display: flex; justify-content: center; padding: 8px 0 40px; }
.phone {
  --p-bg: #0f1a1a; --p-surface: #162424; --p-raised: #203131; --p-line: #243434;
  --p-text: #f2ede4; --p-muted: #9db0aa; --p-accent: #4fb08a; --p-accent-text: #79d9b0; --p-soft: #1a2f2b;
  width: 292px; flex: none;
  background: var(--p-bg); color: var(--p-text);
  border-radius: 42px; padding: 12px;
  border: 1px solid #2d3d3a;
  box-shadow: 0 0 0 7px #0b1212, 0 40px 80px rgba(15, 26, 26, 0.35);
  font-family: "Plus Jakarta Sans", "Noto Sans Tamil", system-ui, sans-serif;
  line-height: 1.3;
}
.phone .screen { border-radius: 30px; overflow: hidden; background: var(--p-bg); padding: 10px 14px 0; }
.phone .status { display: flex; justify-content: space-between; font-size: 11px; color: var(--p-muted); padding: 2px 6px 10px; }
.phone .status i { display: inline-block; width: 22px; height: 9px; border-radius: 3px; border: 1px solid var(--p-muted); position: relative; }
.phone .status i::after { content: ""; position: absolute; inset: 1px 5px 1px 1px; background: var(--p-accent); border-radius: 1px; }
.p-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.p-title { font-size: 21px; font-weight: 600; }
.p-tools { display: flex; gap: 6px; }
.p-tools span { width: 26px; height: 26px; border-radius: 50%; background: var(--p-raised); display: grid; place-items: center; }
.p-tools svg { width: 13px; height: 13px; color: var(--p-accent-text); }
.p-loc { font-size: 11px; color: var(--p-muted); margin-bottom: 10px; display: flex; align-items: center; gap: 4px; }
.p-loc svg { width: 11px; height: 11px; color: var(--p-accent-text); }
.p-card { background: var(--p-surface); border: 1px solid var(--p-line); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; }
.p-date { font-size: 12.5px; font-weight: 600; }
.p-hijri { font-size: 10.5px; color: var(--p-muted); margin: 2px 0 7px; }
.p-sun { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--p-muted); }
.p-sun b { color: var(--p-text); font-weight: 600; }
.p-next { display: flex; gap: 10px; align-items: center; background: var(--p-soft); border-color: transparent; }
.p-next svg { width: 16px; height: 16px; color: #d9b872; flex: none; }
.p-next small { display: block; font-size: 9.5px; color: var(--p-muted); }
.p-next strong { font-size: 12.5px; color: #d9b872; font-weight: 600; }
.p-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
.p-row.is-next { background: var(--p-soft); }
.p-time { font-size: 22px; font-weight: 200; letter-spacing: -0.02em; min-width: 66px; }
.p-time sup { font-size: 8px; font-weight: 500; color: var(--p-muted); margin-left: 2px; vertical-align: 2px; }
.p-name { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 600; }
.p-name small { display: block; font-size: 9.5px; font-weight: 400; color: var(--p-muted); white-space: nowrap; }
.p-row.is-next .p-name small { color: var(--p-accent-text); }
.p-toggle { width: 30px; height: 17px; border-radius: 999px; background: var(--p-accent); position: relative; flex: none; }
.p-toggle::after { content: ""; position: absolute; right: 2px; top: 2px; width: 13px; height: 13px; border-radius: 50%; background: #0f1a1a; }
.p-tabs { display: flex; justify-content: space-around; border-top: 1px solid var(--p-line); margin: 6px -14px 0; padding: 8px 4px 12px; }
.p-tabs span { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 8.5px; color: var(--p-muted); }
.p-tabs span.on { color: var(--p-accent-text); }
.p-tabs svg { width: 15px; height: 15px; }

/* The check-in notification, floating over the phone */
.notif {
  position: absolute; left: 50%; bottom: 0;
  width: min(330px, 100%);
  transform: translateX(-62%);
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 14px 16px 12px;
  line-height: 1.4;
}
@media (max-width: 520px) { .notif { transform: translateX(-50%); } }
.notif-app { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.notif-app img { width: 16px; height: 16px; border-radius: 4px; }
.notif strong { display: block; font-size: 15px; }
.notif p { margin: 2px 0 10px; font-size: 14px; color: var(--muted); }
.notif-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.notif-actions span {
  font-size: 13px; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); padding: 6px 12px; border-radius: 999px;
}

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section.alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 680px; margin: 0 0 40px; }
.kicker { font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
html:lang(ta) .kicker { letter-spacing: 0; text-transform: none; font-size: 15px; }
h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 14px; }
html:lang(ta) h2 { font-size: clamp(24px, 3vw, 32px); line-height: 1.35; letter-spacing: 0; }
.section-head p { color: var(--muted); font-size: 18px; margin: 0; }
html:lang(ta) .section-head p { font-size: 16px; }
h3 { font-size: 18px; line-height: 1.35; margin: 0 0 8px; }

/* Steps: how a prayer is kept */
.steps { display: grid; gap: 16px; counter-reset: step; padding: 0; margin: 0; list-style: none; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; gap: 14px;
}
.step-num {
  counter-increment: step;
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 15px;
}
.step-num::before { content: counter(step); }
.step p { margin: 0; color: var(--muted); font-size: 16px; }
.mini-notif {
  margin-top: auto;
  background: var(--raised); border-radius: 14px; padding: 12px 14px;
  font-size: 14px; line-height: 1.45;
}
.mini-notif b { display: block; font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.mini-notif .notif-actions { margin-top: 8px; }
.mini-notif .notif-actions span { background: var(--surface); }
.tag-pending { color: var(--pending); }

/* Features */
.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px;
}
.feature .ico {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 16px;
}
.feature .ico svg { width: 22px; height: 22px; }
.feature p { margin: 0; color: var(--muted); font-size: 16px; }

/* Two languages */
.bilingual { display: grid; gap: 40px; align-items: center; }
@media (min-width: 860px) { .bilingual { grid-template-columns: 1fr 1fr; } }
.pair { display: grid; gap: 12px; }
.pair div {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px;
}
.pair small { display: block; font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: 0.06em; margin-bottom: 4px; }
.pair p { margin: 0; font-size: 16px; }

/* Ayah */
.ayah-band { text-align: center; padding: 72px 0; }
.ayah {
  font-family: "Amiri Ayah", serif; direction: rtl;
  font-size: clamp(30px, 5vw, 46px); line-height: 1.8; margin: 0 0 8px; color: var(--text);
}
.ayah-meaning { color: var(--muted); font-size: 17px; margin: 0 auto; max-width: 34em; }
.ayah-ref { display: block; margin-top: 6px; font-size: 14px; color: var(--gold); font-weight: 600; }

/* Privacy */
.pillars { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-bottom: 20px; }
.pillar { padding: 4px 0; }
.pillar .ico { width: 40px; height: 40px; color: var(--accent); margin-bottom: 12px; }
.pillar p { margin: 0; color: var(--muted); font-size: 16px; }
.drive-note {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; display: grid; gap: 8px;
}
.drive-note p { margin: 0; color: var(--muted); font-size: 16px; }
.drive-note strong { color: var(--text); }

/* Closing call to action */
.cta {
  text-align: center; padding: 72px 24px; border-radius: 28px; margin: 0 0 80px;
  background:
    radial-gradient(600px 300px at 20% 0%, var(--hero-a), transparent 70%),
    radial-gradient(600px 300px at 80% 100%, var(--hero-c), transparent 70%),
    var(--surface);
  border: 1px solid var(--line);
}
.cta img { width: 88px; height: 88px; border-radius: 22px; margin: 0 auto 20px; box-shadow: var(--shadow); }
.cta p { color: var(--muted); margin: 0 auto 26px; max-width: 30em; }
.cta .actions { justify-content: center; margin: 0; }

/* ---------- Long text (privacy) ---------- */
.doc { padding-top: 48px; padding-bottom: 24px; }
.doc h1 { font-size: clamp(32px, 5vw, 44px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 8px; }
html:lang(ta) .doc h1 { font-size: clamp(26px, 4vw, 36px); line-height: 1.35; letter-spacing: 0; }
.doc .updated { color: var(--muted); margin: 0 0 28px; }
.doc h2 { font-size: clamp(22px, 2.6vw, 26px); margin-top: 44px; }
.doc li { margin-bottom: 10px; }
.doc .callout {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: 14px; padding: 16px 18px; margin: 0 0 24px;
}
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 420px; font-size: 16px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }
code { font-size: 0.9em; background: var(--raised); padding: 1px 6px; border-radius: 6px; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; }
footer a { color: var(--muted); }
footer a:hover { color: var(--text); }
footer .spacer { flex: 1; }
footer .brand { font-size: 16px; }
footer .brand img { width: 24px; height: 24px; border-radius: 6px; }

/* 404 */
.lost { text-align: center; padding: 96px 16px; }
.lost img { width: 96px; height: 96px; border-radius: 24px; margin: 0 auto 24px; }
.lost h1 { margin: 0 0 6px; }
.lost p { color: var(--muted); }

@media (max-width: 520px) {
  body { font-size: 16px; }
  .section { padding: 60px 0; }
  .brand .name { display: none; }
}
