/* Prayer Times by NESCO — landing page
 *
 * Design: "dusk on the mosque wall". The product is a glowing glass screen
 * in a dark prayer hall, so the page lives in that world:
 *   ground   #0C1712  deep green-black (night sky over the hall)
 *   sand     #F1EAD9  warm ivory text
 *   green    #34C759  the product's accent (the TV app's default accent)
 * Type: Bricolage Grotesque (EN display), Readex Pro (EN body),
 *       IBM Plex Sans Arabic (everything in Arabic).
 */

:root {
  color-scheme: dark;

  --ink: #0C1712;
  --ink-2: #0F1D16;
  /* solid card surfaces (sand pre-blended over the ink ground) */
  --surface: #1B251F;
  --surface-2: #242E28;
  --line: rgba(241, 234, 217, 0.12);
  --line-strong: rgba(241, 234, 217, 0.22);

  --sand: #F1EAD9;
  --sand-dim: rgba(241, 234, 217, 0.66);
  --sand-faint: rgba(241, 234, 217, 0.42);

  --green: #34C759;
  --green-deep: #1F8A43;
  --green-dim: rgba(52, 199, 89, 0.14);

  --font-display: 'Bricolage Grotesque', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-body: 'Readex Pro', system-ui, sans-serif;

  --radius: 16px;
  --radius-lg: 28px;
  --wrap: 1160px;

  /* Material 3 expressive motion */
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-emph: cubic-bezier(0.05, 0.7, 0.1, 1);      /* emphasized decelerate */
  --ease-emph-accel: cubic-bezier(0.3, 0, 0.8, 0.15); /* emphasized accelerate */
  --dur-short: 200ms;
  --dur-med: 350ms;
  --dur-long: 550ms;
}

/* Arabic: one face everywhere — IBM Plex Sans Arabic */
html[lang="ar"] {
  --font-display: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans Arabic', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--ink);
  color: var(--sand);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* Material symbols — self-hosted subset containing only the icons this page uses */
@font-face {
  font-family: 'Material Symbols Rounded';
  font-style: normal;
  font-weight: 300 600;
  font-display: block;
  src: url('../assets/fonts/material-symbols-subset.woff2?v=20260722') format('woff2');
}
.ms {
  font-family: 'Material Symbols Rounded';
  font-weight: 400; font-style: normal;
  font-size: 1.25em; line-height: 1;
  display: inline-block; vertical-align: middle;
  letter-spacing: normal; text-transform: none;
  direction: ltr;
  font-variation-settings: 'opsz' 24, 'wght' 400, 'FILL' 0;
  user-select: none;
}

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(20px, 4vw, 40px); }
.wrap--narrow { max-width: 860px; }

/* ---------- ambient sky ---------- */
.sky {
  position: fixed; inset: 0; z-index: -1;
  background: var(--ink);
}
/* the brand's girih lattice (Pattern 1 from the design file), tiled faintly */
.sky::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url('../assets/pattern-tile.png');
  background-size: 173px 100px;
  opacity: 0.035;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), rgba(0,0,0,.25) 40%, rgba(0,0,0,.55));
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), rgba(0,0,0,.25) 40%, rgba(0,0,0,.55));
}

/* ---------- type ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] h4 {
  letter-spacing: 0;
  line-height: 1.35;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 700; }
h1 em {
  font-style: normal;
  color: var(--green);
}
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.14rem; font-weight: 600; }

.eyebrow {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 14px;
}
html[lang="ar"] .eyebrow { letter-spacing: 0.02em; }

.section { padding-block: clamp(48px, 6vw, 80px); position: relative; }

.section-head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head p { color: var(--sand-dim); margin-top: 14px; font-size: 1.05rem; }

/* ---------- buttons ---------- */
/* M3 expressive buttons: state layer on hover, shape morph on press */
.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--green-deep);
  color: #fff;
  font-family: var(--font-body); font-weight: 500; font-size: 0.94rem;
  padding: 12px 21px;
  border-radius: 999px;
  border: 0;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: border-radius var(--dur-med) var(--ease-emph);
}
.btn::before { /* state layer */
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: currentColor;
  opacity: 0;
  transition: opacity var(--dur-short) var(--ease-standard);
}
.btn:hover::before { opacity: 0.09; }
.btn:active { border-radius: 14px; } /* round → rounded-square on press */
.btn:active::before { opacity: 0.14; }
.btn--lg { padding: 15px 27px; font-size: 1rem; }
.btn--full { width: 100%; justify-content: center; }

.btn--ghost {
  background: transparent; color: var(--sand-dim);
  transition: border-radius var(--dur-med) var(--ease-emph), color var(--dur-short) var(--ease-standard);
}
.btn--ghost:hover { color: var(--sand); }

.btn--outline {
  background: transparent;
  box-shadow: none;
  border: 1px solid var(--line-strong);
  color: var(--sand);
}

