/* Masar Marketing Landing Page — RTL Arabic Dark/Light Theme with Local Cairo Font */
@font-face {
  font-family: "Cairo";
  src:
    url("/fonts/Cairo.woff2") format("woff2"),
    url("/fonts/Cairo.ttf") format("truetype");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root,
html.dark-theme {
  --bg: #060b14;
  --bg-elevated: #0c1524;
  --card-bg: rgba(15, 23, 42, 0.78);
  --card-border: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #0ea5e9;
  --accent-2: #10b981;
  --accent-glow: rgba(14, 165, 233, 0.28);
  --header-bg: rgba(6, 11, 20, 0.82);
}

html.light-theme {
  --bg: #f4f7fb;
  --bg-elevated: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.94);
  --card-border: rgba(15, 23, 42, 0.11);
  --text: #0f172a;
  --text-muted: #475569;
  --accent: #0284c7;
  --accent-2: #059669;
  --accent-glow: rgba(2, 132, 199, 0.18);
  --header-bg: rgba(244, 247, 251, 0.9);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-family: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif; overflow-x: clip; }
body {
  background: var(--bg); color: var(--text); font-family: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
  line-height: 1.75; min-height: 100vh; overflow-x: clip; position: relative;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.bg-glow {
  position: fixed; width: 520px; height: 520px; border-radius: 50%;
  filter: blur(110px); pointer-events: none; z-index: 0; opacity: 0.42;
}
.bg-glow-1 { top: -160px; right: -120px; background: radial-gradient(circle, rgba(14, 165, 233, 0.38), transparent 70%); }
.bg-glow-2 { bottom: -180px; left: -140px; background: radial-gradient(circle, rgba(16, 185, 129, 0.32), transparent 70%); }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; position: relative; z-index: 1; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: blur(14px); border-bottom: 1px solid var(--card-border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 74px; }
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.logo-halo {
  width: 44px; height: 44px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(16, 185, 129, 0.2));
  border: 1px solid var(--card-border); display: grid; place-items: center; padding: 5px;
}
.logo-halo img { width: 100%; height: 100%; object-fit: contain; }
.brand-name { font-size: 1.3rem; font-weight: 900; line-height: 1.2; }
.brand-tagline { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; }
.header-nav { display: flex; align-items: center; gap: 24px; }
.header-nav a { color: var(--text-muted); text-decoration: none; font-weight: 700; font-size: 0.92rem; transition: color 0.2s; }
.header-nav a:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--card-border);
  background: var(--card-bg); color: var(--text); display: inline-flex; align-items: center;
  justify-content: center; cursor: pointer; transition: transform 0.15s ease, border-color 0.2s ease;
}
.icon-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
html.dark-theme .theme-icon-moon { display: none; }
html.dark-theme .theme-icon-sun { display: block; }
html.light-theme .theme-icon-sun { display: none; }
html.light-theme .theme-icon-moon { display: block; }
.header-cta {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; text-decoration: none;
  font-weight: 800; font-size: 0.88rem; box-shadow: 0 8px 22px var(--accent-glow);
  transition: transform 0.15s ease, opacity 0.2s ease;
}
.header-cta:hover { transform: translateY(-1px); }
.header-cta.is-paused { opacity: 0.55; pointer-events: none; filter: grayscale(0.45); }

