/* Nemplat Design System */

/* Fonts are loaded via <link> in HTML for Yandex Browser compatibility */

:root {
  /* Colors */
  --primary: #5e6ad2;
  --primary-hover: #7170ff;
  --primary-lighter: #828fff;
  --background: #08090a;
  --background-panel: #0f1011;
  --background-elevated: #191a1b;
  --surface: #0f1011;
  --text-primary: #f7f8f8;
  --text-secondary: #d0d6e0;
  --text-tertiary: #8a8f98;
  --text-quaternary: #62666d;
  --border: rgba(255,255,255,0.05);
  --border-standard: rgba(255,255,255,0.08);
  --border-solid: #23252a;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #fb565b;
  --info: #3b82f6;

  /* Typography */
  --font-primary: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 64px;
  --space-3xl: 96px;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-full: 9999px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

h1 { font-size: clamp(32px, 5.5vw, 56px); }
h2 { font-size: clamp(28px, 4.5vw, 48px); }
h3 { font-size: clamp(24px, 3.8vw, 32px); }
h4 { font-size: clamp(20px, 3vw, 24px); }
h5 { font-size: clamp(18px, 2.5vw, 20px); }
h6 { font-size: clamp(17px, 2.2vw, 18px); }

p {
  color: var(--text-secondary);
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-hover);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15, 16, 17, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav-logo img {
  display: block;
}

.nav-logo-text {
  color: #f7f8f8;
  transition: color 0.2s ease;
}

.nav-logo:hover .nav-logo-text {
  color: var(--primary);
}

.nav-logo-accent {
  color: var(--primary);
}

.nav-links {
  display: flex;
  gap: var(--space-xl);
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-cta {
  background: var(--primary);
  color: white;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 14px;
  transition: background 0.2s;
}

.nav-cta:hover {
  background: var(--primary-hover);
  color: white;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: var(--font-primary);
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: white;
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-standard);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.05);
}

.btn-large {
  padding: 16px 32px;
  font-size: 18px;
}

/* Cards */
.card {
  background: var(--background-panel);
  border: 1px solid var(--border-standard);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.card:hover {
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 0 40px rgba(94, 106, 210, 0.1);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: rgba(94, 106, 210, 0.15);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: var(--space-lg);
}

/* Grid */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
  grid-template-columns: repeat(4, 1fr);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  background: var(--primary);
  color: white;
}

/* Sections */
.section {
  padding: var(--space-3xl) 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-3xl);
}

.section-header h2 {
  margin-bottom: var(--space-md);
}

.section-header p {
  font-size: 18px;
  color: var(--text-tertiary);
}

/* Hero */
.hero {
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 0 100px;
  position: relative;
  overflow: hidden;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: rgba(94, 106, 210, 0.15);
  border: 1px solid rgba(94, 106, 210, 0.3);
  font-size: 14px;
  color: var(--primary-lighter);
  margin-bottom: var(--space-xl);
}

.hero h1 {
  font-size: 56px;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: var(--space-lg);
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 20px;
  color: var(--text-tertiary);
  max-width: 600px;
  margin: 0 auto var(--space-xl);
}

.hero-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(94, 106, 210, 0.15) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}

/* Hero split layout */
.hero-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  justify-items: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  text-align: center;
}

.hero-content h1 {
  text-align: center;
  font-size: 52px;
  line-height: 1.15;
  letter-spacing: -2px;
  margin-bottom: var(--space-lg);
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  text-align: center;
  font-size: 20px;
  color: var(--text-tertiary);
  max-width: 540px;
  margin: 0 auto var(--space-xl) auto;
}

.hero-content .hero-buttons {
  justify-content: center;
}


/* Orbital labels animation */
@keyframes orbitPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.9; }
}

@keyframes drawLine {
  from { stroke-dashoffset: 200; }
  to { stroke-dashoffset: 0; }
}

.orbit-item {
  animation: orbitPulse 3s ease-in-out infinite;
}

.orbit-item:nth-child(2) { animation-delay: 0.5s; }
.orbit-item:nth-child(3) { animation-delay: 1s; }
.orbit-item:nth-child(4) { animation-delay: 1.5s; }
.orbit-item:nth-child(5) { animation-delay: 2s; }
.orbit-item:nth-child(6) { animation-delay: 2.5s; }

/* Features */
.feature-card {
  composes: card;
  text-align: left;
}

