@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn.woff2") format("woff2-variations"),
       url("../fonts/Vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* ---------- tokens (colors taken from the app's MiraStyle) ---------- */
:root {
  --bg: #f5f7fb;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --text: #0f1c32;
  --muted: #55627a;
  --border: #e3e8f0;
  --brand: #1a5fd0;          /* logo blue */
  --brand-ink: #0c345c;      /* logo navy */
  --accent: #0f766e;         /* greenForLight */
  --accent-soft: #e2f5f2;
  --heart: #e5484d;
  --shadow: 0 10px 30px rgba(15, 28, 50, .08);
  --hero-grad: radial-gradient(1200px 500px at 85% -10%, #dbe8ff 0%, transparent 60%),
               radial-gradient(900px 500px at 0% 10%, #dcf5ef 0%, transparent 55%);
  --radius: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1c32;           /* darkBackground */
    --bg-alt: #0c1729;
    --surface: #10203a;      /* cardBackgroundDark */
    --text: #e8eff7;
    --muted: #9aa8bb;
    --border: #1e314a;       /* borderDark */
    --brand: #6ea2ff;
    --brand-ink: #e8eff7;
    --accent: #2dd4bf;       /* greenForDark */
    --accent-soft: rgba(45, 212, 191, .12);
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    --hero-grad: radial-gradient(1200px 500px at 85% -10%, rgba(26, 95, 208, .35) 0%, transparent 60%),
                 radial-gradient(900px 500px at 0% 10%, rgba(45, 212, 191, .14) 0%, transparent 55%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1c32; --bg-alt: #0c1729; --surface: #10203a; --text: #e8eff7; --muted: #9aa8bb;
  --border: #1e314a; --brand: #6ea2ff; --brand-ink: #e8eff7; --accent: #2dd4bf;
  --accent-soft: rgba(45, 212, 191, .12); --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --hero-grad: radial-gradient(1200px 500px at 85% -10%, rgba(26, 95, 208, .35) 0%, transparent 60%),
               radial-gradient(900px 500px at 0% 10%, rgba(45, 212, 191, .14) 0%, transparent 55%);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Vazirmatn", Tahoma, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.85;
  overflow-x: hidden;
}
html[lang="en"] body { line-height: 1.65; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.4; margin: 0 0 .5em; color: var(--brand-ink); }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 900; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.section { padding: 88px 0; scroll-margin-top: 68px; }
.section.alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.eyebrow {
  display: inline-block; font-size: .85rem; font-weight: 700; color: var(--accent);
  background: var(--accent-soft); padding: 4px 14px; border-radius: 999px; margin-bottom: 12px;
}
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--brand-ink); }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.nav-links { display: flex; gap: 22px; margin-inline-start: auto; }
.nav-links a { color: var(--muted); font-weight: 600; font-size: .95rem; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang-toggle {
  font: inherit; font-weight: 700; font-size: .85rem; cursor: pointer;
  background: transparent; color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; padding: 4px 12px; min-width: 48px;
}
.lang-toggle:hover { border-color: var(--brand); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer;
  padding: 12px 22px; border-radius: 14px; border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 35%, transparent); }
:root[data-theme="dark"] .btn-primary { color: #06201d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { color: #06201d; } }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-sm { padding: 7px 16px; font-size: .9rem; border-radius: 11px; }
.btn small { display: block; font-size: .72rem; font-weight: 500; opacity: .8; line-height: 1.2; }
.btn .btn-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.3; }
.btn.is-disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn.is-disabled:hover { transform: none; }

/* ---------- hero ---------- */
.hero { background: var(--hero-grad); padding: 56px 0 72px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 40px; }
.hero h1 .hl { color: var(--accent); }
.hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 18px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: .92rem; padding: 0; margin: 0; list-style: none; }
.hero-meta li { display: flex; align-items: center; gap: 6px; }
.hero-meta li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.hero-art { position: relative; display: flex; justify-content: flex-start; align-items: flex-end; min-height: 460px; }
.hero-art .mira { width: min(300px, 70%); position: relative; z-index: 2; filter: drop-shadow(0 20px 30px rgba(15, 28, 50, .18)); }
.hero-art .phone { position: absolute; width: 210px; inset-inline-end: 0; bottom: 10px; z-index: 1; transform: rotate(-6deg); }
html[dir="rtl"] .hero-art .phone { transform: rotate(6deg); }
/* Mira points left; in RTL the text sits on the right, so mirror her to point at it */
html[dir="rtl"] .hero-art .mira { transform: scaleX(-1); }
.tagline { font-weight: 700; color: var(--brand); letter-spacing: .01em; margin-bottom: 6px; }

/* ---------- phone frame ---------- */
.phone {
  border-radius: 30px; padding: 8px; background: #0b1424;
  box-shadow: 0 25px 50px rgba(15, 28, 50, .28), inset 0 0 0 2px #26364f;
}
.phone img { border-radius: 23px; aspect-ratio: 540 / 1101; width: 100%; object-fit: cover; }

/* ---------- features ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.feature .icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 14px;
}
.feature .icon svg { width: 26px; height: 26px; }
.feature p { color: var(--muted); margin: 0; font-size: .98rem; }

/* ---------- split sections ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.reverse .split-art { order: -1; }
.split-art { display: flex; justify-content: center; }
.split-art img { max-height: 520px; width: auto; filter: drop-shadow(0 18px 28px rgba(15, 28, 50, .15)); }
.checklist { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist li::before {
  content: "✓"; flex: none; width: 26px; height: 26px; border-radius: 50%; margin-top: 3px;
  display: grid; place-items: center; font-size: .8rem; font-weight: 900;
  background: var(--accent-soft); color: var(--accent);
}
.course-cards { display: grid; gap: 14px; margin-top: 24px; }
.course-card {
  display: flex; align-items: center; gap: 16px; padding: 16px 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.course-card .icon { width: 46px; height: 46px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.course-card .icon svg { width: 26px; height: 26px; }
.course-card h3 { margin: 0; }
.course-card p { margin: 0; font-size: .9rem; color: var(--muted); }
.pill { margin-inline-start: auto; font-size: .78rem; font-weight: 700; padding: 3px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.pill.soon { background: color-mix(in srgb, var(--muted) 15%, transparent); color: var(--muted); }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 800; margin-bottom: 12px;
}
html[lang="fa"] .step::before { content: counter(step, persian); }
.step p { margin: 0; color: var(--muted); }

/* ---------- gallery ---------- */
.gallery {
  display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 10px 4px 26px; scrollbar-width: thin;
}
.gallery figure { margin: 0; flex: 0 0 220px; scroll-snap-align: center; text-align: center; }
.gallery figcaption { margin-top: 12px; font-weight: 600; font-size: .92rem; color: var(--muted); }

/* ---------- download band ---------- */
.download {
  background: linear-gradient(135deg, #0c345c 0%, #0f1c32 55%, #0f766e 130%);
  color: #e8eff7; border-radius: 28px; padding: 48px; display: grid;
  grid-template-columns: 1fr auto; gap: 32px; align-items: center; overflow: hidden; position: relative;
}
.download h2 { color: #fff; }
.download p { color: #c3d0e0; margin: 0; }
.download .btn-ghost { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .2); }
.download .btn-primary { background: #2dd4bf; color: #06201d; }
.download-actions { display: flex; flex-direction: column; gap: 12px; min-width: 240px; }
.download-actions .note { font-size: .8rem; color: #9fb0c6; text-align: center; }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin-inline: auto; display: grid; gap: 12px; }
.faq details {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 4px 22px;
}
.faq summary {
  cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--accent); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 0 0 16px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0 32px; background: var(--bg-alt); font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-grid h3 { font-size: 1rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--muted); }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ---------- prose (privacy page) ---------- */
.prose { max-width: 760px; margin-inline: auto; padding: 56px 0 80px; }
.prose h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.prose h2 { font-size: 1.3rem; margin-top: 2em; }
.prose p, .prose li { color: var(--muted); }
.prose li { margin-bottom: .4em; }

/* ---------- language visibility for long blocks ---------- */
html[lang="fa"] [data-lang="en"], html[lang="en"] [data-lang="fa"] { display: none !important; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .features, .steps { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .nav-links, .nav-web { display: none; }
  .nav-actions { margin-inline-start: auto; }
  .hero { padding-top: 32px; }
  .hero-grid, .split { grid-template-columns: 1fr; gap: 28px; }
  .hero-art { min-height: 380px; order: -1; justify-content: center; }
  .hero-art .mira { width: 210px; }
  .hero-art .phone { width: 150px; inset-inline-end: 6%; }
  .split.reverse .split-art { order: 0; }
  .split-art img { max-height: 380px; }
  .download { grid-template-columns: 1fr; padding: 32px 24px; text-align: center; }
  .download-actions { min-width: 0; }
  .section { padding: 64px 0; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .features, .steps { grid-template-columns: 1fr; }
  .hero-cta .btn { flex: 1 1 100%; }
  .hero-art { min-height: 330px; }
  .hero-art .mira { width: 180px; }
  .hero-art .phone { width: 128px; inset-inline-end: 2%; }
  .gallery figure { flex-basis: 180px; }
  .nav-actions .btn-sm { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .btn:hover { transform: none; }
}
