/* =========================================================
   Sarvino — استایل لندینگ، ورود و نصب
   الگوگرفته از زبان طراحی dibachain.ir
   ========================================================= */

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

:root {
    --brand: #2563eb;
    --brand-600: #1d4ed8;
    --brand-700: #1e40af;
    --brand-800: #1e3a8a;
    --brand-400: #3b82f6;
    --brand-300: #60a5fa;
    --brand-200: #93c5fd;
    --brand-100: #dbeafe;
    --brand-50: #eff6ff;

    --ink: #0f172a;
    --ink-2: #334155;
    --muted: #64748b;
    --muted-2: #94a3b8;
    --line: #e2e8f0;
    --bg: #ffffff;
    --bg-soft: #f8fafc;
    --bg-slate: #f1f5f9;
    --ok: #059669;
    --warn: #d97706;
    --danger: #dc2626;

    --radius: 18px;
    --radius-sm: 12px;
    --radius-lg: 28px;

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .05);
    --shadow: 0 10px 30px -12px rgba(15, 23, 42, .15);
    --shadow-lg: 0 30px 60px -20px rgba(37, 99, 235, .28);
    --shadow-brand: 0 18px 40px -14px rgba(37, 99, 235, .45);

    --container: 1200px;
    --ease: cubic-bezier(.22, .61, .36, 1);
    --safe-b: env(safe-area-inset-bottom, 0px);

    font-family: Vazirmatn, "Segoe UI", Tahoma, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
    margin: 0; background: var(--bg); color: var(--ink);
    font-size: 16px; line-height: 1.85; font-family: inherit;
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
    -webkit-tap-highlight-color: transparent;
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.4; font-weight: 800; letter-spacing: -.2px; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button, input, textarea, select { font-family: inherit; font-size: inherit; }
button { cursor: pointer; }
.ltr { direction: ltr; unicode-bidi: isolate; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
main { overflow-x: clip; }
.section { padding-block: clamp(64px, 9vw, 116px); position: relative; }
.section > .container { position: relative; z-index: 1; }
.center { text-align: center; }

.pattern-dots::before {
    content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background-image: radial-gradient(var(--brand-300) 1px, transparent 1.4px);
    background-size: 28px 28px; opacity: .18;
    -webkit-mask-image: radial-gradient(ellipse 80% 65% at 50% 25%, #000, transparent 72%);
    mask-image: radial-gradient(ellipse 80% 65% at 50% 25%, #000, transparent 72%);
}
.pattern-grid::before {
    content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 52px 52px; opacity: .5;
    -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 30%, #000, transparent 70%);
    mask-image: radial-gradient(ellipse 75% 70% at 50% 30%, #000, transparent 70%);
}

.skip-link { position: absolute; top: -60px; right: 12px; z-index: 999; background: var(--brand); color: #fff; padding: 10px 18px; border-radius: 10px; transition: top .2s var(--ease); }
.skip-link:focus { top: 8px; }

.icon { width: 24px; height: 24px; flex-shrink: 0; }
.icon-sm { width: 18px; height: 18px; flex-shrink: 0; }
.icon-lg { width: 30px; height: 30px; flex-shrink: 0; }
.flip { transform: scaleX(-1); }

.text-grad {
    background: linear-gradient(90deg, var(--brand-400), var(--brand-700));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------------- Buttons ---------------- */
.btn {
    --bh: 52px;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: var(--bh); padding-inline: 26px; border: 0; border-radius: 14px;
    font-weight: 700; font-size: 15px; white-space: nowrap; line-height: 1;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s, border-color .25s;
}
.btn-sm { --bh: 44px; padding-inline: 20px; font-size: 14px; }
.btn-lg { --bh: 56px; padding-inline: 30px; font-size: 16px; }
.btn-block { display: flex; width: 100%; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-brand); }
.btn-primary:hover { background: var(--brand-600); transform: translateY(-3px); box-shadow: 0 24px 48px -16px rgba(37, 99, 235, .55); }
.btn-primary:active { transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--brand-300); color: var(--brand-600); transform: translateY(-3px); box-shadow: var(--shadow); }
.btn-white { background: #fff; color: var(--brand-700); box-shadow: 0 18px 40px -16px rgba(15, 23, 42, .45); }
.btn-white:hover { transform: translateY(-3px); }
.btn-outline-white { background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid rgba(255, 255, 255, .35); }
.btn-outline-white:hover { background: rgba(255, 255, 255, .16); transform: translateY(-3px); }
.btn[disabled], .btn.loading { opacity: .7; pointer-events: none; }
.btn.loading::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: spin .8s linear infinite; }

/* =========================================================
   Header
   ========================================================= */
.site-header { position: sticky; top: 0; z-index: 100; transition: padding .4s var(--ease); }
.header-inner {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px;
    height: 74px; border-radius: 20px; border: 1px solid transparent;
    transition: height .4s var(--ease), max-width .4s var(--ease), background .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
.site-header.scrolled { padding-top: 12px; }
.site-header.scrolled .header-inner {
    height: 62px; max-width: min(1120px, calc(100% - 40px));
    background: rgba(255, 255, 255, .78);
    backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-color: rgba(226, 232, 240, .9);
    box-shadow: 0 18px 44px -18px rgba(15, 23, 42, .30);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; justify-self: start; flex-shrink: 0; }
.brand-logo { width: 40px; height: 40px; flex-shrink: 0; display: block; }
.brand-name { font-size: 22px; color: var(--ink); letter-spacing: 0; white-space: nowrap; font-weight: 800; line-height: 1; }

.main-nav {
    display: flex; align-items: center; gap: 2px; justify-self: center;
    background: rgba(248, 250, 252, .75); border: 1px solid var(--line);
    padding: 5px; border-radius: 999px;
    transition: background .4s var(--ease), border-color .4s var(--ease);
}
.site-header.scrolled .main-nav { background: transparent; border-color: transparent; }
.nav-link {
    padding: 9px 17px; border-radius: 999px; white-space: nowrap;
    color: var(--ink-2); font-size: 14.5px; font-weight: 600;
    transition: color .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
}
.nav-link:hover { color: var(--brand-600); background: #fff; box-shadow: var(--shadow-sm); }
.nav-link.active { color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-600)); box-shadow: 0 8px 18px -8px rgba(37, 99, 235, .6); }
.header-actions { display: flex; align-items: center; gap: 10px; justify-self: end; }
.nav-mobile-cta { display: none; }

.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 0; position: relative; }
.nav-toggle span { position: absolute; inset-inline: 11px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 27px; }
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* =========================================================
   Hero
   ========================================================= */
.hero { position: relative; overflow: hidden; display: flex; align-items: center; min-height: min(calc(100vh - 74px), 760px); padding-block: clamp(40px, 5vw, 72px); }
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.blob-1 { width: 480px; height: 480px; background: radial-gradient(circle, #bfdbfe, transparent 70%); top: -120px; inset-inline-start: -80px; }
.blob-2 { width: 420px; height: 420px; background: radial-gradient(circle, #dbeafe, transparent 70%); bottom: -140px; inset-inline-end: -60px; }
.grid-overlay {
    position: absolute; inset: 0;
    background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 44px 44px; opacity: .35;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
}
.hero-inner { position: relative; z-index: 1; width: 100%; display: grid; grid-template-columns: 1.02fr 1fr; gap: 56px; align-items: center; }
.hero-text { max-width: 580px; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--brand-50); color: var(--brand-600);
    padding: 7px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 700;
    border: 1px solid var(--brand-100); margin-bottom: 22px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); position: relative; }

.hero-title { font-size: clamp(30px, 4.6vw, 54px); line-height: 1.36; }
.hero-title .text-grad { display: inline-block; }
.hero-subtitle { margin-top: 22px; color: var(--muted); font-size: clamp(15px, 1.6vw, 18px); line-height: 2.05; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 30px; color: var(--muted); font-size: 14px; }
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; }
.hero-trust .icon-sm { color: var(--ok); }

/* --- نمایش زندهٔ گفتگو --- */
.hero-visual { position: relative; display: flex; justify-content: center; }
.demo {
    position: relative; z-index: 2; width: 100%; max-width: 470px;
    background: rgba(255, 255, 255, .9); border: 1px solid var(--line); border-radius: 26px;
    box-shadow: 0 40px 80px -30px rgba(30, 64, 175, .35), 0 2px 6px rgba(15, 23, 42, .04);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
}
.demo-top { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.demo-top .brand-logo { width: 30px; height: 30px; }
.demo-top-t { font-weight: 800; font-size: 14px; line-height: 1.4; }
.demo-top-s { font-size: 12px; color: var(--muted); line-height: 1.4; }
.demo-live { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ok); font-weight: 700; }
.demo-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(5, 150, 105, .15); }
.demo-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.d-msg { max-width: 88%; font-size: 13.5px; line-height: 1.95; padding: 10px 14px; border-radius: 16px; }
.d-msg.show { opacity: 1; transform: none; }
.d-user { align-self: flex-start; background: var(--brand); color: #fff; border-end-start-radius: 6px; }
.d-bot { align-self: flex-end; background: var(--bg-slate); color: var(--ink); border-end-end-radius: 6px; }
.d-bot b { color: var(--brand-700); }
.d-cite { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding-inline: 5px; border-radius: 6px; background: var(--brand-100); color: var(--brand-700); font-size: 11px; font-weight: 800; vertical-align: middle; }
.d-src { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.d-src span { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; color: var(--ink-2); }
.d-escalate { align-self: stretch; display: flex; align-items: center; gap: 10px; background: #fff; border: 1px dashed var(--brand-300); color: var(--ink-2); }
.d-escalate .ic { width: 32px; height: 32px; border-radius: 10px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; flex-shrink: 0; }
.d-escalate b { color: var(--ink); font-size: 13px; display: block; line-height: 1.6; }
.d-escalate small { color: var(--muted); font-size: 12px; }
.d-typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.d-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted-2); animation: blink 1.2s infinite; }
.d-typing i:nth-child(2) { animation-delay: .2s; }
.d-typing i:nth-child(3) { animation-delay: .4s; }
.demo-input { display: flex; align-items: center; gap: 10px; margin: 0 14px 14px; padding: 8px 8px 8px 8px; padding-inline-start: 16px; border: 1px solid var(--line); border-radius: 16px; color: var(--muted-2); font-size: 13px; }
.demo-input .send { margin-inline-start: auto; width: 34px; height: 34px; border-radius: 11px; background: var(--brand); color: #fff; display: grid; place-items: center; }

.float-card {
    position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px;
    background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px;
    box-shadow: 0 20px 40px -18px rgba(15, 23, 42, .3); font-size: 12.5px; white-space: nowrap;
}
.float-card .ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.float-card b { display: block; font-size: 13px; line-height: 1.5; }
.float-card small { color: var(--muted); line-height: 1.4; display: block; }
.fc-1 { top: 8%; inset-inline-start: -34px; }
.fc-1 .ic { background: linear-gradient(135deg, #10b981, #059669); }
.fc-2 { bottom: 12%; inset-inline-end: -30px; }
.fc-2 .ic { background: linear-gradient(135deg, var(--brand-400), var(--brand-700)); }
.hero-glow { position: absolute; inset: 10% 5%; z-index: 0; border-radius: 50%; background: radial-gradient(circle, rgba(59, 130, 246, .28), transparent 68%); filter: blur(40px); }

/* =========================================================
   Stats strip
   ========================================================= */
.strip { border-block: 1px solid var(--line); background: var(--bg-soft); }
.strip-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.strip-item { padding: 30px 20px; text-align: center; position: relative; }
.strip-item + .strip-item::before { content: ""; position: absolute; inset-block: 26px; inset-inline-start: 0; width: 1px; background: var(--line); }
.strip-num { font-size: clamp(26px, 3vw, 36px); font-weight: 900; color: var(--ink); line-height: 1.3; }
.strip-num em { font-style: normal; color: var(--brand); }
.strip-label { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* =========================================================
   Section headings
   ========================================================= */
.section-head { text-align: center; margin: 0 auto 56px; max-width: 720px; }
.section-head .eyebrow { margin-bottom: 16px; }
.section-title { font-size: clamp(25px, 3.2vw, 38px); }
.section-lead { color: var(--muted); font-size: clamp(15px, 1.5vw, 17px); margin-top: 16px; line-height: 2.05; }

/* =========================================================
   Process
   ========================================================= */
.pcards { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.pcards::before {
    content: ""; position: absolute; top: 66px; inset-inline: 12.5%; height: 2px; z-index: 0;
    background: repeating-linear-gradient(90deg, var(--brand-200) 0 9px, transparent 9px 19px); opacity: .85;
}
.pcard {
    position: relative; z-index: 1; text-align: center; background: #fff;
    border: 1px solid var(--line); border-radius: 20px; padding: 34px 22px 26px;
    box-shadow: var(--shadow-sm); overflow: hidden;
    transition: transform .35s var(--ease), box-shadow .35s, border-color .35s;
}
.pcard::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--brand-400), var(--brand-700)); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease); }
.pcard:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: transparent; }
.pcard:hover::after { transform: scaleX(1); }
.pcard-num { position: absolute; top: 6px; inset-inline-end: 18px; z-index: 0; pointer-events: none; font-size: 56px; font-weight: 900; line-height: 1; letter-spacing: -3px; color: var(--brand-50); }
.pcard-icon {
    position: relative; width: 66px; height: 66px; margin: 0 auto 22px; border-radius: 20px;
    background: linear-gradient(135deg, var(--brand-400), var(--brand-700)); color: #fff;
    display: grid; place-items: center; box-shadow: 0 14px 26px -10px rgba(37, 99, 235, .6);
    transition: transform .35s var(--ease);
}

.pcard-icon .icon { width: 30px; height: 30px; position: relative; z-index: 1; }
.pcard:hover .pcard-icon { transform: translateY(-5px) rotate(-6deg) scale(1.06); }
.pcard-title { position: relative; z-index: 1; font-size: 17px; margin-bottom: 10px; }
.pcard-desc { position: relative; z-index: 1; color: var(--muted); font-size: 14.5px; }

/* =========================================================
   Hub (ایجنت در مرکز)
   ========================================================= */
.hub-section { background: var(--bg-slate); }
.hub-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.hub-text .section-title { margin-top: 4px; }
.hub-list { margin-top: 26px; display: grid; gap: 14px; }
.hub-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-2); font-size: 15px; }
.hub-list .ck { width: 26px; height: 26px; border-radius: 8px; background: #fff; border: 1px solid var(--brand-100); color: var(--brand); display: grid; place-items: center; flex-shrink: 0; margin-top: 2px; }
.hub { position: relative; aspect-ratio: 1 / .9; max-width: 560px; margin-inline: auto; width: 100%; }
.hub svg.hub-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hub-line { stroke: var(--brand-200); stroke-width: 1.5; fill: none; opacity: .7; }
.hub-flow { stroke: url(#hubGrad); stroke-width: 3; fill: none; stroke-linecap: round; stroke-dasharray: 3 14; animation: dashFlow 1.1s linear infinite; }
.hub-flow.rev { animation-direction: reverse; }
.hub-core { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 128px; height: 128px; display: grid; place-items: center; z-index: 2; }
.hub-core .brand-logo { width: 96px; height: 96px; filter: drop-shadow(0 22px 26px rgba(37, 99, 235, .35)); position: relative; z-index: 1; }
.hub-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--brand-300); animation: coreRipple 2.8s ease-out infinite; }
.hub-ring.r2 { animation-delay: 1.4s; }
.hub-node {
    position: absolute; transform: translate(-50%, -50%); z-index: 3;
    display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 15px;
    padding: 8px 15px 8px 8px; padding-inline-start: 8px; padding-inline-end: 15px;
    box-shadow: 0 10px 24px -12px rgba(15, 23, 42, .22); font-size: 13.5px; font-weight: 700; white-space: nowrap;
    transition: transform .35s var(--ease), box-shadow .35s;
}
.hub-node:hover { transform: translate(-50%, -50%) scale(1.06); box-shadow: var(--shadow-lg); }
.hub-node .ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--brand-400), var(--brand-700)); }
.hub-node .ic .icon { width: 19px; height: 19px; }