.feature-card h3 {
  font-size: 20px;
  margin-bottom: var(--space-sm);
}

.feature-card p {
  color: var(--text-tertiary);
  font-size: 15px;
}

/* Steps */
.step {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: rgba(94, 106, 210, 0.2);
  border: 1px solid rgba(94, 106, 210, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--primary);
  flex-shrink: 0;
}

/* CTA Section */
.cta-section {
  background: var(--background-panel);
  border: 1px solid var(--border-standard);
  border-radius: var(--radius-xl);
  padding: var(--space-3xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(94, 106, 210, 0.2) 0%, transparent 70%);
  top: -100px;
  right: -100px;
  pointer-events: none;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-standard);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.footer-brand {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.footer-brand span {
  color: var(--primary);
}

.footer-links h4 {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: var(--space-lg);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-sm);
}

.footer-links a {
  color: var(--text-tertiary);
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--text-quaternary);
}

/* Mobile Menu */








/* Responsive */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .hero h1 { font-size: clamp(28px, 7vw, 36px); }
  .hero p { font-size: 16px; max-width: 100%; }

  .section {
    padding: 48px 0;
  }

  .grid-3,
  .grid-2 { grid-template-columns: 1fr; }

  .nav-links { display: none; }
  
  .nav-cta { display: none; }

  .hero-layout {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .hero-content {
    overflow: hidden;
  }

  .hero-content h1,
  .hero-content p {
    text-align: center;
  }

  .hero-content .hero-buttons {
    justify-content: center;
    flex-wrap: wrap;
  }

  .partner-grid { grid-template-columns: 1fr; }
  .partner-block { padding: 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }

  .section { padding: var(--space-2xl) 0; }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--background);
}

::-webkit-scrollbar-thumb {
  background: var(--border-solid);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-quaternary);
}

/* Selection */
::selection {
  background: rgba(94, 106, 210, 0.3);
  color: var(--text-primary);
}

/* Form inputs dark theme */
input, select, textarea {
  color: var(--text-primary);
  font-family: var(--font-primary);
}

input::placeholder, select::placeholder {
  color: var(--text-quaternary);
}

select option {
  background: var(--background-panel);
  color: var(--text-primary);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px rgba(94, 106, 210, 0.2);
}

/* Input Button disabled state */
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Scroll reveal base */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   NEW: Interactive Nav Tiles
   ======================================== */
