/* ============================================================
   Tilawa — public site styles
   Light theme. Warm cream background, deep emerald accent.
   Mobile-first. Pure CSS, no build step.
   ============================================================ */

:root {
  /* palette */
  --cream:        #FBF8F1;
  --cream-2:      #F4EFE3;
  --paper:        #FFFFFF;
  --ink:          #1A1410;
  --ink-2:        #3A322B;
  --muted:        #6E635A;
  --rule:         #E8E2D8;
  --accent:       #0E7C66;   /* emerald */
  --accent-2:     #0A5E4D;   /* darker emerald */
  --gold:         #B8893D;
  --danger:       #B23A2F;

  /* type */
  --serif:  'Iowan Old Style', 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans:   -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
  --mono:   ui-monospace, 'SF Mono', 'JetBrains Mono', 'Consolas', monospace;
  --arabic: 'Amiri', 'Scheherazade New', 'Geeza Pro', 'Noto Naskh Arabic', serif;

  /* layout */
  --maxw:    72rem;
  --maxw-prose: 42rem;

  /* radius */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-pill: 999px;

  /* shadow */
  --shadow-1: 0 1px 2px rgba(26, 20, 16, 0.04), 0 2px 8px rgba(26, 20, 16, 0.04);
  --shadow-2: 0 4px 16px rgba(26, 20, 16, 0.06), 0 12px 32px rgba(26, 20, 16, 0.04);

  --nav-bg: rgba(251, 248, 241, 0.85);
  --inverse-surface: #1A1410;       /* always-dark panel bg (trust strip, dark pills) */
  --inverse-surface-2: #0D0A08;     /* slightly deeper for hover/contrast */
}

/* ---------- dark mode (site chrome only; phone mocks stay light) ----------
   Resolved theme:
     - html[data-theme="dark"]  → dark (user override)
     - html[data-theme="light"] → light (user override)
     - no attribute            → follow OS via prefers-color-scheme
------------------------------------------------------------------------- */
:root {
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --cream:   #14110E;
  --cream-2: #1C1814;
  --paper:   #25201B;
  --ink:     #F4EEDF;
  --ink-2:   #D8CFC0;
  --muted:   #ADA192;
  --rule:    #3A332B;
  --accent:  #2BB897;
  --accent-2:#14A085;
  --nav-bg:  rgba(20, 17, 14, 0.85);
  --inverse-surface:   #2A241F;
  --inverse-surface-2: #1F1A16;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-2: 0 4px 16px rgba(0, 0, 0, 0.5), 0 12px 32px rgba(0, 0, 0, 0.4);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    color-scheme: dark;
    --cream:   #14110E;
    --cream-2: #1C1814;
    --paper:   #25201B;
    --ink:     #F4EEDF;
    --ink-2:   #D8CFC0;
    --muted:   #ADA192;
    --rule:    #3A332B;
    --accent:  #2BB897;
    --accent-2:#14A085;
    --nav-bg:  rgba(20, 17, 14, 0.85);
    --inverse-surface:   #2A241F;
    --inverse-surface-2: #1F1A16;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-2: 0 4px 16px rgba(0, 0, 0, 0.5), 0 12px 32px rgba(0, 0, 0, 0.4);
  }
}

/* Phone mockups always render in the app's light palette, regardless of OS theme */
.phone-screen {
  --ink:     #1A1410;
  --ink-2:   #3A322B;
  --muted:   #6E635A;
  --rule:    #E8E2D8;
  --cream-2: #F4EFE3;
  --paper:   #FFFFFF;
  color: var(--ink);
}

/* Dark-mode polish for tinted card surfaces */
html[data-theme="dark"] .tier-badge {
  background: rgba(43, 184, 151, 0.18);
  color: #6EE7C9;
}
html[data-theme="dark"] .tier-premium .tier-badge {
  background: rgba(184, 137, 61, 0.20);
  color: #E8C383;
}
html[data-theme="dark"] .tier-starter .tier-badge {
  background: rgba(120, 160, 220, 0.20);
  color: #A8C5EA;
}
html[data-theme="dark"] .feature-icon {
  background: rgba(43, 184, 151, 0.15);
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .tier-badge {
    background: rgba(43, 184, 151, 0.18);
    color: #6EE7C9;
  }
  html:not([data-theme="light"]) .tier-premium .tier-badge {
    background: rgba(184, 137, 61, 0.20);
    color: #E8C383;
  }
  html:not([data-theme="light"]) .tier-starter .tier-badge {
    background: rgba(120, 160, 220, 0.20);
    color: #A8C5EA;
  }
  html:not([data-theme="light"]) .feature-icon {
    background: rgba(43, 184, 151, 0.15);
  }
}

