/* =========================================================
   CVSaz Landing — Design Tokens harmonized with Login.php
   ========================================================= */
:root {
  --bg-body: #f3f4f6;
  --bg-card: #ffffff;
  --text-main: #111827;
  --text-muted: #6b7280;
  --border-color: #e5e7eb;
  --input-bg: #f9fafb;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --brand-50: #eef2ff;
  --brand-100: #e0e7ff;
  
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 25px 50px -12px rgba(0,0,0,0.15);

  --bg: var(--bg-body);
  --surface: var(--bg-card);
  --border: var(--border-color);
  --ink-900: var(--text-main);
  --ink-700: var(--text-muted);
  --ink-600: var(--text-muted);
  --ink-400: #9ca3af;
  --ink-200: #d1d5db;
  --brand-900: #312e81;
  --brand-700: var(--primary-hover);
  --brand-600: var(--primary);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 999px;
  --container-w: 1200px;
  --font-base: 'Inter', 'Vazirmatn', Tahoma, sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark {
  --bg-body: #111827;
  --bg-card: #1f2937;
  --text-main: #ffffff;
  --text-muted: #9ca3af;
  --border-color: #374151;
  --input-bg: #374151;
  --primary: #4f46e5;
  --primary-hover: #6366f1;
  --brand-50: rgba(79, 70, 229, 0.15);
  --brand-100: rgba(79, 70, 229, 0.25);

  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 25px 50px -12px rgba(0,0,0,0.6);
  
  --ink-400: #6b7280;
  --ink-200: #4b5563;
  --brand-900: #e0e7ff;
}

html[dir="rtl"] body {
  font-family: "Vazirmatn", Tahoma, var(--font-base);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* رفع مشکل اسکرول دوگانه: width 100% و overflow-x در html حذف شد */
body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font-base);
  color: var(--ink-700);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s, color 0.3s;
}

h1, h2, h3 { color: var(--ink-900); margin: 0 0 .5em; line-height: 1.2; font-weight: 800; }
p { margin: 0; color: var(--ink-600); }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
svg { width: 20px; height: 20px; }

:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 2px; }

.container { max-width: var(--container-w); margin-inline: auto; padding-inline: 24px; }
.container-narrow { max-width: 760px; }

section { padding-block: 88px; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.section-head p { font-size: 1.05rem; }
.section-head.center { max-width: 640px; margin-inline: auto; text-align: center; }
.section-head.row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--radius-full); font-weight: 700; white-space: nowrap;
  border: 1px solid transparent; transition: var(--transition);
  padding: 12px 22px; font-size: .95rem;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-sm { padding: 9px 18px; font-size: .85rem; }
