@font-face { font-family: Vazirmatn; src: url("/fonts/Vazirmatn-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Vazirmatn; src: url("/fonts/Vazirmatn-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Vazirmatn; src: url("/fonts/Vazirmatn-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: Vazirmatn; src: url("/fonts/Vazirmatn-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #f8fafc; --bg-subtle: #f1f5f9; --surface: #ffffff;
  --text: #1e293b; --text-2: #64748b; --text-3: #94a3b8;
  --line: #e2e8f0; --line-strong: #cbd5e1;
  --primary: #4f46e5; --primary-hover: #4338ca; --primary-soft: #eef2ff; --on-primary: #ffffff;
  --success: #059669; --success-soft: #f0fdf4; --warning: #d97706; --warning-soft: #fffbeb;
  --danger: #e11d48; --danger-soft: #fff1f2; --info: #2563eb; --info-soft: #eff6ff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04); --shadow-lg: 0 16px 34px rgba(15, 23, 42, .16);
  --focus: 0 0 0 3px rgba(79, 70, 229, .28);
  --r-md: 8px; --r-lg: 12px; --r-xl: 16px; --r-full: 9999px;
  --wrap: 1160px;
  color-scheme: light;
}
html.dark {
  --bg: #0f172a; --bg-subtle: #1e293b; --surface: #172033;
  --text: #f8fafc; --text-2: #94a3b8; --text-3: #64748b;
  --line: #334155; --line-strong: #475569;
  --primary: #818cf8; --primary-hover: #a5b4fc; --primary-soft: #1e1b4b; --on-primary: #0f172a;
  --success: #4ade80; --success-soft: #052e1a; --warning: #fbbf24; --warning-soft: #422006;
  --danger: #fb7185; --danger-soft: #4c0519; --info: #60a5fa; --info-soft: #172554;
  --shadow-lg: 0 16px 34px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; font: 400 16px/1.8 Vazirmatn, Tahoma, sans-serif; letter-spacing: normal; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.45; font-weight: 700; color: var(--text); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-md); }
.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }
.skip { position: fixed; top: -5rem; right: 16px; z-index: 100; padding: 8px 16px; background: var(--primary); color: var(--on-primary); border-radius: var(--r-md); pointer-events: none; }
.skip:focus { top: 16px; pointer-events: auto; }
.theme-img-dark, html.dark .theme-img-light { display: none; }
html.dark .theme-img-dark { display: block; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: var(--r-md); border: 1px solid transparent; font: 600 15px/1 Vazirmatn, sans-serif; cursor: pointer; transition: background .15s, border-color .15s, transform .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--line-strong); background: var(--bg-subtle); }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 16px; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); color: var(--text-2); cursor: pointer; }
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-moon, html.dark .icon-sun { display: block; }
.icon-sun, html.dark .icon-moon { display: none; }

/* Header */
.header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.brand-mark { width: 36px; height: 36px; }
.brand-mark-dark, html.dark .brand-mark-light { display: none; }
html.dark .brand-mark-dark { display: block; }
.nav { display: flex; gap: 4px; margin-inline-start: 16px; }
.nav a { padding: 8px 12px; border-radius: var(--r-md); color: var(--text-2); font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--text); background: var(--bg-subtle); }
.header-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.menu-btn, .nav .nav-login { display: none; }

/* Hero */
.hero { padding: 72px 0 0; text-align: center; overflow: hidden; }
.kicker { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px; border-radius: var(--r-full); background: var(--primary-soft); color: var(--primary); font-size: 14px; font-weight: 600; }
.hero h1 { margin-top: 20px; font-size: clamp(32px, 5.2vw, 56px); }
.hero h1 em { font-style: normal; color: var(--primary); }
.hero-lead { max-width: 620px; margin: 20px auto 0; color: var(--text-2); font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.hero-note { margin-top: 16px; color: var(--text-3); font-size: 14px; }
.hero-shot { position: relative; max-width: 1040px; margin: 56px auto 0; }
.frame { border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden; }
.frame-bar { display: flex; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg-subtle); }
.frame-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.hero-shot > .frame { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom: 0; }
.phone { position: absolute; left: -24px; bottom: -40px; width: 200px; border: 6px solid var(--text); border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-lg); background: var(--surface); }