/* ---------- RTL / Arabic ---------- */
html[lang="ar"],
[dir="rtl"] {
  direction: rtl;
}
html[lang="ar"] body {
  font-family: var(--arabic), var(--sans);
}
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4 {
  font-family: var(--arabic), var(--serif);
  letter-spacing: 0;
}

* { box-sizing: border-box; }

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

[id] { scroll-margin-top: 5rem; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  font-size: 17px;
  font-feature-settings: 'kern' 1, 'liga' 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; display: block; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--accent-2); }

/* ---------- typography ---------- */

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  letter-spacing: -0.01em;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 600; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

p { margin: 0 0 1em; color: var(--ink-2); }

.lede {
  font-size: 1.125rem;
  color: var(--muted);
  line-height: 1.65;
  max-width: 36rem;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1rem;
}

/* ---------- top nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
          backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.9rem clamp(1.25rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: block;
}
.brand-stack {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 2px;
}
.brand-name {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand-tag {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 500;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-size: 0.92rem;
  color: var(--ink-2);
}
.nav-links a { color: var(--ink-2); }
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  background: var(--inverse-surface);
  color: white !important;
  padding: 0.5rem 1.1rem;
  border-radius: var(--r-pill);
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.15s ease, transform 0.15s ease;
}
.nav-cta:hover { background: var(--accent); color: white !important; }

/* theme toggle button (light / dark) */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink-2);
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  padding: 0;
}
.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.theme-toggle .i { width: 1.05rem; height: 1.05rem; }
.theme-toggle .theme-toggle-sun { display: none; }
.theme-toggle .theme-toggle-moon { display: inline-block; }
html[data-theme="dark"] .theme-toggle .theme-toggle-sun { display: inline-block; }
html[data-theme="dark"] .theme-toggle .theme-toggle-moon { display: none; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .theme-toggle .theme-toggle-sun { display: inline-block; }
  html:not([data-theme="light"]) .theme-toggle .theme-toggle-moon { display: none; }
}

@media (max-width: 720px) {
  .nav-links { gap: 1rem; }
  .nav-links .nav-anchor { display: none; }
}

/* ---------- layout primitives ---------- */

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

section {
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
}

.section-tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }

.section-band {
  background: var(--cream-2);
}

/* ---------- hero ---------- */

.hero {
  padding-top: clamp(3rem, 8vw, 6rem);
  padding-bottom: clamp(3rem, 8vw, 6rem);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 10% 0%, rgba(14, 124, 102, 0.06), transparent 50%),
    radial-gradient(ellipse at 90% 100%, rgba(184, 137, 61, 0.05), transparent 50%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
}
.hero-headline {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
}
.hero-headline em {
  font-style: italic;
  color: var(--accent);
}
.hero-sub {
  font-size: 1.2rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 2rem;
  max-width: 32rem;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 18rem; margin: 0 auto; }
}

/* ---------- phone mockup (CSS-only) ---------- */

