/* ============================================================
   Keystone Seller - Modern Design System (Persian / RTL)
   Dark premium landing + Light clean app areas
   ============================================================ */

:root {
  /* Dark landing tokens */
  --d-bg: #070b16;
  --d-bg-2: #0d1326;
  --d-surface: #121a33;
  --d-surface-2: #1a2342;
  --d-border: rgba(148, 163, 255, 0.14);
  --d-text: #eef1ff;
  --d-muted: #97a0c8;
  --d-accent: #667eea;
  --d-accent-2: #9b6bf0;
  --d-mint: #2dd4bf;
  --d-gradient: linear-gradient(135deg, #667eea 0%, #9b6bf0 55%, #38bdf8 110%);

  /* Light app tokens */
  --l-bg: #f4f6fb;
  --l-surface: #ffffff;
  --l-border: #e6eaf4;
  --l-text: #171c2e;
  --l-muted: #6c7693;
  --l-primary: #4f46e5;
  --l-primary-2: #7c3aed;
  --l-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --l-success: #10b981;
  --l-danger: #ef4444;
  --l-warning: #f59e0b;

  /* Shared */
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --font: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow-sm: 0 2px 10px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 34px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 24px 70px rgba(15, 23, 42, 0.16);
  --glow: 0 0 0 1px rgba(102, 126, 234, 0.25), 0 14px 44px rgba(102, 126, 234, 0.28);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  direction: rtl;
  text-align: right;
  background: var(--d-bg);
  color: var(--d-text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.8;
}

img { max-width: 100%; }
a { text-decoration: none; transition: color .25s var(--ease); }

/* ---------- Typography helpers ---------- */
.gradient-text {
  background: var(--d-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(102, 126, 234, 0.12);
  border: 1px solid rgba(102, 126, 234, 0.35);
  color: #b7c2ff;
  backdrop-filter: blur(8px);
}

/* ---------- Buttons ---------- */
.btn-modern {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  white-space: nowrap;
}
.btn-modern::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255,255,255,.35) 50%, transparent 75%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease);
}
.btn-modern:hover::after { transform: translateX(120%); }
.btn-modern:hover { transform: translateY(-3px); }