.btn--light { background: var(--sand); color: #14261C; }
.btn--outline-light { background: transparent; border: 1px solid rgba(255,255,255,.35); color: #fff; }

:is(a, button):focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(12, 23, 18, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 28px;
  height: 68px;
}
.logo { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.logo-mark {
  width: 32px; height: 31px;
  flex-shrink: 0;
  /* fill: currentColor — follows the wordmark's text color */
}
.logo-word { font-family: var(--font-display); font-weight: 700; font-size: 1.06rem; }

.nav-links { display: flex; gap: 4px; margin-inline-start: auto; }
.nav-links a {
  text-decoration: none; color: var(--sand-dim);
  font-size: 0.92rem; font-weight: 400;
  padding: 8px 13px; border-radius: 999px;
  transition: color var(--dur-short) var(--ease-standard), background var(--dur-short) var(--ease-standard);
}
.nav-links a:hover { color: var(--sand); background: var(--surface); }

.nav-cta { display: flex; align-items: center; gap: 8px; }

.lang-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  background: transparent; border: 0;
  color: var(--sand-dim); border-radius: 999px;
  padding: 8px 14px; cursor: pointer;
  font-family: 'IBM Plex Sans Arabic', var(--font-body); font-size: 0.9rem; font-weight: 500;
  transition: color var(--dur-short) var(--ease-standard), background var(--dur-short) var(--ease-standard);
}
.lang-toggle:hover { color: var(--sand); background: var(--surface); }
html[lang="ar"] .lang-toggle { font-family: var(--font-body); }

.burger {
  display: none;
  background: none; border: 0; color: var(--sand);
  cursor: pointer; padding: 8px;
}
.burger .ms { font-size: 1.7rem; }

.mobile-menu {
  display: none;
  flex-direction: column; gap: 6px;
  padding: 14px clamp(20px, 4vw, 40px) 22px;
  border-top: 1px solid var(--line);
}
.mobile-menu a:not(.btn) {
  text-decoration: none; color: var(--sand-dim);
  padding: 11px 6px; font-size: 1.02rem;
  border-bottom: 1px solid var(--line);
}
.mobile-menu .lang-toggle--block { justify-content: center; margin-block: 10px 4px; }
.site-header.menu-open .mobile-menu { display: flex; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(36px, 4.5vw, 60px) clamp(48px, 6vw, 80px); overflow: hidden; }
.hero-stack { display: flex; flex-direction: column; }
.hero-copy {
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}

.hero-sub {
  color: var(--sand-dim);
  font-size: 1.08rem;
  max-width: 34rem;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 32px; }
html[lang="ar"] .hero-cta-arrow { transform: none; }

.hero-note {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  color: var(--sand-faint); font-size: 0.88rem;
  margin-top: 26px;
}
.hero-note .ms { color: var(--green); }

/* TV visual — a landscape TV cycling display modes + a portrait panel */
.hero-visual { position: relative; margin-top: clamp(40px, 5vw, 64px); }
.hero-screens {
  display: grid;
  grid-template-columns: 1fr 24%;
  gap: clamp(18px, 2.5vw, 28px);
  align-items: start;
  max-width: 980px;
  margin-inline: auto;
}
.tv { position: relative; }
.tv-screen {
  border-radius: 10px;
  border: 6px solid #060b08;
  outline: 1px solid rgba(241,234,217,.18);
  overflow: hidden;
  background: #000;
}
.tv--landscape .tv-screen { aspect-ratio: 16 / 9; }
.tv--landscape .tv-screen > div { height: 100%; }
.tv--portrait .tv-screen > div { aspect-ratio: 9 / 16; width: 100%; }
.tv-stand {
  width: 34%; height: 10px;
  margin: 0 auto;
  background: #080f0b;
  border-radius: 0 0 10px 10px;
}


/* ---------- day arc (signature) ---------- */
.day { border-top: 1px solid var(--line); }

.arc-figure { margin-top: clamp(10px, 2vw, 24px); }
.arc { width: 100%; height: auto; display: block; overflow: visible; }

.arc-horizon {
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 3 7;
}
.arc-path {
  fill: none;
  stroke: var(--sand);
  stroke-opacity: 0.35;
  stroke-width: 1.6;
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
}
.arc-sun { fill: var(--sand); }
.arc-node circle {
  fill: var(--ink);
  stroke: var(--green);
  stroke-width: 2;
}
.arc-node--night circle { stroke: var(--sand-faint); }
.arc-node text {
  fill: var(--sand);
  text-anchor: middle;
  font-family: var(--font-body);
}
.arc-node .arc-name { font-size: 21px; font-weight: 500; }
.arc-node .arc-lat { font-size: 12.5px; fill: var(--sand-faint); letter-spacing: 0.06em; }
html[lang="ar"] .arc-node .arc-lat { letter-spacing: 0; font-size: 13.5px; }

/* prayer state machine strip */
.states { margin-top: clamp(36px, 5vw, 56px); }
.states-title {
  font-size: 0.85rem; font-weight: 500;
  font-family: var(--font-body);
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--sand-faint);
  margin-bottom: 18px;
}
html[lang="ar"] .states-title { letter-spacing: 0.02em; }
.states-layout {
  display: flex; flex-direction: column;
  gap: clamp(22px, 3vw, 34px);
}
.states-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.states-list > li { display: flex; }
.state-chip {
  width: 100%;
  display: flex; gap: 13px; align-items: flex-start;
  text-align: start;
  background: var(--surface);
  border: 0;
  border-radius: var(--radius-lg);
  padding: 18px 20px 16px;
  color: var(--sand);
  font-family: var(--font-body);
  cursor: pointer;
  transition: background var(--dur-med) var(--ease-standard), border-radius var(--dur-med) var(--ease-emph);
}
.state-chip:hover { background: var(--surface-2); }
.state-chip:active { border-radius: var(--radius); }
.state-chip.active { background: var(--green-dim); }
.state-chip .ms { color: var(--green); font-size: 1.45rem; margin-top: 2px; }
.state-chip strong { display: block; font-weight: 500; font-size: 0.98rem; }
.state-chip small { color: var(--sand-faint); font-size: 0.82rem; line-height: 1.5; display: block; margin-top: 3px; }
.states-screens {
  display: grid;
  grid-template-columns: 1fr 24%;
  gap: clamp(18px, 2.5vw, 28px);
  align-items: start;
  max-width: 980px;
  margin-inline: auto;
  width: 100%;
}

/* ---------- how it works ---------- */
.steps-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.step-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
}
.step-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.step-icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--green-dim);
  color: var(--green);
}
.step-icon .ms { font-size: 1.5rem; }
.step-num {
  font-family: 'IBM Plex Sans Arabic', var(--font-display);
  font-size: 2rem; font-weight: 700;
  color: var(--sand-faint);
  line-height: 1;
}
.step-card p { color: var(--sand-dim); font-size: 0.94rem; margin-top: 10px; }
.how-cta { display: flex; justify-content: center; margin-top: clamp(24px, 3vw, 36px); }