/* Hero */
.hero-section { padding: 56px 0 42px; }
.hero-grid { max-width: 760px; margin: 0 auto; text-align: center; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: var(--card-bg); border: 1px solid var(--card-border); font-size: 0.82rem; font-weight: 700;
  color: var(--accent); margin-bottom: 18px;
}
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; display: inline-block; box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.22); }
.hero-heading { font-size: clamp(1.9rem, 3.6vw, 2.9rem); font-weight: 900; line-height: 1.32; margin-bottom: 16px; }
.text-gradient { background: linear-gradient(135deg, #0369a1, #047857); -webkit-background-clip: text; background-clip: text; color: transparent; }
html.dark-theme .text-gradient { background: linear-gradient(135deg, #38bdf8, #34d399); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { font-size: 1.03rem; color: var(--text-muted); margin: 0 auto 26px; max-width: 620px; }
.download-card {
  background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 22px; padding: 20px;
  backdrop-filter: blur(14px); display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
  max-width: 560px; margin: 0 auto; text-align: start;
}
.download-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.version-badge { font-size: 0.84rem; font-weight: 800; color: var(--accent); }
.free-badge { font-size: 0.76rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgba(4, 120, 87, 0.12); color: #065f46; }
html.dark-theme .free-badge { background: rgba(16, 185, 129, 0.18); color: #6ee7b7; }
.download-btn-wrap { position: relative; overflow: hidden; border-radius: 15px; }
.primary-download-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 16px 22px;
  border-radius: 15px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
  text-decoration: none; font-weight: 900; font-size: 1.05rem; box-shadow: 0 12px 28px var(--accent-glow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.2s ease;
}
.primary-download-btn:hover { transform: translateY(-2px); }
.primary-download-btn.is-paused,
.download-btn-wrap.is-paused .primary-download-btn {
  background: rgba(148, 163, 184, 0.12); color: var(--text-muted); border: 1.5px dashed rgba(148, 163, 184, 0.36);
  box-shadow: none; opacity: 0.72; filter: grayscale(0.5); pointer-events: none; cursor: not-allowed; transform: none;
}
.header-cta.is-paused {
  background: rgba(148, 163, 184, 0.14); color: var(--text-muted); border: 1px dashed rgba(148, 163, 184, 0.36);
  box-shadow: none; opacity: 0.72; pointer-events: none; cursor: not-allowed; transform: none;
}
.support-status-note { font-size: 0.8rem; color: var(--text-muted); font-weight: 700; text-align: center; }
.support-status-note[hidden] { display: none !important; }
.support-cta-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.support-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 14px;
  border-radius: 12px; text-decoration: none; font-weight: 800; font-size: 0.86rem;
  border: 1px solid var(--card-border); color: var(--text); background: var(--bg-elevated);
  transition: transform 0.15s ease, opacity 0.2s ease;
}
.support-btn:hover { transform: translateY(-1px); }
.support-whatsapp { border-color: rgba(21, 128, 61, 0.42); color: #15803d; }
html.dark-theme .support-whatsapp { color: #4ade80; }
.support-telegram { border-color: rgba(56, 189, 248, 0.4); color: #0284c7; }
html.dark-theme .support-telegram { color: #38bdf8; }
.support-btn.is-disabled,
html.dark-theme .support-btn.is-disabled {
  opacity: 0.42; filter: grayscale(1); pointer-events: none; cursor: not-allowed;
  border-style: dashed; border-color: rgba(148, 163, 184, 0.3); color: var(--text-muted);
  background: transparent; transform: none;
}

/* Stats, Features, Workflow & FAQ */
.stats-strip { padding: 20px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-box {
  background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 18px; padding: 20px 16px;
  text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.stat-icon-wrap {
  width: 44px; height: 44px; border-radius: 13px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.16), rgba(16, 185, 129, 0.16));
  color: var(--accent); display: grid; place-items: center; margin-bottom: 4px;
}
.stat-num { font-size: 1.12rem; font-weight: 900; color: var(--text); }
.stat-desc { font-size: 0.84rem; color: var(--text-muted); font-weight: 600; }
.features-section, .workflow-section { padding: 54px 0; }
.section-head { text-align: center; margin-bottom: 34px; }
.section-kicker { display: inline-block; font-size: 0.84rem; font-weight: 800; color: var(--accent-2); margin-bottom: 6px; }
.section-heading { font-size: clamp(1.48rem, 2.5vw, 2.05rem); font-weight: 900; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 20px; padding: 24px; transition: transform 0.2s ease, border-color 0.2s ease; }
.feature-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.feature-icon-box {
  width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.16), rgba(16, 185, 129, 0.16));
  color: var(--accent); display: grid; place-items: center; margin-bottom: 14px;
}
.feature-card h3 { font-size: 1.06rem; font-weight: 900; margin-bottom: 8px; }
.feature-card p { font-size: 0.9rem; color: var(--text-muted); }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 20px; padding: 24px; }
.step-num { font-size: 1.55rem; font-weight: 900; color: var(--accent); margin-bottom: 8px; }
.step-card h3 { font-size: 1.05rem; font-weight: 900; margin-bottom: 6px; }
.step-card p { font-size: 0.9rem; color: var(--text-muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--card-border); padding: 24px 0; margin-top: 30px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; font-size: 0.86rem; color: var(--text-muted); font-weight: 700; }
.ducks-footer-badge { display: inline-flex; align-items: center; gap: 8px; font-family: "Cairo", sans-serif; font-size: 12.5px; font-weight: 700; color: #475569; }
html.dark-theme .ducks-footer-badge { color: #94a3b8; }

/* FAQ Section */
.faq-section { padding: 38px 0 54px; }
.faq-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.faq-item {
  background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 18px;
  padding: 20px 22px; transition: border-color 0.2s ease, transform 0.2s ease;
}
.faq-item:hover { border-color: var(--accent); transform: translateY(-2px); }
.faq-item summary { font-size: 1.02rem; font-weight: 900; color: var(--text); cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.2rem; color: var(--accent); flex-shrink: 0; }
.faq-item[open] summary::after { content: "−"; }
.faq-item[open] summary { margin-bottom: 10px; }
.faq-item p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.65; }

@media (max-width: 960px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid, .steps-grid, .faq-list { grid-template-columns: 1fr; }
  .header-inner { flex-wrap: wrap; padding-block: 10px; }
  .header-nav {
    display: flex;
    order: 3;
    width: 100%;
    overflow-x: auto;
    gap: 16px;
    padding-top: 6px;
    border-top: 1px solid var(--card-border);
    white-space: nowrap;
  }
}
@media (max-width: 540px) {
  .support-cta-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
  .container { padding: 0 12px; }
  .hero-section { padding: 32px 0 28px; }
  .hero-heading { font-size: 1.55rem; line-height: 1.38; }
  .hero-lead { font-size: 0.92rem; }
  .download-card { padding: 14px; border-radius: 18px; }
  .primary-download-btn { padding: 13px 14px; font-size: 0.94rem; }
  .header-cta { padding: 8px 11px; font-size: 0.8rem; }
  .brand-tagline { display: none; }
}