.btn-gradient { background: var(--d-gradient); color: #fff; box-shadow: 0 10px 30px rgba(102,126,234,.35); }
.btn-gradient:hover { color: #fff; box-shadow: var(--glow); }
.btn-ghost {
  background: rgba(148, 163, 255, 0.08);
  color: var(--d-text);
  border: 1px solid var(--d-border);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { color: #fff; border-color: rgba(148, 163, 255, 0.4); background: rgba(148, 163, 255, 0.14); }
.btn-lg { padding: 17px 38px; font-size: 16px; }

/* ---------- Glass navbar ---------- */
.nav-modern {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 1000;
  padding: 18px 0;
  transition: padding .35s var(--ease), background .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav-modern.scrolled {
  padding: 10px 0;
  background: rgba(7, 11, 22, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--d-border);
  box-shadow: 0 12px 40px rgba(2, 6, 18, 0.45);
}
.nav-modern .nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: #fff; }
.nav-brand img { width: 44px; height: 44px; border-radius: 12px; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  position: relative;
  color: var(--d-muted);
  font-size: 14px;
  font-weight: 500;
  padding: 9px 16px;
  border-radius: 100px;
  transition: color .25s var(--ease), background .25s var(--ease);
}
.nav-links a:hover { color: #fff; background: rgba(148, 163, 255, 0.1); }
.nav-links a.active { color: #fff; background: rgba(102, 126, 234, 0.18); }
.nav-actions { display: flex; align-items: center; gap: 12px; }

.nav-burger { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--d-border); background: rgba(148,163,255,.08); color: #fff; font-size: 18px; cursor: pointer; }
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1001;
  background: rgba(7, 11, 22, 0.96);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s var(--ease);
}
.mobile-menu.open { opacity: 1; pointer-events: auto; }
.mobile-menu a { color: #fff; font-size: 22px; font-weight: 600; padding: 14px 20px; }
.mobile-menu a:hover { color: #b7c2ff; }
.mobile-menu .close-mobile { position: absolute; top: 24px; inset-inline-start: 24px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--d-border); background: transparent; color: #fff; font-size: 22px; cursor: pointer; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-burger { display: block; }
  .nav-actions .hide-sm { display: none; }
}

/* ---------- Hero ---------- */
.hero-modern {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px 0 90px;
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(102, 126, 234, 0.28), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(155, 107, 240, 0.24), transparent 60%),
    radial-gradient(1000px 700px at 50% 110%, rgba(56, 189, 248, 0.12), transparent 60%),
    var(--d-bg);
}
.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 255, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 40%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 40%, transparent 75%);
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  animation: float-orb 12s ease-in-out infinite;
  pointer-events: none;
}
.hero-orb.o1 { width: 380px; height: 380px; top: -120px; inset-inline-start: -100px; background: #667eea; }
.hero-orb.o2 { width: 300px; height: 300px; bottom: 5%; inset-inline-end: -80px; background: #9b6bf0; animation-delay: -4s; }
.hero-orb.o3 { width: 200px; height: 200px; top: 40%; inset-inline-start: 45%; background: #38bdf8; opacity: 0.3; animation-delay: -8s; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: 100px;
  background: rgba(102, 126, 234, 0.12);
  border: 1px solid rgba(102, 126, 234, 0.35);
  color: #b7c2ff;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 26px;
  backdrop-filter: blur(8px);
}
.hero-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--d-mint);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.2);
  animation: pulse-dot 2s ease-in-out infinite;
}
.hero-title {
  font-size: clamp(34px, 5.4vw, 66px);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.5px;
  margin-bottom: 22px;
}
.hero-sub {
  color: var(--d-muted);
  font-size: clamp(16px, 1.6vw, 19px);
  max-width: 620px;
  line-height: 2;
  margin-bottom: 34px;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 54px; }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  max-width: 560px;
  border-top: 1px solid var(--d-border);
  padding-top: 30px;
}
.hero-stat b { display: block; font-size: 30px; font-weight: 800; color: #fff; }
.hero-stat span { color: var(--d-muted); font-size: 13px; }
@media (max-width: 640px) { .hero-stats { grid-template-columns: 1fr; } }

.hero-visual { position: relative; }
.hero-visual .glass-panel {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 28px;
  background: linear-gradient(160deg, rgba(148, 163, 255, 0.1), rgba(148, 163, 255, 0.03));
  border: 1px solid var(--d-border);
  backdrop-filter: blur(14px);
  box-shadow: 0 40px 90px rgba(2, 6, 18, 0.5);
  animation: float-y 7s ease-in-out infinite;
}
.hero-visual .glass-panel .bar { height: 10px; border-radius: 6px; background: rgba(148,163,255,.14); margin-bottom: 12px; }
.hero-visual .glass-panel .bar.short { width: 55%; }
.hero-visual .glass-panel .mini-row { display: flex; gap: 10px; margin-top: 18px; }
.hero-visual .glass-panel .mini-card {
  flex: 1; height: 86px; border-radius: 12px;
  background: linear-gradient(135deg, #1a2342, #232e5c);
  border: 1px solid rgba(148, 163, 255, 0.12);
  animation: float-y 5s ease-in-out infinite;
}
.hero-visual .glass-panel .mini-card:nth-child(2) { animation-delay: -2s; }
.hero-visual .glass-panel .mini-card:nth-child(3) { animation-delay: -4s; }
.float-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 14px;
  background: rgba(18, 26, 51, 0.85);
  border: 1px solid var(--d-border);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  animation: float-y 6s ease-in-out infinite;
}
.float-chip .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--d-gradient); font-size: 14px; }
.float-chip.c1 { top: -26px; inset-inline-end: 8%; animation-delay: -2s; }
.float-chip.c2 { bottom: -22px; inset-inline-start: 6%; animation-delay: -4s; }

/* ---------- Sections ---------- */
.section-modern { position: relative; padding: 110px 0; }
.section-head { max-width: 640px; margin: 0 auto 60px; text-align: center; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 42px); font-weight: 800; margin: 16px 0 12px; }
.section-head p { color: var(--d-muted); font-size: 16px; }