/* ---------- display modes ---------- */
.modes-layout {
  display: grid;
  grid-template-columns: minmax(240px, 3fr) minmax(0, 7fr);
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
}
.modes-tabs { display: flex; flex-direction: column; gap: 10px; }
.mode-tab {
  display: flex; align-items: center; gap: 14px;
  text-align: start;
  background: var(--surface);
  border: 0;
  border-radius: var(--radius-lg);
  color: var(--sand-dim);
  padding: 17px 19px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background var(--dur-med) var(--ease-standard), color var(--dur-med) var(--ease-standard), border-radius var(--dur-med) var(--ease-emph);
}
.mode-tab .ms { font-size: 1.4rem; color: var(--sand-faint); transition: color var(--dur-med) var(--ease-standard); }
.mode-tab-text strong { display: block; font-weight: 500; font-size: 0.98rem; }
.mode-tab-text small { color: var(--sand-faint); font-size: 0.82rem; }
.mode-tab:hover { background: var(--surface-2); color: var(--sand); }
.mode-tab:active { border-radius: var(--radius); }
.mode-tab.active {
  background: var(--green-dim);
  color: var(--sand);
}
.mode-tab.active .ms { color: var(--green); }

.modes-stage { position: relative; min-height: 300px; }
.mode-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  margin-inline: auto;
  border-radius: 12px;
  border: 5px solid #060b08;
  outline: 1px solid rgba(241,234,217,.16);
  overflow: hidden;
  background: #000;
  /* the frame itself morphs between landscape and portrait */
  transition: aspect-ratio 750ms var(--ease-emph), width 750ms var(--ease-emph);
}
.mode-frame > div { height: 100%; }
.mode-frame.is-tall {
  aspect-ratio: 9 / 16;
  width: min(315px, 80%);
}
@media (prefers-reduced-motion: reduce) {
  .mode-frame { transition: none; }
}

/* ---------- features ---------- */
.feature-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.feature-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  transition: background var(--dur-med) var(--ease-standard);
}
.feature-card:hover { background: var(--surface-2); }
.feature-icon {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--green-dim);
  color: var(--green);
  margin-bottom: 16px;
}
.feature-icon .ms { font-size: 1.35rem; }
.feature-card h3 { font-size: 1.02rem; margin-bottom: 8px; }
.feature-card p { color: var(--sand-dim); font-size: 0.88rem; line-height: 1.6; }

