/* Fonts: Vazirmatn (text), Lalezar (big display headings), Estedad (optional, self-hosted: UI labels and card titles).
   If Estedad's file is not present the browser silently uses Vazirmatn instead. */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800;900&family=Lalezar&display=swap');
@font-face { font-family: Estedad; src: local('Estedad'), url('fonts/Estedad.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --font-body: Vazirmatn,Tahoma,system-ui,sans-serif;
  --font-ui: Estedad,Vazirmatn,Tahoma,system-ui,sans-serif;
  --font-display: Lalezar,Estedad,Vazirmatn,Tahoma,system-ui,sans-serif;
  color-scheme: light;
  --bg: #f5f3fb;
  --surface: #fff;
  --surface-2: #ece8f7;
  --text: #1f1a3d;
  --muted: #7a7596;
  --primary: #6d3fd9;
  --gold: #c79b48;
  --border: rgba(60,30,130,.09);
  --shadow: 0 18px 50px rgba(50,30,110,.10);
  --soft-shadow: 8px 8px 24px rgba(50,30,110,.09),-8px -8px 24px rgba(255,255,255,.9);
  --radius: 24px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0a14;
  --surface: #151226;
  --surface-2: #201b38;
  --text: #ece8fa;
  --muted: #aaa4c6;
  --primary: #a67cff;
  --gold: #d5ad61;
  --border: rgba(255,255,255,.08);
  --shadow: 0 18px 50px rgba(0,0,0,.25);
  --soft-shadow: 7px 7px 22px rgba(0,0,0,.22),-7px -7px 22px rgba(255,255,255,.015);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.9;
  overflow-x: hidden;
  transition: background .3s,color .3s;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.container { width: min(1160px,calc(100% - 40px)); margin-inline: auto; }
.section { padding: 100px 0; }
.section-muted { background: var(--surface-2); }
.skip-link { position: absolute; top: -60px; right: 15px; z-index: 9999; background: var(--primary); color: white; padding: 10px 20px; border-radius: 10px; }
.skip-link:focus { top: 10px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

/* Header */
.header { position: sticky; top: 0; z-index: 100; background: var(--bg); background: color-mix(in srgb,var(--bg) 90%,transparent); backdrop-filter: blur(18px); border-bottom: 1px solid var(--border); }
.nav { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 25px; }
.brand { display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-icon img,.document-logo img { width: 100%; height: 100%; display: block; border-radius: inherit; }
.brand-icon { width: 43px; height: 43px; display: grid; place-items: center; color: white; font-size: 23px; font-weight: 900; border-radius: 15px; background: none; box-shadow: 0 8px 20px rgba(109,63,217,.2); }
.brand strong,.brand small { display: block; }
.brand strong { font-size: 16px; font-weight: 800; }
.brand small { color: var(--muted); font-size: 10px; }
.nav-links { display: flex; gap: 29px; align-items: center; }
.nav-links a { font-size: 13px; color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.theme-toggle { width: 43px; height: 43px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 14px; cursor: pointer; font-size: 21px; }

/* Buttons */
.btn { min-height: 52px; padding: 12px 24px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 15px; font-size: 13px; font-weight: 700; transition: transform .25s,box-shadow .25s,background .25s; }
.btn:hover { transform: translateY(-3px); }
.btn-primary { color: white; background: linear-gradient(135deg,#7c4dff,#3a1d9e); box-shadow: 0 12px 25px rgba(109,63,217,.22); }
.btn-primary:hover { box-shadow: 0 16px 30px rgba(109,63,217,.3); }
.btn-outline { border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.btn-small { min-height: 42px; padding: 8px 18px; }

/* Hero */
.hero { min-height: 660px; display: flex; align-items: center; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; width: 500px; height: 500px; border-radius: 50%; background: rgba(124,77,255,.08); filter: blur(90px); top: -200px; right: -200px; pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 70px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--primary); font-size: 12px; font-weight: 800; margin-bottom: 20px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #a67cff; box-shadow: 0 0 0 5px rgba(166,124,255,.15); }
.hero h1 { font-size: clamp(35px,5vw,58px); line-height: 1.45; font-weight: 900; max-width: 600px; }
.gradient-text { color: var(--primary); }
.hero-description { color: var(--muted); font-size: 15px; line-height: 2.2; margin-top: 20px; max-width: 540px; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 30px; }
.download-note { font-size: 11px; color: var(--muted); margin-top: 10px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 35px; color: var(--muted); font-size: 11px; }

/* Phone mockup */
.hero-visual { position: relative; min-height: 530px; display: grid; place-items: center; }
.glow { position: absolute; width: 340px; height: 340px; border-radius: 50%; filter: blur(70px); opacity: .35; }
.glow-one { background: #7c4dff; }
.glow-two { background: #d5ad61; width: 150px; height: 150px; left: 0; bottom: 30px; }
.phone { width: 278px; height: 510px; border: 7px solid #2a1f55; background: #120d26; border-radius: 39px; padding: 8px; position: relative; z-index: 2; box-shadow: 0 35px 75px rgba(0,0,0,.25); transform: rotate(-4deg); }
.phone-top { height: 27px; color: white; display: flex; justify-content: space-between; padding: 0 12px; font-size: 9px; }
.phone-screen { height: calc(100% - 27px); background: #f5f3fb; border-radius: 26px; padding: 16px 12px; color: #1f1a3d; overflow: hidden; }
.app-topbar { display: flex; justify-content: space-between; align-items: center; }
.app-topbar small { font-size: 9px; color: #8d88a8; }
.app-topbar h3 { font-size: 17px; }
.app-avatar img { width: 100%; height: 100%; border-radius: inherit; display: block; }
.app-avatar { width: 38px; height: 38px; display: grid; place-items: center; background: none; overflow: hidden; color: white; border-radius: 13px; font-weight: 900; }
.welcome-card { background: linear-gradient(130deg,#7c4dff,#3a1d9e); color: white; padding: 15px; border-radius: 17px; margin-top: 20px; }
.welcome-card small { opacity: .8; font-size: 9px; }
.welcome-card h3 { font-size: 16px; margin: 5px 0; }
.welcome-card p { font-size: 9px; opacity: .8; }
.phone-section-title { font-size: 11px; font-weight: 800; margin: 18px 0 10px; }
.phone-actions { display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; }
.phone-action { background: white; border-radius: 11px; text-align: center; padding: 8px 2px; box-shadow: 0 4px 12px rgba(0,0,0,.04); }
.action-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; margin: auto auto 5px; font-size: 15px; }
.green { background: #e9e2fb; color: #6d3fd9; }
.gold { background: #f8edda; color: #a77c2f; }
.blue { background: #dceaf7; color: #397bb3; }
.purple { background: #eae1f7; color: #7753a4; }
.phone-action small { font-size: 7px; display: block; }
.activity-item { display: flex; align-items: center; gap: 9px; padding: 9px; background: white; border-radius: 12px; margin-bottom: 8px; }
.activity-icon { width: 30px; height: 30px; display: grid; place-items: center; background: #e9e2fb; border-radius: 9px; color: #6d3fd9; }
.activity-item strong,.activity-item small { display: block; }
.activity-item strong { font-size: 9px; }
.activity-item small { font-size: 8px; color: #8d88a8; }
.activity-check { margin-right: auto; color: #159d7e; font-size: 13px; }
.phone-bottom { display: flex; justify-content: space-around; margin-top: 13px; padding-top: 10px; border-top: 1px solid #ebe8f5; color: #8d88a8; }
.floating-card { position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 17px; padding: 12px 15px; box-shadow: var(--shadow); }
.floating-card-one { top: 100px; right: 0; }
.floating-card-two { bottom: 80px; left: 0; }
.floating-icon { width: 36px; height: 36px; display: grid; place-items: center; background: #e9e2fb; color: #6d3fd9; border-radius: 11px; }
.gold-icon { background: #f7edda; color: #a77c2f; }
.floating-card strong,.floating-card small { display: block; }
.floating-card strong { font-size: 11px; }
.floating-card small { color: var(--muted); font-size: 9px; }

/* Section titles and cards */
.section-heading { text-align: center; max-width: 650px; margin: 0 auto 55px; }
.section-heading h2,.report-content h2,.security-box h2 { font-size: clamp(25px,4vw,38px); line-height: 1.6; font-weight: 900; }
.section-heading p { color: var(--muted); font-size: 13px; margin-top: 12px; }
.feature-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.feature-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 22px; min-height: 245px; position: relative; overflow: hidden; box-shadow: var(--soft-shadow); transition: transform .3s,border-color .3s; }
.feature-card:hover { transform: translateY(-8px); border-color: var(--primary); }
.feature-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 17px; background: #e9e2fb; color: #6d3fd9; font-size: 23px; margin-bottom: 22px; }
.feature-icon.gold { background: #f7edda; color: #a77c2f; }
.feature-icon.blue { background: #e0edf8; color: #397bb3; }
.feature-icon.purple { background: #eee5fa; color: #7753a4; }
.feature-card h3 { font-size: 16px; margin-bottom: 9px; }
.feature-card p { font-size: 12px; color: var(--muted); line-height: 2; }
.card-number { position: absolute; bottom: 7px; left: 17px; font-size: 28px; font-weight: 900; color: var(--surface-2); }

/* Roles */
.role-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.role-card { position: relative; background: var(--surface); padding: 30px; border-radius: 25px; border: 1px solid var(--border); box-shadow: var(--soft-shadow); overflow: hidden; }
.role-featured { border-color: var(--primary); transform: translateY(-12px); }
.role-number { font-size: 12px; font-weight: 900; color: var(--gold); }
.role-icon { width: 57px; height: 57px; display: grid; place-items: center; border-radius: 17px; background: var(--surface-2); color: var(--primary); font-size: 25px; margin: 18px 0; }
.role-card h3 { font-size: 18px; }
.role-card p { color: var(--muted); font-size: 12px; margin: 12px 0 20px; }
.role-label { display: inline-block; color: var(--primary); font-size: 10px; background: var(--surface-2); border-radius: 20px; padding: 6px 12px; }

/* Reports */
.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 90px; align-items: center; }
.report-content p { color: var(--muted); font-size: 14px; margin-top: 20px; }
.export-list { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 25px; font-size: 12px; }
.export-list span { color: var(--primary); font-weight: 900; margin-left: 5px; }
.report-preview { min-height: 400px; background: var(--surface-2); border-radius: 35px; display: grid; place-items: center; position: relative; }
.document { width: 270px; min-height: 335px; background: white; color: #1f1a3d; padding: 23px; border-radius: 7px; box-shadow: 0 20px 50px rgba(0,0,0,.15); transform: rotate(3deg); }
.document-header { display: flex; align-items: center; gap: 12px; }
.document-logo { width: 38px; height: 38px; display: grid; place-items: center; background: none; overflow: hidden; color: white; border-radius: 11px; font-weight: 900; }
.document-header strong,.document-header small { display: block; }
.document-header strong { font-size: 13px; }
.document-header small { font-size: 8px; color: #8d88a8; }
.document-line { height: 2px; background: #6d3fd9; margin: 18px 0; }
.document-row { display: flex; justify-content: space-between; border-bottom: 1px solid #ebe8f5; padding: 9px 0; font-size: 9px; }
.document-row span { color: #8d88a8; }
.document-table { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 20px; }
.document-table div { height: 22px; background: #efecf8; border-radius: 3px; }
.document-footer { text-align: center; font-size: 8px; color: #8d88a8; margin-top: 18px; }
.file-badge { position: absolute; padding: 10px 16px; border-radius: 12px; color: white; font-size: 11px; font-weight: 800; box-shadow: var(--shadow); }
.pdf { background: #c94d4d; top: 65px; right: 50px; }
.excel { background: #26865d; bottom: 65px; left: 50px; }

/* Privacy and FAQ */
.security-section { padding-top: 30px; }
.security-box { display: flex; align-items: center; gap: 25px; padding: 38px; border-radius: 28px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--soft-shadow); }
.security-icon { width: 70px; height: 70px; flex-shrink: 0; display: grid; place-items: center; color: white; background: linear-gradient(145deg,#7c4dff,#3a1d9e); border-radius: 22px; font-size: 30px; }
.security-box h2 { font-size: 23px; }
.security-box p { color: var(--muted); font-size: 12px; margin-top: 7px; }
.security-box .btn { flex-shrink: 0; margin-right: auto; }
.faq-container { max-width: 820px; }
.faq-list { display: grid; gap: 13px; }
.faq-list details { background: var(--surface); border: 1px solid var(--border); border-radius: 17px; padding: 18px 22px; box-shadow: var(--soft-shadow); }
.faq-list summary { font-size: 13px; font-weight: 700; cursor: pointer; }
.faq-list details p { color: var(--muted); font-size: 12px; padding-top: 13px; }

/* Footer */
.footer { background: #120d26; color: #ebe8f5; padding: 65px 0 20px; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 60px; padding-bottom: 45px; }
.footer .brand small { color: #b3add0; }
.footer-brand p { color: #b3add0; font-size: 12px; max-width: 330px; margin-top: 18px; }
.footer-links { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.footer-links strong { font-size: 13px; margin-bottom: 5px; }
.footer-links a,.footer-links span { color: #b3add0; font-size: 11px; transition: color .2s; }
.footer-links a:hover { color: white; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 18px; display: flex; justify-content: space-between; color: #b3add0; font-size: 10px; }

/* Inner pages */
.page-hero { padding: 85px 0 45px; background: var(--surface-2); }
.page-hero h1 { font-size: clamp(30px,5vw,43px); font-weight: 900; }
.page-hero p { color: var(--muted); margin-top: 10px; font-size: 13px; }
.content-card { max-width: 850px; margin: 50px auto 90px; padding: 40px; background: var(--surface); border: 1px solid var(--border); border-radius: 25px; box-shadow: var(--soft-shadow); }
.content-card h2 { font-size: 19px; margin: 28px 0 10px; }
.content-card h2:first-child { margin-top: 0; }
.content-card p,.content-card li { color: var(--muted); font-size: 13px; line-height: 2.3; }
.content-card ul { padding-right: 22px; }
.notice { padding: 18px; border-radius: 15px; background: var(--surface-2); color: var(--muted); font-size: 12px; margin-bottom: 25px; border-right: 4px solid var(--gold); }
.contact-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px; background: var(--surface-2); border-radius: 16px; margin-top: 15px; }
.contact-card strong,.contact-card small { display: block; }
.contact-card small { color: var(--muted); font-size: 11px; }
.contact-card a { color: var(--primary); font-weight: 800; font-size: 13px; }
.not-found { min-height: 100vh; display: grid; place-items: center; text-align: center; }
.not-found p { color: var(--muted); margin: 15px 0 30px; }
.error-code { font-size: 100px; font-weight: 900; color: var(--primary); line-height: 1.3; }

/* Reveal animations */
.reveal { opacity: 0; transform: translateY(25px); transition: opacity .7s ease,transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 950px) {
  .nav-links { display: none; }
  .hero-grid { gap: 25px; }
  .feature-grid { grid-template-columns: repeat(2,1fr); }
  .report-grid { gap: 35px; }
  .security-box { flex-wrap: wrap; }
  .security-box .btn { margin-right: 0; }
}
@media (max-width: 680px) {
  .container { width: calc(100% - 32px); }
  .section { padding: 75px 0; }
  .nav { min-height: 70px; }
  .nav-actions .btn { display: none; }
  .hero { padding-top: 65px; }
  .hero-grid,.report-grid { grid-template-columns: 1fr; }
  .hero-content { text-align: center; }
  .hero-description { margin-inline: auto; }
  .hero-buttons,.hero-points { justify-content: center; }
  .hero-visual { min-height: 510px; }
  .phone { transform: rotate(-2deg) scale(.93); }
  .floating-card-one { right: -5px; }
  .floating-card-two { left: -5px; }
  .feature-grid,.role-grid { grid-template-columns: 1fr; }
  .role-featured { transform: none; }
  .report-content { text-align: center; }
  .export-list { justify-content: center; }
  .report-preview { min-height: 390px; }
  .security-box { text-align: center; justify-content: center; padding: 27px 20px; }
  .security-icon { margin-inline: auto; }
  .security-box .btn { width: 100%; }
  .footer-top { grid-template-columns: 1fr; gap: 35px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
  .content-card { padding: 24px 18px; margin-top: 25px; }
  .contact-card { align-items: flex-start; flex-direction: column; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    color-scheme: dark;
    --bg: #0b0a14;
    --surface: #151226;
    --surface-2: #201b38;
    --text: #ece8fa;
    --muted: #aaa4c6;
    --primary: #a67cff;
    --gold: #d5ad61;
    --border: rgba(255,255,255,.08);
    --shadow: 0 18px 50px rgba(0,0,0,.25);
    --soft-shadow: 7px 7px 22px rgba(0,0,0,.22),-7px -7px 22px rgba(255,255,255,.015);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
/* ── typography roles ──
   Headings use Lalezar only when it really loaded (class set by app.js); otherwise bold Vazirmatn, so they never look thin. */
.hero h1,.page-hero h1,.section-heading h2,.report-content h2,.security-box h2 { font-weight: 900; }
.hero h1 { font-size: clamp(36px,5vw,58px); }
.fonts-ready .hero h1,.fonts-ready .page-hero h1,.fonts-ready .section-heading h2,.fonts-ready .report-content h2,.fonts-ready .security-box h2 { font-family: var(--font-display); font-weight: 400; }
.fonts-ready .hero h1 { font-size: clamp(40px,5.6vw,66px); }
.fonts-ready .section-heading h2,.fonts-ready .report-content h2,.fonts-ready .security-box h2 { font-size: clamp(28px,4.2vw,42px); }
.btn,.nav-links a,.eyebrow,.faq summary,.brand strong { font-family: var(--font-ui); }
.btn,.nav-links a { font-weight: 700; }