/* ---------- Feature cards ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.feature-card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 34px 28px;
  background: linear-gradient(160deg, rgba(148, 163, 255, 0.08), rgba(148, 163, 255, 0.02));
  border: 1px solid var(--d-border);
  overflow: hidden;
  transition: transform .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
}
.feature-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--d-gradient);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .5s var(--ease);
}
.feature-card:hover::before { transform: scaleX(1); }
.feature-card:hover { transform: translateY(-10px); border-color: rgba(148, 163, 255, 0.35); box-shadow: 0 24px 60px rgba(2, 6, 18, 0.5); }
.feature-icon {
  width: 60px; height: 60px; border-radius: 16px;
  display: grid; place-items: center;
  font-size: 24px;
  background: var(--d-gradient);
  color: #fff;
  margin-bottom: 20px;
  box-shadow: 0 12px 30px rgba(102, 126, 234, 0.35);
  transition: transform .4s var(--ease);
}
.feature-emoji { font-size: 26px; line-height: 1; }
.feature-card:hover .feature-icon { transform: rotate(-8deg) scale(1.08); }
.feature-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.feature-card p { color: var(--d-muted); font-size: 14px; margin: 0; }
@media (max-width: 960px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .feature-grid { grid-template-columns: 1fr; } }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; counter-reset: step; }
.step-card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 40px 28px;
  background: var(--d-surface);
  border: 1px solid var(--d-border);
  transition: transform .4s var(--ease), border-color .4s var(--ease);
}
.step-card:hover { transform: translateY(-8px); border-color: rgba(148, 163, 255, 0.35); }
.step-card::before {
  counter-increment: step;
  content: "0" counter(step);
  position: absolute;
  top: 22px; inset-inline-end: 26px;
  font-size: 44px;
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 1px rgba(148, 163, 255, 0.35);
}
.step-card .num { font-size: 13px; font-weight: 700; color: #b7c2ff; }
.step-card h3 { font-size: 18px; font-weight: 700; margin: 8px 0 10px; }
.step-card p { color: var(--d-muted); font-size: 14px; margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Stats band ---------- */
.stats-band {
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  background:
    radial-gradient(600px 300px at 10% 0%, rgba(102,126,234,.25), transparent 60%),
    radial-gradient(600px 300px at 90% 100%, rgba(155,107,240,.22), transparent 60%),
    var(--d-surface);
  border: 1px solid var(--d-border);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}
.stats-band .s b { font-size: 40px; font-weight: 900; }
.stats-band .s span { color: var(--d-muted); font-size: 14px; }
@media (max-width: 760px) { .stats-band { grid-template-columns: 1fr 1fr; } }

/* ---------- Templates showcase ---------- */
.tpl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.tpl-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--d-surface);
  border: 1px solid var(--d-border);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .45s var(--ease);
}
.tpl-card:hover { transform: translateY(-12px) scale(1.01); border-color: rgba(148, 163, 255, 0.4); box-shadow: 0 30px 70px rgba(2, 6, 18, 0.55); }
.tpl-thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.tpl-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.tpl-thumb .tpl-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s var(--ease); }
.tpl-thumb .tpl-slide.active { opacity: 1; }
.tpl-card:hover .tpl-thumb img.active { transform: scale(1.12); }
.tpl-thumb::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(0deg, var(--d-surface), transparent 55%);
  z-index: 2;
  pointer-events: none;
}
.tpl-card .tpl-body { padding: 20px 22px 24px; }
.tpl-card .tpl-body h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.tpl-card .tpl-body p { color: var(--d-muted); font-size: 13px; margin: 0; }
.tpl-card .tpl-foot { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px 18px; border-top: 1px solid var(--d-border); font-size: 13px; color: var(--d-muted); }
.tpl-card .tpl-foot .tpl-cat { color: var(--d-accent); font-weight: 600; }
.tpl-badge {
  position: absolute; top: 14px; inset-inline-start: 14px; z-index: 2;
  padding: 5px 12px; border-radius: 50px; font-size: 11px; font-weight: 700;
  background: linear-gradient(135deg, var(--d-accent), #764ba2); color: #fff;
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.45);
}
.tpl-price {
  position: absolute; top: 14px; inset-inline-end: 14px; z-index: 2;
  padding: 5px 14px; border-radius: 50px; font-size: 12px; font-weight: 700;
  background: rgba(255, 159, 67, 0.92); color: #fff; backdrop-filter: blur(4px);
}
.tpl-price.free { background: rgba(46, 204, 113, 0.92); }
.tpl-overlay {
  position: absolute; inset: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, rgba(7, 11, 22, 0.2) 0%, rgba(7, 11, 22, 0.75) 100%);
  opacity: 0; transition: opacity .35s var(--ease);
}
.tpl-card:hover .tpl-overlay { opacity: 1; }
.tpl-preview {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: 50px; font-size: 13px; font-weight: 600; color: #fff;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px); transition: background .25s var(--ease), transform .25s var(--ease);
}
.tpl-preview:hover { background: rgba(255, 255, 255, 0.25); transform: translateY(-2px); }
@media (max-width: 960px) { .tpl-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .tpl-grid { grid-template-columns: 1fr; } }