/* ---------- platform ---------- */
.platform-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.platform-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  text-decoration: none;
  transition: background var(--dur-med) var(--ease-standard);
}
a.platform-card:hover { background: var(--surface-2); }
.platform-head {
  display: grid; place-items: center;
  height: 170px;
}
.platform-head .ms { font-size: 3rem; }
.platform-head--tv { background: var(--green-dim); color: var(--green); }
.platform-head--web { background: rgba(241, 234, 217, 0.10); color: var(--sand); }
.platform-head--mobile { background: rgba(241, 234, 217, 0.10); color: var(--sand); }
.platform-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.platform-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 10px; }
.platform-tag {
  font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--sand-faint);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}
.platform-body p { color: var(--sand-dim); font-size: 0.9rem; }
.platform-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  margin-top: auto;
  padding-top: 16px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--green);
}
.platform-link .ms { font-size: 1.05rem; transition: transform var(--dur-med) var(--ease-emph); }
.platform-card:hover .platform-link .ms { transform: translateX(3px); }
html[dir="rtl"] .platform-link .ms { transform: scaleX(-1); }
/* translate composes inside the flipped space, so +3px moves visually left */
html[dir="rtl"] .platform-card:hover .platform-link .ms { transform: scaleX(-1) translateX(3px); }

/* The companion card offers two equal destinations, so instead of one
 * whole-card anchor it carries a pair of outlined store pills with the
 * platform glyph. */
.store-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 18px; }
.store-btns .btn { flex: 1 1 0; min-width: max-content; justify-content: center; padding: 10px 16px; font-size: 0.88rem; }
.store-ic { flex: none; width: 17px; height: 17px; }

/* Platform heads show the real surfaces: a live mini prayer board on the TV
 * card (tvscreen.js mounts it like the hero), and the companion app peeking
 * up as two phones. Shells borrow the .tv-screen bezel vocabulary. */
.platform-tv { width: min(230px, 76%); }
.platform-head--web, .platform-head--mobile { align-items: end; overflow: hidden; }
.mini-browser {
  width: 272px;
  margin-bottom: -12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  direction: ltr;
}
.mini-browser-bar { display: flex; gap: 4px; padding: 7px 9px; border-bottom: 1px solid var(--line); }
.mini-browser-bar span { width: 6px; height: 6px; border-radius: 50%; background: var(--sand-faint); }
.mini-browser-view { height: 128px; overflow: hidden; }
.mini-browser-view img { display: block; width: 150%; }
.mini-phones { display: flex; align-items: flex-end; direction: rtl; }
.mini-phone {
  position: relative; z-index: 1;
  width: 128px; height: 154px;
  margin-bottom: -10px;
  border: 4px solid #060b08; border-bottom: 0;
  border-radius: 18px 18px 0 0;
  outline: 1px solid rgba(241, 234, 217, 0.18);
  background: #060b08;
  overflow: hidden;
}
.mini-phone img { display: block; width: 100%; margin-top: -9%; border-radius: 14px 14px 0 0; }
.mini-phone--back { z-index: 0; width: 106px; height: 126px; margin-inline-end: -28px; }


/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  transition: background var(--dur-med) var(--ease-standard);
}
.faq-item.open { background: var(--surface-2); }
.faq-q {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: none; border: 0; color: var(--sand);
  font-family: var(--font-body); font-weight: 400; font-size: 1rem;
  text-align: start;
  padding: 18px 20px;
  cursor: pointer;
}
.faq-q .ms { transition: transform var(--dur-med) var(--ease-emph); color: var(--sand-faint); flex-shrink: 0; }
.faq-item.open .faq-q .ms { transform: rotate(180deg); }
.faq-a-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-med) var(--ease-emph);
}
.faq-item.open .faq-a-wrap { grid-template-rows: 1fr; }
.faq-a {
  overflow: hidden;
  min-height: 0;
  padding: 0 20px;
  color: var(--sand-dim);
  font-size: 0.93rem;
  max-width: 60ch;
}
.faq-item.open .faq-a { padding-bottom: 20px; }
@media (prefers-reduced-motion: reduce) {
  .faq-a-wrap { transition: none; }
}

