/* Mudawin — mudawinapp.com. One stylesheet, RTL-first via logical properties. */
:root {
  --teal-900: #0b2f2d;
  --teal-800: #14524f;
  --teal-700: #1d615d;
  --teal-600: #2c6e6b;
  --teal-500: #3d8a86;
  --teal-200: #bcd9d6;
  --teal-100: #e5f0ef;
  --bg: #fafcfc;
  --surface: #ffffff;
  --text: #152423;
  --muted: #59706e;
  --border: rgba(21, 36, 35, 0.09);
  --shadow-sm: 0 1px 2px rgba(11, 47, 45, 0.05), 0 4px 14px rgba(11, 47, 45, 0.05);
  --shadow-lg: 0 6px 18px rgba(11, 47, 45, 0.1), 0 24px 60px rgba(11, 47, 45, 0.14);
  --radius: 20px;
  --nav-bg: rgba(250, 252, 252, 0.8);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Tahoma, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1514;
    --surface: #142120;
    --text: #e9f1f0;
    --muted: #9db2b0;
    --border: rgba(233, 241, 240, 0.09);
    --teal-100: #16302e;
    --teal-200: #1e4340;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 14px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 6px 18px rgba(0, 0, 0, 0.35), 0 24px 60px rgba(0, 0, 0, 0.45);
    --nav-bg: rgba(12, 21, 20, 0.78);
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 17px;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-600); text-decoration: none; }
section { scroll-margin-top: 84px; }

.container { max-width: 1100px; margin-inline: auto; padding-inline: 24px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 21px; color: var(--text); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: linear-gradient(145deg, var(--teal-500), var(--teal-800));
  color: #fff; display: grid; place-items: center;
  font-size: 19px; font-weight: 800; line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 2px 6px rgba(11,47,45,.25);
}
.nav-links { display: flex; gap: 24px; margin-inline-start: 8px; }
.nav-links a { color: var(--muted); font-size: 15px; font-weight: 600; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { margin-inline-start: auto; display: flex; align-items: center; gap: 12px; }
.lang-pill {
  border: 1px solid var(--border); border-radius: 999px;
  padding: 5px 14px; font-size: 13.5px; font-weight: 700; color: var(--muted);
  transition: border-color .2s, color .2s;
}
.lang-pill:hover { border-color: var(--teal-500); color: var(--teal-600); }
.btn-small {
  background: var(--teal-700); color: #fff; font-weight: 700; font-size: 14.5px;
  padding: 8px 18px; border-radius: 999px; transition: background .2s, transform .2s;
  box-shadow: var(--shadow-sm);
}
.btn-small:hover { background: var(--teal-800); transform: translateY(-1px); }
@media (max-width: 780px) {
  .nav-links { display: none; }
  .nav-inner { gap: 12px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #f2f8f7; overflow: hidden;
  background:
    radial-gradient(1100px 600px at 85% -20%, rgba(84, 160, 155, 0.55), transparent 65%),
    radial-gradient(900px 500px at -10% 110%, rgba(38, 96, 92, 0.6), transparent 60%),
    linear-gradient(180deg, #113f3c, #0b2b29);
}
.hero-inner {
  display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center;
  gap: 48px; padding-block: 84px 96px;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 54px); line-height: 1.25; font-weight: 850;
  letter-spacing: -0.5px; margin-bottom: 22px;
}
.hero .accent { color: #8fd4cd; }
.hero-sub { font-size: clamp(16.5px, 2vw, 19.5px); color: rgba(242, 248, 247, 0.82); max-width: 34em; margin-bottom: 34px; }
.hero-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.hero-note { font-size: 14px; color: rgba(242, 248, 247, 0.6); }

.store-badge {
  display: inline-flex; align-items: center; gap: 12px;
  background: #000; color: #fff; border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px; padding: 10px 22px; transition: transform .2s, box-shadow .2s;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.store-badge:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); }
.store-badge svg { width: 26px; height: 26px; flex: none; }
.store-badge .sb-text { display: flex; flex-direction: column; line-height: 1.25; text-align: start; }
.store-badge small { font-size: 11.5px; opacity: 0.85; font-weight: 500; }
.store-badge strong { font-size: 20px; font-weight: 700; letter-spacing: 0.2px; direction: ltr; }

.hero-phone { position: relative; display: flex; justify-content: center; }
.phone {
  width: min(300px, 72vw); border-radius: 42px; overflow: hidden;
  border: 5px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.35);
  background: #0b2b29;
}
.phone img { width: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .hero-phone .phone { animation: float 7s ease-in-out infinite; }
  @keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
}
@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; padding-block: 56px 64px; text-align: center; }
  .hero-sub { margin-inline: auto; }
  .hero-actions { justify-content: center; }
}

/* ---------- Trust strip ---------- */
.trust { border-bottom: 1px solid var(--border); background: var(--surface); }
.trust-inner {
  display: flex; justify-content: center; gap: clamp(20px, 5vw, 64px);
  padding-block: 20px; flex-wrap: wrap;
}
.trust-item { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 650; color: var(--muted); }
.trust-item svg { width: 21px; height: 21px; color: var(--teal-500); flex: none; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 9vw, 104px); }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.kicker {
  display: inline-block; font-size: 13.5px; font-weight: 800; letter-spacing: 0.4px;
  color: var(--teal-600); background: var(--teal-100);
  border-radius: 999px; padding: 5px 16px; margin-bottom: 16px;
}
.section h2 { font-size: clamp(27px, 3.6vw, 38px); font-weight: 830; line-height: 1.3; letter-spacing: -0.4px; margin-bottom: 14px; }
.section-lead { color: var(--muted); font-size: 18px; max-width: 38em; margin-bottom: 48px; }
.center { text-align: center; }
.center .section-lead { margin-inline: auto; }

