/* ========== 31X Studio — Shared Styles ========== */

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-deep: #0A0A0F;
  --bg-card: #12121A;
  --bg-card-hover: #1A1A25;
  --bg-glass: rgba(255,255,255,0.03);
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --text-primary: #F0F0F5;
  --text-secondary: #8888A0;
  --text-muted: #55556A;
  --accent-blue: #4F6DF5;
  --accent-purple: #7C5CFC;
  --accent-cyan: #00D4FF;
  --accent-green: #00E68A;
  --accent-orange: #FF8A3D;
  --accent-pink: #FF5CAA;
  --gradient-main: linear-gradient(135deg, #4F6DF5, #7C5CFC);
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --radius: 16px;
  --radius-sm: 10px;
  --max-w: 1200px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* NOISE */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* GLOWS */
.glow-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.12;
  pointer-events: none;
}
.glow-1 { width: 500px; height: 500px; background: var(--accent-blue); top: -100px; left: -150px; }
.glow-2 { width: 400px; height: 400px; background: var(--accent-purple); top: 200px; right: -100px; }
.glow-3 { width: 350px; height: 350px; background: var(--accent-cyan); bottom: -50px; left: 30%; }

/* CONTAINER */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ========== NAV ========== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.5px;
}
.nav-logo .x {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.nav-active { color: var(--text-primary); }
.lang-switch {
  display: flex;
  background: var(--bg-card);
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.lang-btn {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  border: none;
  transition: all 0.2s;
}
.lang-btn.active {
  background: var(--gradient-main);
  color: white;
}

/* ========== HERO ========== */
.hero {
  position: relative;
  padding: 160px 0 100px;
  text-align: center;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 80px;
  background: linear-gradient(to bottom, var(--border), transparent);
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  background: rgba(0,212,255,0.08);
  border: 1px solid rgba(0,212,255,0.15);
  border-radius: 100px;
  margin-bottom: 28px;
}
.hero-badge::before { content: '◆'; font-size: 8px; }
.hero h1 {
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.05;
  margin-bottom: 20px;
}
.hero h1 .gradient {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
}
.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--gradient-main);
  color: white;
  font-weight: 600;
  font-size: 15px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(79,109,245,0.3);
}
.hero-cta svg { width: 18px; height: 18px; }
.hero-cta-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 15px;
  border-radius: 12px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
}
.hero-cta-outline:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* ========== PAGE HERO (products page) ========== */
.page-hero {
  position: relative;
  padding: 140px 0 40px;
  overflow: hidden;
}

/* ========== SECTIONS ========== */
.section { padding: 80px 0; position: relative; }
.section-tag {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 16px;
}
.section-desc {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.7;
}

/* ========== PRODUCTS ========== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 48px;
}
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
}
.product-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
}
.product-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
}
.product-card[data-accent="blue"]::before { background: var(--gradient-main); }
.product-card[data-accent="green"]::before { background: linear-gradient(90deg, #00E68A, #00C9FF); }
.product-card[data-accent="orange"]::before { background: linear-gradient(90deg, #FF8A3D, #FF5CAA); }
.product-card[data-accent="purple"]::before { background: linear-gradient(90deg, #7C5CFC, #B44AFF); }

.product-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 20px;
}
.product-card[data-accent="blue"] .product-icon { background: rgba(79,109,245,0.12); }
.product-card[data-accent="green"] .product-icon { background: rgba(0,230,138,0.12); }
.product-card[data-accent="orange"] .product-icon { background: rgba(255,138,61,0.12); }
.product-card[data-accent="purple"] .product-icon { background: rgba(124,92,252,0.12); }

.product-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 16px;
}
.status-live { color: var(--accent-green); background: rgba(0,230,138,0.1); }
.status-beta { color: var(--accent-orange); background: rgba(255,138,61,0.1); }
.status-dev { color: var(--accent-purple); background: rgba(124,92,252,0.1); }

.product-name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}
.product-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}
.product-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.product-tag {
  font-size: 12px;
  font-family: var(--font-mono);
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--bg-glass);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.product-price {
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}
.product-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-blue);
  transition: gap 0.2s;
}
.product-link:hover { gap: 10px; }
.product-link svg { width: 16px; height: 16px; }

/* ========== ABOUT ========== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 48px;
  align-items: center;
}
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  text-align: center;
}
.stat-num {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}
.about-text p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}
.about-text p strong { color: var(--text-primary); }
.about-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-blue);
  transition: gap 0.2s;
}
.about-link:hover { gap: 10px; }
.about-link svg { width: 16px; height: 16px; }

/* ========== TECH STACK ========== */
.stack-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
  justify-content: center;
}
.stack-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: border-color 0.2s;
}
.stack-chip:hover { border-color: var(--border-hover); }
.stack-chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

/* ========== CTA ========== */
.cta-section {
  text-align: center;
  padding: 100px 0;
}
.cta-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 64px 48px;
  position: relative;
  overflow: hidden;
}
.cta-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient-main);
}
.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========== FOOTER ========== */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
}
.footer-copy span { color: var(--text-secondary); }
.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text-secondary); }

/* ========== MOBILE ========== */
@media (max-width: 768px) {
  .products-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .nav-links a.nav-hide { display: none; }
  .hero { padding: 130px 0 60px; }
  .page-hero { padding: 120px 0 30px; }
  .product-card { padding: 24px; }
  .cta-box { padding: 40px 24px; }
  .footer .container { flex-direction: column; gap: 16px; text-align: center; }
}

/* ========== ANIMATIONS ========== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate { opacity: 0; animation: fadeUp 0.6s ease-out forwards; }
.animate-d1 { animation-delay: 0.1s; }
.animate-d2 { animation-delay: 0.2s; }
.animate-d3 { animation-delay: 0.3s; }
.animate-d4 { animation-delay: 0.4s; }

/* ========== i18n ========== */
[data-lang="en"] .ru { display: none; }
[data-lang="ru"] .en { display: none; }