.phone {
  position: relative;
  width: 100%;
  max-width: 22rem;
  margin: 0 auto;
  aspect-ratio: 9 / 19;
  background: linear-gradient(180deg, #1a1a1c 0%, #0a0a0c 100%);
  border-radius: 2.25rem;
  padding: 0.55rem;
  box-shadow:
    0 30px 60px -20px rgba(26, 20, 16, 0.35),
    0 12px 24px rgba(26, 20, 16, 0.18),
    inset 0 0 0 1.5px #2c2c2e;
}
.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 1.85rem;
  background:
    linear-gradient(180deg, #0E7C66 0%, #0A5E4D 50%, #074133 100%);
  padding: 1.75rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  color: white;
  font-family: var(--sans);
  position: relative;
  overflow: hidden;
}
.phone-notch {
  position: absolute;
  top: 0.7rem;
  left: 50%;
  transform: translateX(-50%);
  width: 6rem;
  height: 1.25rem;
  background: #000;
  border-radius: var(--r-pill);
  z-index: 2;
}
.phone-bismillah {
  font-family: var(--arabic);
  font-size: 1.3rem;
  text-align: center;
  margin-top: 1.5rem;
  opacity: 0.9;
  direction: rtl;
}
.phone-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.6;
  text-align: center;
  margin-top: 0.4rem;
}
.phone-cards {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.phone-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-md);
  padding: 0.75rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  backdrop-filter: blur(8px);
}
.phone-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
  font-family: var(--arabic);
  font-size: 0.95rem;
  flex-shrink: 0;
}
.phone-card-name { font-size: 0.85rem; font-weight: 500; }
.phone-card-sub { font-size: 0.7rem; opacity: 0.7; margin-top: 0.1rem; }
.phone-spacer { flex: 1; }
.phone-bottom {
  display: flex;
  justify-content: space-around;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.65rem;
  opacity: 0.7;
}

/* ---------- phone stack (two phones overlapping) ---------- */
.phone-stack {
  position: relative;
  width: 100%;
  max-width: 26rem;
  margin: 0 auto;
  padding: 1rem 0 1rem;
}
.phone-stack .phone {
  margin: 0;
}
.phone-stack .phone-back {
  position: absolute;
  top: 0;
  right: -8%;
  width: 78%;
  transform: rotate(6deg);
  opacity: 0.95;
  filter: drop-shadow(0 25px 35px rgba(26, 20, 16, 0.25));
  z-index: 1;
}
.phone-stack .phone-front {
  position: relative;
  width: 88%;
  margin-left: 0;
  transform: rotate(-3deg);
  z-index: 2;
}

/* shared status bar */
.phone-statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.4rem 0.5rem;
  opacity: 0.85;
  letter-spacing: 0.01em;
}
.phone-statusbar-right { display: inline-flex; gap: 0.3rem; align-items: center; }

