:root {
  --bg-base: oklch(14% 0.025 240);
  --bg-raised: oklch(17% 0.03 240);
  --bg-card: oklch(20% 0.035 240);
  --border: oklch(31% 0.035 240);
  --text-body: oklch(78% 0.025 240);
  --text-muted: oklch(58% 0.025 240);
  --text-head: oklch(96% 0.015 240);
  --accent: oklch(76% 0.165 82);
  --accent-dim: oklch(76% 0.165 82 / 0.15);
  --accent2: oklch(68% 0.14 220);
  --accent2-dim: oklch(68% 0.14 220 / 0.14);
  --radius: 12px;
  --container: 1180px;
  --nav-height: 78px;
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg-base);
  color: var(--text-body);
  font-family: Vazirmatn, Inter, system-ui, sans-serif;
  line-height: 1.8;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.container { width: min(var(--container), calc(100% - 48px)); margin: 0 auto; }
.section-pad { padding: 120px 0; position: relative; }

.ambient { position: fixed; pointer-events: none; border-radius: 50%; filter: blur(100px); opacity: 0.09; z-index: -1; }
.ambient-one { width: 420px; height: 420px; background: var(--accent2); top: 6%; right: -220px; }
.ambient-two { width: 320px; height: 320px; background: var(--accent); bottom: 18%; left: -190px; }

.site-header {
  height: var(--nav-height);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: oklch(14% 0.025 240 / 0.84);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nav-wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text-head); font-family: Inter, sans-serif; font-size: 1.35rem; font-weight: 900; letter-spacing: 1px; }
.brand img { width: 38px; height: 38px; object-fit: contain; }

.nav-links { display: flex; align-items: center; gap: 30px; color: var(--text-muted); font-size: 0.9rem; }
.nav-links a { transition: color 0.25s ease; padding: 6px 0; }
.nav-links a:hover { color: var(--accent); }

.nav-auth { padding: 9px 19px; border: 1px solid var(--accent); border-radius: 7px; color: var(--accent); font-size: 0.82rem; font-weight: 700; transition: 0.25s ease; white-space: nowrap; }
.nav-auth:hover { background: var(--accent); color: var(--bg-base); }
.mobile-auth { display: none; }

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 40px;
  height: 40px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  z-index: 110;
}
.menu-toggle span { display: block; width: 100%; height: 2px; background: var(--text-head); transition: transform 0.3s, opacity 0.3s; }

.eyebrow { display: inline-block; color: var(--accent); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 8px; }

h1, h2, h3, p { margin-top: 0; }
h1, h2 { color: var(--text-head); line-height: 1.35; }
h1 { max-width: 620px; margin: 18px 0; font-size: clamp(2.4rem, 5vw, 4.4rem); font-weight: 900; }
h2 { margin: 13px 0 12px; font-size: clamp(2rem, 4vw, 3.15rem); font-weight: 850; }
h1 em, h2 em { color: var(--accent); font-style: normal; }

.hero { min-height: calc(100vh - var(--nav-height)); display: flex; align-items: center; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 80px; align-items: center; direction: ltr; }
.hero-copy, .hero-visual-wrap { direction: rtl; }
.hero-lead { max-width: 570px; color: var(--text-body); font-size: 1.05rem; }

.hero-points { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 8px; color: var(--text-muted); font-size: 0.91rem; }
.hero-points li::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: 10px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 48px; padding: 10px 22px; border-radius: 7px; font-size: 0.88rem; font-weight: 700; transition: 0.3s ease; }
.btn span { font-size: 1.15rem; line-height: 1; }
.btn-primary { background: var(--accent); color: var(--bg-base); box-shadow: 0 0 28px oklch(76% 0.165 82 / 0.18); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 0 38px oklch(76% 0.165 82 / 0.3); }
.btn-ghost { border: 1px solid var(--border); color: var(--text-body); }
.btn-ghost:hover { border-color: var(--accent2); color: var(--accent2); }

.community-proof { display: flex; align-items: center; gap: 14px; margin-top: 34px; color: var(--text-muted); font-size: 0.8rem; }
.community-proof p { margin: 0; }
.community-proof strong { color: var(--text-head); }