/* ---------- CTA band ---------- */
.cta-band {
  margin: clamp(16px, 3vw, 36px) auto clamp(56px, 7vw, 88px);
  max-width: var(--wrap);
  padding-inline: clamp(20px, 4vw, 40px);
}
.cta-inner {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: clamp(28px, 4vw, 48px);
  align-items: center;
  background: #16301F;
  border-radius: var(--radius-lg);
  padding: clamp(32px, 5vw, 56px);
}
.cta-copy h2 { color: #fff; }
.cta-copy p { color: rgba(241, 234, 217, 0.75); margin-top: 12px; font-size: 0.98rem; }
.cta-actions { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.cta-actions .btn { justify-content: center; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(44px, 6vw, 64px) 28px;
  background: rgba(6, 12, 9, 0.55);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 48px);
}
.footer-brand p { color: var(--sand-faint); font-size: 0.9rem; margin-top: 14px; max-width: 26ch; }
.footer-nesco {
  display: flex; align-items: center; gap: 10px;
  margin-top: 22px;
  color: var(--sand-faint); font-size: 0.8rem;
}
.footer-nesco img {
  height: 20px; width: auto;
  /* the NESCO logo is drawn for light surfaces — lift it onto the dark ground */
  filter: brightness(0) invert(0.92);
  opacity: 0.85;
}
.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--sand-faint);
  margin-bottom: 16px;
}
html[lang="ar"] .footer-col h4 { letter-spacing: 0.02em; }
.footer-col nav { display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  color: var(--sand-dim); text-decoration: none; font-size: 0.92rem;
  width: fit-content;
}
.footer-col a:hover { color: var(--sand); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-top: 1px solid var(--line);
  margin-top: clamp(32px, 5vw, 48px);
  padding-top: 22px;
  color: var(--sand-faint); font-size: 0.82rem;
}
.footer-bottom a { color: var(--sand-faint); }
.footer-bottom a:hover { color: var(--sand); }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .states-list {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 4px;
  }
  .states-list > li { flex-shrink: 0; }
  .state-chip { width: auto; max-width: 76vw; }
}

@media (max-width: 880px) {
  .nav-links, .nav-cta { display: none; }
  .burger { display: block; margin-inline-start: auto; }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { margin-top: 10px; }

  .steps-grid, .platform-grid { grid-template-columns: 1fr; }
  .modes-layout { grid-template-columns: 1fr; }
  .modes-tabs { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .mode-tab { flex-shrink: 0; }

  .cta-inner { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }

  .arc-node .arc-name { font-size: 26px; }
  .arc-node .arc-lat { font-size: 15px; }
}

@media (max-width: 560px) {
  /* keep the two-line headline: scale it to the viewport so
     "Your masjid's screen," never wraps onto a second line */
  h1 { font-size: clamp(1.55rem, 8.3vw, 2.5rem); }
  .hero-screens { grid-template-columns: 1fr; }
  .tv--portrait { width: 62%; margin-inline: auto; }
  .feature-grid { grid-template-columns: 1fr; }
  .states-screens { grid-template-columns: 1fr; }
  .states-screens .tv--portrait { width: 62%; margin-inline: auto; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
  /* the arc shrinks with the viewport — keep the prayer names readable
     by dropping the transliteration line and growing the Arabic */
  .arc-lat { display: none; }
  .arc-node .arc-name { font-size: 34px; }
}

/* ---------- live TV screen (recreation of the Android TV client) ----------
 * Sizes are the app's 1080p dp values converted to container-query units:
 * landscape design width 1920 → Xpx = X/19.2 cqw; portrait width 1080 → X/10.8 cqw.
 * Motion mirrors HomeScreen.kt: 800ms crossfades, exit scale 1.04 / enter 0.96.
 */
.scr {
  position: relative;
  width: 100%; height: 100%;
  overflow: hidden;
  background: #0a0f0c;
  container-type: size;
  font-family: 'Noto Kufi Arabic', var(--font-body);
  color: #fff;
}

/* wallpaper layers (800ms crossfade, FastOutSlowIn) */
.scr-wall-img {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 800ms cubic-bezier(0.4, 0, 0.2, 1);
}
.scr-wall-img.is-shown { opacity: 1; }
.scr-wall-img.is-fading { opacity: 0; }
/* interactive previews: quicker fades than the TV's own pacing */
.scr--fast .scr-wall-img,
.scr--fast .scr-layout > * { transition-duration: 400ms; }

/* the CSS-drawn announcement wallpaper (used by Hidden mode) */
.scr-wall-img--announce {
  background: #14306E;
  display: grid; place-items: center;
}
.scr-wall-img--announce::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke='%23FFFFFF' stroke-opacity='0.07' stroke-width='1'%3E%3Cpath d='M48 8 L88 48 L48 88 L8 48 Z'/%3E%3Cpath d='M48 20 L76 48 L48 76 L20 48 Z'/%3E%3Cpath d='M48 0 V8 M48 88 V96 M0 48 H8 M88 48 H96'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 18cqmin 18cqmin;
}
.scr-eid { position: relative; text-align: center; direction: rtl; padding-inline: 6cqw; }
.scr-eid-title { font-size: 9.5cqmin; font-weight: 700; line-height: 1.6; }
.scr-eid-line { font-size: 4.4cqmin; font-weight: 500; line-height: 1.9; color: rgba(255,255,255,0.92); }

/* layout layer — AnimatedContent fade + zoom.
 * The fade/zoom is applied to each child, not the layer: opacity/transform on
 * the container would make it a backdrop root, which blanks the glass blur
 * until the animation ends. Self-animation keeps backdrop-filter sampling
 * the wallpaper throughout. */
.scr-layout { position: absolute; inset: 0; }
.scr-layout > * {
  transition: opacity 800ms cubic-bezier(0.4, 0, 0.2, 1), transform 800ms cubic-bezier(0.4, 0, 0.2, 1);
}
.scr-layout.is-exiting > * { opacity: 0; transform: scale(1.04); }
.scr-layout.is-entering > * { opacity: 0; transform: scale(0.96); transition: none; }

/* glass card (GlassCard.kt: black @0.6 + blur 24dp + edge reflections) */
.scr-glass {
  position: relative;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(1.25cqw);
  -webkit-backdrop-filter: blur(1.25cqw);
  border-radius: 0.63cqw;
}
.scr-glass.is-active { background: rgba(52, 199, 89, 0.6); } /* accent @0.6 */
/* the liquid-glass reflection ring: bright top-left and bottom-right */
.scr-glass::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: max(1px, 0.1cqw);
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.10) 24%,
    rgba(255, 255, 255, 0.02) 50%,
    rgba(255, 255, 255, 0.10) 76%,
    rgba(255, 255, 255, 0.50) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

