:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #eef4ff;
  --text: #1e293b;
  --muted: #64748b;
  --accent: #5b8def;
  --accent-strong: #3b5bdb;
  --border: #e2e8f0;
  --border-soft: #eef2f7;
  --bale: rgb(12, 182, 137);
  --shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
  --radius: 24px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220; --surface: #111a2e; --surface-soft: #17223b; --text: #e5edff; --muted: #94a3b8;
    --accent: #7ba6ff; --accent-strong: #a5c2ff; --border: #1f2a44; --border-soft: #17223b;
    --shadow: 0 10px 36px rgba(0, 0, 0, 0.45);
  }
}
:root[data-theme="dark"] {
  --bg: #0b1220; --surface: #111a2e; --surface-soft: #17223b; --text: #e5edff; --muted: #94a3b8;
  --accent: #7ba6ff; --accent-strong: #a5c2ff; --border: #1f2a44; --border-soft: #17223b;
  --shadow: 0 10px 36px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Vazirmatn", system-ui, sans-serif;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.6; font-weight: 900; }
p { margin: 0; }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 20px 16px 96px; display: flex; flex-direction: column; gap: 28px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.pad { padding: 32px 24px; }
@media (min-width: 768px) { .pad { padding: 40px 44px; } }

/* header */
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border-soft); background: var(--surface); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; color: var(--accent-strong); font-size: 1.05rem; }
.brand img { width: 34px; height: 34px; border-radius: 10px; object-fit: contain; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; font-size: .9rem; font-weight: 700; color: var(--muted); align-items: center; }
.nav a { padding: 4px 10px; border-radius: 8px; transition: background .2s, color .2s; }
.nav a:hover, .nav a.active { background: var(--surface-soft); color: var(--accent); }
.theme-btn { border: 1px solid var(--border); background: var(--surface-soft); color: var(--text); border-radius: 10px; width: 36px; height: 36px; cursor: pointer; font-size: 1rem; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; padding: 11px 22px; font-weight: 800; font-size: .92rem; transition: filter .2s, background .2s; border: 0; cursor: pointer; font-family: inherit; }
.btn:hover { filter: brightness(1.06); }
.btn-white { background: #fff; color: #1d4ed8; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-ghost-white { background: rgba(255,255,255,.15); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.btn-soon { background: var(--surface-soft); color: var(--muted); border: 1px solid var(--border); cursor: default; opacity: .75; }
.btn-soon:hover { filter: none; }

/* hero */
.hero { display: grid; gap: 24px; align-items: center; padding: 28px 24px; color: #fff; background: linear-gradient(to left, #2563eb, #3b82f6, #60a5fa); }
.hero h1 { font-size: 1.6rem; line-height: 1.8; }
.hero p { color: #eaf2ff; max-width: 48ch; margin: 14px 0 22px; }
.hero-img { border-radius: 18px; overflow: hidden; height: 260px; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; object-position: left; }
@media (min-width: 768px) {
  .hero { grid-template-columns: 1fr 1fr; padding: 44px; }
  .hero h1 { font-size: 2.2rem; }
  .hero-img { height: 360px; }
}

.lead { text-align: center; font-weight: 700; color: var(--muted); max-width: 76ch; margin: 0 auto; }

/* why */
.split { display: grid; gap: 24px; align-items: center; }
.split-img { border-radius: 18px; overflow: hidden; height: 240px; border: 1px solid var(--border-soft); background: var(--surface-soft); }
.split-img img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 768px) { .split { grid-template-columns: 1fr 1fr; } .split-img { height: 280px; } }
.h2 { font-size: 1.6rem; color: var(--accent-strong); margin-bottom: 12px; }
.muted { color: var(--muted); }

.features-title { text-align: center; font-size: 1.35rem; color: var(--accent-strong); margin: 48px 0 28px; }
.features { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .features { grid-template-columns: repeat(4, 1fr); } }
.feature { background: #60a5fa; border: 1px solid #bfdbfe; color: #fff; border-radius: 18px; padding: 24px 16px; text-align: center; font-weight: 700; font-size: .92rem; }
.feature .num { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.3); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-weight: 900; }

/* stories */
.stories { display: grid; }
.stories .img-side { background: linear-gradient(to right, #1d4ed8, #3b82f6); padding: 16px; }
.stories .img-side div { height: 240px; border-radius: 14px; overflow: hidden; }
.stories .img-side img { width: 100%; height: 100%; object-fit: cover; }
.stories .text-side { background: #1e40af; color: #fff; padding: 28px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 16px; }
.stories h2 { font-size: 1.6rem; }
@media (min-width: 768px) { .stories { grid-template-columns: .65fr 1.35fr; } .stories .img-side div { height: 280px; } }

/* course */
.course h2 { font-size: 1.7rem; color: var(--accent-strong); margin-bottom: 12px; }
.course h3 { font-size: 1.1rem; margin: 20px 0 10px; }
.course ul { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 8px; }
.course li { background: var(--surface-soft); border-radius: 12px; padding: 8px 16px; }
@media (min-width: 768px) { .course h2 { font-size: 2.1rem; } }

/* articles strip */
.articles-strip { background: #3b82f6; padding: 26px 24px; }
.strip-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; color: #fff; }
.strip-head h2 { font-size: 1.3rem; }
.grid-3 { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.a-card { display: flex; flex-direction: column; background: var(--surface); border-radius: 18px; overflow: hidden; border: 1px solid var(--border-soft); transition: transform .2s, box-shadow .2s; }
.a-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.a-card .cover { aspect-ratio: 1024 / 682; background: #93c5fd; overflow: hidden; }
.a-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.a-card .body { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.a-card h3 { font-size: 1.05rem; color: var(--accent-strong); }
.a-card p { color: var(--muted); font-size: .9rem; flex: 1; }
.a-card .btn { width: 100%; padding: 10px; }

/* faq */
.two-col { display: grid; gap: 20px; }
@media (min-width: 768px) { .two-col { grid-template-columns: 1fr 1fr; } }
details { border: 1px solid #bfdbfe; background: #eff6ff; border-radius: 12px; padding: 12px 16px; margin-bottom: 8px; }
:root[data-theme="dark"] details { background: #17223b; border-color: #2b3e6f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) details { background: #17223b; border-color: #2b3e6f; } }
summary { cursor: pointer; font-weight: 700; color: #1d4ed8; font-size: .93rem; }
:root[data-theme="dark"] summary { color: #a5c2ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) summary { color: #a5c2ff; } }
details p { margin-top: 10px; color: var(--muted); font-size: .9rem; }
.center-col { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 20px; }

/* bale */
.bale { border: 2px solid var(--bale); text-align: center; }
.bale img { width: 72px; height: 72px; margin: 0 auto 10px; object-fit: contain; }
.bale h2 { color: var(--bale); font-size: 1.4rem; margin-bottom: 10px; }
.bale p { max-width: 56ch; margin: 0 auto 22px; color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn-bale { background: var(--bale); color: #fff; }
.btn-bale-o { background: transparent; color: var(--bale); box-shadow: inset 0 0 0 2px var(--bale); }

/* cta */
.cta { background: linear-gradient(to left, #60a5fa, #1d4ed8); color: #fff; padding: 40px 24px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.cta h2 { font-size: 1.8rem; }

/* footer */
.footer { background: #1e3a8a; color: #fff; padding: 32px 24px; }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer { padding: 36px 44px; } }
.footer nav { display: flex; flex-direction: column; gap: 2px; font-weight: 700; }
.footer nav a { padding: 6px 8px; border-radius: 8px; }
.footer nav a:hover { background: rgba(255,255,255,.1); color: #93c5fd; }
.f-block { border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.05); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.f-block small { display: block; color: rgba(255,255,255,.7); font-weight: 700; }
.f-block a { color: #93c5fd; font-weight: 600; word-break: break-all; }
.f-block a:hover { text-decoration: underline; }
.copy { margin-top: 28px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.25); text-align: center; font-size: .85rem; color: rgba(255,255,255,.8); }

/* floating badge */
.float-badge { position: fixed; bottom: max(20px, env(safe-area-inset-bottom)); left: 20px; z-index: 50; background: var(--accent); color: #fff; padding: 12px 18px; border-radius: 16px; font-weight: 900; font-size: .88rem; box-shadow: 0 8px 30px rgb(29 78 216 / .35); outline: 2px solid rgba(255,255,255,.3); }

/* article pages */
.page-head h1 { font-size: 1.7rem; color: var(--accent-strong); }
.page-head p { color: var(--muted); margin-top: 6px; }
.article { max-width: 44rem; margin: 0 auto; width: 100%; }
.back { display: inline-flex; color: var(--accent); font-weight: 700; margin-bottom: 20px; font-size: .92rem; }
.article .cover { border-radius: 18px; overflow: hidden; border: 1px solid var(--border-soft); margin-bottom: 28px; aspect-ratio: 1024/682; }
.article .cover img { width: 100%; height: 100%; object-fit: cover; }
.article h1 { font-size: 1.65rem; color: var(--accent-strong); }
.article .teaser { color: var(--muted); margin-top: 10px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 14px; font-size: .85rem; font-weight: 600; color: var(--muted); padding-bottom: 22px; border-bottom: 1px solid var(--border-soft); }
.prose { padding-top: 26px; display: flex; flex-direction: column; gap: 18px; }
.prose p { text-align: justify; }
.prose h2 { font-size: 1.35rem; color: var(--accent-strong); margin-top: 18px; }
.prose h3 { font-size: 1.15rem; margin-top: 12px; }
.prose ul { margin: 0; padding-inline-start: 22px; display: grid; gap: 8px; }
.prose li::marker { color: var(--accent); }
.source { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border-soft); text-align: center; font-size: .85rem; color: var(--muted); }
.source a { color: var(--accent); font-weight: 700; }
.more { margin-top: 8px; }
.more h2 { font-size: 1.2rem; color: var(--accent-strong); margin-bottom: 16px; }
.free-tag { display: inline-block; background: #e6f7f0; color: #0d7a5c; font-weight: 800; font-size: .85rem; border-radius: 999px; padding: 2px 14px; margin-bottom: 12px; }
.app-note { margin-top: 14px; font-size: .88rem; color: var(--muted); }
.soon-modal { border: 0; border-radius: 24px; padding: 32px 24px 24px; width: min(92vw, 440px); background: var(--surface); color: var(--text); text-align: center; box-shadow: 0 25px 60px rgba(15,23,42,.25); font-family: inherit; position: fixed; }
.soon-modal[open] { animation: soonIn .25s ease both; }
.soon-modal::backdrop { background: rgba(15, 23, 42, .55); backdrop-filter: blur(2px); }
.soon-modal h2 { color: var(--accent-strong); font-size: 1.35rem; margin-bottom: 10px; }
.soon-modal p { color: var(--muted); margin-bottom: 10px; }
.soon-modal .soon-sub { font-size: .88rem; margin-bottom: 20px; }
.soon-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--surface-soft); display: flex; align-items: center; justify-content: center; font-size: 1.9rem; margin: 0 auto 14px; }
.soon-x { position: absolute; top: 12px; left: 12px; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-soft); color: var(--text); font-size: 1.2rem; cursor: pointer; line-height: 1; }
.soon-modal .btn-soon { cursor: pointer; opacity: 1; }
@keyframes soonIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