.avatar-stack { display: flex; direction: ltr; }
.avatar-stack span { width: 29px; height: 29px; margin-left: -7px; display: grid; place-items: center; border: 2px solid var(--bg-base); border-radius: 50%; background: var(--accent2); color: var(--bg-base); font-size: 0.7rem; font-weight: 800; }
.avatar-stack span:nth-child(2) { background: var(--accent); }
.avatar-stack span:nth-child(3) { background: #a78bfa; }
.avatar-stack span:nth-child(4) { background: #4ade80; }
.avatar-stack span:last-child { background: var(--bg-card); color: var(--accent); }

.hero-visual {
  position: relative;
  width: min(100%, 530px);
  min-height: 610px;
  margin: auto;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 45%, oklch(25% 0.07 220), transparent 52%), var(--bg-raised);
  box-shadow: 0 20px 80px oklch(10% 0.03 240 / 0.5);
}

.visual-grid { position: absolute; inset: 0; opacity: 0.25; background-image: linear-gradient(oklch(68% 0.14 220 / 0.15) 1px, transparent 1px), linear-gradient(90deg, oklch(68% 0.14 220 / 0.15) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to bottom, transparent, black 25%, black 75%, transparent); -webkit-mask-image: linear-gradient(to bottom, transparent, black 25%, black 75%, transparent); }
.hero-person { position: absolute; inset: 2% 6% 0; width: 88%; height: 98%; object-fit: contain; filter: drop-shadow(0 0 28px oklch(68% 0.14 220 / 0.28)); }

.chart-badge {
  position: absolute;
  top: 17%;
  left: 5%;
  padding: 12px 15px;
  min-width: 145px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: oklch(17% 0.03 240 / 0.9);
  box-shadow: 0 12px 35px oklch(8% 0.03 240 / 0.5);
}
.chart-badge span { display: block; color: var(--text-muted); font-size: 0.68rem; }
.chart-badge strong { display: block; color: var(--accent); font: 800 1.25rem Inter, sans-serif; direction: ltr; }
.mini-chart { display: flex; align-items: end; gap: 3px; height: 24px; margin-top: 5px; }
.mini-chart i { width: 8px; background: var(--accent2); border-radius: 4px 4px 0 0; }

.corner-badge { position: absolute; width: 68px; height: 68px; object-fit: contain; animation: float 5s ease-in-out infinite; filter: drop-shadow(0 0 15px oklch(76% 0.165 82 / 0.3)); }
.badge-top { top: 5%; right: 5%; }
.badge-bottom { bottom: 5%; left: 5%; animation-delay: -2.4s; }

.section-heading { max-width: 630px; margin-bottom: 48px; }
.section-heading p { color: var(--text-muted); margin-bottom: 0; }

.services { background: var(--bg-raised); }
.services-grid, .values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.service-card, .value-card {
  position: relative;
  min-height: 250px;
  padding: 25px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: border-color 0.3s, transform 0.3s, background 0.3s;
}
.service-card:hover, .value-card:hover { transform: translateY(-5px); border-color: oklch(76% 0.165 82 / 0.5); background: oklch(23% 0.04 240); }

.service-icon { display: grid; place-items: center; width: 43px; height: 43px; margin-bottom: 22px; border-radius: 9px; background: var(--accent-dim); color: var(--accent); font: 1.5rem Inter, sans-serif; }
.service-card h3, .value-card h3 { color: var(--text-head); margin-bottom: 8px; font-size: 1.12rem; }
.service-card p, .value-card p { color: var(--text-muted); margin-bottom: 22px; font-size: 0.82rem; }

.card-link { position: absolute; right: 25px; bottom: 20px; color: var(--accent); font-size: 0.77rem; font-weight: 700; }
.card-link span { margin-right: 8px; font-size: 1rem; }

.ai-section { overflow: hidden; }
.ai-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 90px; align-items: center; direction: ltr; }
.ai-visual, .ai-content { direction: rtl; }

.ai-visual { position: relative; width: 440px; height: 440px; margin: auto; display: grid; place-items: center; }
.ai-hex {
  position: relative;
  z-index: 2;
  width: 190px;
  height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);
  background: linear-gradient(145deg, var(--accent), var(--accent2));
  color: var(--bg-base);
  box-shadow: 0 0 65px oklch(76% 0.165 82 / 0.5);
  animation: ai-text-glow 3s ease-in-out infinite;
}
.ai-hex strong { font: 900 2.2rem Inter, sans-serif; letter-spacing: 3px; }
.ai-hex span { font: 900 1.25rem Inter, sans-serif; letter-spacing: 7px; }

.ai-ring { position: absolute; border: 1px solid oklch(68% 0.14 220 / 0.45); border-radius: 50%; transform: rotate(-20deg) skewX(-20deg); animation: spin-slow 18s linear infinite; }
.ring-one { width: 320px; height: 410px; }
.ring-two { width: 410px; height: 260px; border-color: oklch(76% 0.165 82 / 0.35); animation-duration: 25s; animation-direction: reverse; }
.ring-three { width: 260px; height: 440px; border-style: dashed; animation-duration: 32s; }

.orbit-dot { position: absolute; top: 14px; right: 93px; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 18px var(--accent); animation: orbit 5s linear infinite; }

