/* لمّة: Rose & Gold (ADR-0007), the app's own tokens (src/ui/tokens.ts). */
:root {
  --bg: #fff9f7;
  --surface: #ffffff;
  --surface-alt: #fbeef2;
  --border: #eadce1;
  --text: #2a2126;
  --muted: #7c6b72;
  --primary: #a73a6b;
  --primary-deep: #6e1f44;
  --on-deep: #ffffff;
  --accent: #c7a24c;
  --accent-soft: #f7eed6;
  --gold-ink: #7a5a12;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(42, 33, 38, 0.06), 0 8px 24px rgba(42, 33, 38, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1417;
    --surface: #251c20;
    --surface-alt: #2f2429;
    --border: #3d3036;
    --text: #f6eef1;
    --muted: #b8a9af;
    --primary: #e58bb2;
    --primary-deep: #4a1830;
    --accent: #e2c27a;
    --accent-soft: #3a3020;
    --gold-ink: #e2c27a;
    --shadow: none;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.75;
}

h1, h2, h3 { font-family: 'Cairo', 'IBM Plex Sans Arabic', sans-serif; line-height: 1.3; margin: 0; }

a { color: var(--primary); }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* Hero: the deep rose of the sign-in screen. */
.hero {
  background: radial-gradient(120% 90% at 50% 0%, #a73a6b 0%, var(--primary-deep) 70%);
  color: var(--on-deep);
  border-radius: 0 0 32px 32px;
  padding: 28px 0 64px;
  overflow: hidden;
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-family: 'Cairo', sans-serif; font-weight: 700; font-size: 22px; }
.brand img { width: 40px; height: 40px; border-radius: 11px; }
.nav a.link { color: rgba(255, 255, 255, 0.85); text-decoration: none; font-size: 15px; }

.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; margin-top: 40px; }
.hero .eyebrow { margin: 0 0 6px; font-weight: 600; color: var(--accent); letter-spacing: 0.02em; }
.hero h1 { font-size: clamp(36px, 6vw, 58px); font-weight: 700; }
.hero .tagline { font-size: clamp(20px, 3vw, 26px); margin: 8px 0 20px; opacity: 0.95; }
.hero .lead { font-size: 18px; opacity: 0.85; max-width: 34em; margin: 0 0 28px; }

.store {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent); color: #3a2f0a;
  font-weight: 600; padding: 14px 22px; border-radius: 14px; text-decoration: none;
}
.store small { display: block; font-weight: 400; font-size: 13px; opacity: 0.8; }
.hero .note { font-size: 14px; opacity: 0.75; margin-top: 14px; }

/* The ring mark, drawn large: members around the gold pot. */
.mark { justify-self: center; width: min(320px, 70vw); aspect-ratio: 1; position: relative; }
.mark svg { width: 100%; height: 100%; }
.mark .orbit { transform-origin: 50% 50%; animation: turn 40s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .mark .orbit { animation: none; } }

section { padding: 64px 0 0; }
section h2 { font-size: clamp(26px, 4vw, 34px); margin-bottom: 8px; }
section .sub { color: var(--muted); margin: 0 0 28px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.step::before {
  counter-increment: step; content: counter(step);
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent-soft); color: var(--gold-ink); font-weight: 700; margin-bottom: 12px;
}
.step h3 { font-size: 20px; margin-bottom: 6px; }
.step p { margin: 0; color: var(--muted); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { background: var(--surface-alt); border-radius: var(--radius); padding: 22px; }
.feature .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); color: var(--primary); margin-bottom: 12px; }
.feature .icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 19px; margin-bottom: 4px; }
.feature p { margin: 0; color: var(--muted); font-size: 16px; }

.promise {
  margin-top: 64px; background: var(--accent-soft); color: var(--gold-ink);
  border-radius: var(--radius); padding: 26px; display: flex; gap: 16px; align-items: center;
}
.promise svg { flex: none; width: 32px; height: 32px; }
.promise p { margin: 0; font-size: 18px; font-weight: 500; }

footer { margin-top: 72px; border-top: 1px solid var(--border); padding: 24px 0 40px; color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
footer a { color: var(--muted); }

/* Text pages (privacy). */
.page-head { background: var(--primary-deep); color: var(--on-deep); padding: 28px 0 40px; border-radius: 0 0 28px 28px; }
.page-head h1 { font-size: clamp(30px, 5vw, 40px); margin-top: 36px; }
.page-head p { opacity: 0.8; margin: 6px 0 0; }
.prose { max-width: 720px; padding-top: 32px; }
.prose h2 { font-size: 22px; margin: 32px 0 8px; }
.prose ul { padding-inline-start: 22px; }
.prose li { margin-bottom: 6px; }

@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; margin-top: 32px; gap: 28px; }
  .steps, .features { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}

