/* استایل‌های اصلی لندینگ پیج سه‌بعدی */
:root {
  --bg-primary: #070913;
  --bg-secondary: #0f172a;
  --bg-card: rgba(18, 24, 43, 0.65);
  --bg-card-hover: rgba(28, 38, 68, 0.8);
  --border-color: rgba(255, 255, 255, 0.1);
  --border-glow: rgba(99, 102, 241, 0.4);
  --primary: #6366f1;
  --primary-glow: #818cf8;
  --accent-cyan: #06b6d4;
  --accent-purple: #a855f7;
  --accent-rose: #f43f5e;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Vazirmatn', 'Tahoma', sans-serif;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-main);
  direction: rtl;
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* بوم پس‌زمینه سه‌بعدی */
#webgl-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: auto;
  outline: none;
}

/* هدر و ناوبری */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 2rem;
  transition: var(--transition-smooth);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(7, 9, 19, 0.6);
  border-bottom: 1px solid var(--border-color);
}

.header.scrolled {
  padding: 0.85rem 2rem;
  background: rgba(7, 9, 19, 0.85);
  border-bottom-color: rgba(99, 102, 241, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.navbar {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.5px;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--primary), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

.brand-icon svg {
  width: 22px;
  height: 22px;
  fill: white;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-main);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  right: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--primary));
  transition: var(--transition-smooth);
  border-radius: 2px;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 0.5rem;
}

/* دکمه‌ها */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 9999px;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
  color: white;
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 35px rgba(129, 140, 248, 0.6);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

/* لایه محتوا */
.content-layer {
  position: relative;
  z-index: 10;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* هیرو سکشن */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 5rem;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 1rem;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 9999px;
  font-size: 0.85rem;
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
  backdrop-filter: blur(8px);
}

.hero-badge .pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-cyan);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: -1.5px;
  margin-bottom: 1.5rem;
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 10%, var(--accent-cyan) 60%, var(--primary-glow) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 580px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  margin-bottom: 3.5rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.stat-item h3 {
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #fff, var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-item p {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

/* کارت کنترلر سه‌بعدی هیرو */
.hero-interactive-card {
  position: relative;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(99, 102, 241, 0.1);
}

.card-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.badge-status {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.control-btn {
  padding: 0.65rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.control-btn:hover,
.control-btn.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--primary);
  color: white;
}

.control-btn svg {
  width: 16px;
  height: 16px;
}

.shape-switcher {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.shape-btn {
  flex: 1;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: var(--transition-smooth);
}

.shape-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
  color: #ffffff;
  border-color: transparent;
}

/* بخش ویژگی‌ها با کارت‌های 3D Tilt */
.section {
  padding: 6.5rem 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 4rem auto;
}

.section-subtitle {
  color: var(--accent-cyan);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  perspective: 1000px;
}

/* کارت سه‌بعدی با انیمیشن و Tilt */
.tilt-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transform-style: preserve-3d;
  transform: perspective(1000px);
  transition: transform 0.15s ease-out, border-color 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.tilt-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(99, 102, 241, 0.25) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.tilt-card:hover::before {
  opacity: 1;
}

.tilt-card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 25px 50px -12px rgba(99, 102, 241, 0.25);
}

.card-inner {
  transform: translateZ(30px);
  position: relative;
  z-index: 2;
}

.card-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--accent-cyan);
  transition: var(--transition-smooth);
}

.tilt-card:hover .card-icon {
  background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
  color: #fff;
  transform: scale(1.1) rotate(5deg);
}

.card-icon svg {
  width: 28px;
  height: 28px;
}

.card-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  color: var(--text-main);
}

.card-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent-cyan);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.card-link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.25s ease;
}

.tilt-card:hover .card-link svg {
  transform: translateX(-5px);
}

/* ویترین نمایش تعاملی محصولات سه‌بعدی */
.showcase-wrapper {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.7) 0%, rgba(7, 9, 19, 0.9) 100%);
  border: 1px solid var(--border-glow);
  border-radius: 28px;
  padding: 3rem;
  backdrop-filter: blur(20px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.showcase-content h3 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  line-height: 1.3;
}