/* ---------- Testimonials ---------- */
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.testi-card {
  border-radius: var(--radius-lg);
  padding: 30px;
  background: var(--d-surface);
  border: 1px solid var(--d-border);
  transition: transform .4s var(--ease), border-color .4s var(--ease);
}
.testi-card:hover { transform: translateY(-8px); border-color: rgba(148, 163, 255, 0.35); }
.testi-card .stars { color: #fbbf24; margin-bottom: 14px; }
.testi-card p { color: #c6cdee; font-size: 15px; line-height: 2; }
.testi-card .who { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.testi-card .who .av {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--d-gradient);
  color: #fff; font-weight: 800; font-size: 15px;
}
.testi-card .who b { display: block; font-size: 14px; }
.testi-card .who span { color: var(--d-muted); font-size: 12px; }
@media (max-width: 960px) { .testi-grid { grid-template-columns: 1fr; } }

/* ---------- Pricing ---------- */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; align-items: stretch; }
.price-card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 38px 30px;
  background: var(--d-surface);
  border: 1px solid var(--d-border);
  display: flex;
  flex-direction: column;
  transition: transform .4s var(--ease), border-color .4s var(--ease);
}
.price-card.popular {
  border-color: transparent;
  background: linear-gradient(160deg, rgba(102,126,234,.16), rgba(155,107,240,.08)) padding-box,
              var(--d-gradient) border-box;
  transform: scale(1.04);
  box-shadow: 0 30px 80px rgba(102, 126, 234, 0.28);
}
.price-card .tag {
  position: absolute; top: -13px; inset-inline-start: 50%;
  transform: translateX(-50%);
  background: var(--d-gradient);
  color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 5px 16px;
  border-radius: 100px;
}
.price-card h3 { font-size: 17px; font-weight: 700; }
.price-card .amount { font-size: 44px; font-weight: 900; margin: 14px 0 4px; }
.price-card .amount small { font-size: 14px; color: var(--d-muted); font-weight: 500; }
.price-card ul { list-style: none; margin: 22px 0 28px; padding: 0; flex: 1; }
.price-card ul li { padding: 9px 0; color: #c6cdee; font-size: 14px; display: flex; align-items: center; gap: 10px; }
.price-card ul li::before { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; color: var(--d-mint); font-size: 13px; }
.price-card ul li.no::before { content: '\f00d'; color: #f87171; }
@media (max-width: 900px) { .price-grid { grid-template-columns: 1fr; } .price-card.popular { transform: none; } }

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.faq-item {
  border-radius: var(--radius-md);
  background: var(--d-surface);
  border: 1px solid var(--d-border);
  overflow: hidden;
  transition: border-color .3s var(--ease);
}
.faq-item.open { border-color: rgba(148, 163, 255, 0.4); }
.faq-q {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--d-text);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  text-align: right;
}
.faq-q .fa { transition: transform .35s var(--ease); color: var(--d-accent); }
.faq-item.open .fa-chevron-down { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .4s var(--ease); }
.faq-a p { padding: 0 22px 22px; color: var(--d-muted); font-size: 14px; margin: 0; }

/* ---------- CTA ---------- */
.cta-band {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 70px 50px;
  text-align: center;
  overflow: hidden;
  background: var(--d-gradient);
}
.cta-band::before {
  content: '';
  position: absolute;
  inset: -40%;
  background: repeating-linear-gradient(45deg, transparent 0 24px, rgba(255,255,255,.05) 24px 48px);
}
.cta-band h2 { font-size: clamp(26px, 3vw, 40px); font-weight: 800; color: #fff; position: relative; }
.cta-band p { color: rgba(255,255,255,.85); margin: 14px auto 30px; max-width: 520px; position: relative; }
.cta-band .btn-white {
  position: relative;
  background: #fff; color: #4f46e5;
}
.cta-band .btn-white:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(0,0,0,.25); color: #4f46e5; }

/* ---------- Footer ---------- */
.footer-modern { border-top: 1px solid var(--d-border); padding: 80px 0 0; background: var(--d-bg-2); }
.footer-modern .f-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 50px; }
.footer-modern h4 { font-size: 15px; font-weight: 700; margin-bottom: 18px; }
.footer-modern ul { list-style: none; margin: 0; padding: 0; }
.footer-modern ul li { margin-bottom: 12px; }
.footer-modern ul a { color: var(--d-muted); font-size: 14px; }
.footer-modern ul a:hover { color: #fff; }
.footer-modern p { color: var(--d-muted); font-size: 14px; }
.footer-modern .f-social { display: flex; gap: 10px; margin-top: 20px; }
.footer-modern .f-social a {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(148,163,255,.1);
  border: 1px solid var(--d-border);
  color: var(--d-muted);
  transition: all .3s var(--ease);
}
.footer-modern .f-social a:hover { background: var(--d-gradient); color: #fff; transform: translateY(-3px); }
.footer-modern .f-bottom {
  border-top: 1px solid var(--d-border);
  padding: 24px 0;
  color: var(--d-muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
@media (max-width: 860px) { .footer-modern .f-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-modern .f-grid { grid-template-columns: 1fr; } }

/* ---------- Scroll reveal animations ---------- */
.reveal, .reveal-up, .reveal-left, .reveal-right, .reveal-scale {
  opacity: 0;
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: calc(var(--reveal-delay, 0) * 70ms);
  will-change: opacity, transform;
}
.reveal { transform: translateY(28px); }
.reveal-up { transform: translateY(48px); }
.reveal-left { transform: translateX(48px); }
.reveal-right { transform: translateX(-48px); }
.reveal-scale { transform: scale(0.92); }
.in-view { opacity: 1; transform: none; }

/* ---------- Keyframes ---------- */
@keyframes float-orb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -50px) scale(1.15); }
}
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ---------- Marquee ---------- */
.marquee-wrap { overflow: hidden; position: relative; }
.marquee-track { display: flex; gap: 40px; width: max-content; animation: marquee 26s linear infinite; }
.marquee-wrap:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(50%); } }
[dir="rtl"] .marquee-track { animation: marquee-rtl 26s linear infinite; }
@keyframes marquee-rtl { to { transform: translateX(-50%); } }