/* ---------- HOME SCREEN (front phone, light theme) ---------- */
.phone-screen--home {
  background: linear-gradient(180deg, #FBF9F4 0%, #F2EDE2 100%);
  color: var(--ink);
  padding: 1.75rem 1rem 1rem;
}
.phone-statusbar--dark { color: var(--ink); }

.home-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.6rem;
  margin-bottom: 1rem;
}
.home-greet {
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.home-name {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 0.1rem;
}
.home-avatar {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.home-avatar img { width: 100%; height: 100%; display: block; }

.home-cta {
  background: linear-gradient(135deg, #0E7C66 0%, #0A5E4D 100%);
  color: white;
  border-radius: var(--r-md);
  padding: 0.9rem 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 8px 18px -8px rgba(10, 94, 77, 0.45);
}
.home-cta-icon {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: var(--r-sm, 10px);
  background: rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.home-cta-icon .i { width: 1.1rem; height: 1.1rem; }
.home-cta-title { font-size: 0.95rem; font-weight: 600; }
.home-cta-sub {
  font-size: 0.7rem;
  opacity: 0.85;
  margin-top: 0.1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.dot-live {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: #5EE6B0;
  box-shadow: 0 0 0 3px rgba(94, 230, 176, 0.25);
  display: inline-block;
}

.home-card {
  margin-top: 0.85rem;
  background: white;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: 0.85rem 0.95rem;
}
.home-card-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}
.home-card-icon { color: #D97757; width: 1.05rem; height: 1.05rem; }
.home-card-title { font-size: 0.85rem; font-weight: 600; }
.home-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.3rem;
}
.home-week .d {
  font-size: 0.65rem;
  text-align: center;
  padding: 0.35rem 0;
  border-radius: 999px;
  background: var(--cream-2, #F4EFE3);
  color: var(--muted);
  font-weight: 500;
}
.home-week .d.on {
  background: rgba(14, 124, 102, 0.12);
  color: var(--accent);
}
.home-week .d.today {
  background: var(--accent);
  color: white;
}

.phone-tabbar {
  display: flex;
  justify-content: space-around;
  padding: 0.7rem 0 0.3rem;
  border-top: 1px solid var(--rule);
  margin-top: 0.5rem;
}
.phone-tabbar .tab {
  color: var(--muted);
  display: inline-grid;
  place-items: center;
}
.phone-tabbar .tab.on { color: var(--accent); }
.phone-tabbar .tab .i { width: 1.15rem; height: 1.15rem; }

/* ---------- TEACHERS LIST (front phone) ---------- */
.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.6rem;
  margin-bottom: 0.9rem;
}
.list-title { font-size: 1rem; font-weight: 600; color: var(--ink); }
.list-sub {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 0.15rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.teacher-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.t-row {
  background: white;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: 0.6rem 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.t-ava {
  position: relative;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: rgba(14, 124, 102, 0.1);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-family: var(--arabic);
  font-size: 1.05rem;
  flex-shrink: 0;
}
.t-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #2ecc71;
  border: 2px solid white;
}
.t-info { flex: 1; min-width: 0; }
.t-name { font-size: 0.82rem; font-weight: 600; color: var(--ink); }
.t-spec { font-size: 0.68rem; color: var(--muted); margin-top: 0.1rem; }
.t-req {
  background: var(--accent);
  color: white;
  border: none;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
}

/* ---------- CALL SCREEN (back phone, dark gradient) ---------- */
.phone-screen--call {
  background: linear-gradient(180deg, #0E7C66 0%, #074133 100%);
  color: white;
  padding: 1.75rem 1.1rem 1.1rem;
  align-items: center;
}
.call-meta {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  opacity: 0.75;
  margin-top: 0.6rem;
  text-align: center;
}
.call-avatar {
  position: relative;
  margin: 1.4rem auto 0.9rem;
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: grid;
  place-items: center;
  font-family: var(--arabic);
  font-size: 2.2rem;
}
.call-pulse {
  position: absolute;
  inset: -0.5rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  animation: callPulse 2s ease-out infinite;
}
@keyframes callPulse {
  0% { transform: scale(0.85); opacity: 0.8; }
  100% { transform: scale(1.35); opacity: 0; }
}
.call-name { font-size: 1rem; font-weight: 600; text-align: center; }
.call-sub { font-size: 0.72rem; opacity: 0.8; text-align: center; margin-top: 0.15rem; }
.call-timer {
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-top: 0.9rem;
  text-align: center;
  opacity: 0.9;
}
.call-spacer { flex: 1; }
.call-controls {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  padding-bottom: 0.4rem;
}
.call-btn {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: white;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.call-btn .i { width: 1.1rem; height: 1.1rem; }
.call-btn--end {
  background: #E04848;
  border-color: #E04848;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--r-pill);
  font-size: 0.95rem;
  font-weight: 500;
  font-family: var(--sans);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary {
  background: var(--inverse-surface);
  color: white !important;
}
.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-1);
}
.btn-secondary {
  background: transparent;
  color: var(--ink) !important;
  border: 1px solid var(--rule);
}
.btn-secondary:hover {
  border-color: var(--ink);
  background: var(--paper);
}
.btn-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}
.btn:hover .btn-arrow { transform: translate(3px, 0); }

/* ---------- feature grid ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 3rem;
}
.feature {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 2rem 1.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-2);
}
.feature-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--r-md);
  background: rgba(14, 124, 102, 0.08);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 1.25rem;
}
.feature-icon .i { width: 1.4rem; height: 1.4rem; }

/* ---------- icon primitives ---------- */
.i { width: 1.25rem; height: 1.25rem; display: inline-block; vertical-align: middle; }
.i-xs { width: 0.85rem; height: 0.85rem; display: inline-block; vertical-align: middle; }
.feature h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.005em;
}
.feature p {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}

@media (max-width: 880px) {
  .features { grid-template-columns: 1fr; }
}

/* ---------- how it works ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 2rem 1.5rem;
  padding-top: 3.5rem;
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.05em;
}
.step h3 {
  font-size: 1.15rem;
  font-family: var(--sans);
  margin-bottom: 0.5rem;
}
.step p {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
}

@media (max-width: 720px) {
  .steps { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* ---------- audience split ---------- */

.audience {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 3rem;
}
.audience-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 2.5rem 2rem;
}
.audience-card h3 {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.audience-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}
.audience-card li {
  padding: 0.55rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--ink-2);
  font-size: 0.98rem;
  border-bottom: 1px solid var(--rule);
}
.audience-card li:last-child { border-bottom: none; }
.audience-card li::before {
  content: "·";
  position: absolute;
  left: 0.4rem;
  color: var(--accent);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1;
  top: 0.55rem;
}

@media (max-width: 720px) {
  .audience { grid-template-columns: 1fr; }
}

/* ---------- privacy / trust strip ---------- */

.trust {
  background: var(--inverse-surface);
  color: white;
  border-radius: var(--r-lg);
  padding: clamp(2.5rem, 5vw, 4rem);
  margin-top: 3rem;
}
.trust h2 {
  color: white;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 1rem;
}
.trust p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.05rem;
  max-width: 38rem;
  margin: 0 0 2rem;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem 2rem;
}
.trust-item {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 1rem;
}
.trust-item-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 0.4rem;
}
.trust-item h4 {
  color: white;
  font-family: var(--sans);
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
}
.trust-item p {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

@media (max-width: 720px) {
  .trust-grid { grid-template-columns: 1fr; }
}

/* ---------- FAQ ---------- */

.faq {
  margin-top: 3rem;
  display: grid;
  gap: 0.4rem;
}
.faq details {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: 1.1rem 1.4rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.faq details[open] {
  border-color: var(--accent);
  box-shadow: var(--shadow-1);
}
.faq summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--mono);
  font-size: 1.4rem;
  color: var(--accent);
  font-weight: 400;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after {
  content: "−";
  transform: rotate(180deg);
}
.faq p {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.6;
}

/* ---------- builder strip ---------- */

.builder {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 1.75rem 2rem;
  margin-top: 3rem;
}
.builder-mark {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: rgba(14, 124, 102, 0.08);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-family: var(--arabic);
  font-size: 2rem;
  flex-shrink: 0;
}
.builder-text { flex: 1; }
.builder-text-eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.builder-text p {
  margin: 0;
  color: var(--ink-2);
  font-size: 1rem;
}
.builder-text strong { color: var(--ink); font-weight: 600; }
.builder-link {
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
}
.builder-link .btn-arrow { display: inline-block; }

@media (max-width: 720px) {
  .builder { flex-direction: column; text-align: center; align-items: stretch; }
  .builder-mark { margin: 0 auto; }
}

/* ---------- download / store badges ---------- */

.download {
  text-align: center;
  padding: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 4vw, 4rem);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: white;
  border-radius: var(--r-lg);
  margin-top: 3rem;
}
.download h2 {
  color: white;
  margin-bottom: 0.75rem;
}
.download p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 32rem;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
}
.store-badges {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.store-badge {
  background: rgba(0, 0, 0, 0.85);
  color: white !important;
  padding: 0.9rem 1.5rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  transition: transform 0.15s ease, background 0.15s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.store-badge:hover {
  transform: translateY(-2px);
  background: black;
  color: white !important;
}
.store-badge-icon {
  display: inline-grid;
  place-items: center;
}
.store-badge-icon .i { width: 1.4rem; height: 1.4rem; }
.store-badge-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: left;
}
.store-badge-text small {
  font-size: 0.65rem;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.store-badge-text span { font-size: 1rem; font-weight: 600; }
.store-badge.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* dark-mode: lift dark pills off the dark page */
html[data-theme="dark"] .store-badge {
  background: var(--inverse-surface);
  border-color: var(--rule);
}
html[data-theme="dark"] .store-badge:hover { background: var(--inverse-surface-2); }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .store-badge {
    background: var(--inverse-surface);
    border-color: var(--rule);
  }
  html:not([data-theme="light"]) .store-badge:hover { background: var(--inverse-surface-2); }
}

/* ---------- donate / tiers ---------- */

.donate-section .lead {
  max-width: 44rem;
  margin: 0.5rem 0 2.5rem;
  color: var(--ink-2);
  font-size: 1.05rem;
}
.tiers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
  margin-bottom: 2rem;
}
.tier {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  position: relative;
}
.tier-free {
  border-color: var(--accent);
  border-width: 2px;
}
.tier-starter .tier-badge {
  background: rgba(99, 142, 198, 0.12);
  color: #4a73a8;
}
.tier-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(14, 124, 102, 0.1);
  color: var(--accent);
}
.tier-premium .tier-badge {
  background: rgba(184, 137, 61, 0.12);
  color: var(--gold);
}
.tier h3 {
  margin: 0.25rem 0 0;
  font-size: 1.25rem;
}
.tier-amount {
  font-size: 1rem;
  color: var(--muted);
  margin-top: 0.25rem;
}
.tier-amount-big {
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.tier-sub {
  font-size: 0.95rem;
  color: var(--ink-2);
}
.tier-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.tier-list li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  color: var(--ink-2);
  line-height: 1.45;
}
.tier-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 600;
}
.tier-foot {
  margin-top: auto;
  padding-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px dashed var(--rule);
}
.donate-fineprint {
  max-width: 44rem;
  margin: 0 auto;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
}

