/* ═══════════════════════════════════════════════════════
   EmpireVPS — Shared Stylesheet
   ═══════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; }
body { margin: 0; }

:root {
  --bg: #fafafa;
  --bg-elev: #ffffff;
  --bg-subtle: #f4f4f5;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --text: #09090b;
  --text-muted: #52525b;
  --text-faint: #71717a;
  --accent: #0a0a0a;
  --accent-hover: #27272a;
  --brand: #2563eb;
  --brand-hover: #1d4ed8;
  --success: #10b981;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 1px 3px rgba(0,0,0,0.05), 0 4px 14px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 40px -10px rgba(0,0,0,0.1);
  --font-en: 'Inter', system-ui, sans-serif;
  --font-fa: 'Vazirmatn', 'Inter', system-ui, sans-serif;
  --font-zh: 'Noto Sans SC', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

body {
  font-family: var(--font-en);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 15px;
  overflow-x: hidden;
}
body[data-lang="fa"], body[data-lang="ar"] { font-family: var(--font-fa); }
body[data-lang="zh"] { font-family: var(--font-zh); }
body[dir="rtl"] { direction: rtl; text-align: right; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg { display: block; max-width: 100%; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ───── Promo bar ───── */
.promo {
  background: var(--text);
  color: #fafafa;
  font-size: 13px;
  padding: 9px 16px;
  text-align: center;
  letter-spacing: -0.01em;
}
.promo a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255,255,255,0.3);
  margin-inline-start: 6px;
  transition: text-decoration-color 0.2s;
}
.promo a:hover { text-decoration-color: #fff; }

/* ───── Nav ───── */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 250, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
nav.main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 32px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--text);
}
.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--text);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  font-family: var(--font-mono);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links li { position: relative; }
.nav-links > li > a, .nav-links > li > button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  transition: all 0.15s;
  white-space: nowrap;
}
.nav-links > li > a:hover, .nav-links > li > button:hover {
  color: var(--text);
  background: var(--bg-subtle);
}
.nav-links svg.chev { width: 12px; height: 12px; opacity: 0.6; }

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-start: 0;
  min-width: 320px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 0.18s ease;
}
.nav-links li:hover > .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.12s;
}
.dropdown-item:hover { background: var(--bg-subtle); }
.dropdown-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg-subtle);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--text);
}
.dropdown-icon svg { width: 18px; height: 18px; }
.dropdown-text { flex: 1; min-width: 0; }
.dropdown-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}
.flag {
  width: 14px;
  height: 10px;
  border-radius: 2px;
  object-fit: cover;
  display: inline-block;
}
.dropdown-desc {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 2px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lang-switch { position: relative; }
.lang-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: transparent;
  transition: all 0.15s;
}
.lang-button:hover { color: var(--text); border-color: var(--border-strong); }
.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-end: 0;
  min-width: 160px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 4px;
  display: none;
}
.lang-menu.open { display: block; }
.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-muted);
  transition: all 0.12s;
  text-align: start;
}
.lang-option:hover { background: var(--bg-subtle); color: var(--text); }
.lang-option.active { background: var(--bg-subtle); color: var(--text); font-weight: 600; }

/* ───── Buttons ───── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--text);
  color: #fafafa;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--bg-subtle); }
.btn-ghost { color: var(--text-muted); padding: 7px 12px; font-size: 13px; }
.btn-ghost:hover { color: var(--text); }
.btn-lg { padding: 13px 24px; font-size: 15px; }

.mobile-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  color: var(--text);
}
.mobile-toggle:hover { background: var(--bg-subtle); }

/* ───── Sections ───── */
section { padding: 80px 0; }
.section-head {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 56px;
}
.section-head .tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 16px;
}
body[data-lang="fa"] .section-head h2, body[data-lang="ar"] .section-head h2 { line-height: 1.35; }
.section-head p {
  font-size: 16px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* ───── Page Hero (smaller, for inner pages) ───── */
.page-hero {
  position: relative;
  padding: 80px 0 56px;
  overflow: hidden;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.page-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 100%;
  background-image: 
    linear-gradient(to right, rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 80%);
  pointer-events: none;
}
.page-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
}
.page-hero .eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.page-hero h1 {
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
  color: var(--text);
}
body[data-lang="fa"] .page-hero h1, body[data-lang="ar"] .page-hero h1 { line-height: 1.25; }
.page-hero p {
  font-size: 17px;
  color: var(--text-muted);
  margin: 0 auto;
  max-width: 560px;
  line-height: 1.6;
}

/* ───── Footer ───── */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand p {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 16px 0 20px;
  max-width: 280px;
  line-height: 1.6;
}
.footer-social { display: flex; gap: 8px; }
.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  transition: all 0.15s;
}
.footer-social a:hover { color: var(--text); border-color: var(--border-strong); background: var(--bg-elev); }
.footer-social svg { width: 16px; height: 16px; }
.footer-col h5 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin: 0 0 16px;
  font-weight: 600;
  font-family: var(--font-mono);
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col a {
  font-size: 13.5px;
  color: var(--text-muted);
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-bottom span { font-size: 13px; color: var(--text-faint); }
.footer-bottom .pay-methods {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-faint);
}
.pay-tag {
  padding: 3px 8px;
  border-radius: 5px;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.04em;
}

/* ───── Mobile menu ───── */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 100;
  display: none;
  flex-direction: column;
  padding: 24px;
}
.mobile-menu.open { display: flex; }
.mobile-menu-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}
.mobile-menu nav {
  flex-direction: column;
  align-items: stretch;
  height: auto;
  gap: 0;
  display: flex;
}
.mobile-menu a {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
  display: block;
}

/* ───── Animations ───── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { opacity: 0; animation: fadeUp 0.6s ease-out forwards; }
.fade-in:nth-child(1) { animation-delay: 0.05s; }
.fade-in:nth-child(2) { animation-delay: 0.1s; }
.fade-in:nth-child(3) { animation-delay: 0.15s; }
.fade-in:nth-child(4) { animation-delay: 0.2s; }

/* ───── Responsive ───── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  .nav-links, .nav-right .btn:not(.btn-primary) { display: none; }
  .mobile-toggle { display: inline-flex; }
  .page-hero { padding: 50px 0 40px; }
  section { padding: 56px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