.feature-list {
  list-style: none;
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.feature-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.feature-check svg {
  width: 14px;
  height: 14px;
}

.showcase-interactive-box {
  background: radial-gradient(circle at center, rgba(99, 102, 241, 0.15), rgba(7, 9, 19, 0.6));
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
  height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.orbit-circle {
  position: absolute;
  border: 1px dashed rgba(99, 102, 241, 0.25);
  border-radius: 50%;
  animation: rotateClockwise 25s linear infinite;
}

.orbit-1 { width: 220px; height: 220px; }
.orbit-2 {
  width: 340px;
  height: 340px;
  border: none;
  border-radius: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  animation-duration: 35s;
  animation-direction: reverse;
  filter: drop-shadow(0 0 12px rgba(6, 182, 212, 0.45));
  transition: filter 0.3s ease;
}

.orbit-2:hover {
  filter: drop-shadow(0 0 18px rgba(6, 182, 212, 0.7));
}

.orbit-2 .hexagon-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  display: block;
}

.hex-outer-path {
  animation: hexPulse 4s ease-in-out infinite alternate;
}

@keyframes hexPulse {
  0% {
    stroke-width: 2.2px;
    opacity: 0.85;
  }
  100% {
    stroke-width: 3.2px;
    opacity: 1;
    filter: drop-shadow(0 0 6px rgba(236, 72, 153, 0.6));
  }
}

@keyframes rotateClockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.floating-cube {
  width: 100px;
  height: 100px;
  transform-style: preserve-3d;
  animation: floatCube 8s ease-in-out infinite alternate;
  position: relative;
  z-index: 5;
}

@keyframes floatCube {
  0% { transform: translateY(-10px) rotateX(15deg) rotateY(25deg); }
  100% { transform: translateY(15px) rotateX(45deg) rotateY(205deg); }
}

.cube-face {
  position: absolute;
  width: 100px;
  height: 100px;
  background: rgba(99, 102, 241, 0.25);
  border: 1.5px solid var(--accent-cyan);
  box-shadow: inset 0 0 15px rgba(6, 182, 212, 0.3);
  backdrop-filter: blur(5px);
}

.face-front  { transform: translateZ(50px); }
.face-back   { transform: rotateY(180deg) translateZ(50px); }
.face-right  { transform: rotateY(90deg) translateZ(50px); }
.face-left   { transform: rotateY(-90deg) translateZ(50px); }
.face-top    { transform: rotateX(90deg) translateZ(50px); }
.face-bottom { transform: rotateX(-90deg) translateZ(50px); }

.interactive-hint {
  position: absolute;
  bottom: 1.25rem;
  font-size: 0.85rem;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* فرم تماس و تعامل */
.contact-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.contact-box::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 60%);
  pointer-events: none;
}

.form-inline {
  display: flex;
  max-width: 520px;
  margin: 2rem auto 0 auto;
  gap: 0.75rem;
}

.input-field {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 0.85rem 1.5rem;
  color: white;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-smooth);
}

.input-field:focus {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

/* فوتر */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 3rem 0;
  background: rgba(7, 9, 19, 0.9);
  position: relative;
  z-index: 10;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-text {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.footer-socials {
  display: flex;
  gap: 1rem;
}

.social-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

.social-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-3px);
}

.social-btn svg {
  width: 18px;
  height: 18px;
}

/* واکنش‌گرایی (Responsive) */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3.5rem;
  }
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-cta {
    justify-content: center;
  }
  .hero-stats {
    max-width: 500px;
    margin: 0 auto;
  }
  .showcase-wrapper {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(7, 9, 19, 0.95);
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
  }
  .mobile-toggle {
    display: block;
  }
  .form-inline {
    flex-direction: column;
  }
  .hero-title {
    font-size: 2.25rem;
  }
  .contact-box {
    padding: 2rem 1.5rem;
  }
}