/* ---------- team ---------- */

.team-section {
  padding: 4rem 0 1rem;
}
.team-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.team-header h2 {
  margin: 0 0 0.5rem;
}
.team-header p {
  color: var(--muted);
  margin: 0;
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.team-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: 1.5rem 1rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
a.team-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(14, 124, 102, 0.08);
}
.team-card--placeholder {
  border-style: dashed;
  background: transparent;
}
.team-ava {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #0E7C66, #074133);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.team-ava--ghost {
  background: transparent;
  border: 1.5px dashed var(--rule);
  color: var(--muted);
  font-weight: 400;
  font-size: 1.6rem;
}
.team-name {
  font-weight: 600;
  font-size: 0.95rem;
}
.team-role {
  font-size: 0.8rem;
  color: var(--muted);
}
.team-note {
  text-align: center;
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--rule);
  margin-top: 4rem;
  padding: 3rem 0 2rem;
  background: var(--cream-2);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
.footer-brand p {
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 22rem;
  margin-top: 0.75rem;
}
.footer-col h4 {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1rem;
  font-weight: 600;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-col a {
  color: var(--ink-2);
  font-size: 0.95rem;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--muted);
}
.footer-bottom a { color: var(--muted); }
.footer-bottom .arabic {
  font-family: var(--arabic);
  font-size: 1.1rem;
  color: var(--accent);
}
.footer-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 600;
}