.nav-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.nav-tile { position: relative; background: var(--background-panel); border: 1px solid var(--border-standard); border-radius: var(--radius-xl); padding: 40px 32px 32px; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; overflow: hidden; cursor: pointer; }
.nav-tile::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; }
.nav-tile:nth-child(1)::before { background: linear-gradient(90deg, #5e6ad2, #7170ff); }
.nav-tile:nth-child(2)::before { background: linear-gradient(90deg, #10b981, #34d399); }
.nav-tile:nth-child(3)::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.nav-tile:nth-child(4)::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.nav-tile:hover { transform: translateY(-4px); border-color: var(--primary); box-shadow: 0 16px 48px rgba(94,106,210,.12); }
.nav-tile-icon { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 28px; margin-bottom: 20px; background: rgba(94,106,210,.1); }
.nav-tile:nth-child(2) .nav-tile-icon { background: rgba(16,185,129,.1); }
.nav-tile:nth-child(3) .nav-tile-icon { background: rgba(59,130,246,.1); }
.nav-tile:nth-child(4) .nav-tile-icon { background: rgba(245,158,11,.1); }
.nav-tile h3 { font-size: 24px; font-weight: 700; margin-bottom: 12px; }
.nav-tile-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.nav-tile-tags span { font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: var(--radius-full); background: rgba(255,255,255,.05); color: var(--text-tertiary); }
.nav-tile p { font-size: 15px; color: var(--text-tertiary); line-height: 1.6; }
.nav-tile a { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-weight: 600; color: var(--primary); text-decoration: none; }

/* ---- Conveyor Belt ---- */
.conveyor { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: center; margin: 32px 0; }
.conveyor-step { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 110px; }
.conveyor-step .step-bubble { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; background: var(--background-elevated); border: 1px solid var(--border-standard); }
.conveyor-step span { font-size: 12px; color: var(--text-tertiary); font-weight: 500; }
.conveyor-arrow { color: var(--text-quaternary); font-size: 20px; }

/* ---- Niche Cards ---- */
.niches-scroll { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.niches-scroll::-webkit-scrollbar { display: none; }
.niche-card { flex-shrink: 0; width: 320px; background: var(--background-panel); border: 1px solid var(--border-standard); border-radius: var(--radius-xl); padding: 28px; transition: transform .25s ease, border-color .25s ease; display: flex; flex-direction: column; }
.niche-card .btn { margin-top: auto; width: 100%; }
.niche-card:hover { transform: translateY(-4px); border-color: var(--primary); }
.niche-card h4 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.niche-card .niche-task { font-size: 14px; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.5; }
.niche-modules { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.niche-modules .mod { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; background: rgba(94,106,210,.1); }
.niche-kpi { font-size: 13px; color: var(--success); font-weight: 600; margin-bottom: 16px; }

/* ---- Partners Grid ---- */
.partner-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; }
.partner-block { background: var(--background-panel); border: 1px solid var(--border-standard); border-radius: var(--radius-xl); padding: 32px; display: flex; flex-direction: column; }
.partner-featured { border-color: var(--primary); background: linear-gradient(180deg, rgba(94,106,210,0.08) 0%, var(--background-panel) 100%); }
.partner-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--primary); margin-bottom: 12px; }
.partner-block h3 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.partner-block p { font-size: 15px; color: var(--text-tertiary); line-height: 1.6; margin-bottom: 20px; }
.partner-logos { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.partner-logos span { font-size: 13px; font-weight: 500; padding: 6px 12px; border-radius: var(--radius-full); background: rgba(255,255,255,0.05); color: var(--text-tertiary); border: 1px solid var(--border-standard); }
.partner-featured .partner-logos span { background: rgba(94,106,210,0.15); color: var(--primary-lighter); border-color: rgba(94,106,210,0.3); }

/* ---- Partner logos ---- */
.partner-track { display: flex; gap: 48px; align-items: center; overflow-x: auto; padding: 16px 0; scrollbar-width: none; }
.partner-track::-webkit-scrollbar { display: none; }
.partner-track span { flex-shrink: 0; font-size: 16px; font-weight: 600; color: var(--text-quaternary); opacity: .7; transition: opacity .2s; white-space: nowrap; }
.partner-track span:hover { opacity: 1; color: var(--text-primary); }

/* ---- Process Steps ---- */
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.process-card { position: relative; background: var(--background-panel); border: 1px solid var(--border-standard); border-radius: var(--radius-xl); padding: 32px; }
.process-card .step-num { width: 40px; height: 40px; border-radius: 10px; background: linear-gradient(135deg, var(--primary), var(--primary-hover)); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; margin-bottom: 16px; }
.process-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.process-card p { font-size: 14px; color: var(--text-tertiary); line-height: 1.6; }

/* ---- FAQ Accordion ---- */
.faq-item { border-bottom: 1px solid var(--border-standard); }
.faq-question { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 20px 0; background: none; border: none; color: var(--text-primary); font-size: 16px; font-weight: 600; cursor: pointer; text-align: left; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s ease; padding: 0; }
.faq-item.open .faq-answer { max-height: 300px; padding-bottom: 20px; }
.faq-answer p { color: var(--text-secondary); font-size: 15px; line-height: 1.7; }

/* ---- Before / After ---- */
.results-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 32px; }
.result-card { text-align: center; padding: 28px; background: var(--background-panel); border: 1px solid var(--border-standard); border-radius: var(--radius-xl); }
.result-card .result-num { font-size: 40px; font-weight: 700; color: var(--primary); }
.result-card .result-label { font-size: 14px; color: var(--text-tertiary); margin-top: 4px; }

/* ---- Content Factory ---- */
.factory-card { background: var(--background-panel); border: 1px solid var(--border-standard); border-radius: var(--radius-xl); padding: 28px; }
.factory-card .f-icon { font-size: 28px; margin-bottom: 12px; }
.factory-card h4 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.factory-card p { font-size: 14px; color: var(--text-tertiary); line-height: 1.6; }

/* ---- Blog preview ---- */
.blog-preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

@media (max-width: 900px) {
  .nav-tiles { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: repeat(4, 1fr); }
  .results-row { grid-template-columns: 1fr; }
  .blog-preview-grid { grid-template-columns: 1fr; }

  /* Partners vertical on mobile */
  .partner-grid { grid-template-columns: 1fr; gap: 20px; }
  .partner-track { flex-direction: column; gap: 12px; overflow-x: visible; }
}


/* ========================================
   IMPROVED MOBILE MENU (Drawer)
   ======================================== */








.mobile-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 28px;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}



@media (max-width: 768px) {
  
}

/* Mobile overlay */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-overlay.active {
  opacity: 1;
  pointer-events: auto;
}


@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }
  
  .nav-tile {
    padding: 28px 20px 24px;
  }
  
  .niche-card {
    width: 280px;
    padding: 22px;
  }
  
  .process-card {
    padding: 24px;
  }
}