.ai-content > p { max-width: 570px; color: var(--text-muted); }
.ai-features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px 30px; margin-top: 35px; }
.ai-features > div { position: relative; padding-right: 38px; }
.ai-features b { position: absolute; right: 0; top: 2px; color: var(--accent); font-size: 1.2rem; }
.ai-features h3 { margin-bottom: 3px; color: var(--text-head); font-size: 0.93rem; }
.ai-features p { margin: 0; color: var(--text-muted); font-size: 0.76rem; }

.values { background: var(--bg-raised); }
.value-card { min-height: 190px; }
.value-card > span { display: block; margin-bottom: 22px; color: var(--accent2); font: 700 0.75rem Inter, sans-serif; }
.value-card h3 { font-size: 1.03rem; }

.community-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; direction: ltr; }
.community-content, .globe-wrap { direction: rtl; }
.community-content > p { max-width: 510px; color: var(--text-muted); }

.community-features { display: grid; grid-template-columns: repeat(2, max-content); gap: 12px 30px; margin: 30px 0; color: var(--text-body); font-size: 0.8rem; }
.community-features span::first-letter { color: var(--accent); }

.globe-wrap { position: relative; min-height: 510px; display: grid; place-items: center; }
.globe {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1;
  border: 1px solid oklch(68% 0.14 220 / 0.35);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, oklch(68% 0.14 220 / 0.17), transparent 43%), oklch(17% 0.04 240);
  box-shadow: 0 0 70px oklch(68% 0.14 220 / 0.13), inset 0 0 50px oklch(68% 0.14 220 / 0.11);
  overflow: hidden;
}

.earth-map {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: url('../assets/images/earth-map.png') center / cover no-repeat;
  animation: globe-spin 36s linear infinite;
  opacity: 0.85;
}

.network-lines { position: absolute; z-index: 3; width: min(100%, 510px); aspect-ratio: 1; pointer-events: none; }
.network-lines svg { width: 100%; height: 100%; overflow: visible; }
.network-lines path {
  fill: none;
  stroke: var(--accent2);
  stroke-opacity: 0.5;
  stroke-width: 1.2;
  stroke-dasharray: 7 9;
  animation: dash-flow 3s linear infinite;
}

.globe-core {
  position: absolute;
  z-index: 4;
  inset: 0;
  width: 96px;
  height: 96px;
  margin: auto;
  display: grid;
  place-content: center;
  text-align: center;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: oklch(14% 0.03 240 / 0.88);
  color: var(--accent);
  font: 900 1.05rem/1.15 Inter, sans-serif;
  letter-spacing: 2px;
  box-shadow: 0 0 24px var(--accent), 0 0 70px oklch(76% 0.165 82 / 0.6);
  animation: ai-text-glow 2.4s ease-in-out infinite;
}
.globe-core small { color: var(--accent2); font-size: 0.75rem; letter-spacing: 4px; }

.globe-dot { position: absolute; z-index: 5; width: 46px; height: 46px; display: grid; place-items: center; border: 2px solid var(--bg-base); border-radius: 50%; background: var(--bg-card); box-shadow: 0 0 16px oklch(68% 0.14 220 / 0.4); font-size: 1.5rem; }
.dot-1 { top: 8%; left: calc(50% - 23px); }
.dot-2 { top: 27%; right: 6%; }
.dot-3 { bottom: 27%; right: 6%; }
.dot-4 { bottom: 8%; left: calc(50% - 23px); }
.dot-5 { bottom: 27%; left: 6%; }
.dot-6 { top: 27%; left: 6%; }

.stats { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-raised); }
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); }
.stat { padding: 42px 15px; text-align: center; border-left: 1px solid var(--border); }
.stat:last-child { border-left: 0; }
.stat strong { display: block; direction: ltr; color: var(--accent); font: 800 2.1rem Inter, sans-serif; }
.stat strong span { margin-right: 4px; color: var(--accent2); font-size: 0.8em; }
.stat small { color: var(--text-muted); font-size: 0.75rem; }

.footer { padding: 80px 0 25px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 0.8fr 0.8fr 1.4fr; gap: 45px; padding-bottom: 60px; }
.footer-brand p, .newsletter p { color: var(--text-muted); font-size: 0.8rem; }
.footer-brand .brand { margin-bottom: 20px; }

.socials { display: flex; gap: 10px; direction: ltr; }
.socials a { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 50%; color: var(--text-muted); font: 600 0.75rem Inter, sans-serif; transition: 0.25s; }
.socials a:hover { border-color: var(--accent); color: var(--accent); }

.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col h3 { margin-bottom: 11px; color: var(--text-head); font-size: 0.9rem; }
.footer-col a { color: var(--text-muted); font-size: 0.78rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); }