/* ---------- Light / App area overrides ---------- */
.app-shell {
  background: var(--l-bg);
  color: var(--l-text);
  min-height: 100vh;
  font-family: var(--font);
  display: flex;
  flex-direction: column;
}
.app-shell .gradient-text { background: var(--l-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }

/* ---------- App topbar ---------- */
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--l-border);
}
.app-topbar .container { min-height: 66px; }
.app-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--l-text); font-weight: 800; font-size: 18px; }
.app-brand img { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; }
.app-nav li a {
  color: #475569; font-weight: 600; font-size: 14px; text-decoration: none;
  padding: 8px 14px; border-radius: 10px; transition: all .25s var(--ease);
}
.app-nav li a:hover { color: var(--l-primary); background: rgba(79, 70, 229, 0.08); }
.btn-app {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: 100px; font-size: 13px; font-weight: 700;
  text-decoration: none; transition: all .25s var(--ease); border: none; cursor: pointer;
}
.btn-app-ghost { background: #f1f5f9; color: #475569; }
.btn-app-ghost:hover { background: #e2e8f0; color: var(--l-text); }
.btn-app-danger { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; }
.btn-app-danger:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3); }

.app-mobile-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 16px;
  background: #fff;
  border-bottom: 1px solid var(--l-border);
}
.app-mobile-nav a {
  white-space: nowrap;
  font-size: 13px; font-weight: 600; color: #475569;
  text-decoration: none;
  background: #f1f5f9; padding: 7px 14px; border-radius: 100px;
  transition: all .25s var(--ease);
}
.app-mobile-nav a:hover { background: rgba(79, 70, 229, 0.1); color: var(--l-primary); }

.app-main { flex: 1; }

.app-footer {
  border-top: 1px solid var(--l-border);
  background: #fff;
  padding: 20px 0;
  color: #94a3b8;
  font-size: 13px;
  margin-top: 40px;
}