/* ========================================
   COMPONENT SYSTEM (Stage 2)
   ======================================== */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--background-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-standard);
}

.btn-secondary:hover {
  border-color: var(--primary);
}

/* Cards */
.card {
  background: var(--background-panel);
  border: 1px solid var(--border-standard);
  border-radius: var(--radius-xl);
  padding: 32px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: rgba(94, 106, 210, 0.1);
  color: var(--primary-lighter);
}

/* Sections */
.section {
  padding: 80px 0;
}

@media (max-width: 768px) {
  .section {
    padding: 56px 0;
  }
}


@media (max-width: 768px) {
  /* Блог и Партнёры — вертикальные блоки на мобильных */
  .blog-preview-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .partner-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .partner-track {
    flex-direction: column;
    gap: 12px;
    overflow-x: visible;
    align-items: stretch;
  }
  
  .partner-track span {
    white-space: normal;
    text-align: center;
    padding: 12px 16px;
  }
}


@media (max-width: 768px) {
  .partner-logos {
    justify-content: center;
  }
  
  .partner-block {
    padding: 24px;
  }
}


/* === Mobile Partners Fix === */
@media (max-width: 768px) {
  .partner-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }
  
  .partner-track {
    flex-direction: column !important;
    gap: 12px;
    overflow-x: visible !important;
    align-items: stretch;
  }
  
  .partner-track span {
    white-space: normal !important;
    text-align: center;
    padding: 14px 20px;
    display: block;
  }
}


@media (max-width: 768px) {
  
  
  
}


@media (max-width: 768px) {
  
  
  
}


/* ========================================
   MOBILE MENU - CLEAN VERSION
   ======================================== */

.mobile-menu-btn {
  display: none;
  background: var(--background-panel);
  border: 1px solid var(--border-standard);
  color: var(--text-primary);
  font-size: 22px;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(94, 106, 210, 0.2);
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }
  
  .mobile-menu-btn:active {
    transform: scale(0.95);
    background: var(--background-elevated);
  }
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100vh;
  background: var(--background-panel);
  border-left: 1px solid var(--border-standard);
  z-index: 1000;
  padding: 80px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: right 0.3s ease;
  box-shadow: -20px 0 60px rgba(0,0,0,0.4);
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu a {
  color: var(--text-primary);
  font-size: 17px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-standard);
}

.mobile-menu a:hover {
  color: var(--primary);
}

.mobile-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 28px;
  cursor: pointer;
}

/* Mobile overlay */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-overlay.active {
  opacity: 1;
  pointer-events: auto;
}


@media (max-width: 768px) {
  .mobile-menu {
    display: none;
    right: 0;
  }
  
  .mobile-menu.open {
    display: flex;
    right: 0;
  }
}


.nav-tile-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 20px;
  background: rgba(94,106,210,.1);
  overflow: hidden;
}

.nav-tile-icon video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}


.nav-tile .nav-tile-icon {
  width: 64px !important;
  height: 64px !important;
  padding: 0 !important;
  background: none !important;
}

.nav-tile .nav-tile-icon video {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}


@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }
  .mobile-only {
    display: flex !important;
  }
}

@media (min-width: 769px) {
  .mobile-only {
    display: none !important;
  }
  .desktop-only {
    display: flex !important;
  }
}


@media (min-width: 769px) {
  .nav-tile .desktop-only {
    display: block !important;
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 14px;
  }
}


.crm-video-wrapper {
  width: 100%;
  margin-bottom: 16px;
  border-radius: 12px;
  overflow: hidden;
  background: #111;
}

.crm-video-wrapper video {
  width: 100%;
  height: auto;
  display: block;
  max-height: 180px;
  object-fit: cover;
}

@media (max-width: 768px) {
  .crm-video-wrapper {
    display: none;
  }
}

/* === New layout for "Сайты, которые продают сами" === */
.websites-tile {
  display: flex;
  flex-direction: column;
}