.btn-xs { padding: 7px 14px; font-size: .78rem; }
.btn-lg { padding: 15px 28px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--brand-600); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-700); }
.btn-ghost { background: var(--surface); color: var(--ink-700); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--ink-400); color: var(--ink-900); }
.btn-outline { background: transparent; color: var(--brand-600); border-color: var(--brand-600); }
.btn-outline:hover { background: var(--brand-50); }
.btn-white { background: #fff; color: #111827; }
.btn-white:hover { background: var(--brand-50); }
.btn-outline-white { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-outline-white:hover { background: rgba(255,255,255,.12); }

/* =========================================================
   Header & Theme Toggle
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface); opacity: 0.95; backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.3s, border-color 0.3s;
}
.header-inner { display: flex; align-items: center; gap: 24px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--ink-900); margin-inline-end: auto; }
.brand-mark { width: 32px; height: 32px; }
.main-nav { display: flex; align-items: center; gap: 28px; font-weight: 600; font-size: .92rem; color: var(--ink-700); }
.main-nav a:hover { color: var(--brand-600); }
.header-actions { display: flex; align-items: center; gap: 16px; margin-inline-start: auto; }
.link-signin { font-weight: 600; font-size: .9rem; color: var(--ink-700); }
.link-signin:hover { color: var(--brand-600); }

/* Theme Toggle Button */
.icon-btn {
  background: var(--surface); border: 1px solid var(--border); color: var(--text-main);
  border-radius: 0.5rem; padding: 0.5rem; cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: var(--bg); }
.dark .sun-icon { display: block; }
.dark .moon-icon { display: none; }
.sun-icon { display: none; }
.moon-icon { display: block; }

.lang-switch { display: flex; border: 1px solid var(--border); border-radius: var(--radius-full); padding: 3px; background: var(--surface); }
.lang-btn { border: 0; background: transparent; padding: 5px 12px; border-radius: var(--radius-full); font-size: .78rem; font-weight: 700; color: var(--ink-400); cursor: pointer; transition: var(--transition); }
.lang-btn:hover { color: var(--ink-900); }
.lang-btn.is-active { background: var(--brand-600); color: #fff; }

.nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: 0; padding: 8px; }
.nav-toggle span { width: 20px; height: 2px; background: var(--ink-700); border-radius: 2px; }

/* =========================================================
   Scroll Reveal Animation
   ========================================================= */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}
.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   Hero & Device Animations
   ========================================================= */
.hero { padding-top: 64px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.hero-copy h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); letter-spacing: -.02em; }
.hero-sub { font-size: 1.1rem; margin-block: 20px 28px; max-width: 46ch; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.parallax-container { position: relative; perspective: 1200px; }
.glow { position: absolute; inset: -15% 0 0 10%; background: radial-gradient(circle, var(--brand-500) 0%, transparent 65%); filter: blur(75px); opacity: .25; z-index: 0; pointer-events: none; }

.parallax-element {
  position: relative; z-index: 1; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; width: 100%; max-width: 100%;
  transform-style: preserve-3d; transform: rotateX(8deg) rotateY(-12deg);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ATS Scanner Laser */
.scanner-line {
  position: absolute; top: 0; left: 0; width: 100%; height: 3px;
  background: var(--brand-600); box-shadow: 0 0 20px var(--brand-600), 0 0 8px var(--brand-600);
  z-index: 10; animation: scan-down 3s cubic-bezier(0.4, 0, 0.2, 1) infinite; opacity: 0.8;
}
@keyframes scan-down {
  0% { top: -10%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 110%; opacity: 0; }
}

.device-bar { display: flex; gap: 6px; padding: 12px 16px; background: var(--bg); border-bottom: 1px solid var(--border); }
.device-bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-200); }
.device-body { padding: 32px; display: flex; flex-direction: column; gap: 24px; position: relative; }

/* Modern CV Layout Components inside Device */
.cv-header-modern { display: flex; align-items: center; gap: 16px; }
.cv-photo { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-600), var(--brand-900)); flex-shrink: 0; }
.cv-title-group { display: flex; flex-direction: column; gap: 4px; }
.cv-name { font-weight: 800; color: var(--ink-900); font-size: 1.15rem; }
.cv-role { font-weight: 600; color: var(--brand-600); font-size: 0.85rem; }

.cv-section { display: flex; flex-direction: column; gap: 10px; }
.cv-shimmer-line {
  height: 10px; border-radius: 5px;
  background: linear-gradient(90deg, var(--input-bg) 25%, var(--border-color) 50%, var(--input-bg) 75%);
  background-size: 200% 100%; animation: shimmer-load 2s infinite linear;
}
.w-100 { width: 100%; } .w-90 { width: 90%; } .w-80 { width: 80%; } .w-70 { width: 70%; } .w-60 { width: 60%; }

.cv-skill-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.cv-skill-chips span { padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; background: var(--brand-50); color: var(--brand-600); font-weight: 700; }

/* AI Assistant Popups and Text Glow */
.ai-suggestion-box {
  position: absolute; top: 15%; right: -25px; background: var(--brand-600); color: #fff;
  padding: 12px 18px; border-radius: 12px; font-size: 0.85rem; font-weight: 600;
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 8px;
  animation: float 3s ease-in-out infinite; z-index: 10;
}
[dir="rtl"] .ai-suggestion-box { right: auto; left: -25px; }
.cv-text-glow {
  color: var(--ink-900); font-size: 0.9rem; padding: 12px 16px; 
  border-inline-start: 4px solid var(--brand-600); background: var(--brand-50); 
  font-weight: 600; border-radius: 8px; box-shadow: 0 0 15px var(--brand-50);
}