.app-card {
  background: var(--l-surface);
  border: 1px solid var(--l-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.app-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 24px; border-radius: 100px;
  font-weight: 700; font-size: 14px; border: none; cursor: pointer;
  background: var(--l-gradient); color: #fff;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.app-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(79, 70, 229, 0.3); color: #fff; }
.app-btn.ghost { background: var(--l-surface); color: var(--l-primary); border: 1px solid var(--l-border); }
.app-btn.ghost:hover { border-color: var(--l-primary); color: var(--l-primary); }
.app-btn.danger { background: linear-gradient(135deg, #ef4444, #dc2626); }
.app-btn.success { background: linear-gradient(135deg, #10b981, #059669); }

/* Utility */
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }

/* ============================================================
   DAY / NIGHT THEME
   Default = dark (matches system via pre-paint script).
   html[data-theme="light"] switches the landing to light,
   html[data-theme="dark"] switches app areas to dark.
   ============================================================ */

/* ---------- Theme toggle button ---------- */
.theme-toggle {
  position: relative;
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid var(--d-border);
  background: rgba(148, 163, 255, 0.08);
  color: var(--d-text);
  font-size: 17px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease);
}
.theme-toggle:hover { border-color: rgba(148, 163, 255, 0.45); background: rgba(148, 163, 255, 0.16); transform: translateY(-2px); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline-flex; }
html[data-theme="light"] .theme-toggle { border-color: var(--l-border); background: #fff; color: #475569; box-shadow: var(--shadow-sm); }
html[data-theme="light"] .theme-toggle .icon-sun { display: inline-flex; }
html[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* ---------- Background images (hero + sections) ---------- */
.bg-hero-1 { background-image: url('../images/backgrounds/bg-2.jpg'); }
.bg-hero-2 { background-image: url('../images/backgrounds/bg-3.jpg'); }
.bg-hero-3 { background-image: url('../images/backgrounds/bg-4.jpg'); }
.bg-hero-4 { background-image: url('../images/backgrounds/bg-1.jpg'); }

.hero-modern {
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(102, 126, 234, 0.5), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(155, 107, 240, 0.42), transparent 60%),
    linear-gradient(rgba(7, 11, 22, 0.72), rgba(7, 11, 22, 0.82)),
    url('../images/backgrounds/bg-2.jpg') center / cover no-repeat;
}

html[data-theme="light"] {
  /* Landing tokens → light */
  --d-bg: #f4f6fb;
  --d-bg-2: #eef0ff;
  --d-surface: #ffffff;
  --d-surface-2: #eef1ff;
  --d-border: rgba(79, 70, 229, 0.14);
  --d-text: #171c2e;
  --d-muted: #5b6478;
  --d-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 60%, #2563eb 110%);
  --shadow-sm: 0 2px 10px rgba(30, 41, 82, 0.06);
  --shadow-md: 0 10px 34px rgba(30, 41, 82, 0.1);
  --shadow-lg: 0 24px 70px rgba(30, 41, 82, 0.14);

  /* App tokens stay light */
  --l-bg: #f4f6fb;
  --l-surface: #ffffff;
  --l-border: #e6eaf4;
  --l-text: #171c2e;
  --l-muted: #6c7693;
  --l-primary: #4f46e5;
  --l-primary-2: #7c3aed;
  --l-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);

  /* Landing background with light overlay */
}
html[data-theme="light"] body { background: var(--d-bg); color: var(--d-text); }
html[data-theme="light"] .hero-modern {
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(102, 126, 234, 0.22), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(155, 107, 240, 0.18), transparent 60%),
    linear-gradient(rgba(244, 246, 251, 0.82), rgba(244, 246, 251, 0.9)),
    url('../images/backgrounds/bg-2.jpg') center / cover no-repeat;
}
html[data-theme="light"] .hero-badge { color: var(--l-primary); border-color: rgba(79, 70, 229, 0.35); background: rgba(79, 70, 229, 0.08); }
html[data-theme="light"] .hero-badge .dot { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2); }
html[data-theme="light"] .hero-stat b { color: var(--l-text); }
html[data-theme="light"] .eyebrow-pill { color: var(--l-primary); border-color: rgba(79, 70, 229, 0.35); background: rgba(79, 70, 229, 0.08); }

html[data-theme="light"] .nav-modern.scrolled { background: rgba(255, 255, 255, 0.82); border-bottom: 1px solid var(--l-border); box-shadow: 0 12px 40px rgba(30, 41, 82, 0.1); }
html[data-theme="light"] .nav-brand { color: var(--l-text); }
html[data-theme="light"] .nav-links a { color: var(--l-muted); }
html[data-theme="light"] .nav-links a:hover { color: var(--l-text); background: rgba(79, 70, 229, 0.08); }
html[data-theme="light"] .nav-links a.active { color: var(--l-primary); background: rgba(79, 70, 229, 0.12); }
html[data-theme="light"] .nav-burger { border-color: var(--l-border); background: #fff; color: var(--l-text); }
html[data-theme="light"] .mobile-menu { background: rgba(255, 255, 255, 0.97); }
html[data-theme="light"] .mobile-menu a { color: var(--l-text); }
html[data-theme="light"] .mobile-menu a:hover { color: var(--l-primary); }
html[data-theme="light"] .mobile-menu .close-mobile { border-color: var(--l-border); color: var(--l-text); }

html[data-theme="light"] .btn-ghost { background: #fff; color: var(--l-text); border-color: var(--l-border); }
html[data-theme="light"] .btn-ghost:hover { color: var(--l-primary); border-color: rgba(79, 70, 229, 0.4); background: rgba(79, 70, 229, 0.06); }
html[data-theme="light"] .btn-gradient { color: #fff; }
html[data-theme="light"] .gradient-text { background: var(--l-gradient); -webkit-background-clip: text; background-clip: text; }

html[data-theme="light"] .hero-visual .glass-panel { background: rgba(255, 255, 255, 0.72); border-color: var(--l-border); box-shadow: 0 40px 90px rgba(30, 41, 82, 0.14); }
html[data-theme="light"] .hero-visual .glass-panel .bar { background: rgba(79, 70, 229, 0.12); }
html[data-theme="light"] .hero-visual .glass-panel .mini-card { background: linear-gradient(135deg, #eef1ff, #e0e7ff); border-color: rgba(79, 70, 229, 0.12); }
html[data-theme="light"] .float-chip { background: rgba(255, 255, 255, 0.9); border-color: var(--l-border); color: var(--l-text); box-shadow: var(--shadow-md); }

html[data-theme="light"] .feature-card { background: #fff; border-color: var(--l-border); }
html[data-theme="light"] .feature-card:hover { border-color: rgba(79, 70, 229, 0.35); box-shadow: 0 24px 60px rgba(30, 41, 82, 0.12); }
html[data-theme="light"] .feature-card p { color: var(--l-muted); }
html[data-theme="light"] .step-card { background: var(--l-surface); border-color: var(--l-border); }
html[data-theme="light"] .step-card .num { color: var(--l-primary); }
html[data-theme="light"] .step-card p { color: var(--l-muted); }
html[data-theme="light"] .stats-band { background: linear-gradient(160deg, #fff, #eef0ff); border-color: var(--l-border); }
html[data-theme="light"] .stats-band .s span { color: var(--l-muted); }
html[data-theme="light"] .tpl-card { background: var(--l-surface); border-color: var(--l-border); }
html[data-theme="light"] .tpl-card:hover { box-shadow: 0 30px 70px rgba(30, 41, 82, 0.14); }
html[data-theme="light"] .tpl-card .tpl-body p { color: var(--l-muted); }
html[data-theme="light"] .tpl-card .tpl-foot { border-top-color: var(--l-border); color: var(--l-muted); }
html[data-theme="light"] .tpl-thumb::after { background: linear-gradient(0deg, #fff, transparent 55%); }
html[data-theme="light"] .tpl-overlay { background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(15, 23, 42, 0.55) 100%); }
html[data-theme="light"] .testi-card { background: var(--l-surface); border-color: var(--l-border); }
html[data-theme="light"] .testi-card p { color: var(--l-text); }
html[data-theme="light"] .testi-card .who span { color: var(--l-muted); }
html[data-theme="light"] .price-card { background: var(--l-surface); border-color: var(--l-border); }
html[data-theme="light"] .price-card ul li { color: var(--l-text); }
html[data-theme="light"] .faq-item { background: var(--l-surface); border-color: var(--l-border); }
html[data-theme="light"] .faq-a p { color: var(--l-muted); }
html[data-theme="light"] .footer-modern { background: var(--l-bg-2, #eef0ff); }
html[data-theme="light"] .footer-modern ul a:hover { color: var(--l-text); }
html[data-theme="light"] .footer-modern .f-social a { background: #fff; border-color: var(--l-border); color: var(--l-muted); }
html[data-theme="light"] .client-marquee { border-block-color: var(--l-border); }

/* ---------- App areas in dark mode ---------- */
html[data-theme="dark"] {
  --l-bg: #0d1326;
  --l-surface: #141a33;
  --l-border: rgba(148, 163, 255, 0.14);
  --l-text: #eef1ff;
  --l-muted: #97a0c8;
  --l-primary: #667eea;
  --l-primary-2: #9b6bf0;
  --l-gradient: linear-gradient(135deg, #667eea 0%, #9b6bf0 100%);
}
html[data-theme="dark"] .app-shell { background: var(--l-bg); color: var(--l-text); }
html[data-theme="dark"] .app-topbar { background: rgba(13, 19, 38, 0.85); border-bottom-color: var(--l-border); }
html[data-theme="dark"] .app-brand { color: var(--l-text); }
html[data-theme="dark"] .app-nav li a { color: var(--l-muted); }
html[data-theme="dark"] .app-nav li a:hover { color: var(--l-text); background: rgba(102, 126, 234, 0.14); }
html[data-theme="dark"] .btn-app-ghost { background: var(--l-surface); color: var(--l-muted); }
html[data-theme="dark"] .btn-app-ghost:hover { background: var(--l-surface-2, #1a2342); color: var(--l-text); }
html[data-theme="dark"] .app-mobile-nav { background: var(--l-surface); border-bottom-color: var(--l-border); }
html[data-theme="dark"] .app-mobile-nav a { background: var(--l-surface-2, #1a2342); color: var(--l-muted); }
html[data-theme="dark"] .app-mobile-nav a:hover { color: var(--l-primary); background: rgba(102, 126, 234, 0.14); }
html[data-theme="dark"] .app-footer { background: var(--l-surface); border-top-color: var(--l-border); color: var(--l-muted); }
html[data-theme="dark"] .app-card { background: var(--l-surface); border-color: var(--l-border); }
html[data-theme="dark"] .app-btn.ghost { background: var(--l-surface); color: var(--l-primary); border-color: var(--l-border); }
html[data-theme="dark"] .app-btn.ghost:hover { border-color: var(--l-primary); }
html[data-theme="light"] .app-shell { background: var(--l-bg); color: var(--l-text); }

/* Theme-aware section backgrounds (bg-1 dark / bg-3 light for templates, bg-2 dark / bg-4 light for cta) */
.section-bg-templates {
  background:
    linear-gradient(rgba(7, 11, 22, 0.78), rgba(7, 11, 22, 0.86)),
    url('../images/backgrounds/bg-1.jpg') center / cover no-repeat;
}
html[data-theme="light"] .section-bg-templates {
  background:
    linear-gradient(rgba(238, 240, 255, 0.85), rgba(244, 246, 251, 0.92)),
    url('../images/backgrounds/bg-3.jpg') center / cover no-repeat;
}
.section-bg-cta {
  background:
    linear-gradient(rgba(7, 11, 22, 0.8), rgba(7, 11, 22, 0.85)),
    url('../images/backgrounds/bg-2.jpg') center / cover no-repeat;
}
html[data-theme="light"] .section-bg-cta {
  background:
    linear-gradient(rgba(238, 240, 255, 0.88), rgba(244, 246, 251, 0.94)),
    url('../images/backgrounds/bg-4.jpg') center / cover no-repeat;
}

/* Keep hero grid/orbs above the background image */
.hero-modern .hero-bg-grid,
.hero-modern .hero-orb { z-index: 0; }
.hero-modern .container { position: relative; z-index: 1; }

/* ============================================================
   AUTH PAGES (ورود / ثبت‌نام) — theme aware
   ============================================================ */
html[data-theme="dark"] .login-container,
html[data-theme="dark"] .register-container { background: linear-gradient(135deg, #0d1226 0%, #151a38 100%); }
html[data-theme="dark"] .login-wrapper,
html[data-theme="dark"] .register-wrapper,
html[data-theme="dark"] .login-panel,
html[data-theme="dark"] .register-panel { background: #141a33; color: #eef1ff; box-shadow: 0 10px 40px rgba(2, 6, 18, 0.6); }
html[data-theme="dark"] .login-header h2,
html[data-theme="dark"] .register-header h2 { color: #eef1ff; }
html[data-theme="dark"] .login-header p,
html[data-theme="dark"] .register-header p { color: #97a0c8; }
html[data-theme="dark"] .login-header .keystone-logo,
html[data-theme="dark"] .register-header .keystone-logo { background: #1a2145; border-color: rgba(148, 163, 255, 0.2); }
html[data-theme="dark"] .form-group label,
html[data-theme="dark"] .register-form label { color: #c6cdee; }
html[data-theme="dark"] .input-container input,
html[data-theme="dark"] .register-input,
html[data-theme="dark"] .form-control {
  background: #1a2145;
  border-color: rgba(148, 163, 255, 0.2);
  color: #eef1ff;
}
html[data-theme="dark"] .input-container input:focus,
html[data-theme="dark"] .register-input:focus,
html[data-theme="dark"] .form-control:focus { background: #202950; border-color: #667eea; box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2); }
html[data-theme="dark"] .input-container input::placeholder,
html[data-theme="dark"] .register-input::placeholder { color: #5b6478; }
html[data-theme="dark"] .input-container .input-icon,
html[data-theme="dark"] .input-container .toggle-password { color: #97a0c8; }
html[data-theme="dark"] .remember-me,
html[data-theme="dark"] .register-remember { color: #c6cdee; }
html[data-theme="dark"] .login-footer,
html[data-theme="dark"] .register-footer { color: #97a0c8; }
html[data-theme="dark"] .header-btn,
html[data-theme="dark"] .home-btn { background: #1a2145; border-color: rgba(148, 163, 255, 0.2); color: #a5b4fc; }
html[data-theme="dark"] .header-btn:hover { background: #4f46e5; color: #fff; }
html[data-theme="dark"] .form-text.text-muted { color: #97a0c8 !important; }
html[data-theme="dark"] .login-message.success { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; border-color: rgba(16, 185, 129, 0.3); }
html[data-theme="dark"] .login-message.error { background: rgba(239, 68, 68, 0.15); color: #fca5a5; border-color: rgba(239, 68, 68, 0.3); }
html[data-theme="dark"] .error-input { background: rgba(239, 68, 68, 0.1) !important; }
html[data-theme="dark"] .login-side-image::before { background: linear-gradient(135deg, rgba(13, 18, 38, 0.85), rgba(30, 27, 75, 0.9)); }
html[data-theme="light"] .login-container,
html[data-theme="light"] .register-container { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
html[data-theme="light"] .login-wrapper,
html[data-theme="light"] .register-wrapper { background: #fff; }