/* pills */
.scr-pill {
  border-radius: 999px;
  padding: 0.26cqw 1.3cqw;
  width: fit-content;
  font-weight: 500;
}
.scr-masjid { font-size: 1.46cqw; }
.scr-announce { font-size: 1.67cqw; }

/* clock card (ClockSection) */
.scr-clock {
  padding: 1.2cqw 3.1cqw;
  text-align: center;
  width: fit-content;
}
.scr-clock-time { display: flex; align-items: baseline; justify-content: center; gap: 0.2em; }
.scr-clock-num { font-size: 7.3cqw; font-weight: 700; line-height: 1.2; }   /* 140sp */
.scr-clock-ampm { font-size: 5.7cqw; font-weight: 600; color: rgba(255,255,255,0.7); } /* 110sp */
.scr-clock-date { font-size: 2.5cqw; font-weight: 500; color: rgba(255,255,255,0.85); line-height: 1.5; } /* 48sp */

/* ---- Normal (NormalPrayerLayout: SpaceBetween column) ---- */
.scr-normal {
  display: flex; flex-direction: column;
  align-items: center; justify-content: space-between;
  padding: 1.25cqw;
}
.scr-cards {
  display: flex; gap: 0.63cqw;
  width: 100%;
  align-items: flex-start;
}
.scr-cardcol { flex: 1; display: flex; flex-direction: column; gap: 0.42cqw; min-width: 0; }
.scr-card {
  aspect-ratio: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 1cqw;
  text-align: center;
}
.scr-card-name { font-size: 2.5cqw; font-weight: 600; line-height: 1.45; }  /* 48sp */
.scr-card-time { font-size: 5cqw; font-weight: 700; line-height: 1.25; }     /* 96sp */
.scr-card-off { font-size: 3.1cqw; font-weight: 500; color: rgba(255,255,255,0.9); line-height: 1.35; } /* 60sp */
.scr-chip {
  font-size: 1.56cqw; font-weight: 600; /* 30sp */
  text-align: center;
  padding: 0.35cqw 0.8cqw;
  border-radius: 0.63cqw;
}

/* ---- Compact (CompactPrayerLayout: bottom 20% row, name + time only) ---- */
.scr-compact { display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 1.25cqw 1.25cqw 0.63cqw; }
.scr-cards--compact { height: 20cqh; align-items: stretch; }
.scr-card--compact {
  flex: 1;
  aspect-ratio: auto;
  padding: 0.6cqw;
  justify-content: center;
  gap: 0.2cqw;
}
.scr-card--compact .scr-card-time { font-size: 5cqw; }

/* ---- Strip (StripPrayerLayout: CenterEnd column — visual left in RTL) ---- */
.scr-strip { display: flex; }
.scr-strip-col {
  margin-inline-start: auto; /* Compose CenterEnd under RTL = visual left */
  height: 100%;
  display: flex; flex-direction: column; justify-content: center;
  gap: 0.31cqw;                 /* 6dp spacers */
  padding-inline: 1.56cqw;      /* 30dp */
  width: max-content;           /* IntrinsicSize.Max */
}
.scr-clock--strip { padding: 1.04cqw; width: auto; border-radius: 0.63cqw; }
.scr-clock--strip .scr-clock-num { font-size: 3.125cqw; }  /* 60sp */
.scr-clock--strip .scr-clock-ampm { font-size: 2.08cqw; }  /* 40sp */
.scr-clock--strip .scr-clock-date { font-size: 1.56cqw; }  /* 30sp */
.scr-strip-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 2.08cqw;                 /* 40dp min spacer between name and time */
  border-radius: 0.42cqw;       /* 8dp */
  padding: 0.55cqw 1.56cqw;     /* a touch of block padding, h30dp */
}
.scr-strip-name, .scr-strip-time { font-size: 2.5cqw; font-weight: 600; line-height: 1.65; } /* 48sp */
.scr-strip-time { font-weight: 700; }
.scr-chip--strip { width: auto; font-size: 1.56cqw; padding: 0.3cqw 0.8cqw; } /* 30sp */

