/* Muslim Pro Max — public website
   Palette from the app: midnight navy, champagne gold, ivory, with a calm
   teal for "now". One bold element: the mihrab arch on the home page. */
:root {
  --ink: #07111d;
  --night: #0b1a2b;
  --navy: #13283f;
  --navy-2: #1a3452;
  --line: rgba(227, 194, 122, 0.22);
  --gold: #e3c27a;
  --gold-deep: #b8913e;
  --ivory: #f4efe4;
  --muted: #a9b6c5;
  --teal: #2e6f73;
  --teal-bright: #5fb3a8;
  --danger: #ff8a7a;
  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 28px;
  --display: 'Marcellus', 'Palatino Linotype', Palatino, serif;
  --headline: 'Playfair Display', 'Marcellus', Georgia, serif;
  --sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --quran: 'Amiri Quran', 'Amiri', 'Noto Naskh Arabic', 'Geeza Pro', serif;
  --arabic: 'Noto Naskh Arabic', 'Geeza Pro', 'Amiri', serif;
  --tabbar-h: 64px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ivory);
  font: 16px/1.55 var(--sans);
  /* Faint eight-point star lattice, the app's background pattern. */
  background-image:
    radial-gradient(circle at 50% -10%, rgba(46, 111, 115, 0.25), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cpath d='M32 8l6 10 12-2-2 12 10 6-10 6 2 12-12-2-6 10-6-10-12 2 2-12-10-6 10-6-2-12 12 2z' fill='none' stroke='%23e3c27a' stroke-opacity='0.05'/%3E%3C/svg%3E");
  min-height: 100vh;
}
img { max-width: 100%; }
a { color: var(--gold); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 50; background: var(--gold); color: var(--ink); padding: 8px 12px; }
.muted { color: var(--muted); }
.ar { font-family: var(--arabic); direction: rtl; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: 0.01em; line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

/* ---------- layout ---------- */
main { display: block; min-height: 70vh; outline: none; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
.page { padding: 32px 0 56px; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head p { margin: 0; color: var(--muted); max-width: 60ch; }
.panel { background: var(--navy); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 20px; }
.stack > * + * { margin-top: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--navy-2); color: var(--ivory); font: 600 0.95rem var(--sans);
  cursor: pointer; text-decoration: none;
}
.btn:hover { border-color: var(--gold); }
.btn.gold { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.btn.gold:hover { background: #ecd196; }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.icon-btn { width: 44px; height: 44px; padding: 0; border-radius: 50%; }
.field { display: block; margin: 14px 0; }
.field > span { display: block; color: var(--muted); font-size: 0.9rem; margin-bottom: 6px; }
input, select, textarea {
  width: 100%; min-height: 44px; padding: 10px 14px; border-radius: var(--radius-s);
  border: 1px solid var(--line); background: var(--ink); color: var(--ivory); font: 1rem var(--sans);
}
input:focus, select:focus { outline: none; border-color: var(--gold); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: var(--navy); color: var(--ivory);
  border-radius: 999px; padding: 8px 14px; font: 500 0.9rem var(--sans); cursor: pointer;
}
.chip[aria-pressed='true'] { background: var(--gold); color: var(--ink); border-color: var(--gold); }

.hijri-line { color: var(--gold); font-size: 0.95rem; margin-top: 10px; }

.today { padding: 24px 0 8px; }
.ayah-day { padding: 28px; background: linear-gradient(135deg, rgba(46, 111, 115, 0.22), transparent 60%), var(--navy); }
.ayah-day .quran { font-family: var(--quran); font-size: clamp(1.6rem, 3.6vw, 2.2rem); line-height: 2.1; direction: rtl; text-align: right; margin-bottom: 12px; }
.ayah-day .tr { color: var(--ivory); font-size: 1.05rem; max-width: 70ch; }
.ayah-day cite { color: var(--muted); font-style: normal; }

.tools { padding: 40px 0 16px; }
.tool-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.tool-list a { display: flex; gap: 14px; align-items: flex-start; padding: 18px; background: var(--night); color: var(--ivory); text-decoration: none; min-height: 100%; }
.tool-list a:hover { background: var(--navy); }
.tool-list svg { width: 28px; height: 28px; fill: var(--gold); flex: none; margin-top: 2px; }
.tool-list b { display: block; font-weight: 600; }
.tool-list span { color: var(--muted); font-size: 0.9rem; }
.app-cta { margin: 40px 0 56px; display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; }
.app-cta img { width: 88px; border-radius: 20px; }

/* ---------- prayer page ---------- */
.prayer-today { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.prayer-card { padding: 16px; border-radius: var(--radius-m); background: var(--navy); border: 1px solid var(--line); }
.prayer-card .n { color: var(--muted); }
.prayer-card .t { font: 600 1.6rem var(--sans); font-variant-numeric: tabular-nums; }
.prayer-card.now { border-color: var(--teal-bright); background: linear-gradient(180deg, rgba(95, 179, 168, 0.18), var(--navy)); }
.prayer-card.now .n { color: var(--teal-bright); }
table.times { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.times th, table.times td { padding: 10px 8px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.times th { color: var(--muted); font-weight: 500; font-size: 0.9rem; }
table.times tr.today td { background: rgba(227, 194, 122, 0.1); color: var(--gold); }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--navy); }

/* ---------- Quran ---------- */
.surah-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.surah-item { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 14px; border-radius: var(--radius-m); background: var(--navy); border: 1px solid transparent; color: var(--ivory); text-decoration: none; }
.surah-item:hover { border-color: var(--line); }
.surah-num { width: 40px; height: 40px; display: grid; place-items: center; font-size: 0.9rem; color: var(--gold); border: 1px solid var(--line); transform: rotate(45deg); border-radius: 8px; }
.surah-num span { transform: rotate(-45deg); }
.surah-item .ar { font-size: 1.35rem; color: var(--gold); }
.surah-item small { display: block; color: var(--muted); }
.reader-bar { position: sticky; top: 61px; z-index: 10; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 0; background: rgba(11, 26, 43, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.reader-bar select { width: auto; min-width: 150px; flex: 1 1 150px; max-width: 260px; }
.surah-title { text-align: center; padding: 28px 0 8px; }
.surah-title .ar { font-family: var(--quran); font-size: 2.6rem; color: var(--gold); }
.bismillah { font-family: var(--quran); font-size: 2rem; text-align: center; margin: 8px 0 24px; direction: rtl; }
.ayah { padding: 18px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 140px; }
.ayah-tools { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ayah-key { font-size: 0.85rem; color: var(--gold); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.ayah .quran { font-family: var(--quran); font-size: var(--quran-size, 2rem); line-height: 2.25; direction: rtl; text-align: right; }
.ayah .quran .w { border-radius: 6px; transition: background-color 0.15s, color 0.15s; }
.ayah .quran .w.lit { background: rgba(227, 194, 122, 0.22); color: #ffe4a6; }
.ayah .quran .w.done { opacity: 0.75; }
.ayah .num { font-family: var(--quran); color: var(--gold); }
.ayah .tr { color: var(--muted); font-size: 1.02rem; margin-top: 8px; max-width: 72ch; }
.ayah.playing { background: linear-gradient(90deg, transparent, rgba(46, 111, 115, 0.18), transparent); }
.tj-g { color: #57b26a; } .tj-n { color: #e3a33b; } .tj-q { color: #4fa3d8; } .tj-m { color: #d86fa5; }
.tj-h { color: #a0a0a0; } .tj-d { color: #e05f5f; } .tj-l { color: #a0a0a0; }
.player {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 30; display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 16px;
  width: min(560px, calc(100% - 24px));
  background: rgba(7, 17, 29, 0.95); border: 1px solid var(--gold-deep); border-radius: 999px;
  box-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.8);
}
.player .now { flex: 1; min-width: 0; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player[hidden] { display: none; }

/* Mushaf */
.mushaf { display: grid; place-items: center; }
.mushaf-page { position: relative; width: min(560px, 100%); aspect-ratio: 807 / 1205; background: #fffdf6; border-radius: 6px; overflow: hidden; box-shadow: 0 20px 50px -25px rgba(0, 0, 0, 0.9); }
.mushaf-page.opening { aspect-ratio: 843 / 1140; }
.mushaf-page img { position: absolute; inset: 0; width: 100%; height: 100%; }
.mushaf-page .glow { position: absolute; background: rgba(227, 194, 122, 0.3); border: 1px solid rgba(184, 145, 62, 0.7); border-radius: 6px; pointer-events: none; }
.mushaf-nav { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 16px 0; flex-wrap: wrap; }

/* ---------- Qibla ---------- */
.compass-wrap { display: grid; place-items: center; padding: 16px 0; overflow: hidden; }
.compass { position: relative; width: min(360px, 86vw); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #15324f, var(--ink) 70%); border: 6px solid var(--gold-deep); box-shadow: inset 0 0 0 2px var(--line); }
.compass .dial { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; transition: transform 0.25s ease-out; }
.compass .needle { position: absolute; left: 50%; top: 50%; width: 6px; height: 44%; margin-left: -3px; transform-origin: 50% 0; background: linear-gradient(var(--gold), transparent); border-radius: 3px; }
.compass .kaaba { position: absolute; left: 50%; top: 4%; transform: translateX(-50%); width: 44px; }
.compass .marker { position: absolute; left: 50%; top: -14px; transform: translateX(-50%); width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 16px solid var(--gold); }
.compass.aligned { border-color: var(--teal-bright); }
.compass.aligned .marker { border-top-color: var(--teal-bright); }
.bearing { text-align: center; }
.bearing b { font: 600 3rem var(--sans); font-variant-numeric: tabular-nums; }

/* ---------- learn & tools ---------- */
.lesson-grid { display: flex; flex-wrap: wrap; gap: 8px; direction: rtl; justify-content: center; }
.tile { min-width: var(--tile, 84px); padding: 10px 6px; border-radius: 14px; background: var(--navy); border: 2px solid transparent; color: var(--ivory); cursor: pointer; text-align: center; transition: transform 0.15s, border-color 0.15s; }
.tile .x { font: 1.9rem/1.5 var(--arabic); display: block; }
.tile small { display: block; color: var(--muted); direction: ltr; font-size: 0.75rem; }
.tile.on { border-color: var(--gold); transform: scale(1.07); background: rgba(227, 194, 122, 0.14); }
.names-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.name-card { padding: 16px; border-radius: var(--radius-m); background: var(--navy); border: 1px solid transparent; text-align: center; cursor: pointer; color: var(--ivory); }
.name-card:hover { border-color: var(--line); }
.name-card .ar { display: block; font-size: 1.8rem; color: var(--gold); }
.name-card b { display: block; }
.name-card small { color: var(--muted); }
.tasbih { display: grid; place-items: center; gap: 16px; padding: 24px 0; }
.bead { width: min(280px, 76vw); aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--gold); background: radial-gradient(circle at 35% 30%, var(--navy-2), var(--ink)); color: var(--ivory); font: 600 4.5rem var(--sans); font-variant-numeric: tabular-nums; cursor: pointer; }
.bead:active { transform: scale(0.98); }
.result-big { font: 700 2.4rem var(--sans); font-variant-numeric: tabular-nums; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; gap: 12px; justify-content: space-between; align-items: center; }
.list li:last-child { border-bottom: 0; }
.list .sub { color: var(--muted); font-size: 0.9rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-grid div { padding: 8px 4px; border-radius: 8px; background: var(--navy); text-align: center; min-height: 58px; }
.cal-grid .h { font-size: 0.75rem; color: var(--gold); }
.cal-grid .dow { background: none; min-height: 0; color: var(--muted); font-size: 0.8rem; }
.cal-grid .today { outline: 1px solid var(--gold); }
.more-list { columns: 2 280px; column-gap: 16px; }
.more-list a { break-inside: avoid; display: flex; gap: 14px; padding: 16px; margin-bottom: 12px; border-radius: var(--radius-m); background: var(--navy); color: var(--ivory); text-decoration: none; border: 1px solid transparent; }
.more-list a:hover { border-color: var(--line); }
.more-list svg { width: 26px; height: 26px; fill: var(--gold); flex: none; }
.more-list b { display: block; }
.more-list span { color: var(--muted); font-size: 0.9rem; }

/* ---------- dialog, toast, footer, tab bar ---------- */
dialog.sheet { width: min(480px, calc(100% - 24px)); border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--navy); color: var(--ivory); padding: 24px; }
dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.results { list-style: none; padding: 0; margin: 0 0 12px; max-height: 280px; overflow: auto; }
.results button { width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--ivory); padding: 12px 4px; font: 1rem var(--sans); cursor: pointer; }
.results button:hover { color: var(--gold); }
#toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; z-index: 60; background: var(--ivory); color: var(--ink); padding: 10px 18px; border-radius: 999px; font-weight: 600; transition: all 0.2s; pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.footer { border-top: 1px solid var(--line); padding: 32px 0 40px; margin-top: 24px; }
.footer-inner { width: min(1120px, 100% - 32px); margin-inline: auto; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer nav { display: flex; flex-direction: column; gap: 8px; }
.footer p { color: var(--muted); }
.tabbar { display: none; }
.note { font-size: 0.88rem; color: var(--muted); }
.loading { color: var(--muted); padding: 32px 0; text-align: center; }

@media (max-width: 900px) {
  .app-cta { grid-template-columns: auto 1fr; }
  .app-cta .btn { grid-column: 1 / -1; }
  body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset: auto 0 0 0; z-index: 25;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: rgba(7, 17, 29, 0.96); border-top: 1px solid var(--line);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); text-decoration: none; font-size: 0.72rem; }
  .tabbar svg { width: 22px; height: 22px; fill: currentColor; }
  .tabbar a.active { color: var(--gold); }
  .player { bottom: calc(var(--tabbar-h) + 10px + env(safe-area-inset-bottom)); }
  /* On phones the reader controls scroll away so the ayahs get the screen. */
  .reader-bar { position: static; }
  .reader-bar select { max-width: none; }
}
@media (max-width: 520px) {
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ===================================================================
   Top bar: a floating pill, shared by every page.
   =================================================================== */
.topbar {
  position: sticky; top: 12px; z-index: 30;
  display: flex; align-items: center; gap: clamp(12px, 2vw, 28px);
  width: min(1522px, calc(100% - 24px)); margin: 12px auto 0;
  min-height: 72px;
  padding: 8px 14px 8px clamp(16px, 3.3vw, 54px);
  border: 1px solid rgba(227, 194, 122, 0.3); border-radius: 999px;
  background: rgba(8, 19, 35, 0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.brand { flex: none; display: flex; align-items: center; gap: 10px; color: var(--ivory); text-decoration: none; padding-right: clamp(0px, 2.6vw, 44px); border-right: 1px solid rgba(227, 194, 122, 0.22); }
.brand-mark { width: 62px; height: 57px; flex: none; -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 70%, transparent 100%); mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 70%, transparent 100%); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--display); font-size: 1.62rem; letter-spacing: 0.01em; white-space: nowrap; }
.brand-sub { font-size: 0.58rem; letter-spacing: 0.34em; text-transform: uppercase; color: rgba(244, 239, 228, 0.82); margin-top: 6px; white-space: nowrap; }
.mainnav { display: flex; align-items: center; gap: clamp(2px, 1.1vw, 22px); margin-inline: auto; }
.mainnav > a, .more-menu summary {
  display: flex; align-items: center; gap: 8px;
  color: var(--ivory); text-decoration: none; font-weight: 500; font-size: 1.03rem; white-space: nowrap;
  padding: 7px 17px; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
}
.mainnav > a svg { width: 19px; height: 19px; fill: none; stroke: var(--gold); stroke-width: 1.7; display: none; }
.mainnav > a.active svg { display: block; }
.mainnav > a:hover, .more-menu summary:hover { color: var(--gold); }
.mainnav > a.active, .more-menu.active summary {
  color: var(--gold); background: linear-gradient(180deg, rgba(227, 194, 122, 0.22), rgba(227, 194, 122, 0.1));
  border-color: rgba(227, 194, 122, 0.45);
}
.more-menu { position: relative; }
.more-menu summary { list-style: none; }
.more-menu summary::-webkit-details-marker { display: none; }
.more-menu summary svg, .place-chip .chev { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.more-panel {
  position: absolute; right: 0; top: calc(100% + 12px); min-width: 220px; padding: 8px;
  display: grid; background: rgba(10, 24, 42, 0.97); border: 1px solid rgba(227, 194, 122, 0.3);
  border-radius: 18px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
.more-panel a { color: var(--ivory); text-decoration: none; padding: 10px 14px; border-radius: 12px; }
.more-panel a:hover { background: rgba(227, 194, 122, 0.12); color: var(--gold); }
.place-chip {
  display: flex; align-items: center; gap: 10px; max-width: 260px; min-width: 0; flex: 0 1 auto;
  background: rgba(8, 19, 35, 0.4); color: var(--ivory);
  border: 1px solid var(--gold); border-radius: 999px;
  padding: 9px 18px 9px 20px; font: 500 0.97rem var(--sans); cursor: pointer;
}
.place-chip > svg:first-child { width: 20px; height: 20px; fill: none; stroke: var(--gold); stroke-width: 1.8; flex: none; }
.place-chip > svg:first-child path { fill: none; }
.place-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place-chip:hover { background: rgba(227, 194, 122, 0.12); }

/* ===================================================================
   Home hero. Desktop is laid out on the design's own 1672-wide grid
   (--u = one design pixel), so the live elements sit exactly over the
   artwork's arches, skyline and crescent at every window width.
   =================================================================== */
.hero {
  --u: calc(min(100vw, 2200px) / 1672);
  position: relative; isolation: isolate;
  margin-top: calc(-1 * (12px + 72px));
  background: url("../img/hero.jpg") center top / cover no-repeat, var(--night);
  background: image-set(url("../img/hero.jpg") 1x, url("../img/hero-1.5x.jpg") 2x) center top / cover no-repeat, var(--night);
}
.hero::after { /* soft hand-off into the page below */
  content: ""; position: absolute; inset: auto 0 0 0; height: 90px; z-index: -1;
  background: linear-gradient(180deg, transparent, var(--night));
}
.eyebrow-pill .ln { width: 18px; height: 18px; }
.eyebrow-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 18px 7px 16px; border-radius: 999px;
  border: 1px solid rgba(227, 194, 122, 0.55); background: rgba(10, 24, 42, 0.55);
  color: var(--ivory); font-size: 0.95rem; font-weight: 500;
}
.ln { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ln.gold { color: var(--gold); }
.hero-title { font-family: var(--headline); font-weight: 700; color: #f7f2e6; letter-spacing: -0.005em; line-height: 1.07; margin: 0; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35); }
.hero-title > span { display: block; white-space: nowrap; position: relative; width: fit-content; }
.hero-title em {
  font-style: normal;
  background: linear-gradient(180deg, #fbe6ad 0%, #e9c372 45%, #c8953d 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.swoosh { position: absolute; left: 4%; bottom: -0.2em; width: 105%; height: 0.32em; }
.swoosh path { fill: #e3c27a; opacity: 0.95; filter: drop-shadow(0 0 6px rgba(227, 194, 122, 0.6)); }
.hero-lede { color: #ece6d9; margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; }
.hbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  border-radius: 999px; border: 1.5px solid rgba(244, 239, 228, 0.55);
  background: rgba(8, 19, 35, 0.45); color: var(--ivory);
  font: 600 1.05rem var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}
.hbtn:hover { border-color: var(--gold); background: rgba(227, 194, 122, 0.1); }
.hbtn.primary {
  color: #1b1405; border-color: transparent;
  background: linear-gradient(180deg, #f6dd9c 0%, #e7c270 55%, #d3a24e 100%);
  box-shadow: 0 8px 24px rgba(227, 194, 122, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.hbtn.primary:hover { filter: brightness(1.05); }
.hbtn .chev { width: 18px; height: 18px; stroke-width: 2.2; }
.trust { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; align-items: center; color: #e6e0d3; }
.trust li { display: flex; align-items: center; gap: 9px; }
.trust li + li { border-left: 1px solid rgba(244, 239, 228, 0.28); }
.trust .ln { color: var(--ivory); opacity: 0.9; }

.arch-card { position: relative; text-align: center; color: var(--ivory); }
.arch-frame { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible;
  filter: drop-shadow(0 0 14px rgba(227, 194, 122, 0.45)) drop-shadow(0 24px 40px rgba(0, 0, 0, 0.45)); }
.arch-lantern {
  position: absolute; left: 50%; transform: translateX(-50%);
  -webkit-mask-image: radial-gradient(ellipse 48% 52% at 50% 58%, #000 62%, transparent 100%);
  mask-image: radial-gradient(ellipse 48% 52% at 50% 58%, #000 62%, transparent 100%);
}
.arch-body { position: relative; display: flex; flex-direction: column; align-items: center; height: 100%; }
.next-label { color: #ece6d9; }
.next-name { font-family: var(--headline); font-weight: 600; line-height: 1; color: #f7f2e6; }
.next-ar { font-family: var(--arabic); color: var(--gold); line-height: 1.2; }
.countdown {
  font: 700 1em/1 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: 0.01em; color: #fff;
  border-radius: 999px; border: 1.5px solid rgba(227, 194, 122, 0.85);
  background: radial-gradient(120% 140% at 50% 0%, rgba(30, 58, 92, 0.75), rgba(6, 15, 28, 0.85));
  box-shadow: 0 0 22px rgba(227, 194, 122, 0.28), inset 0 0 18px rgba(227, 194, 122, 0.12);
  display: flex; align-items: center; justify-content: center;
}
.at { color: #ece6d9; }
.hijri-line { display: flex; align-items: center; gap: 10px; color: var(--gold); font-weight: 500; }
.hijri-line .ln { color: var(--gold); }
.day { display: grid; grid-template-columns: repeat(5, 1fr); width: 100%; border-top: 1px solid rgba(227, 194, 122, 0.22); }
.day > div { display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 12px; color: #d9d3c6; }
.day > div + div { border-left: 1px solid rgba(244, 239, 228, 0.1); }
.day b { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.day .now { background: linear-gradient(180deg, rgba(22, 98, 92, 0.9), rgba(12, 70, 68, 0.9)); border: 1px solid rgba(95, 179, 168, 0.55); color: #a6efd9; }
.day .now b { color: #8ff0c9; }
.day .now + div { border-left-color: transparent; }

.feature-bar {
  display: grid; grid-template-columns: repeat(6, 1fr);
  border: 1px solid rgba(190, 205, 230, 0.28); border-radius: 30px;
  background: linear-gradient(180deg, rgba(24, 44, 72, 0.72), rgba(14, 30, 52, 0.82));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.feature-bar a { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--ivory); text-decoration: none; position: relative; }
.feature-bar a + a::before { content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 1px; background: rgba(244, 239, 228, 0.18); }
.feature-bar a:hover b { color: var(--gold); }
.feature-bar .ln { color: var(--gold); stroke-width: 1.4; }
.feature-bar b { font-weight: 600; }
.feature-bar span { color: #c9cfd8; }

@media (max-width: 1560px) {
  .mainnav > a, .more-menu summary { padding: 7px 12px; font-size: 0.97rem; }
  .brand-name { font-size: 1.45rem; }
}
@media (max-width: 1360px) {
  .mainnav { gap: 2px; }
  .mainnav > a, .more-menu summary { padding: 6px 10px; font-size: 0.92rem; }
  .brand { padding-right: 16px; }
  .brand-sub { letter-spacing: 0.24em; }
  .place-chip { padding: 8px 14px; }
}

/* Desktop: the design's exact geometry. */
@media (min-width: 1100px) {
  .topbar { width: min(91vw, 1640px); }
  .hero { height: calc(941 * var(--u)); min-height: 680px; }
  .hero-copy { position: absolute; left: calc(266 * var(--u)); top: calc(141 * var(--u)); width: calc(700 * var(--u)); }
  .hero .eyebrow-pill { height: calc(37 * var(--u)); min-height: 30px; font-size: max(12.5px, calc(15 * var(--u))); padding: 0 calc(18 * var(--u)) 0 calc(16 * var(--u)); }
  .hero .eyebrow-pill .ln { width: calc(18 * var(--u)); height: calc(18 * var(--u)); }
  .hero-title { font-size: calc(67 * var(--u)); margin-top: calc(24 * var(--u)); line-height: 1.08; }
  .hero-lede { font-size: max(14px, calc(18.5 * var(--u))); line-height: 1.43; max-width: calc(540 * var(--u)); margin-top: calc(34 * var(--u)); }
  .hero-actions { gap: calc(17 * var(--u)); margin-top: calc(26 * var(--u)); }
  .hbtn { height: calc(52 * var(--u)); min-height: 40px; padding: 0 calc(26 * var(--u)); font-size: max(13.5px, calc(17 * var(--u))); gap: calc(12 * var(--u)); }
  .hbtn .ln { width: calc(23 * var(--u)); height: calc(23 * var(--u)); }
  .hbtn .chev { width: calc(17 * var(--u)); height: calc(17 * var(--u)); }
  .trust { margin-top: calc(26 * var(--u)); margin-left: calc(30 * var(--u)); font-size: max(11.5px, calc(13.5 * var(--u))); }
  .trust li { padding: 0 calc(22 * var(--u)); }
  .trust li:first-child { padding-left: 0; }
  .trust .ln { width: calc(21 * var(--u)); height: calc(21 * var(--u)); }

  .arch-card { position: absolute; left: calc(1002 * var(--u)); top: calc(113 * var(--u)); width: calc(506 * var(--u)); height: calc(572 * var(--u)); }
  .arch-lantern { top: calc(6 * var(--u)); width: calc(70 * var(--u)); height: calc(120 * var(--u)); }
  .arch-body { padding: calc(128 * var(--u)) calc(36 * var(--u)) calc(52 * var(--u)); }
  .next-label { font-size: calc(18 * var(--u)); }
  .next-name { font-size: calc(54 * var(--u)); margin-top: calc(10 * var(--u)); }
  .next-ar { font-size: calc(27 * var(--u)); margin-top: calc(6 * var(--u)); }
  .countdown { width: calc(332 * var(--u)); height: calc(82 * var(--u)); font-size: calc(62 * var(--u)); margin-top: calc(18 * var(--u)); }
  .at { font-size: calc(18 * var(--u)); margin-top: calc(14 * var(--u)); }
  .hijri-line { font-size: calc(18 * var(--u)); margin-top: calc(18 * var(--u)); gap: calc(10 * var(--u)); }
  .hijri-line .ln { width: calc(20 * var(--u)); height: calc(20 * var(--u)); }
  .day { margin-top: auto; padding-top: calc(14 * var(--u)); }
  .day > div { height: calc(64 * var(--u)); font-size: calc(14 * var(--u)); gap: calc(4 * var(--u)); }
  .day b { font-size: calc(19.5 * var(--u)); }

  .feature-bar { position: absolute; left: calc(110 * var(--u)); top: calc(802 * var(--u)); width: calc(1452 * var(--u)); height: calc(111 * var(--u)); border-radius: calc(30 * var(--u)); }
  .feature-bar a { gap: calc(3 * var(--u)); }
  .feature-bar .ln { width: calc(36 * var(--u)); height: calc(36 * var(--u)); margin-bottom: calc(6 * var(--u)); }
  .feature-bar b { font-size: max(13px, calc(17.5 * var(--u))); }
  .feature-bar span { font-size: max(11px, calc(13.5 * var(--u))); }
}

/* Tablet and phone: the same pieces, stacked. */
@media (max-width: 1099.98px) {
  .topbar { border-radius: 26px; }
  .mainnav { display: none; }
  .place-chip { margin-left: auto; max-width: 48vw; }
  .brand { border-right: 0; padding-right: 0; }
  .hero { padding: calc(94px + 28px) 16px 32px; background-position: 18% bottom; }
  .hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8, 19, 35, 0.35), rgba(8, 19, 35, 0.55) 60%, rgba(8, 19, 35, 0.2)); }
  .hero-copy { max-width: 640px; margin: 0 auto; }
  .hero .eyebrow-pill { font-size: 0.85rem; }
  .hero-title { font-size: clamp(2.3rem, 8.4vw, 3.6rem); margin-top: 18px; }
  .hero-lede { margin-top: 22px; font-size: 1.05rem; }
  .hero-actions { gap: 10px; margin-top: 22px; }
  .hbtn { height: 48px; padding: 0 20px; font-size: 1rem; }
  .trust { margin-top: 20px; font-size: 0.85rem; row-gap: 10px; }
  .trust li { padding: 0 14px; }
  .trust li:first-child { padding-left: 0; }
  .arch-card { width: min(420px, 100%); aspect-ratio: 506 / 600; margin: 34px auto 0; }
  .arch-lantern { top: 1.2%; width: 13.8%; height: auto; }
  .arch-body { padding: 26% 7% 9%; }
  .next-label { font-size: 0.98rem; }
  .next-name { font-size: clamp(2.2rem, 9vw, 2.9rem); margin-top: 6px; }
  .next-ar { font-size: 1.4rem; }
  .countdown { width: 70%; height: 64px; font-size: clamp(2.1rem, 9vw, 2.8rem); margin-top: 12px; }
  .at { margin-top: 10px; }
  .hijri-line { margin-top: 10px; font-size: 0.98rem; }
  .day { margin-top: auto; padding-top: 10px; }
  .day > div { padding: 8px 0; font-size: 0.78rem; }
  .day b { font-size: 1rem; }
  .feature-bar { grid-template-columns: repeat(3, 1fr); margin: 28px auto 0; max-width: 720px; row-gap: 4px; padding: 10px 6px; }
  .feature-bar a { padding: 12px 4px; gap: 2px; }
  .feature-bar a:nth-child(3n + 1)::before { display: none; }
  .feature-bar .ln { width: 30px; height: 30px; margin-bottom: 4px; }
  .feature-bar b { font-size: 0.95rem; }
  .feature-bar span { font-size: 0.75rem; }
}
@media (max-width: 520px) {
  .brand-sub { display: none; }
  .brand-name { font-size: 1.2rem; }
  .brand-mark { width: 44px; height: 40px; }
  .place-chip { padding: 8px 12px; gap: 6px; }
  .place-chip .chev { display: none; }
  .hbtn { flex: 1 1 auto; }
  .trust li:nth-child(3) { border-left: 0; padding-left: 0; }
}

/* ===================================================================
   Get the app: nav shortcut, homepage section, device carousel, badges.
   Store badges are never altered or animated (Apple/Google guidelines).
   =================================================================== */
.get-app-link {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  color: var(--ivory); text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(244, 239, 228, 0.28);
}
.get-app-link svg { width: 18px; height: 18px; fill: none; stroke: var(--gold); stroke-width: 1.7; }
.get-app-link:hover { border-color: var(--gold); color: var(--gold); }
@media (max-width: 1540px) { .get-app-link span { display: none; } .get-app-link { padding: 9px; } }

.get-app { position: relative; padding: 72px 0 56px; overflow: hidden; }
.get-app::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 70% at 78% 40%, rgba(227, 194, 122, 0.10), transparent 70%),
    radial-gradient(50% 60% at 10% 80%, rgba(46, 111, 115, 0.18), transparent 70%),
    linear-gradient(180deg, transparent, rgba(19, 40, 63, 0.55) 30%, rgba(19, 40, 63, 0.55) 70%, transparent);
  border-top: 1px solid rgba(227, 194, 122, 0.14);
}
.get-app-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; }
.get-app h2 { font-family: var(--headline); font-weight: 700; font-size: clamp(2rem, 3.4vw, 2.9rem); margin: 18px 0 12px; }
.get-app-lede { color: #e6e0d3; font-size: 1.08rem; max-width: 52ch; }
.benefits { list-style: none; padding: 0; margin: 22px 0 26px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.benefits li {
  display: flex; gap: 11px; align-items: flex-start; padding: 13px 13px 12px;
  border-radius: 16px; border: 1px solid rgba(227, 194, 122, 0.18);
  background: linear-gradient(180deg, rgba(26, 52, 82, 0.75), rgba(15, 32, 54, 0.75));
  transition: transform 0.2s, border-color 0.2s;
}
.benefits li:hover { transform: translateY(-2px); border-color: rgba(227, 194, 122, 0.5); }
.benefits .ln { width: 36px; height: 36px; padding: 7px; border-radius: 11px; color: var(--gold); background: rgba(227, 194, 122, 0.12); flex: none; stroke-width: 1.5; }
.benefits b { display: block; font-size: 0.95rem; }
.benefits span { display: block; color: var(--muted); font-size: 0.8rem; line-height: 1.35; }

.store-badges { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px 18px; }
.store-badge { display: inline-flex; flex-direction: column; align-items: center; text-decoration: none; }
.store-badge .badge-img.apple { height: 48px; width: auto; display: block; }
/* Google's badge file includes its own clear space, so at this height its
   visible badge matches the App Store badge (Google: same size or larger). */
.store-badge .badge-img.google { height: 74px; width: auto; display: block; margin: -13px -10px; }
.store-badge.is-soon { cursor: default; }
.store-badge small { margin-top: 14px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em; color: var(--gold); }
.store-badge.is-live:focus-visible { outline-offset: 6px; }
.store-badge.compact .badge-img.apple { height: 40px; }
.store-badge.compact .badge-img.google { height: 62px; margin: -11px -8px; }
.store-badge.compact small { margin-top: 12px; font-size: 0.7rem; }
.badge-text, .store-soon-pill {
  display: inline-flex; align-items: center; height: 48px; padding: 0 18px; border-radius: 10px;
  border: 1px solid rgba(244, 239, 228, 0.45); color: var(--ivory); font-weight: 600; background: #000;
}
.store-soon-pill { background: rgba(8, 19, 35, 0.6); border-color: rgba(227, 194, 122, 0.5); color: var(--gold); }
.compact .badge-text, .store-soon-pill.compact { height: 40px; font-size: 0.85rem; }
.get-app-note { margin-top: 18px; max-width: 54ch; }

.carousel { position: relative; min-width: 0; }
.track {
  list-style: none; margin: 0; padding: 18px 0 8px;
  display: flex; gap: 0; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  padding-inline: calc(50% - 150px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}
.track::-webkit-scrollbar { display: none; }
.track:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 24px; }
.slide { flex: 0 0 300px; scroll-snap-align: center; display: flex; justify-content: center; cursor: pointer; }
.device { margin: 0; display: flex; flex-direction: column; align-items: center; transform: scale(0.84); opacity: 0.45; transition: transform 0.45s cubic-bezier(.2, .7, .2, 1), opacity 0.45s; }
.slide.active .device { transform: scale(1); opacity: 1; cursor: default; }
.device-frame {
  position: relative; width: 268px; aspect-ratio: 360 / 779; padding: 9px; border-radius: 46px;
  background: linear-gradient(145deg, #2b3d55, #0b1522 55%, #1d2c40);
  border: 1px solid rgba(227, 194, 122, 0.35);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.6) inset, 0 0 40px rgba(227, 194, 122, 0.08);
}
.device-frame::after { /* side button */
  content: ""; position: absolute; right: -3px; top: 22%; width: 3px; height: 64px; border-radius: 0 3px 3px 0; background: #26364b;
}
.device-frame img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 37px; background: #0b1c2d; }
.device figcaption { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 16px; }
.device figcaption b { font-family: var(--display); font-size: 1.15rem; font-weight: 400; }
.shot-kind { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; padding: 3px 10px; border-radius: 999px; }
.shot-kind.preview { color: var(--gold); border: 1px solid rgba(227, 194, 122, 0.55); background: rgba(227, 194, 122, 0.08); }
.shot-kind.actual { color: #8ff0c9; border: 1px solid rgba(95, 179, 168, 0.55); background: rgba(46, 111, 115, 0.2); }
.carousel-ui { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 8px; }
.car-btn {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: rgba(19, 40, 63, 0.85); color: var(--ivory); border: 1px solid rgba(227, 194, 122, 0.4);
}
.car-btn:hover { border-color: var(--gold); color: var(--gold); }
.car-btn .ln { width: 20px; height: 20px; }
.dots { display: flex; gap: 6px; }
.dot { width: 9px; height: 9px; padding: 0; border-radius: 999px; border: 0; background: rgba(244, 239, 228, 0.3); cursor: pointer; transition: width 0.25s, background 0.25s; }
.dot[aria-current="true"] { width: 26px; background: var(--gold); }
.dot::before { content: ""; position: absolute; inset: -14px -4px; } /* larger touch target */
.dot { position: relative; }
.slide-caption { text-align: center; color: var(--muted); min-height: 2.6em; margin: 10px auto 0; max-width: 40ch; font-size: 0.92rem; }

/* One reveal when the section scrolls into view. */
.get-app .get-app-copy, .get-app .carousel { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.get-app .carousel { transition-delay: 0.12s; }
.get-app.in .get-app-copy, .get-app.in .carousel { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .get-app .get-app-copy, .get-app .carousel { opacity: 1; transform: none; }
}

.footer-apps { display: flex; flex-direction: column; gap: 10px; }
.footer-apps b { font-family: var(--display); font-weight: 400; font-size: 1.05rem; }
.footer-badges { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: flex-start; }

@media (max-width: 1099.98px) {
  .get-app-grid { grid-template-columns: 1fr; gap: 24px; }
  .get-app-copy { order: 2; text-align: left; }
  .carousel { order: 1; }
  .get-app { padding: 52px 0 40px; }
}
@media (max-width: 640px) {
  .benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slide { flex-basis: 236px; }
  .track { padding-inline: calc(50% - 118px); }
  .device-frame { width: 212px; border-radius: 38px; padding: 7px; }
  .device-frame img { border-radius: 31px; }
  .store-badges { justify-content: flex-start; }
}