.websites-content {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.websites-text {
  flex: 1;
  min-width: 0;
}

.websites-video {
  flex: 1.2;
  max-width: 420px;
  border-radius: 16px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.websites-video video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
}

/* Mobile: stack vertically */
@media (max-width: 768px) {
  .websites-content {
    flex-direction: column;
    gap: 16px;
  }
  
  .websites-video {
    max-width: 100%;
  }
}

/* === Vertical 4-column layout for directions === */
@media (min-width: 1024px) {
  .nav-tiles {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
}

.nav-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 24px;
}

.nav-tile h3 {
  margin-top: 16px;
  margin-bottom: 12px;
}

.nav-tile .nav-tile-tags {
  justify-content: center;
}

.nav-tile p {
  text-align: center;
}

.nav-tile a {
  margin-top: auto;
  padding-top: 16px;
}

/* Make video full width on top */
.crm-video-wrapper {
  width: 100%;
  margin-bottom: 16px;
  border-radius: 12px;
  overflow: hidden;
}

.crm-video-wrapper video {
  width: 100%;
  height: auto;
  max-height: 160px;
  object-fit: cover;
}

/* Fix: Make video full width in the directions grid */
.nav-tile .crm-video-wrapper {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin-bottom: 20px;
}

.nav-tile .crm-video-wrapper video {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 180px;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

/* Square video */
.nav-tile .crm-video-wrapper {
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  max-height: none !important;
  height: auto !important;
  margin-bottom: 20px;
  border-radius: 12px;
  overflow: hidden;
}

.nav-tile .crm-video-wrapper video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 12px;
}

/* Force square video - high specificity */
.nav-tiles .nav-tile .crm-video-wrapper {
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  height: auto !important;
  max-height: none !important;
  padding-bottom: 0 !important;
  margin-bottom: 20px;
  border-radius: 12px;
  overflow: hidden;
  background: #111;
}

.nav-tiles .nav-tile .crm-video-wrapper video {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  display: block !important;
  max-height: none !important;
  border-radius: 12px;
}

/* Reduce video size by ~25% vertically */
.nav-tiles .nav-tile .crm-video-wrapper {
  max-height: 160px !important;
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
}

/* Make video twice as tall */
.nav-tiles .nav-tile .crm-video-wrapper {
  max-height: 320px !important;
  aspect-ratio: 16 / 9 !important;
  width: 100% !important;
}

.nav-tiles .nav-tile .crm-video-wrapper video {
  max-height: 320px !important;
  height: auto !important;
  aspect-ratio: 16 / 9 !important;
  object-fit: cover !important;
}

/* Square video with hover play */
.nav-tiles .nav-tile .crm-video-wrapper {
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  max-height: 220px !important;
  height: auto !important;
  margin-bottom: 20px;
  border-radius: 12px;
  overflow: hidden;
  background: #111;
  cursor: pointer;
}

.nav-tiles .nav-tile .crm-video-wrapper video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block;
  border-radius: 12px;
}

/* Strict square video */
.nav-tiles .nav-tile .crm-video-wrapper {
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  height: 0 !important;
  padding-bottom: 100% !important;
  position: relative !important;
  margin-bottom: 20px;
  border-radius: 12px;
  overflow: hidden;
  background: #111;
}

.nav-tiles .nav-tile .crm-video-wrapper video {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 12px;
}

/* Clean square video */
.nav-tiles .nav-tile .crm-video-wrapper {
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  max-height: 220px !important;
  height: auto !important;
  margin-bottom: 20px;
  border-radius: 12px;
  overflow: hidden;
  background: #111;
}

.nav-tiles .nav-tile .crm-video-wrapper video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block;
  border-radius: 12px;
}

/* Ultra specific square video */
.nav-tiles .nav-tile .crm-video-wrapper,
.nav-tiles .nav-tile .crm-video-wrapper * {
  aspect-ratio: 1 / 1 !important;
}

.nav-tiles .nav-tile .crm-video-wrapper {
  width: 100% !important;
  max-height: 220px !important;
  height: auto !important;
  margin-bottom: 20px !important;
  border-radius: 12px !important;
  overflow: hidden !important;
}

.nav-tiles .nav-tile .crm-video-wrapper video {
  width: 100% !important;
  height: 100% !important;
  max-height: 220px !important;
  object-fit: cover !important;
  display: block !important;
}

