/* Maly AI landing — tokens from mobile/lib/design/tokens.dart */
:root {
  --canvas: #f6f3ec;
  --canvas-wash: #f8e6dc;
  --surface: #ffffff;
  --surface-alt: #f3efe6;
  --ink: #0b1610;
  --ink-muted: #5f675f;
  --ink-faint: #9aa096;
  --primary: #0c6b3a;
  --primary-soft: #e4f3ea;
  --gold: #c49a2a;
  --gold-soft: #fbf4e0;
  --hairline: #e8e3d8;
  --shadow: rgba(16, 28, 20, 0.08);
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --gutter: 16px;
  --max: 1120px;
  --nav-h: 72px;
  --font-ar: 'Cairo', system-ui, sans-serif;
  --font-en: 'Inter', system-ui, sans-serif;
  --font-display: 'Amiri', serif;
}

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

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

body {
  font-family: var(--font-ar);
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

html[lang="en"] body { font-family: var(--font-en); }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: min(var(--max), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

/* ── Nav ─────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(246, 243, 236, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; }

.nav-links {
  display: none;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}
.nav-links a {
  color: var(--ink-muted);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--primary); text-decoration: none; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-toggle {
  display: flex;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface);
}
.lang-toggle button {
  border: none;
  background: transparent;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-muted);
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}
.lang-toggle button.active {
  background: var(--primary);
  color: #fff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  font-family: inherit;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(12, 107, 58, 0.25);
}
.btn-primary:hover { background: #0a5a32; }
.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--hairline);
}

.nav-cta { display: none; }

.menu-btn {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  background: var(--canvas);
  z-index: 99;
  padding: 1.5rem;
  flex-direction: column;
  gap: 0.5rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}
.mobile-menu a:hover { background: var(--surface-alt); text-decoration: none; }

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .menu-btn { display: none; }
}

/* ── Hero ────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 3rem 0 4rem;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0 0 40% 0;
  background: linear-gradient(180deg, var(--canvas-wash) 0%, transparent 100%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  background: var(--gold-soft);
  color: var(--gold);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.hero-badge svg { width: 14px; height: 14px; }

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
html[lang="en"] .hero h1 { letter-spacing: -0.03em; }

.hero-lead {
  font-size: 1.05rem;
  color: var(--ink-muted);
  max-width: 34rem;
  margin-bottom: 1.75rem;
  line-height: 1.7;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.store-badge img { height: 48px; width: auto; }

.phone-frame {
  position: relative;
  max-width: 300px;
  margin-inline: auto;
}
.phone-frame::before {
  content: '';
  position: absolute;
  inset: -8% -12% -8% -12%;
  background: radial-gradient(ellipse at center, var(--primary-soft) 0%, transparent 70%);
  z-index: -1;
}
.phone-shell {
  background: var(--ink);
  border-radius: 36px;
  padding: 10px;
  box-shadow: 0 24px 60px var(--shadow), 0 0 0 1px rgba(0,0,0,0.06);
}
.phone-screen {
  border-radius: 28px;
  overflow: hidden;
  background: var(--surface);
}
.phone-screen img { width: 100%; }

@media (min-width: 900px) {
  .hero { padding: 4rem 0 5rem; }
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
  .phone-frame { margin-inline: auto 0; max-width: 320px; }
}

/* ── Trust strip ───────────────────────────────────── */
.trust-strip {
  background: var(--surface);
  border-block: 1px solid var(--hairline);
  padding: 1.25rem 0;
}
.trust-strip ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 2rem;
  list-style: none;
}
.trust-strip li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-muted);
}
.trust-strip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

/* ── Sections ──────────────────────────────────────── */
section { padding: 4rem 0; }