.newsletter form { display: flex; margin-top: 20px; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; background: var(--bg-card); }
.newsletter input { min-width: 0; flex: 1; padding: 11px 13px; border: 0; outline: 0; background: transparent; color: var(--text-head); font-size: 0.75rem; }
.newsletter button { width: 48px; border: 0; background: var(--accent); color: var(--bg-base); cursor: pointer; font-size: 1.1rem; }

.footer-bottom { display: flex; justify-content: space-between; padding-top: 20px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.68rem; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

@keyframes spin-slow { to { transform: rotate(340deg) skewX(-20deg); } }
@keyframes globe-spin { to { transform: translate3d(0,0,0) rotate(360deg); } }
@keyframes orbit { to { transform: rotate(360deg) translateX(158px) rotate(-360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-12px) rotate(4deg); } }
@keyframes ai-text-glow {
  0%, 100% { filter: drop-shadow(0 0 12px oklch(76% 0.165 82 / 0.5)); }
  50% { filter: drop-shadow(0 0 34px oklch(76% 0.165 82 / 0.95)) drop-shadow(0 0 65px oklch(68% 0.14 220 / 0.45)); }
}
@keyframes dash-flow { to { stroke-dashoffset: -32; } }

@media (max-width: 900px) {
  .nav-wrap { gap: 20px; }
  .nav-links { gap: 16px; }
  .hero-grid, .ai-grid, .community-grid { gap: 45px; }
  .footer-grid { gap: 25px; }
}

@media (max-width: 768px) {
  :root { --nav-height: 68px; }
  .container { width: min(var(--container), calc(100% - 32px)); }
  .section-pad { padding: 80px 0; }
  
  .site-header { background: oklch(14% 0.025 240 / 0.96); }
  .desktop-auth { display: none; }
  
  .menu-toggle { display: flex; }
  
  .nav-links {
    position: absolute;
    top: var(--nav-height);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 24px 24px;
    border-bottom: 1px solid var(--border);
    background: oklch(17% 0.03 240 / 0.98);
    box-shadow: 0 20px 30px oklch(8% 0.03 240 / 0.4);
    transform: translateY(-10px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  
  .nav-links.menu-open {
    display: flex;
    transform: translateY(0);
    opacity: 1;
  }
  
  .nav-links a {
    padding: 14px 0;
    border-bottom: 1px solid oklch(31% 0.035 240 / 0.4);
    width: 100%;
    text-align: right;
  }
  .nav-links a:last-of-type { border-bottom: none; }
  
  .mobile-auth { display: block; margin-top: 18px; text-align: center; }
  
  .menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle.active span:nth-child(2) { opacity: 0; }
  .menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .hero { min-height: auto; padding-top: 40px; }
  .hero-grid, .ai-grid, .community-grid { grid-template-columns: 1fr; direction: rtl; }
  .hero-copy, .hero-visual-wrap, .ai-visual, .ai-content, .community-content, .globe-wrap { direction: rtl; }
  .hero-copy { text-align: center; }
  .hero-points { justify-content: center; }
  .hero-points li::before { margin-left: 6px; }
  .hero-actions { justify-content: center; }
  .community-proof { justify-content: center; }
  
  .hero-visual { min-height: 480px; }
  .ai-visual { width: min(100%, 360px); height: 360px; order: 2; }
  .ai-content { order: 1; }
  .ai-hex { width: 145px; height: 168px; }
  .ai-hex strong { font-size: 1.7rem; }
  .ai-hex span { font-size: 1rem; }
  .ring-one { width: 260px; height: 330px; }
  .ring-two { width: 330px; height: 210px; }
  .ring-three { width: 210px; height: 355px; }
  
  .community-grid { gap: 35px; }
  .globe-wrap { min-height: 430px; }
  .globe { width: min(100%, 335px); }
  .network-lines { width: min(100%, 405px); }
  .community-features { grid-template-columns: 1fr; gap: 8px; justify-content: center; }
  
  .services-grid, .values-grid { grid-template-columns: repeat(2, 1fr); }
  .service-card { min-height: 235px; }
  
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat { border-bottom: 1px solid var(--border); }
  .stat:nth-child(odd) { border-left: 1px solid var(--border); }
  .stat:nth-child(even) { border-left: 0; }
  .stat:last-child { grid-column: 1 / -1; border-bottom: 0; }
  
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-brand, .newsletter { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 5px; text-align: center; }
}

@media (max-width: 580px) {
  .services-grid, .values-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat { border-left: 0 !important; }
}

@media (max-width: 460px) {
  h1 { font-size: 2.25rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  .hero-visual { min-height: 400px; }
  .chart-badge { top: 8%; left: 3%; transform: scale(0.85); transform-origin: left top; }
  .corner-badge { width: 55px; height: 55px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand, .newsletter { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