@keyframes shimmer-load { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Floating Badges with synchronized 3D Z-translation */
.parallax-float { transform: rotateX(8deg) rotateY(-12deg) translateZ(40px); transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.floating-badge {
  position: absolute; display: flex; align-items: center; gap: 6px; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-md);
  border-radius: var(--radius-full); padding: 9px 16px; font-size: .8rem; font-weight: 700; color: var(--ink-700); z-index: 2; pointer-events: none;
}
.floating-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-600); flex-shrink: 0; }
.fb-1 { top: 14%; inset-inline-start: -8%; }
.fb-2 { top: 38%; inset-inline-end: -10%; }
.fb-3 { top: 14%; inset-inline-end: 2%; }
.fb-4 { bottom: 22%; inset-inline-end: -8%; }
.fb-5 { bottom: 6%; inset-inline-start: 6%; }

.fb-a1{ top:6%; inset-inline-start:-6%; }
.fb-a2{ top:30%; inset-inline-end:-10%; }
.fb-a3{ top:52%; inset-inline-start:-10%; }
.fb-a4{ bottom:16%; inset-inline-end:-6%; }
.fb-a5{ bottom:-4%; inset-inline-start:14%; }

/* =========================================================
   Proof strip
   ========================================================= */
.proof { padding-block: 48px; }
.proof-heading { text-align: center; font-weight: 700; color: var(--ink-400); margin-bottom: 28px; font-size: .95rem; }
.proof-list { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; font-weight: 700; color: var(--ink-400); font-size: 1.05rem; }

/* =========================================================
   Stats
   ========================================================= */
.stats { padding-block: 24px 12px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 26px; text-align: center; transition: var(--transition); }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--brand-600); }
.stat-label { font-size: .88rem; color: var(--ink-600); margin-top: 6px; }

/* =========================================================
   Features
   ========================================================= */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 26px; transition: var(--transition); }
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.feature-icon { width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--brand-100); display: flex; align-items: center; justify-content: center; color: var(--brand-600); margin-bottom: 16px; transition: var(--transition); }
.feature-card:hover .feature-icon { background: var(--brand-600); color: #fff; }
.feature-icon svg { width: 22px; height: 22px; }
.feature-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.feature-card p { font-size: .92rem; }

/* =========================================================
   AI Assistant
   ========================================================= */
.assistant { background: var(--surface); }
.assistant-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.assistant-copy h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.assistant-copy p { font-size: 1.05rem; max-width: 42ch; }

/* =========================================================
   Templates
   ========================================================= */
.carousel-controls { display: flex; gap: 10px; }
.carousel-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--ink-700); display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.carousel-btn:hover { background: var(--brand-50); color: var(--brand-600); }
.templates-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.template-card { scroll-snap-align: start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; transition: var(--transition); }
.template-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--brand-600); }
.template-thumb { aspect-ratio: 3/4; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.t-minimal { background: var(--bg); }
.t-executive { background: linear-gradient(180deg, var(--brand-50), var(--bg)); }
.t-creative { background: var(--brand-50); }
.t-technical { background: var(--bg); }
.t-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-600); margin-bottom: 4px; }
.t-line { height: 7px; border-radius: 3px; background: var(--ink-200); }
.template-foot { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-top: 1px solid var(--border); font-weight: 700; font-size: .9rem; }

/* =========================================================
   How it works
   ========================================================= */
.how-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative; }
.how-grid::before { content: ""; position: absolute; top: 20px; inset-inline: 12%; height: 2px; background: var(--border); z-index: 0; }
.how-step { position: relative; z-index: 1; text-align: center; }
.how-num { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--brand-600); color: #fff; font-weight: 800; margin: 0 auto 16px; }
.how-step h3 { font-size: 1rem; }
.how-step p { font-size: .88rem; }

/* =========================================================
   Pricing
   ========================================================= */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; }