.section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.section-lead {
  color: var(--ink-muted);
  font-size: 1.02rem;
  max-width: 36rem;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.section-head { text-align: center; margin-bottom: 2.5rem; }
.section-head .section-lead { margin-inline: auto; margin-bottom: 0; }

/* ── How it works ──────────────────────────────────── */
.steps {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

.step {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: 0 2px 16px var(--shadow);
  position: relative;
}
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.step h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.step p {
  color: var(--ink-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* ── Pillars ───────────────────────────────────────── */
.pillars {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 768px) {
  .pillars { grid-template-columns: repeat(3, 1fr); }
}

.pillar {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  box-shadow: 0 2px 20px var(--shadow);
  border: 1px solid var(--hairline);
  transition: transform 0.2s, box-shadow 0.2s;
}
.pillar:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px var(--shadow);
}
.pillar-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}
.pillar.zakat .pillar-icon { background: var(--gold-soft); }
.pillar h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}
.pillar p {
  color: var(--ink-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* ── Feature grid ──────────────────────────────────── */
.features-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 600px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .features-grid { grid-template-columns: repeat(3, 1fr); }
}

.feature-card {
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}
.feature-card:hover {
  background: var(--surface);
  border-color: var(--hairline);
  box-shadow: 0 4px 16px var(--shadow);
}
.feature-card h4 {
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.feature-card p {
  font-size: 0.88rem;
  color: var(--ink-muted);
  line-height: 1.6;
}

/* ── Why Maly ──────────────────────────────────────── */
.why-section {
  background: var(--surface);
  border-block: 1px solid var(--hairline);
}
.why-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 900px) {
  .why-grid { grid-template-columns: 1fr 1fr; }
}

.why-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.why-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.why-check {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 2px;
}
.why-list h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.why-list p {
  font-size: 0.9rem;
  color: var(--ink-muted);
  line-height: 1.6;
}

.why-visual {
  background: linear-gradient(135deg, var(--primary-soft) 0%, var(--gold-soft) 100%);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
}
.why-visual .star {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.25rem;
}
.why-visual blockquote {
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.5;
  color: var(--ink);
}
html[lang="en"] .why-visual blockquote {
  font-family: var(--font-en);
  font-style: italic;
  font-size: 1.15rem;
}

/* ── Screenshots ───────────────────────────────────── */
.shots-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.shots-scroll::-webkit-scrollbar { height: 6px; }
.shots-scroll::-webkit-scrollbar-thumb {
  background: var(--hairline);
  border-radius: 3px;
}

.shot-card {
  flex: 0 0 auto;
  width: min(220px, 70vw);
  scroll-snap-align: start;
}
.shot-card .phone-shell {
  border-radius: 24px;
  padding: 6px;
}
.shot-card .phone-screen { border-radius: 18px; }
.shot-card figcaption {
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
  font-weight: 500;
}

/* ── CTA ───────────────────────────────────────────── */
.cta-section {
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, var(--primary-soft) 100%);
  pointer-events: none;
}
.cta-section .container { position: relative; }
.cta-section h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
.cta-section p {
  color: var(--ink-muted);
  font-size: 1.05rem;
  max-width: 28rem;
  margin: 0 auto 1.75rem;
  line-height: 1.7;
}
.cta-section .store-badges { justify-content: center; }

/* ── Footer ────────────────────────────────────────── */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.75);
  padding: 3rem 0 2rem;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
@media (min-width: 600px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 0.75rem;
}
.footer-brand img { width: 32px; height: 32px; }
.footer-tagline {
  color: rgba(255,255,255,0.55);
  font-size: 0.88rem;
  line-height: 1.6;
  max-width: 22rem;
}
.footer-col h4 {
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.85rem;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.88rem;
}
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
}

/* ── Legal pages ───────────────────────────────────── */
.legal-page {
  padding: 3rem 0 4rem;
}
.legal-page h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.legal-page .updated {
  color: var(--ink-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}
.legal-page h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin: 2rem 0 0.6rem;
}
.legal-page p, .legal-page ul {
  margin-bottom: 1rem;
  line-height: 1.75;
  color: var(--ink-muted);
}
.legal-page ul { padding-inline-start: 1.5rem; }
.legal-page hr {
  border: none;
  border-top: 1px solid var(--hairline);
  margin: 2.5rem 0;
}
.legal-page .en-block {
  direction: ltr;
  text-align: left;
}