@media (max-width: 1024px) {
  .tiers { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }
  .footer-bottom { flex-direction: column; gap: 0.75rem; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .tiers { grid-template-columns: 1fr; }
}

/* ---------- prose pages (privacy, terms, community) ---------- */

.prose {
  max-width: var(--maxw-prose);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem) clamp(1.25rem, 4vw, 3rem);
}
.prose-header {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2rem;
  margin-bottom: 2rem;
}
.prose-header h1 {
  margin: 0 0 0.5rem;
}
.prose-meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.prose h2 {
  font-size: 1.5rem;
  margin: 2.5rem 0 0.75rem;
}
.prose h3 {
  font-size: 1.15rem;
  margin: 1.75rem 0 0.5rem;
  font-family: var(--sans);
  letter-spacing: -0.005em;
}
.prose p {
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.7;
}
.prose ul {
  padding-left: 1.5rem;
  margin: 0.5rem 0 1.5rem;
}
.prose li {
  color: var(--ink-2);
  margin-bottom: 0.5rem;
  line-height: 1.6;
}
.prose strong { color: var(--ink); font-weight: 600; }
.prose code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--cream-2);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  color: var(--accent-2);
}
.prose a {
  color: var(--accent);
  border-bottom: 1px solid rgba(14, 124, 102, 0.3);
}
.prose a:hover { border-bottom-color: var(--accent); }
.prose .back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2.5rem;
  border-bottom: none;
}
.prose .back:hover { color: var(--accent); border-bottom: none; }

/* ---------- responsive global ---------- */

@media (max-width: 640px) {
  body { font-size: 16px; }
  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.6rem; }
  .lede { font-size: 1.05rem; }
  .hero-sub { font-size: 1.05rem; }
  section { padding: 3rem 0; }
}

/* ---------- prefers reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