/* ---- Portrait (PortraitPrayerLayout.kt; design width 1080 → X/10.8 cqw) ---- */
.scr-portraitL {
  display: flex; flex-direction: column;
  align-items: stretch;
  justify-content: center;   /* Arrangement.Center — a centered island that hugs content */
  padding: 2.2cqw;           /* 24dp */
  gap: 0.74cqw;              /* 8dp spacers */
}
.scr-portraitL .scr-clock {
  width: 100%;               /* fillMaxWidth */
  padding: 2.96cqw;          /* 32dp */
  border-radius: 1.85cqw;    /* 20dp */
  margin-bottom: 0.37cqw;    /* 12dp after the clock */
}
.scr-portraitL .scr-clock-num { font-size: 13cqw; line-height: 1.2; }     /* 140sp */
.scr-portraitL .scr-clock-ampm { font-size: 10.2cqw; }                    /* 110sp */
.scr-portraitL .scr-clock-date { font-size: 4.44cqw; line-height: 1.35; } /* 48sp */
.scr-prow {
  display: flex; justify-content: space-between; align-items: center;
  padding: 3cqw 4.63cqw;     /* block padding gives the rows their breathing room */
  border-radius: 1.85cqw;    /* 20dp */
}
.scr-prow-name, .scr-prow-time { font-size: 7.4cqw; font-weight: 700; line-height: 1.25; } /* 80sp */
.scr-chip--portrait {
  font-size: 4.63cqw;        /* 50sp */
  line-height: 1.15;
  text-align: center;
  padding: 1.6cqw;           /* GlassCard default 20dp-ish */
  border-radius: 1.1cqw;     /* 12dp */
}

@media (prefers-reduced-motion: reduce) {
  .scr-wall-img, .scr-layout { transition-duration: 1ms; }
}