/* Sections */
.section { padding: 96px 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { margin-top: 12px; font-size: clamp(26px, 3.4vw, 36px); }
.section-head p { margin-top: 12px; color: var(--text-2); font-size: 17px; }
.eyebrow { color: var(--primary); font-size: 14px; font-weight: 600; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card { padding: 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.section-alt .card { background: var(--bg); }
.card h3 { font-size: 18px; }
.card p { margin-top: 8px; color: var(--text-2); font-size: 15px; }
.pain-num { color: var(--text-3); font-weight: 700; font-size: 14px; }
.pain h3 { margin-top: 8px; }
.pain-fix { display: flex; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); color: var(--text); font-size: 15px; font-weight: 500; }
.pain-fix b { color: var(--success); white-space: nowrap; }
.feature-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 16px; border-radius: var(--r-md); }
.feature-icon svg { width: 22px; height: 22px; }
.tone-primary { background: var(--primary-soft); color: var(--primary); }
.tone-success { background: var(--success-soft); color: var(--success); }
.tone-warning { background: var(--warning-soft); color: var(--warning); }
.tone-danger { background: var(--danger-soft); color: var(--danger); }
.tone-info { background: var(--info-soft); color: var(--info); }

/* Roles */
.section-tight { padding-top: 0; }
.tabs { display: none; }
.js .tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.tab { min-height: 44px; padding: 0 20px; border: 1px solid var(--line); border-radius: var(--r-full); background: var(--surface); color: var(--text-2); font: 600 15px Vazirmatn, sans-serif; cursor: pointer; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.role { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: center; }
.role + .role { margin-top: 64px; }
.js .role + .role { margin-top: 0; }
.role h3 { font-size: 26px; }
.role > div > p { margin-top: 12px; color: var(--text-2); font-size: 17px; }
.checks { margin: 24px 0 32px; padding: 0; list-style: none; display: grid; gap: 12px; }
.checks li { position: relative; padding-inline-start: 32px; }
.checks li::before { content: ""; position: absolute; right: 0; top: 5px; width: 20px; height: 20px; border-radius: 50%; background: var(--success-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat; }

/* Steps */
.steps { counter-reset: step; }
.step { position: relative; padding-top: 56px; }
.step::before { counter-increment: step; content: counter(step, persian); position: absolute; top: 24px; right: 24px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-weight: 700; }
.step h3 { margin-top: 16px; }

/* Trust */
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.trust .card { text-align: center; }
.trust .feature-icon { margin-inline: auto; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 56px; padding: 12px 20px; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-3); font-size: 22px; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 20px 20px; color: var(--text-2); }

/* CTA + footer */
.cta { padding: 56px 32px; border-radius: var(--r-xl); background: var(--primary); color: var(--on-primary); text-align: center; }
.cta h2 { color: inherit; font-size: clamp(24px, 3.2vw, 34px); }
.cta p { margin-top: 12px; opacity: .88; font-size: 17px; }
.cta .hero-actions { margin-top: 28px; }
.cta .btn-primary { background: var(--on-primary); color: var(--primary); }
.cta .btn-primary:hover { opacity: .92; }
.cta .btn-ghost { background: transparent; color: var(--on-primary); border-color: color-mix(in srgb, var(--on-primary) 45%, transparent); }
.cta .btn-ghost:hover { background: color-mix(in srgb, var(--on-primary) 12%, transparent); }
.footer { padding: 48px 0 32px; border-top: 1px solid var(--line); color: var(--text-2); font-size: 15px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a:hover { color: var(--text); }
.footer small { display: block; margin-top: 32px; color: var(--text-3); }

/* Login chooser */
.login-page { min-height: calc(100vh - 69px); display: grid; place-items: center; padding: 48px 0; }
.login-box { width: min(760px, 100% - 48px); text-align: center; }
.login-box h1 { font-size: clamp(26px, 4vw, 36px); }
.login-box > p { margin-top: 8px; color: var(--text-2); }
.roles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 32px; text-align: start; }
.role-card { display: flex; align-items: center; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); transition: border-color .15s, box-shadow .15s, transform .15s; }
.role-card:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.role-card .feature-icon { margin: 0; flex: none; }
.role-card strong { display: block; font-size: 17px; }
.role-card span { color: var(--text-2); font-size: 14px; }
.role-card .arrow { margin-inline-start: auto; color: var(--text-3); font-size: 20px; }
.login-help { margin-top: 24px; color: var(--text-3); font-size: 14px; }
.login-help a { color: var(--primary); font-weight: 600; }

@media (max-width: 960px) {
  .grid-3, .grid-4, .trust { grid-template-columns: repeat(2, 1fr); }
  .role { grid-template-columns: 1fr; gap: 32px; }
  .phone { width: 150px; left: 8px; }
}
@media (max-width: 760px) {
  .nav { display: none; position: absolute; top: 68px; inset-inline: 0; flex-direction: column; padding: 12px 24px 20px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .nav .nav-login { display: block; color: var(--primary); font-weight: 600; }
  .menu-btn { display: inline-grid; }
  .header-login { display: none; }
  .hero { padding-top: 48px; }
  .hero-lead { font-size: 16px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .phone { display: none; }
  .section { padding: 64px 0; }
  .grid-3, .grid-4, .trust, .roles { grid-template-columns: 1fr; }
  .cta { padding: 40px 20px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