/* =========================================================
   Features (bento)
   ========================================================= */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.fcard {
    position: relative; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 28px;
    box-shadow: var(--shadow-sm); overflow: hidden;
    transition: transform .35s var(--ease), box-shadow .35s, border-color .35s;
}
.fcard:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--brand-100); }
.fcard.wide { grid-column: span 2; }
.fcard-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); border: 1px solid var(--brand-100); margin-bottom: 18px; transition: background .3s, color .3s, transform .35s var(--ease); }
.fcard:hover .fcard-icon { background: var(--brand); color: #fff; transform: rotate(-6deg); }
.fcard h3 { font-size: 18px; margin-bottom: 8px; }
.fcard p { color: var(--muted); font-size: 14.5px; line-height: 2; }
.fcard .tag { position: absolute; top: 22px; inset-inline-end: 22px; font-size: 11.5px; font-weight: 700; color: var(--brand-600); background: var(--brand-50); border-radius: 999px; padding: 3px 10px; }
.mini-cite { margin-top: 18px; padding: 14px; border-radius: 14px; background: var(--bg-soft); border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); line-height: 2; }
.mini-steps { margin-top: 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.mini-steps span { font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: var(--bg-slate); color: var(--ink-2); }
.mini-steps span.on { background: var(--brand); color: #fff; }

/* =========================================================
   Roles split
   ========================================================= */
.roles { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.role-card { border-radius: var(--radius-lg); padding: clamp(26px, 4vw, 42px); border: 1px solid var(--line); background: #fff; position: relative; overflow: hidden; }
.role-card.dark { background: linear-gradient(150deg, #0f1f4b, #1e3a8a 60%, #1d4ed8); color: #fff; border-color: transparent; }
.role-card.dark .role-lead, .role-card.dark li { color: rgba(255, 255, 255, .82); }
.role-card.dark .ck { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .2); }
.role-card.dark::after { content: ""; position: absolute; width: 340px; height: 340px; inset-inline-end: -120px; top: -120px; border-radius: 50%; background: radial-gradient(circle, rgba(96, 165, 250, .45), transparent 70%); }
.role-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; padding: 6px 14px; border-radius: 999px; background: var(--brand-50); color: var(--brand-700); margin-bottom: 18px; }
.role-card.dark .role-badge { background: rgba(255, 255, 255, .12); color: #fff; }
.role-card h3 { font-size: clamp(21px, 2.4vw, 27px); }
.role-lead { color: var(--muted); margin-top: 10px; font-size: 15px; }
.role-card ul { margin-top: 24px; display: grid; gap: 13px; position: relative; z-index: 1; }
.role-card li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--ink-2); }
.role-card .ck { width: 24px; height: 24px; border-radius: 8px; border: 1px solid var(--brand-100); background: var(--brand-50); color: var(--brand); display: grid; place-items: center; flex-shrink: 0; margin-top: 3px; }
.role-card .ck .icon { width: 15px; height: 15px; }
.role-card .btn { margin-top: 30px; position: relative; z-index: 1; }

/* =========================================================
   Mobile/PWA showcase
   ========================================================= */
.pwa-band { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.phone {
    width: 260px; height: 520px; margin-inline: auto; border-radius: 42px; background: #0b1220; padding: 12px;
    box-shadow: 0 50px 90px -40px rgba(15, 23, 42, .6), inset 0 0 0 2px #1e293b; position: relative;
}
.phone::before { content: ""; position: absolute; top: 20px; left: 50%; width: 76px; height: 20px; transform: translateX(-50%); background: #0b1220; border-radius: 12px; z-index: 2; }
.phone-screen { width: 100%; height: 100%; border-radius: 32px; background: #fff; overflow: hidden; display: flex; flex-direction: column; }
.ph-top { padding: 44px 16px 12px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.ph-top .brand-logo { width: 26px; height: 26px; }
.ph-top b { font-size: 13px; }
.ph-body { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ph-b { font-size: 11.5px; line-height: 1.9; padding: 8px 11px; border-radius: 13px; max-width: 88%; }
.ph-b.u { background: var(--brand); color: #fff; align-self: flex-start; }
.ph-b.a { background: var(--bg-slate); align-self: flex-end; }
.ph-in { margin: 0 12px 16px; border: 1px solid var(--line); border-radius: 14px; height: 40px; display: flex; align-items: center; padding-inline: 12px; font-size: 11px; color: var(--muted-2); }
.pwa-points { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.pwa-point { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; gap: 12px; align-items: flex-start; }
.pwa-point .ic { width: 38px; height: 38px; border-radius: 12px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; flex-shrink: 0; }
.pwa-point b { display: block; font-size: 14.5px; line-height: 1.6; }
.pwa-point small { color: var(--muted); font-size: 13px; line-height: 1.8; display: block; }

/* =========================================================
   FAQ
   ========================================================= */
.faq { max-width: 860px; margin-inline: auto; display: grid; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 16px; transition: border-color .25s, box-shadow .25s; }
.faq details[open] { border-color: var(--brand-200); box-shadow: var(--shadow); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 22px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon-sm { transition: transform .3s var(--ease); color: var(--muted); }
.faq details[open] summary .icon-sm { transform: rotate(180deg); color: var(--brand); }
.faq .ans { padding: 0 22px 20px; color: var(--muted); font-size: 15px; line-height: 2.05; }

/* =========================================================
   CTA
   ========================================================= */
.cta-band {
    position: relative; overflow: hidden; border-radius: 32px; padding: clamp(36px, 6vw, 72px); text-align: center; color: #fff;
    background: radial-gradient(120% 140% at 100% 0%, #3b82f6 0%, #1d4ed8 40%, #1e3a8a 100%);
    box-shadow: 0 40px 80px -30px rgba(30, 64, 175, .55);
}
.cta-band::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .08) 1px, transparent 1px); background-size: 40px 40px; -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, #000, transparent 75%); mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, #000, transparent 75%); }
.cta-band > * { position: relative; }
.cta-band h2 { font-size: clamp(24px, 3.4vw, 40px); }
.cta-band p { color: rgba(255, 255, 255, .82); margin: 14px auto 0; max-width: 620px; font-size: 16.5px; }
.cta-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding-top: 56px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-about { color: var(--muted); font-size: 14.5px; margin-top: 16px; max-width: 360px; line-height: 2; }
.footer-col h4 { font-size: 15px; margin-bottom: 14px; }
.footer-col a { display: block; color: var(--muted); font-size: 14.5px; padding: 5px 0; transition: color .2s; }
.footer-col a:hover { color: var(--brand-600); }
.footer-bottom { margin-top: 44px; padding: 22px 0 calc(22px + var(--safe-b)); border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 13.5px; }
.footer-bottom a { color: var(--brand-600); font-weight: 700; }

/* =========================================================
   Auth / Install
   ========================================================= */
.auth-wrap { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side {
    position: relative; overflow: hidden; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
    background: radial-gradient(120% 120% at 100% 0%, #3b82f6 0%, #1d4ed8 38%, #172554 100%);
}
.auth-side::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px); background-size: 44px 44px; -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000, transparent 75%); mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000, transparent 75%); }
.auth-side > * { position: relative; }
.auth-side .brand-name { color: #fff; }
.auth-quote { font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; line-height: 1.6; max-width: 460px; }
.auth-quote small { display: block; margin-top: 14px; font-size: 15px; font-weight: 400; color: rgba(255, 255, 255, .78); line-height: 2; }
.auth-feats { display: grid; gap: 12px; }
.auth-feats div { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: rgba(255, 255, 255, .88); }
.auth-feats .ck { width: 28px; height: 28px; border-radius: 9px; background: rgba(255, 255, 255, .14); display: grid; place-items: center; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--bg); position: relative; }
.auth-box { width: 100%; max-width: 430px; }
.auth-box .brand { margin-bottom: 26px; }
.auth-title { font-size: 26px; }
.auth-sub { color: var(--muted); margin-top: 6px; font-size: 15px; }
.tabs { display: flex; gap: 4px; background: var(--bg-slate); border-radius: 14px; padding: 4px; margin: 26px 0 22px; }
.tabs button, .tabs a { flex: 1; border: 0; background: transparent; height: 42px; border-radius: 11px; font-weight: 700; color: var(--muted); display: grid; place-items: center; transition: background .2s, color .2s, box-shadow .2s; }
.tabs .on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-pick label { position: relative; cursor: pointer; }
.role-pick input { position: absolute; opacity: 0; pointer-events: none; }
.role-pick span { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; font-weight: 700; transition: border-color .2s, background .2s, color .2s; }
.role-pick span .icon { color: var(--muted); }
.role-pick input:checked + span { border-color: var(--brand); background: var(--brand-50); color: var(--brand-700); }
.role-pick input:checked + span .icon { color: var(--brand); }

.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field > label, .label { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.input, .field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea {
    width: 100%; height: 50px; padding-inline: 16px; border: 1.5px solid var(--line); border-radius: 13px; background: #fff; color: var(--ink);
    font-size: 15px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.field textarea { height: auto; min-height: 110px; padding-block: 12px; line-height: 1.9; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand-400); box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }
.field .hint { font-size: 12.5px; color: var(--muted); line-height: 1.8; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-inline-end: 48px !important; }
.pw-eye { position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: transparent; color: var(--muted); border-radius: 10px; display: grid; place-items: center; }
.pw-eye:hover { background: var(--bg-slate); }

.alert { padding: 12px 16px; border-radius: 13px; font-size: 14px; margin-bottom: 16px; border: 1px solid; line-height: 1.9; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-ok { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.alert-info { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-800); }
.auth-foot { margin-top: 22px; text-align: center; color: var(--muted); font-size: 14px; }
.auth-foot a { color: var(--brand-600); font-weight: 700; }
.back-home { position: absolute; top: 20px; inset-inline-start: 20px; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 600; }
.back-home:hover { color: var(--brand-600); }

.install-card { max-width: 720px; margin: 40px auto; background: #fff; border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow); padding: clamp(22px, 5vw, 42px); }
.req-list { display: grid; gap: 8px; margin: 18px 0 26px; }
.req { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--line); font-size: 14px; }
.req b.ok { color: var(--ok); }
.req b.bad { color: var(--danger); }
.req b.warn { color: var(--warn); }

/* =========================================================
   Animations
   ========================================================= */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(2.6); opacity: 0; } }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@keyframes nodePulse { 0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, .35); } 70%, 100% { box-shadow: 0 0 0 13px rgba(37, 99, 235, 0); } }
@keyframes dashFlow { to { stroke-dashoffset: -17; } }
@keyframes coreRipple { 0% { opacity: .6; transform: scale(.85); } 100% { opacity: 0; transform: scale(1.6); } }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1080px) {
    .hero-inner { grid-template-columns: 1fr; gap: 48px; }
    .hero-text { max-width: 680px; margin-inline: auto; text-align: center; }
    .hero-actions, .hero-trust { justify-content: center; }
    .fc-1 { inset-inline-start: 0; }
    .fc-2 { inset-inline-end: 0; }
    .hub-grid, .pwa-band { grid-template-columns: 1fr; }
    .bento { grid-template-columns: 1fr 1fr; }
    .fcard.wide { grid-column: span 2; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
    .pcards { grid-template-columns: 1fr 1fr; }
    .pcards::before { display: none; }
    .roles { grid-template-columns: 1fr; }
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-side { display: none; }
}
@media (max-width: 760px) {
    .container { padding-inline: 16px; }
    .header-inner { grid-template-columns: 1fr auto; height: 64px; }
    .site-header.scrolled .header-inner { max-width: calc(100% - 20px); padding-inline: 12px; }
    .nav-toggle { display: block; }
    .header-actions .btn-ghost { display: none; }
    .main-nav {
        position: fixed; top: 76px; inset-inline: 12px; flex-direction: column; align-items: stretch; gap: 4px;
        background: rgba(255, 255, 255, .97) !important; border: 1px solid var(--line) !important; border-radius: 20px; padding: 10px;
        box-shadow: 0 30px 60px -20px rgba(15, 23, 42, .35);
        opacity: 0; visibility: hidden; transform: translateY(-10px); transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
        backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    }
    body.nav-open .main-nav { opacity: 1; visibility: visible; transform: none; }
    .nav-link { padding: 13px 16px; border-radius: 13px; font-size: 15.5px; }
    .nav-mobile-cta { display: flex; margin-top: 6px; }
    .strip-grid { grid-template-columns: 1fr 1fr; }
    .strip-item:nth-child(3)::before { display: none; }
    .strip-item { padding: 22px 12px; }
    .bento { grid-template-columns: 1fr; }
    .fcard.wide { grid-column: auto; }
    .float-card { display: none; }
    .demo-body { min-height: 330px; }
    .pwa-points { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .hub-node { font-size: 11.5px; padding: 5px 10px 5px 5px; padding-inline-start: 5px; padding-inline-end: 10px; gap: 6px; border-radius: 12px; }
    .hub-node .ic { width: 26px; height: 26px; border-radius: 8px; }
    .hub-node .ic .icon { width: 15px; height: 15px; }
    .hub-core { width: 96px; height: 96px; }
    .hub-core .brand-logo { width: 70px; height: 70px; }
}
@media (max-width: 520px) {
    .pcards { grid-template-columns: 1fr; }
    .hero-actions .btn { flex: 1 1 100%; }
    .field-row { grid-template-columns: 1fr; }
    .brand-name { font-size: 21px; }
    .brand-logo { width: 36px; height: 36px; }
    .header-actions .btn-primary { --bh: 40px; padding-inline: 14px; font-size: 13.5px; }
}

/* نوار به‌روزرسانی PWA */
.sw-update-bar {
    position: fixed; z-index: 2000; left: 50%; bottom: calc(18px + var(--safe-b)); transform: translate(-50%, 140%);
    display: flex; align-items: center; gap: 14px; background: #0f172a; color: #fff; padding: 10px 10px 10px 10px; padding-inline-start: 18px;
    border-radius: 16px; box-shadow: 0 20px 40px -12px rgba(15, 23, 42, .5); font-size: 14px; transition: transform .4s var(--ease); max-width: calc(100% - 24px);
}
.sw-update-bar.show { transform: translate(-50%, 0); }
.sw-update-bar button { border: 0; background: var(--brand); color: #fff; font-weight: 700; border-radius: 11px; padding: 8px 14px; white-space: nowrap; }

/* حذف دکمهٔ چشم/ضربدر پیش‌فرض Edge در فیلد رمز (با دکمهٔ خودمان تداخل دارد) */
input::-ms-reveal, input::-ms-clear { display: none; }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }

/* ---------- Hero: پنل محصول (استاتیک) ---------- */
.product { position: relative; z-index: 2; width: 100%; max-width: 500px; display: grid; gap: 12px; }
.demo-top .brand-logo { width: 28px; height: 28px; }
.d-teacher { display: flex; gap: 10px; align-items: flex-start; background: #fff; border: 1px solid #bbf7d0; border-radius: 16px; padding: 10px 14px; font-size: 13px; line-height: 1.9; max-width: 88%; align-self: flex-end; }
.d-teacher .ic { width: 28px; height: 28px; border-radius: 9px; background: #059669; color: #fff; display: grid; place-items: center; flex-shrink: 0; margin-top: 2px; }
.d-teacher b { color: #047857; font-size: 12.5px; display: block; }
.panel-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.panel-stat { background: rgba(255, 255, 255, .9); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow-sm); backdrop-filter: blur(8px); }
.panel-stat .v { font-size: 20px; font-weight: 900; color: var(--ink); line-height: 1.3; }
.panel-stat .l { font-size: 12px; color: var(--muted); line-height: 1.6; }
.panel-stat .ic { width: 30px; height: 30px; border-radius: 9px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; margin-bottom: 8px; }
.hero-glow { opacity: .7; }
@media (max-width: 1080px) { .product { max-width: 540px; margin-inline: auto; } }
@media (max-width: 520px) { .panel-row { grid-template-columns: repeat(3, 1fr); gap: 8px; } .panel-stat { padding: 10px; border-radius: 13px; } .panel-stat .v { font-size: 17px; } .panel-stat .l { font-size: 11px; } .panel-stat .ic { display: none; } }

/* ---------- Auth v2 ---------- */
.auth-wrap { grid-template-columns: 1.05fr 1fr; }
.auth-side { padding: 36px 44px; justify-content: center; gap: 28px; }
.auth-side .brand { position: absolute; top: 28px; inset-inline-start: 44px; }
.auth-side .brand-name { color: #fff; }
.auth-hero { max-width: 500px; }
.auth-hero h2 { font-size: clamp(22px, 2.2vw, 30px); line-height: 1.55; color: #fff; }
.auth-hero p { margin-top: 10px; color: rgba(255, 255, 255, .78); font-size: 14.5px; line-height: 2; }
.auth-card { max-width: 500px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); border-radius: 20px; padding: 14px 16px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.auth-card .ac-h { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: rgba(255, 255, 255, .7); margin-bottom: 10px; }
.auth-card .ac-h i { width: 7px; height: 7px; border-radius: 50%; background: #34d399; }
.ac-msg { font-size: 13px; line-height: 1.9; padding: 8px 12px; border-radius: 13px; max-width: 92%; }
.ac-msg.u { background: rgba(255, 255, 255, .14); color: #fff; margin-bottom: 8px; }
.ac-msg.a { background: #fff; color: var(--ink); margin-inline-start: auto; }
.ac-msg .d-cite { vertical-align: 1px; }
.ac-src { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 11.5px; color: var(--muted); background: var(--bg-slate); border-radius: 999px; padding: 2px 9px; }
.auth-points { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; max-width: 500px; }
.auth-points div { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: rgba(255, 255, 255, .88); }
.auth-points .ck { width: 26px; height: 26px; border-radius: 8px; background: rgba(255, 255, 255, .14); display: grid; place-items: center; flex-shrink: 0; }
.auth-points .ck .icon-sm { width: 15px; height: 15px; }
.auth-foot-note { position: absolute; bottom: 24px; inset-inline-start: 44px; font-size: 12px; color: rgba(255, 255, 255, .5); }
.auth-main { padding: 28px 24px; overflow-y: auto; }
.auth-box { max-width: 440px; }
.auth-box .brand { margin-bottom: 14px; }
.auth-box .brand-logo { width: 34px; height: 34px; }
.auth-box .brand-name { font-size: 20px; }
.auth-title { font-size: 23px; }
.auth-sub { font-size: 14px; margin-top: 2px; }
.auth-box .tabs { margin: 16px 0 14px; padding: 3px; }
.auth-box .tabs button, .auth-box .tabs a { height: 38px; font-size: 14px; }
.auth-box .field { gap: 5px; margin-bottom: 11px; }
.auth-box .field > label, .auth-box .label { font-size: 13px; }
.auth-box .input, .auth-box .field input:not([type=checkbox]):not([type=radio]), .auth-box .field select { height: 46px; border-radius: 12px; font-size: 14.5px; }
.auth-box .role-pick span { padding: 10px 12px; border-radius: 12px; font-size: 14px; }
.auth-box .role-pick .icon { width: 20px; height: 20px; }
.auth-box .btn-lg { --bh: 50px; margin-top: 4px; }
.auth-box .field .hint { font-size: 12px; }
.auth-foot { margin-top: 14px; font-size: 13.5px; }
.back-home { top: 18px; }
@media (max-width: 900px) { .auth-main { min-height: 100dvh; align-items: flex-start; padding-top: 64px; } }

@media (max-width: 900px) { .auth-wrap { grid-template-columns: 1fr; } }
