/* MADAR official site — same identity as the MADAR Node 2.0 app (teal→blue M badge, yellow satellite).
   No external fonts or resources: fast, private, and allowed by the site's Content-Security-Policy. */
:root {
  --bg: #071016;
  --bg2: #0b1822;
  --card: rgba(18, 32, 40, 0.78);
  --card-solid: #122028;
  --line: #22343f;
  --txt: #e9f0f4;
  --muted: #92a6b0;
  --teal: #0fb5a6;
  --blue: #2f5bea;
  --sun: #ffc53d;
  --ok: #34d399;
  --radius: 18px;
  --sans: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --arabic: "Segoe UI", "Noto Sans Arabic", Tahoma, "Geeza Pro", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background:
    radial-gradient(1000px 480px at 85% -8%, rgba(47, 91, 234, 0.22), transparent 60%),
    radial-gradient(800px 420px at 5% 10%, rgba(15, 181, 166, 0.16), transparent 60%),
    var(--bg);
  color: var(--txt);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
html[dir="rtl"] body { font-family: var(--arabic); font-size: 17px; line-height: 1.9; }

/* soft orbit ring behind the hero (مدار = orbit) */
.orbit-bg {
  position: fixed; inset: auto; top: -260px; inset-inline-end: -260px; width: 720px; height: 720px;
  border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.05); pointer-events: none; z-index: 0;
}
.orbit-bg::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: var(--sun);
  box-shadow: 0 0 24px rgba(255, 197, 61, 0.7); top: 58%; inset-inline-start: 4%;
}

.wrap { position: relative; z-index: 1; max-width: 1040px; margin: 0 auto; padding: 18px 20px 56px; }
a { color: var(--teal); }

/* header */
header {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0; background: linear-gradient(var(--bg) 70%, transparent);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .02em; color: var(--txt); text-decoration: none; }
.brand img { border-radius: 10px; }
nav { display: flex; gap: 4px; align-items: center; }
.nav-link { color: var(--muted); text-decoration: none; padding: 7px 11px; border-radius: 9px; }
.nav-link:hover { color: var(--txt); background: rgba(255, 255, 255, 0.04); }
.nav-cta {
  color: #fff; text-decoration: none; font-weight: 700; padding: 7px 14px; border-radius: 10px; margin-inline: 6px;
  background: linear-gradient(135deg, var(--teal), var(--blue));
}
@media (max-width: 760px) { .nav-link { display: none; } }

/* hero */
.hero { display: grid; grid-template-columns: 1.35fr .65fr; gap: 24px; align-items: center; padding: 48px 0 28px; }
.hero-art { display: grid; place-items: center; }
.hero-art img {
  width: min(240px, 60vw); height: auto; filter: drop-shadow(0 22px 50px rgba(47, 91, 234, 0.45));
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .hero-art img { animation: none; } html { scroll-behavior: auto; } }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; padding-top: 20px; } .hero-art { order: -1; } .hero-art img { width: 120px; } }
.badge {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(255, 197, 61, 0.35);
  background: rgba(255, 197, 61, 0.08); color: var(--sun); border-radius: 999px; padding: 4px 13px; font-size: 14px;
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 10px var(--sun); }
h1 {
  font-size: clamp(34px, 6vw, 58px); line-height: 1.1; margin: 16px 0 12px; font-weight: 800; letter-spacing: -.01em;
  background: linear-gradient(135deg, #ffffff 30%, #9fe7df 70%, #9db4ff); -webkit-background-clip: text; background-clip: text; color: transparent;
}
html[dir="rtl"] h1 { line-height: 1.35; letter-spacing: 0; }
.lead { color: var(--muted); font-size: 19px; max-width: 640px; margin: 0 0 22px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.meta { color: #6f8591; font-size: 14px; margin: 12px 0 0; }

/* buttons */
.btn {
  display: inline-block; text-align: center; text-decoration: none; font-weight: 700; border-radius: 12px; padding: 12px 20px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn.primary { color: #fff; background: linear-gradient(135deg, var(--teal), var(--blue)); box-shadow: 0 10px 30px rgba(47, 91, 234, 0.30); }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(47, 91, 234, 0.42); }
.btn.ghost { color: var(--txt); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.btn.ghost:hover { border-color: #3a5360; }
.btn.big { display: block; font-size: 18px; padding: 15px 20px; margin-top: 6px; }
.btn.off { color: #7b8e97; background: #16242c; border: 1px dashed #2a3d47; cursor: default; font-weight: 600; }

/* cards & sections */
section { margin-top: 22px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  backdrop-filter: blur(6px);
}
.card h2, .section-title { margin: 0 0 10px; font-size: 22px; }
.card h3 { margin: 6px 0 6px; font-size: 17px; }
.card p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.section-title { margin-top: 34px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step .num {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
}
.step p { color: var(--muted); }

.download { display: grid; grid-template-columns: 1.1fr .9fr; gap: 22px; border-color: rgba(15, 181, 166, 0.35); }
@media (max-width: 760px) { .download { grid-template-columns: 1fr; } }
.other-os { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.notice { background: rgba(255, 197, 61, 0.06); border: 1px solid rgba(255, 197, 61, 0.25); border-radius: 14px; padding: 16px 18px; }
.notice h3 { color: var(--sun); margin-top: 0; }
.notice p { color: #c7d3d9; font-size: 15px; }
.sha code { font-size: 11.5px; color: #9fb3bc; word-break: break-all; }
.sha a { font-size: 13px; }

.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .grid4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .grid4 { grid-template-columns: 1fr; } }
.feature svg {
  width: 34px; height: 34px; padding: 6px; border-radius: 10px; fill: none; stroke: var(--teal); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; background: rgba(15, 181, 166, 0.10);
}
.feature p { color: var(--muted); font-size: 15px; }

.facts { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.facts li { display: flex; gap: 10px; align-items: flex-start; }
.facts .ok { flex: none; width: 10px; height: 10px; margin-top: .6em; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px rgba(52, 211, 153, 0.7); }

.contact { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.contact p { color: var(--muted); margin: 0; }

footer { margin-top: 44px; color: #647a85; font-size: 13.5px; border-top: 1px solid var(--line); padding-top: 18px; text-align: center; }

/* language menu */
.lang-wrap { position: relative; }
.lang-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line);
  background: #122530; color: var(--txt); cursor: pointer; display: grid; place-items: center;
}
.lang-btn:hover { border-color: #3a5360; }
.lang-menu {
  position: absolute; top: 46px; inset-inline-end: 0; min-width: 160px; background: #0e1b23; border: 1px solid var(--line);
  border-radius: 12px; padding: 6px; z-index: 40; box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
}
.lang-menu button {
  display: block; width: 100%; text-align: start; background: none; border: 0; color: var(--txt);
  padding: 8px 10px; border-radius: 8px; cursor: pointer; font: inherit;
}
.lang-menu button:hover, .lang-menu button.active { background: #1b323c; }

/* small screens */
html, body { overflow-x: hidden; }
@media (max-width: 440px) {
  .brand span { display: none; }
  .wrap { padding-inline: 16px; }
  .card { padding: 18px; }
  .other-os { grid-template-columns: 1fr; }
}