.pricing-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px 28px; transition: var(--transition); }
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.pricing-card.is-popular { border-color: var(--brand-600); box-shadow: var(--shadow-lg); }
.popular-badge { position: absolute; top: -13px; inset-inline-start: 28px; background: var(--brand-600); color: #fff; font-size: .72rem; font-weight: 800; padding: 5px 14px; border-radius: var(--radius-full); }
.pricing-card h3 { font-size: 1.1rem; }
.price { display: flex; align-items: baseline; gap: 6px; margin-block: 6px 22px; }
.price span { font-size: 2.4rem; font-weight: 800; color: var(--ink-900); }
.price small { color: var(--ink-400); font-weight: 600; }
.pricing-feat { display: flex; flex-direction: column; gap: 12px; margin-bottom: 26px; }
.pricing-feat li { display: flex; align-items: center; gap: 10px; font-size: .92rem; color: var(--ink-700); }
.pricing-feat svg { width: 18px; height: 18px; color: var(--brand-600); flex-shrink: 0; }

/* =========================================================
   Benefits
   ========================================================= */
.benefits { background: var(--surface); }
.benefits-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.benefit-card { padding: 8px; }
.benefit-card h3 { font-size: 1.05rem; }
.benefit-card p { font-size: .92rem; }

/* =========================================================
   FAQ
   ========================================================= */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); }
.faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: none; border: 0; padding: 18px 22px; font-weight: 700; font-size: .98rem; color: var(--ink-900); text-align: start; }
.faq-q .chev { transition: transform .25s ease; color: var(--ink-400); flex-shrink: 0; }
.faq-item.is-open .faq-q .chev { transform: rotate(180deg); color: var(--brand-600); }
.faq-a-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.faq-item.is-open .faq-a-wrap { grid-template-rows: 1fr; }
.faq-a-inner { overflow: hidden; }
.faq-a-inner p { padding: 0 22px 20px; font-size: .92rem; }

/* =========================================================
   CTA banner
   ========================================================= */
.cta-banner { background: linear-gradient(120deg, var(--brand-900), var(--brand-600)); }
.cta-inner { text-align: center; }
.cta-banner h2 { color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.cta-banner p { color: rgba(255,255,255,.82); font-size: 1.05rem; margin-top: 12px; }
.cta-buttons { display: flex; justify-content: center; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { padding-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 40px; }
.footer-brand p { font-size: .88rem; margin-block: 14px 18px; max-width: 32ch; }
.socials { display: flex; gap: 10px; }
.socials a { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--ink-600); transition: var(--transition); }
.socials a:hover { color: var(--brand-600); border-color: var(--brand-600); background: var(--bg); }
.socials svg { width: 16px; height: 16px; }
.footer-col { display: flex; flex-direction: column; gap: 12px; font-size: .9rem; }
.footer-col h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-400); margin-bottom: 4px; }
.footer-col a:hover { color: var(--brand-600); }
.text-link { font-weight: 700; color: var(--brand-600) !important; }
.footer-bottom { border-top: 1px solid var(--border); padding-block: 20px; font-size: .82rem; color: var(--ink-400); }

/* =========================================================
   Responsive Fixes
   ========================================================= */
@media (max-width: 980px) {
  .main-nav {
    display: none; position: absolute; top: 100%; inset-inline: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 24px 18px;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { width: 100%; padding: 10px 0; }
  .nav-toggle { display: flex; }
  .header-inner { position: relative; }
  .hero-grid, .assistant-grid { grid-template-columns: 1fr; }
  .assistant-visual { order: -1; }

  .features-grid, .pricing-grid, .benefits-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .how-grid { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
  .how-grid::before { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  section { padding-block: 56px; }
  
  /* مخفی کردن دکمه‌های اصلی و لینک ورود در هدر موبایل جهت جلوگیری از شکستگی و کاهش فاصله (gap) */
  .header-actions { gap: 8px; }
  .header-actions .link-signin,
  .header-actions .btn { display: none; }
  
  /* تبدیل 3 دکمه زبان به یک دکمه تعاملی (چرخشی) در موبایل */
  .lang-btn:not(.is-active) { display: none; }
  .lang-btn.is-active {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .lang-btn.is-active::after {
    content: "▼";
    font-size: 0.6rem;
  }
  
  .features-grid, .pricing-grid, .benefits-grid, .stats-grid, .how-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero-ctas, .cta-buttons { flex-direction: column; align-items: stretch; }
  .section-head.row { flex-direction: column; align-items: flex-start; }
  
  .floating-badge { display: none; }
  .ai-suggestion-box { right: 10px !important; left: 10px !important; margin: 0 auto; top: -20px; width: auto; max-width: 280px; justify-content: center; text-align: center; }
}