/* MIRA — shared design system (light/dark, RTL/LTR) */
:root {
  --bg: #faf6ee;
  --bg-soft: #f3ede0;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.68);
  --text: #1b2a41;
  --muted: #55627a;
  --green: #7fa38a;
  --green-d: #4a7558;
  --blue-l: #dcebf5;
  --navy: #1b2a41;
  --border: rgba(27, 42, 65, 0.12);
  --shadow: 0 10px 30px rgba(27, 42, 65, 0.08);
  --ok: #3f8a5a;
  --warn: #b7791f;
  --alert: #b4423a;
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1120px;
  --font: "Vazirmatn", "Inter", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
}

:root[data-theme="dark"] {
  --bg: #0e1625;
  --bg-soft: #131d30;
  --surface: #172236;
  --surface-glass: rgba(23, 34, 54, 0.7);
  --text: #eaf0f6;
  --muted: #a6b3c6;
  --green: #86b094;
  --green-d: #8fc09e;
  --blue-l: #1d3148;
  --navy: #eaf0f6;
  --border: rgba(234, 240, 246, 0.14);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  font-size: 1rem;
  transition: background 0.25s ease, color 0.25s ease;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--green-d); }
a:hover { text-decoration: none; }
h1, h2, h3 { line-height: 1.35; margin: 0 0 0.6em; color: var(--text); }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--green-d); outline-offset: 3px; border-radius: 6px; }
.skip {
  position: absolute; inset-inline-start: 1rem; top: -3rem;
  background: var(--navy); color: var(--bg); padding: 0.5rem 1rem; border-radius: 8px; z-index: 100;
}
.skip:focus { top: 0.75rem; }

.container { width: min(100% - 2rem, var(--maxw)); margin-inline: auto; }
section { padding-block: clamp(2.5rem, 7vw, 5rem); }
.alt { background: var(--bg-soft); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface-glass);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; gap: 1rem; min-height: 68px; }
.brand { font-weight: 800; letter-spacing: 0.18em; font-size: 1.35rem; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 0.6rem; }
.brand-mark { width: 28px; height: 28px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #cfe3d5, var(--green) 60%, var(--green-d)); }
.nav-links { display: flex; gap: 0.25rem; margin-inline-start: auto; list-style: none; padding: 0; margin-block: 0; }
.nav-links a { display: block; padding: 0.45rem 0.8rem; border-radius: 999px; text-decoration: none; color: var(--muted); font-size: 0.95rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: var(--blue-l); }
.nav-tools { display: flex; align-items: center; gap: 0.5rem; }
.icon-btn, .chip-btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 999px; cursor: pointer; font: inherit; font-size: 0.9rem;
}
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; }
.chip-btn { padding: 0.4rem 0.9rem; }
.menu-btn { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem; border-radius: 999px; border: 1px solid transparent;
  background: var(--green-d); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
:root[data-theme="dark"] .btn { color: #0e1625; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
:root[data-theme="dark"] .btn-ghost { color: var(--text); }
.btn-sm { padding: 0.5rem 1.1rem; font-size: 0.92rem; }

/* Hero */
.hero { padding-block: clamp(3rem, 9vw, 6.5rem); }
.hero-grid { display: grid; gap: 3rem; grid-template-columns: 1.1fr 0.9fr; align-items: center; }
.eyebrow { display: inline-block; padding: 0.25rem 0.9rem; border-radius: 999px; background: var(--blue-l); color: var(--text); font-size: 0.85rem; margin-bottom: 1rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 40rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.orb-wrap { display: grid; place-items: center; }
.orb {
  width: min(78vw, 340px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #e8f1ea, var(--green) 55%, var(--green-d) 100%);
  box-shadow: inset -20px -30px 60px rgba(27, 42, 65, 0.18), var(--shadow);
  position: relative; animation: float 9s ease-in-out infinite;
}
.orb::after { content: ""; position: absolute; inset: 14%; border-radius: 50%; border: 1px solid rgba(255,255,255,0.45); }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Cards */
.grid { display: grid; gap: 1.25rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow);
}
.glass { background: var(--surface-glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.card h3 { margin-bottom: 0.4em; }
.card p { color: var(--muted); margin: 0; }
.ico {
  width: 46px; height: 46px; border-radius: 14px; background: var(--blue-l);
  display: grid; place-items: center; margin-bottom: 1rem; color: var(--green-d);
}
.ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tag { display: inline-block; margin-top: 0.9rem; font-size: 0.78rem; padding: 0.15rem 0.7rem; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); }

.section-head { max-width: 42rem; margin-bottom: 2rem; }
.section-head p { color: var(--muted); }

.notice {
  border: 1px solid var(--border); border-inline-start: 5px solid var(--green-d);
  background: var(--surface); border-radius: var(--radius-sm); padding: 1.1rem 1.3rem;
}
.notice.alert { border-inline-start-color: var(--alert); }
.list { padding-inline-start: 1.2rem; }
.list li { margin-bottom: 0.5rem; color: var(--muted); }
.list strong { color: var(--text); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding-block: 2.5rem; background: var(--bg-soft); color: var(--muted); font-size: 0.92rem; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; justify-content: space-between; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; }
.disclaimer { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }

.page-head { padding-block: clamp(2.5rem, 6vw, 4.5rem) 1rem; }

@media (max-width: 860px) {
  .hero-grid, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .orb-wrap { order: -1; }
  .menu-btn { display: grid; }
  .nav-links {
    display: none; position: absolute; inset-inline: 0; top: 68px; flex-direction: column;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: 0.75rem 1rem; margin: 0;
  }
  .nav-links.open { display: flex; }
  .nav-tools { margin-inline-start: auto; }
}
@media (min-width: 861px) and (max-width: 1050px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