/* ---------- Phone mockups: the app's own screens, in its dark theme ---------- */
.phone {
  --app-bg: #1a1417; --app-surface: #251c20; --app-alt: #2f2429; --app-border: #3d3036;
  --app-text: #f6eef1; --app-muted: #b8a9af; --app-pink: #e58bb2; --app-deep: #4a1830;
  --app-gold: #e2c27a; --app-gold-soft: #3a3020; --app-green: #8fd8b2; --app-green-soft: #1e3329;
  --app-red: #f2877f; --app-red-soft: #3d1e1c; --app-amber: #f0b45a; --app-amber-soft: #3a2a14;
  width: 280px; flex: none; aspect-ratio: 9 / 17.5; border-radius: 42px; padding: 10px;
  background: #0d0a0c; box-shadow: 0 30px 60px rgba(30, 6, 18, 0.45), inset 0 0 0 2px #2a2226;
  position: relative;
}
.phone::before { /* camera */
  content: ''; position: absolute; top: 18px; left: 50%; width: 10px; height: 10px;
  margin-left: -5px; border-radius: 50%; background: #000; z-index: 2;
}
.screen {
  height: 100%; border-radius: 33px; overflow: hidden; background: var(--app-bg); color: var(--app-text);
  font-family: 'IBM Plex Sans Arabic', sans-serif; font-size: 11px; line-height: 1.5;
  padding: 34px 14px 0; display: flex; flex-direction: column; gap: 10px; position: relative;
}
.screen > * { flex-shrink: 0; }
.screen .h { font-family: 'Cairo', sans-serif; font-weight: 700; font-size: 20px; line-height: 1.3; }
.screen .muted { color: var(--app-muted); }
.screen .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.screen .amt { font-family: 'Cairo', sans-serif; font-weight: 700; }
.chip { font-size: 9.5px; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.chip.unpaid { background: var(--app-red-soft); color: var(--app-red); }
.chip.paid { background: var(--app-green-soft); color: var(--app-green); }
.chip.wait { background: var(--app-amber-soft); color: var(--app-amber); }
.chip.sync { background: var(--app-green-soft); color: var(--app-green); }
.lead-card { background: var(--app-deep); border-radius: 18px; padding: 14px; display: grid; gap: 4px; position: relative; overflow: hidden; }
.lead-card::after { content: ''; position: absolute; width: 120px; height: 120px; border-radius: 50%; border: 10px solid rgba(255, 255, 255, 0.06); top: -40px; left: -30px; }
.lead-card .t { font-family: 'Cairo', sans-serif; font-weight: 700; font-size: 16px; line-height: 1.35; }
.lead-card .amt { color: var(--app-gold); font-size: 22px; }
.lead-card .btn { margin-top: 6px; background: var(--app-gold); color: #3a2f0a; border-radius: 10px; text-align: center; padding: 7px; font-weight: 600; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.week span { border: 1px solid var(--app-border); border-radius: 9px; text-align: center; padding: 4px 0; font-size: 9px; color: var(--app-muted); }
.week b { display: block; color: var(--app-text); font-size: 12px; }
.week .today { background: var(--app-pink); border-color: var(--app-pink); color: #3a0f24; }
.week .today b { color: #3a0f24; }
.app-card { background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 14px; padding: 10px; display: grid; gap: 6px; }
.task { display: flex; align-items: center; gap: 8px; }
.task i { width: 26px; height: 26px; border-radius: 8px; background: var(--app-gold-soft); flex: none; display: grid; place-items: center; color: var(--app-gold); font-style: normal; }
.task div { flex: 1; }
.payout { background: var(--app-gold-soft); color: var(--app-gold); border-radius: 14px; padding: 10px; display: flex; gap: 10px; align-items: center; }
.payout .ring { width: 50px; height: 50px; text-align: center; line-height: 1.2; border-radius: 50%; border: 3px dotted var(--app-gold); display: grid; place-items: center; font-size: 9px; flex: none; }
.payout .amt { font-size: 18px; }
.pool { display: grid; gap: 5px; padding: 8px 0; border-top: 1px solid var(--app-border); }
.pool:first-child { border-top: 0; }
.pool .name { font-weight: 600; font-size: 12.5px; }
.pool .av { width: 30px; height: 30px; border-radius: 50%; background: var(--app-alt); color: var(--app-pink); display: grid; place-items: center; font-weight: 700; flex: none; }
.bars { display: flex; gap: 3px; padding-inline-start: 38px; }
.bars span { flex: 1; height: 3px; border-radius: 2px; background: var(--app-border); }
.bars .done { background: var(--app-pink); }
.bars .now { background: var(--app-gold); }
.bars .mine { background: #6e1f44; height: 5px; margin-top: -1px; }
.turn { background: var(--app-gold-soft); color: var(--app-gold); border-radius: 18px; padding: 12px; display: grid; gap: 3px; }
.turn .amt { font-size: 24px; }
.turn .pill { background: var(--app-deep); color: #fff; border-radius: 99px; padding: 1px 8px; font-size: 9px; }
.ok { background: var(--app-green-soft); color: var(--app-green); border-radius: 10px; padding: 7px 9px; }
.tabs { margin-top: auto; display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; font-size: 9px; color: var(--app-muted); border-top: 1px solid var(--app-border); padding: 7px 0 14px; margin-inline: -14px; background: var(--app-surface); }
.tabs .on { color: var(--app-pink); font-weight: 600; }
.tabs svg { width: 16px; height: 16px; display: block; margin: 0 auto 1px; }

/* Floating notes beside the hero phone. */
.stage { position: relative; justify-self: center; padding: 10px 70px; }
.float {
  position: absolute; background: #fff; color: #2a2126; border-radius: 14px; padding: 9px 12px;
  box-shadow: 0 14px 30px rgba(30, 6, 18, 0.3); font-size: 13px; line-height: 1.5; width: 200px;
  display: flex; gap: 9px; align-items: flex-start; z-index: 3;
}
.float i { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-style: normal; color: #fff; font-size: 14px; }
.float b { display: block; font-size: 12px; }
.float small { color: #7c6b72; font-size: 11.5px; }
.float.wa { top: -2%; left: -40px; }
.float.wa i { background: #25d366; }
.float.done { bottom: 3%; right: -40px; }
.float.done i { background: #2e7d5b; }
@media (prefers-reduced-motion: no-preference) {
  .float.wa { animation: bob 5s ease-in-out infinite; }
  .float.done { animation: bob 5s ease-in-out 2.5s infinite; }
}
@keyframes bob { 50% { transform: translateY(-8px); } }

/* Showcase: three screens with captions. */
.showcase { display: flex; gap: 28px; justify-content: center; align-items: flex-start; padding: 8px 4px 24px; }
.showcase figure { margin: 0; display: grid; gap: 14px; justify-items: center; scroll-snap-align: center; }
.showcase figure:nth-child(2) { margin-top: 36px; }
.showcase figcaption { text-align: center; max-width: 260px; }
.showcase figcaption b { display: block; font-family: 'Cairo', sans-serif; font-size: 18px; }
.showcase figcaption span { color: var(--muted); font-size: 15px; }

/* The WhatsApp invite, as it arrives. */
.invite { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.chat { background: #0b141a; border-radius: 22px; padding: 18px; display: grid; gap: 10px; }
.bubble { background: #005c4b; color: #e9edef; border-radius: 12px 0 12px 12px; padding: 10px 12px; font-size: 14px; line-height: 1.7; max-width: 92%; justify-self: start; }
.bubble .link { color: #53bdeb; direction: ltr; display: block; text-align: right; }
.bubble time { display: block; text-align: left; font-size: 11px; opacity: 0.6; }
.bubble.in { background: #202c33; border-radius: 0 12px 12px 12px; justify-self: end; }

@media (max-width: 760px) {
  .stage { padding: 30px 0 50px; }
  .phone { width: 272px; }
  .float { width: 180px; font-size: 12px; }
  .float.wa { top: 0; left: -40px; }
  .float.done { bottom: 0; right: -40px; top: auto; }
  .showcase { justify-content: flex-start; margin-inline: -20px; padding: 8px 20px 40px; overflow-x: auto; scroll-snap-type: x mandatory; }
  .showcase figure:nth-child(2) { margin-top: 0; }
  .invite { grid-template-columns: 1fr; }
}