/* ---- overlay states (adhan / iqama / prayer-in-progress / azkar) ---- */
.scr-overlay { display: grid; place-items: center; }
.scr-scrim {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.5);          /* AdhanOverlay: blur(24dp) + black @0.5 */
  backdrop-filter: blur(1.25cqw);
  -webkit-backdrop-filter: blur(1.25cqw);
}
.scr-adhan-card {
  position: relative;
  padding: 1.56cqw 2.08cqw;                /* 30/40dp */
  border-radius: 1.04cqw;                  /* 20dp */
  font-size: 3.125cqw;                     /* 60sp */
  font-weight: 700;
  text-align: center;
  line-height: 1.8;
  max-width: 80cqw;
}
.scr-iqama {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  width: 100%;
}
.scr-iqama-icon .ms {
  font-size: 5.2cqw; /* mosque icon 100dp */
  font-variation-settings: 'opsz' 48, 'wght' 400, 'FILL' 1;
}
.scr-iqama-title { font-size: 3.125cqw; font-weight: 700; line-height: 1.9; }  /* 60sp */
.scr-iqama-sub { font-size: 1.82cqw; color: rgba(255,255,255,0.7); line-height: 1.8; } /* 35sp */
.scr-iqama-count { font-size: 11.9cqw; font-weight: 700; line-height: 1.3; direction: ltr; } /* 230sp */
.scr-iqama-divider { width: 55.7cqw; height: max(1px, 0.05cqw); background: #fff; margin-bottom: 0.78cqw; } /* 1070dp */
.scr-msgbar { width: 52cqw; padding: 1.04cqw 2.6cqw; border-radius: 0.63cqw; } /* 1000dp, pad 20/50dp */
.scr-msg-text { font-size: 1.82cqw; line-height: 1.85; }                       /* 35sp */
.scr-msg-source { font-size: 1.56cqw; color: rgba(255,255,255,0.7); line-height: 1.7; } /* 30sp */
.scr-black { position: absolute; inset: 0; background: #000; }
.scr-silence { position: relative; display: flex; align-items: center; gap: 1.56cqw; } /* 30dp */
.scr-silence-text { font-size: 2.5cqw; line-height: 1.7; }  /* 48sp */
.scr-silence .ms { font-size: 3.125cqw; }                   /* 60dp */
.scr-azkar { position: absolute; inset: 0; background: #000; }
.scr-azkar img { width: 100%; height: 100%; object-fit: cover; }

/* ---- pairing / device-login (LoginScreen.kt) ----
 * A faithful copy of the app's login screen: the M3 dark surface, a centered
 * 250dp QR, the 8-char code in monospace (headlineLarge), a scan prompt, a
 * request-account line at the bottom, and an Exit button (surfaceVariant) in
 * the corner. Sizes are the app's dp on a 1920-wide canvas (X/19.2 cqw); the
 * colors are the M3 baseline dark tokens the app's darkColorScheme() yields. */
.scr-pair-bg { position: absolute; inset: 0; background: #1C1B1F; }  /* surface */
.scr-pair-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
/* the 1080p TV runs at ~2x density, so 1dp ≈ 2px on the 1920 canvas → dp/9.6 cqw */
.scr-pair-qr {
  width: 26cqw; height: 26cqw;                     /* 250dp */
  background: url("../assets/qr-sample.svg") center / contain no-repeat;
}
.scr-pair-code {
  margin-top: 1.67cqw;                             /* 16dp spacer */
  font-family: ui-monospace, 'Roboto Mono', 'Cascadia Code', 'Courier New', monospace;
  font-size: 3.33cqw; line-height: 1.25;           /* headlineLarge 32sp */
  letter-spacing: 0.04em;
  color: #E6E1E5;                                  /* onSurface */
  direction: ltr;
}
.scr-pair-prompt {
  margin-top: 0.83cqw;                             /* 8dp spacer */
  font-size: 1.46cqw; line-height: 1.4;            /* bodyMedium 14sp */
  color: #CAC4D0;                                  /* onSurfaceVariant */
  text-align: center;
}
.scr-pair-foot {
  position: absolute; inset-inline: 0; bottom: 2.5cqw;   /* 24dp */
  font-size: 1.25cqw; line-height: 1.5;            /* bodySmall 12sp */
  color: rgba(230, 225, 229, 0.7);                 /* onSurfaceVariant @ .7 */
  text-align: center;
}
.scr-pair-exit {
  position: absolute; bottom: 2.5cqw; inset-inline-end: 2.5cqw;  /* 24dp */
  background: #E7E0EC;                             /* focused button (inverse) */
  color: #1C1B1F;
  font-size: 1.46cqw; line-height: 1;              /* labelLarge 14sp */
  padding: 1.1cqw 2.5cqw;                          /* M3 button 10/24dp */
  border-radius: 999px;
}

/* portrait screens: same dp values over a 1080 short side (X/10.8 cqw) */
@container (orientation: portrait) {
  .scr-scrim { backdrop-filter: blur(2.2cqw); -webkit-backdrop-filter: blur(2.2cqw); } /* 24dp */
  .scr-adhan-card {
    padding: 2.78cqw 3.7cqw;   /* 30/40dp */
    border-radius: 1.85cqw;    /* 20dp */
    font-size: 5.55cqw;        /* 60sp */
    max-width: 88cqw;
  }
  .scr-iqama-icon .ms { font-size: 9.26cqw; }  /* 100dp */
  .scr-iqama-title { font-size: 5.55cqw; }     /* 60sp */
  .scr-iqama-sub { font-size: 3.24cqw; }       /* 35sp */
  .scr-iqama-count { font-size: 21.3cqw; }     /* 230sp */
  .scr-iqama-divider { width: 94cqw; margin-bottom: 1.4cqw; } /* 1070dp */
  .scr-msgbar { width: 88cqw; padding: 1.85cqw 4.63cqw; border-radius: 1.1cqw; } /* 1000dp, pad 20/50dp */
  .scr-msg-text { font-size: 3.24cqw; }        /* 35sp */
  .scr-msg-source { font-size: 2.78cqw; }      /* 30sp */
  .scr-silence { gap: 2.78cqw; }               /* 30dp */
  .scr-silence-text { font-size: 4.44cqw; }    /* 48sp */
  .scr-silence .ms { font-size: 5.55cqw; }     /* 60dp */

  /* portrait: same dp at ~2x density over a 1080-wide canvas (dp/5.4 cqw) */
  .scr-pair-qr { width: 46.3cqw; height: 46.3cqw; }          /* 250dp */
  .scr-pair-code { margin-top: 2.96cqw; font-size: 5.93cqw; }/* 16dp, 32sp */
  .scr-pair-prompt { margin-top: 1.48cqw; font-size: 2.59cqw; } /* 8dp, 14sp */
  .scr-pair-foot { bottom: 4.44cqw; font-size: 2.22cqw; }    /* 24dp, 12sp */
  .scr-pair-exit { bottom: 4.44cqw; inset-inline-end: 4.44cqw; font-size: 2.59cqw; padding: 1.85cqw 4.44cqw; }
}

/* ---- perf-lite: weak devices (few cores / low memory) ----
 * Mirrors the TV app's blur-disabled fallback: opaque surfaces instead of
 * backdrop blur, and no aspect-ratio morph (it re-layouts every frame). */
.perf-lite .scr-glass,
.perf-lite .scr-scrim,
.perf-lite .site-header {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.perf-lite .scr-glass { background: rgba(0, 0, 0, 0.85); }        /* 0.6 + 0.25 */
.perf-lite .scr-glass.is-active { background: rgba(42, 160, 71, 0.88); }
.perf-lite .scr-scrim { background: rgba(0, 0, 0, 0.75); }
.perf-lite .site-header { background: rgba(12, 23, 18, 0.97); }
.perf-lite .mode-frame { transition: none; }
