/* Noor — noor.omniat.net
   Palette and mood follow the app icon: deep emerald, gold, cream.
   Display faces are self-hosted (CSP: font-src 'self'). */

@font-face {
  font-family: "Marcellus";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/marcellus-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Amiri";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/amiri-arabic-700.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1,
    U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF,
    U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Amiri";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/amiri-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #FAF8F2;
  --surface: #FFFFFF;
  --ink: #2C2C2C;
  --ink-soft: #5A5A50;
  --ink-faint: #8A8A7A;
  --green: #1A3A2A;
  --green-soft: #2D6A4F;
  --green-deep: #0C2C1D;
  --green-wash: #EEF7F1;
  --green-line: #B7DFC8;
  --gold: #C9A84C;
  --gold-soft: #E8CE8C;
  --band-a: #EEF7F1;
  --band-b: #F8F2E1;
  --rule: #E8E0D0;
  --radius: 18px;
  --measure: 44rem;
  --display: "Marcellus", Georgia, "Times New Roman", serif;
  --display-ar: "Amiri", "SF Arabic", "Geeza Pro", "Noto Naskh Arabic", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171A;
    --surface: #1C2024;
    --ink: #E8E6E1;
    --ink-soft: #B3B0A8;
    --ink-faint: #8A8880;
    --green: #9FD9B8;
    --green-soft: #7FC79F;
    --green-deep: #0C2C1D;
    --green-wash: #16241C;
    --green-line: #2C4A38;
    --gold: #D9BC68;
    --gold-soft: #E8CE8C;
    --band-a: #16241C;
    --band-b: #1E2620;
    --rule: #2A2F34;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  font-size: 16px;
  padding: 0 0 4rem;
}

/* Arabic gets a face with real Arabic coverage and a little more leading. */
[lang="ar"] {
  font-family: "SF Arabic", "Geeza Pro", "Noto Naskh Arabic", "Amiri", serif;
  line-height: 1.95;
}

::selection { background: var(--gold); color: #0A2417; }

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding-inline: 1.25rem;
}

/* ── Language switch ───────────────────────────────────────────── */
.langbar { display: flex; justify-content: flex-end; gap: .5rem; }
.langbar button {
  font: inherit;
  font-size: .875rem;
  color: var(--green-soft);
  background: transparent;
  border: 1px solid var(--green-line);
  border-radius: 999px;
  padding: .3rem 1rem;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.langbar button:hover { background: var(--green-wash); }
.langbar button[aria-pressed="true"] {
  background: var(--green-wash);
  color: var(--green);
  font-weight: 600;
}
.langbar button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* On the welcome page the switch floats over the dark hero. */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  text-decoration: none;
}
.brand-mark { border-radius: 26%; display: block; }
.brand-name { font-family: var(--display); font-size: 1.2rem; color: var(--green); letter-spacing: .04em; }
.page-home .topbar { position: absolute; inset-inline: 0; top: 0; z-index: 5; }
.page-home .langbar button { color: #CDE3D3; border-color: rgba(255, 255, 255, .3); }
.page-home .langbar button:hover,
.page-home .langbar button[aria-pressed="true"] { background: rgba(255, 255, 255, .12); color: #F2EEDF; }
.page-home .brand-name { color: #F2EEDF; }

/* ── Hero (welcome page) ───────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  color: #F2EEDF;
  background: radial-gradient(130% 110% at 50% -8%, #1E5A3C 0%, #123B27 44%, #0A2517 80%, #081F13 100%);
  padding: clamp(6.5rem, 13vw, 8.5rem) 1.25rem clamp(3.25rem, 7vw, 4.5rem);
}
.hero-star {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(130vw, 920px);
  height: auto;
  color: var(--gold);
  opacity: .07;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  max-width: 46rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.appicon {
  width: clamp(118px, 17vw, 148px);
  height: auto;
  border-radius: 24%;
  margin-bottom: 1.5rem;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, .55),
    0 0 0 1px rgba(255, 255, 255, .14),
    0 0 70px rgba(201, 168, 76, .28);
}
h1.wordmark {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.7rem, 7vw, 3.7rem);
  line-height: 1.1;
  letter-spacing: .05em;
  color: #F6F1E1;
}
.wordmark-alt { font-family: var(--display-ar); font-size: .6em; opacity: .6; }
.wordmark-alt[lang="en"] { font-family: var(--display); }
.hero .tagline {
  max-width: 34rem;
  margin-top: .8rem;
  color: #CDE3D3;
  font-size: 1.06rem;
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .35rem 1.75rem;
  list-style: none;
  margin: 1.5rem 0 1.9rem;
  color: #9FC4AA;
  font-size: .88rem;
}
.hero-stats strong {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.2rem;
  color: var(--gold-soft);
  margin-inline-end: .35rem;
}
.hero-stats li { white-space: nowrap; margin-bottom: 0; }

/* Store badges — placeholders until release; each becomes an <a>. */
.store-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem 0.9rem; }
.store-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem 1.15rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .07);
  color: #F2EEDF;
}
.store-logo { width: 22px; height: 22px; flex: none; }
.store-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.3; }
.store-text small { font-size: .6rem; letter-spacing: .07em; text-transform: uppercase; color: #A9C9B3; }
.store-text strong { font-size: 1.02rem; font-weight: 600; letter-spacing: .01em; }
.store-soon {
  position: absolute;
  top: -9px;
  inset-inline-end: 10px;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #14311F;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: .14rem .55rem;
  border-radius: 999px;
}
[lang="ar"] .store-text small { letter-spacing: 0; text-transform: none; }
[lang="ar"] .store-soon { letter-spacing: 0; }
.hero-note { margin-top: 1.15rem; color: #8FB89D; font-size: .85rem; }
.scroll-cue {
  margin-top: 2.1rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  color: var(--gold-soft);
  text-decoration: none;
  font-size: .9rem;
}
.scroll-cue:hover { color: #F6F1E1; }
.scroll-cue svg { width: 18px; height: 18px; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-cue svg { animation: none; }
  .features li, .features li:hover { transition: none; transform: none; }
}

/* ── Headings & body copy ──────────────────────────────────────── */
h1 { font-family: var(--display); font-weight: 400; }
[lang="ar"] h1, [lang="ar"] h2 { font-family: var(--display-ar); }

h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--green);
  margin: 2.5rem 0 .75rem;
  padding-inline-start: .8rem;
  border-inline-start: 3px solid var(--gold);
}
h3 { font-size: 1rem; font-weight: 600; margin: 1.5rem 0 .4rem; color: var(--ink); }
p { margin-bottom: .9rem; color: var(--ink); }
ul { margin: .5rem 0 1.1rem; padding-inline-start: 1.35rem; }
li { margin-bottom: .4rem; }
strong { font-weight: 600; }
a { color: var(--green-soft); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .9em;
  background: var(--green-wash);
  border-radius: 4px;
  padding: .1em .35em;
}

/* Welcome-page sections get centered display headings with a gold rule. */
.page-home h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.7rem, 3.5vw, 2.15rem);
  letter-spacing: .02em;
  text-align: center;
  border: 0;
  padding: 0;
  margin: 0 0 1.9rem;
}
.page-home h2::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  margin: .7rem auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.page-home .section { padding-top: 3.5rem; scroll-margin-top: 1.5rem; }