/* Fixed square video - attempt 3 */
.nav-tiles .nav-tile .crm-video-wrapper {
  width: 100% !important;
  max-width: 280px !important;
  height: 220px !important;
  aspect-ratio: unset !important;
  margin: 0 auto 20px !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  background: #111;
  display: block !important;
}

.nav-tiles .nav-tile .crm-video-wrapper video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 12px !important;
}

/* Improved horizontal scroll for Готовые решения */
.niches-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 16px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.niches-scroll::-webkit-scrollbar {
  display: none;
}

/* Optional: snap scrolling on mobile */
@media (max-width: 768px) {
  .niches-scroll {
    scroll-snap-type: x mandatory;
  }
  
  .niche-card {
    scroll-snap-align: start;
    flex: 0 0 85%;
  }
}

/* Fix hover effect visibility in niches section */
.niches-scroll .nav-tile {
  position: relative;
  z-index: 1;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.niches-scroll .nav-tile:hover {
  transform: translateY(-4px);
  z-index: 10;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

/* Ensure the top gradient line is visible */
.niches-scroll .nav-tile::before {
  z-index: 2;
}

/* Restore proper horizontal scroll behavior */
.niches-scroll {
  overflow-x: auto;
  overflow-y: visible;
  padding-top: 8px;
  margin-top: -8px;
}

/* Scroll arrows for Готовые решения */
.niche-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.niche-arrow:hover {
  background: rgba(255,255,255,0.2);
  border-color: var(--primary);
}

.niche-arrow-left {
  left: -22px;
}

.niche-arrow-right {
  right: -22px;
}

@media (max-width: 768px) {
  .niche-arrow {
    display: none;
  }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--background-panel);
  border: 1px solid var(--border-standard);
  border-radius: var(--radius-xl);
  padding: 40px;
  max-width: 520px;
  width: 90%;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 28px;
  cursor: pointer;
  color: var(--text-tertiary);
}

#consult-form input,
#consult-form select {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #fff;
  font-size: 16px;
}

/* Improved Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease-out;
}

.modal-content {
  background: var(--background-panel);
  border: 1px solid var(--border-standard);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  max-width: 520px;
  width: 92%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 22px;
  font-size: 32px;
  cursor: pointer;
  color: var(--text-tertiary);
  transition: color 0.2s;
}

.modal-close:hover {
  color: #fff;
}

#consult-form input,
#consult-form select {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #fff;
  font-size: 16px;
  transition: border-color 0.2s;
}

#consult-form input:focus,
#consult-form select:focus {
  border-color: var(--primary);
  outline: none;
}

/* Align descriptions in direction blocks */
.nav-tile {
  display: flex;
  flex-direction: column;
}

.nav-tile p {
  flex: 1;
  margin-bottom: 0;
}

/* Mobile improvements for contact form */
@media (max-width: 480px) {
  #contact-form,
  #consult-form {
    padding: 0 8px;
  }
  
  #contact-form input,
  #contact-form select,
  #consult-form input,
  #consult-form select {
    font-size: 16px;
    padding: 14px 16px;
  }
  
  #contact-form label,
  #consult-form label {
    font-size: 13px;
    line-height: 1.4;
  }
}

/* === Mobile fixes for Directions section === */
@media (max-width: 768px) {
  .nav-tile .nav-tile-icon {
    display: none;
  }
  
  .nav-tile p {
    margin-top: 8px;
    margin-bottom: 12px;
  }
  
  .crm-video-wrapper {
    margin-bottom: 8px;
  }
}

/* === Mobile: Process section in 2 columns === */
@media (max-width: 768px) {
  .process-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .process-card {
    padding: 20px 16px;
  }
}

/* Stronger mobile overrides for Direction blocks */
@media (max-width: 768px) {
  .nav-tile .nav-tile-icon.mobile-only {
    display: none !important;
  }
  
  .nav-tile .crm-video-wrapper {
    margin-bottom: 6px !important;
  }
  
  .nav-tile p {
    margin-top: 6px !important;
    margin-bottom: 8px !important;
  }
  
  .nav-tile {
    padding: 24px 20px 20px !important;
  }
}

/* Minimal spacing between video and title on mobile */
@media (max-width: 768px) {
  .nav-tile .crm-video-wrapper {
    margin-bottom: 4px !important;
  }
  
  .nav-tile h3 {
    margin-top: 4px !important;
    margin-bottom: 8px !important;
  }
}