/* ---------- Features ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 940px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3 { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 26px; box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s;
}
.section-alt .card { background: var(--bg); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-icon {
  width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center;
  background: var(--teal-100); color: var(--teal-600); margin-bottom: 18px;
}
.card-icon svg { width: 25px; height: 25px; }
.card h3 { font-size: 19px; font-weight: 780; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15.5px; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
@media (max-width: 780px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 30px 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.step-num {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--teal-500), var(--teal-800)); color: #fff;
  font-size: 20px; font-weight: 800; margin-bottom: 18px;
  box-shadow: 0 4px 12px rgba(20, 82, 79, 0.35);
}
.step h3 { font-size: 19px; font-weight: 780; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 15.5px; }

/* ---------- Use cases ---------- */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 940px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .grid-4 { grid-template-columns: 1fr; } }
.case {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: 24px 22px; text-align: center; box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s;
}
.case:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.case svg { width: 30px; height: 30px; color: var(--teal-500); margin-inline: auto; margin-bottom: 12px; display: block; }
.case h3 { font-size: 17px; font-weight: 760; margin-bottom: 5px; }
.case p { color: var(--muted); font-size: 14px; }

/* ---------- Screenshots ---------- */
.strip {
  display: flex; gap: 22px; overflow-x: auto; padding: 12px 4px 26px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
.strip figure { flex: none; scroll-snap-align: center; margin: 0; }
.strip img {
  width: min(250px, 62vw); border-radius: 30px;
  border: 4px solid var(--border); box-shadow: var(--shadow-lg);
}
.strip figcaption { text-align: center; font-size: 14px; color: var(--muted); margin-top: 12px; font-weight: 600; }
.ipad-wrap { margin-top: 36px; display: flex; justify-content: center; }
.ipad-wrap img {
  width: min(560px, 92vw); border-radius: 26px;
  border: 4px solid var(--border); box-shadow: var(--shadow-lg);
}

/* ---------- Pricing ---------- */
.pricing-card {
  max-width: 780px; margin-inline: auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: 28px; padding: clamp(30px, 5vw, 52px);
  box-shadow: var(--shadow-lg); text-align: center;
}
.trial-flag {
  display: inline-block; background: linear-gradient(145deg, var(--teal-500), var(--teal-800));
  color: #fff; font-weight: 800; font-size: 15px; border-radius: 999px;
  padding: 8px 24px; margin-bottom: 26px; box-shadow: 0 4px 14px rgba(20, 82, 79, 0.3);
}
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-block: 26px 30px; }
@media (max-width: 620px) { .plans { grid-template-columns: 1fr; } }
.plan { border: 1.5px solid var(--border); border-radius: 20px; padding: 26px 20px; position: relative; }
.plan.best { border-color: var(--teal-500); background: var(--teal-100); }
.save-badge {
  position: absolute; top: -13px; inset-inline-end: 18px;
  background: var(--teal-700); color: #fff; font-size: 12.5px; font-weight: 800;
  border-radius: 999px; padding: 3px 13px;
}
.plan-name { font-size: 15px; font-weight: 750; color: var(--muted); margin-bottom: 6px; }
.plan-price { font-size: 34px; font-weight: 850; letter-spacing: -0.5px; }
.plan-per { font-size: 14px; color: var(--muted); font-weight: 600; }
.fine-print { font-size: 13.5px; color: var(--muted); margin-top: 22px; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; margin-inline: auto; display: grid; gap: 14px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px;
  padding: 19px 22px; font-weight: 750; font-size: 16.5px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; margin-inline-start: auto; flex: none; width: 12px; height: 12px;
  border-inline-end: 2.5px solid var(--teal-500); border-bottom: 2.5px solid var(--teal-500);
  transform: rotate(45deg); transition: transform .25s; margin-top: -5px;
}
.faq-item[open] summary::after { transform: rotate(225deg); margin-top: 5px; }
.faq-item .faq-body { padding: 0 22px 20px; color: var(--muted); font-size: 15.5px; }

/* ---------- CTA band ---------- */
.cta-band {
  text-align: center; color: #f2f8f7; padding-block: clamp(64px, 9vw, 96px);
  background:
    radial-gradient(900px 460px at 50% -30%, rgba(84, 160, 155, 0.5), transparent 65%),
    linear-gradient(180deg, #113f3c, #0b2b29);
}
.cta-band h2 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 830; margin-bottom: 12px; }
.cta-band p { color: rgba(242, 248, 247, 0.78); font-size: 17.5px; margin-bottom: 30px; }

/* ---------- Footer ---------- */
.footer { background: var(--surface); border-top: 1px solid var(--border); padding-block: 40px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer a { color: var(--muted); font-size: 14.5px; font-weight: 600; }
.footer a:hover { color: var(--teal-600); }
.footer-note { color: var(--muted); font-size: 13.5px; }

/* ---------- Legal pages ---------- */
.legal { max-width: 760px; margin-inline: auto; padding: 48px 24px 64px; }
.legal h1 { font-size: 30px; font-weight: 830; margin-bottom: 6px; color: var(--teal-800); }
@media (prefers-color-scheme: dark) { .legal h1 { color: #8fd4cd; } }
.legal h2 { font-size: 20px; font-weight: 780; margin: 30px 0 8px; }
.legal p, .legal li { color: var(--text); font-size: 16px; }
.legal ul { padding-inline-start: 22px; }
.legal .updated { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.legal .en-block { direction: ltr; text-align: left; border-top: 1px solid var(--border); margin-top: 44px; padding-top: 34px; }
.legal .ar-block { direction: rtl; text-align: right; border-top: 1px solid var(--border); margin-top: 44px; padding-top: 34px; }

/* ---------- Reveal on scroll (JS-gated) ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