.callout {
  background: var(--green-wash);
  border: 1px solid var(--green-line);
  border-radius: var(--radius);
  padding: 1.1rem 1.35rem;
  margin: 1.5rem 0;
}
.callout p:last-child { margin-bottom: 0; }

/* ── Feature cards (welcome page) ──────────────────────────────── */
.page-home .wrap { max-width: 58rem; }
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.features li {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
  margin: 0;
  box-shadow: 0 1px 2px rgba(12, 44, 29, .05);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.features li:hover {
  transform: translateY(-3px);
  border-color: var(--green-line);
  box-shadow: 0 14px 32px rgba(12, 44, 29, .12);
}
.f-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--green-wash), var(--band-b));
  border: 1px solid var(--green-line);
  color: var(--gold);
  margin-bottom: 1rem;
}
.f-icon svg { width: 24px; height: 24px; }
.features h3 { margin: 0 0 .45rem; color: var(--green); font-size: 1.05rem; }
.features p { color: var(--ink-soft); font-size: .94rem; margin-bottom: 0; }

/* ── Offline band & privacy strip (welcome page) ───────────────── */
.band {
  max-width: 44rem;
  margin: 3.5rem auto 0;
  background: linear-gradient(135deg, var(--band-a), var(--band-b));
  border: 1px solid var(--green-line);
  border-radius: 22px;
  padding: 2.4rem 2rem 2.1rem;
  text-align: center;
}
.band-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green-deep);
  color: var(--gold-soft);
  margin: 0 auto 1.1rem;
  box-shadow: 0 10px 24px rgba(12, 44, 29, .25);
}
.band-icon svg { width: 26px; height: 26px; }
.band h2 { margin-bottom: .9rem; }
.band h2::after { margin-top: .6rem; }
.band p { color: var(--ink-soft); margin-bottom: 0; }

.privacy-strip {
  max-width: 40rem;
  margin: 3.25rem auto 0;
  text-align: center;
}
.privacy-strip h3 { color: var(--green); font-size: 1.08rem; margin: 0 0 .5rem; }
.privacy-strip p { color: var(--ink-soft); font-size: .93rem; margin-bottom: 0; }

.contact-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  margin-top: 3rem;
  max-width: 40rem;
  margin-inline: auto;
  text-align: center;
  box-shadow: 0 1px 2px rgba(12, 44, 29, .05);
}
.contact-card a { font-weight: 600; }

/* ── Legal/inner pages keep a calm masthead ────────────────────── */
header.masthead {
  text-align: center;
  padding: 2.75rem 1.25rem 2rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2.25rem;
}
.mark {
  display: inline-grid;
  place-items: center;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--gold);
  margin-bottom: .75rem;
}
.mark-img {
  display: block;
  width: 76px;
  height: 76px;
  border-radius: 24%;
  margin: 0 auto .9rem;
  box-shadow: 0 10px 26px rgba(12, 44, 29, .18);
}
header.masthead h1 { font-size: 1.9rem; color: var(--green); letter-spacing: .01em; }
.tagline { color: var(--ink-soft); font-size: 1.05rem; margin-top: .4rem; }
.badge {
  display: inline-block;
  margin-top: 1rem;
  padding: .25rem 1rem;
  font-size: .8rem;
  border-radius: 999px;
  background: var(--green-wash);
  border: 1px solid var(--green-line);
  color: var(--green-soft);
}

footer {
  max-width: var(--measure);
  margin: 3.5rem auto 0;
  padding: 1.5rem 1.25rem 0;
  border-top: 1px solid var(--rule);
  text-align: center;
  font-size: .85rem;
  color: var(--ink-faint);
}
footer p { color: inherit; margin-bottom: .35rem; }
footer a { color: var(--ink-soft); }

/* Only one language is rendered at a time. */
[data-lang-pane][hidden] { display: none !important; }