/* Ultra compact spacing on mobile */
@media (max-width: 768px) {
  .nav-tile .crm-video-wrapper {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
  
  .nav-tile h3 {
    margin-top: 2px !important;
    margin-bottom: 6px !important;
  }
  
  .nav-tile p {
    margin-top: 4px !important;
  }
}

/* Force minimal spacing after video on mobile */
@media (max-width: 768px) {
  .nav-tile .crm-video-wrapper,
  .nav-tile .crm-video-wrapper video {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    display: block;
  }
  
  .nav-tile h3 {
    margin-top: 0 !important;
    padding-top: 4px !important;
  }
}

/* Fix spacing when video is hidden on mobile */
@media (max-width: 768px) {
  .nav-tile .crm-video-wrapper.desktop-only {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
  }
  
  .nav-tile h3 {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
}

/* Restore video visibility + minimal spacing on mobile */
@media (max-width: 768px) {
  .nav-tile .crm-video-wrapper.desktop-only {
    display: block !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
  
  .nav-tile h3 {
    margin-top: 4px !important;
  }
}

/* Final fix: Show video on mobile + tight spacing */
@media (max-width: 768px) {
  .nav-tile .crm-video-wrapper {
    display: block !important;
    margin-bottom: 2px !important;
  }
  
  .nav-tile h3 {
    margin-top: 0 !important;
    margin-bottom: 6px !important;
  }
}

/* Extremely tight spacing between video and title */
@media (max-width: 768px) {
  .nav-tile .crm-video-wrapper {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
  
  .nav-tile h3 {
    margin-top: 0 !important;
    margin-bottom: 4px !important;
    padding-top: 0 !important;
  }
}

/* Nuclear option - force zero gap between video and title on mobile */
@media (max-width: 768px) {
  .nav-tile .crm-video-wrapper,
  .nav-tile .crm-video-wrapper video {
    margin: 0 0 2px 0 !important;
    padding: 0 !important;
  }
  
  .nav-tile h3 {
    margin: 0 0 6px 0 !important;
    padding-top: 0 !important;
  }
}

/* Very specific rule to kill gap between video and h3 */
@media (max-width: 768px) {
  .nav-tiles .nav-tile .crm-video-wrapper {
    margin-bottom: 0 !important;
  }
  
  .nav-tiles .nav-tile .crm-video-wrapper + h3 {
    margin-top: 0 !important;
    padding-top: 2px !important;
  }
}

/* Last attempt - force compact layout on mobile */
@media (max-width: 768px) {
  .nav-tile {
    padding-top: 16px !important;
    padding-bottom: 16px !important;
  }
  
  .nav-tile .crm-video-wrapper {
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .nav-tile h3 {
    margin-top: 4px !important;
    margin-bottom: 8px !important;
  }
}

/* Override conflicting mobile rules */
@media (max-width: 768px) {
  .crm-video-wrapper {
    display: block !important;
    margin-bottom: 2px !important;
  }
  
  .nav-tile h3 {
    margin-top: 0 !important;
  }
}

/* Final desperate attempt - highest specificity */
@media (max-width: 768px) {
  .nav-tiles .nav-tile .crm-video-wrapper {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
  
  .nav-tiles .nav-tile h3 {
    margin-top: 0 !important;
    margin-bottom: 6px !important;
  }
}

/* Small breathing room between video and title */
@media (max-width: 768px) {
  .nav-tiles .nav-tile .crm-video-wrapper {
    margin-bottom: 6px !important;
  }
}

/* 4 column grid for about page */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* Force single column blog on mobile */
@media (max-width: 768px) {
  .blog-preview-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
}

/* Force single column for direction blocks on mobile */
@media (max-width: 768px) {
  .nav-tiles {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}

/* Nuclear option - force 1 column on mobile for directions */
@media (max-width: 768px) {
  .nav-tiles,
  .nav-tiles {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}

/* Final mobile widget button visibility */
@media (max-width: 768px) {
  #npl-btn {
    display: flex !important;
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 999999 !important;
    width: 56px !important;
    height: 56px !important;
    background: #5e6ad2 !important;
    color: white !important;
    font-size: 26px !important;
    border-radius: 50% !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 25px rgba(94, 106, 210, 0.6) !important;
    border: none !important;
  }
}

/* Force blog to single column on mobile */
@media (max-width: 768px) {
  .blog-preview-grid,
  .blog-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
}
