:root {
  --color-bg: #FAFAFA;
  --color-surface: #FFFFFF;
  --color-primary: #4F46E5;
  --color-primary-hover: #4338CA;
  --color-primary-light: #EEF2FF;
  --color-text: #0F172A;
  --color-text-muted: #64748B;
  --color-border: #E2E8F0;
  --color-success: #10B981;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-top: 72px;
}

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* Typography */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.5rem, 5vw, 4rem); margin-bottom: 1.5rem; }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
p { color: var(--color-text-muted); font-size: 1.125rem; }
.text-gradient {
  background: linear-gradient(135deg, var(--color-primary) 0%, #818CF8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.875rem 1.75rem; border-radius: var(--radius-md); font-weight: 600;
  font-size: 1rem; text-decoration: none; transition: var(--transition);
  border: 2px solid transparent; cursor: pointer;
}
.btn-primary {
  background-color: var(--color-primary); color: white;
  box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.39);
}
.btn-primary:hover {
  background-color: var(--color-primary-hover); transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.23);
}
.btn-outline { background-color: transparent; color: var(--color-text); border-color: var(--color-border); }
.btn-outline:hover { border-color: var(--color-text); background-color: var(--color-surface); }
.btn-lg { padding: 1rem 2rem; font-size: 1.125rem; }

/* ========================================= */
/* Navbar — FIXED для iOS и Telegram */
/* ========================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  padding: 1rem 0;
  height: 72px;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: transform;
  position: -webkit-sticky;
  position: sticky;
}
.nav-container { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.logo {
  display: flex; align-items: center; gap: 0.5rem; text-decoration: none;
  color: var(--color-text); font-weight: 800; font-size: 1.5rem;
}
.logo-icon { color: var(--color-primary); }

.nav-links { 
  display: none; 
  gap: 2rem; 
  align-items: center;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  padding: 1.5rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  border-top: 1px solid #E2E8F0;
  flex-direction: column;
}

/* Класс для открытого меню на мобильных */
.nav-links.is-open {
  display: flex !important;
}

.nav-links a { 
  text-decoration: none; 
  color: var(--color-text-muted); 
  font-weight: 500; 
  transition: var(--transition);
  white-space: nowrap;
  touch-action: manipulation; /* Предотвращает задержки на мобильных */
  cursor: pointer;
}

/* Стили только для мобильного меню */
.nav-links.is-open a {
  width: 100%;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

.nav-links.is-open a:last-child {
  border-bottom: none;
}

.nav-links a:hover { color: var(--color-primary); }
.nav-cta { display: none; }
.mobile-menu-btn { 
  background: none; 
  border: none; 
  cursor: pointer; 
  color: var(--color-text); 
  display: flex;
  z-index: 1001;
}

/* Hero Section */
.hero { 
  position: relative; 
  padding: 4rem 0 4rem;
  overflow: hidden; 
}
.hero-container { display: grid; gap: 3rem; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--color-primary-light); color: var(--color-primary);
  padding: 0.5rem 1rem; border-radius: 9999px; font-size: 0.875rem;
  font-weight: 600; margin-bottom: 1.5rem;
}
.hero-subtitle { font-size: clamp(1.125rem, 2vw, 1.25rem); max-width: 540px; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 3rem; }
.hero-stats { display: flex; align-items: center; gap: 1.5rem; padding-top: 2rem; border-top: 1px solid var(--color-border); }
.stat { display: flex; flex-direction: column; }
.stat-number { font-size: 1.5rem; font-weight: 800; color: var(--color-text); }
.stat-label { font-size: 0.875rem; color: var(--color-text-muted); }
.stat-divider { width: 1px; height: 2rem; background-color: var(--color-border); }

.hero-image { position: relative; }
.image-wrapper {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg); border: 1px solid var(--color-border);
}
.image-wrapper img { width: 100%; height: auto; display: block; }
.floating-card {
  position: absolute; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(8px);
  padding: 1rem; border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 0.75rem; border: 1px solid rgba(255, 255, 255, 0.5);
  animation: float 6s ease-in-out infinite; max-width: 280px;
}
.card-1 { top: 15%; left: -5%; animation-delay: 0s; }
.fc-title { display: block; font-weight: 700; font-size: 0.875rem; color: var(--color-text); }
.fc-subtitle { display: block; font-size: 0.75rem; color: var(--color-text-muted); }
.text-primary { color: var(--color-primary); }

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}
.hero-bg-gradient {
  position: absolute; top: -20%; right: -10%; width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
  z-index: -1; pointer-events: none;
}

/* Sections General */
.section { padding: 6rem 0; }
.section-header { text-align: center; max-width: 640px; margin: 0 auto 4rem; }

/* Problem / Insights Section */
.testimonials { background-color: var(--color-surface); }
.testimonials-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.testimonial-card {
  background: var(--color-bg); padding: 2rem; border-radius: var(--radius-lg);
  border: 1px solid var(--color-border); display: flex; flex-direction: column;
}
.quote-icon { color: var(--color-primary); opacity: 0.3; margin-bottom: 1rem; }
.testimonial-text { font-size: 1.125rem; color: var(--color-text); margin-bottom: 1.5rem; font-style: italic; flex-grow: 1; }
.testimonial-author { 
  display: flex; 
  align-items: center; 
  gap: 1rem; 
  margin-top: auto;
}

/* ========================================= */
/* ФОТО АВТОРОВ — исправлено для iOS */
/* ========================================= */
.author-photo {
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  object-position: center top !important;
  flex-shrink: 0 !important;
  background-color: var(--color-primary-light);
  display: block !important;
  max-width: 48px !important;
}

.author-name { display: block; font-weight: 700; color: var(--color-text); }
.author-role { display: block; font-size: 0.875rem; color: var(--color-text-muted); }

/* Features Bento Grid */
.bento-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.bento-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 2rem; transition: var(--transition);
  position: relative; overflow: hidden;
}
.bento-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(79, 70, 229, 0.3); }
.card-icon {
  width: 48px; height: 48px; background: var(--color-primary-light); color: var(--color-primary);
  border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem;
}
.card-large { grid-row: span 2; }
.card-wide { grid-column: span 1; }

/* CTA Section & FORM */
.cta-section { padding: 4rem 0; }
.cta-box {
  background: var(--color-text); color: white; border-radius: var(--radius-xl);
  padding: 3rem 2rem; text-align: center; position: relative; overflow: hidden;
}
.cta-box::before {
  content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.4) 0%, rgba(15, 23, 42, 0) 60%);
  pointer-events: none;
}
.cta-box h2 { color: white; position: relative; z-index: 1; }
.cta-box p { color: #94A3B8; margin-bottom: 2rem; position: relative; z-index: 1; }
.cta-badge { position: relative; z-index: 1; background: rgba(79, 70, 229, 0.2); color: #818CF8; border: 1px solid rgba(79, 70, 229, 0.3); }

.cta-form { 
  max-width: 800px;
  margin: 0 auto; 
  position: relative; 
  z-index: 1; 
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}
.form-group input, 
.form-group select {
  padding: 1.125rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid #334155;
  background: #1E293B;
  color: white;
  font-size: 1.125rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
  width: 100%;
}
.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.25rem center;
  background-size: 1.25rem;
  padding-right: 3.5rem;
}
.form-group select option {
  background: #1E293B;
  color: white;
  font-size: 1rem;
  padding: 0.75rem;
}
.form-group input:focus, 
.form-group select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
}
.form-group input::placeholder {
  color: #94A3B8;
}
.form-group select:invalid {
  color: #94A3B8;
}
.form-note { font-size: 0.875rem; color: #64748B; }

/* Скрытое поле для "Другое" */
.hidden-field {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0 1.5rem;
  margin: 0;
  transition: max-height 0.4s ease, opacity 0.4s ease, padding 0.4s ease, margin 0.4s ease;
}
.hidden-field.visible {
  max-height: 100px;
  opacity: 1;
  padding: 1.125rem 1.5rem;
  margin: 0;
}

/* Success Message */
.success-message {
  position: relative; z-index: 1; padding: 2rem; background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3); border-radius: var(--radius-lg);
  animation: fadeIn 0.5s ease-out;
}
.success-icon { color: var(--color-success); width: 48px; height: 48px; margin-bottom: 1rem; }
.success-message h3 { color: white; margin-bottom: 0.5rem; }
.success-message p { color: #94A3B8; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Footer */
.footer { background: var(--color-surface); border-top: 1px solid var(--color-border); padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer-brand p { margin: 1rem 0; max-width: 300px; font-size: 1rem; }
.status-badge {
  display: inline-block; background: #FEF3C7; color: #92400E; padding: 0.25rem 0.75rem;
  border-radius: 9999px; font-size: 0.875rem; font-weight: 600;
}
.contact-email { color: var(--color-primary); text-decoration: none; font-weight: 500; }
.footer-links h4 { margin-bottom: 1.5rem; font-size: 1rem; }
.footer-links a { display: block; color: var(--color-text-muted); text-decoration: none; margin-bottom: 0.75rem; transition: var(--transition); }
.footer-links a:hover { color: var(--color-primary); }
.footer-bottom {
  border-top: 1px solid var(--color-border); padding-top: 2rem;
  display: flex; flex-direction: column; gap: 1rem; align-items: center; text-align: center;
}

/* Animations */
.fade-in-section { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; will-change: opacity, visibility; }
.fade-in-section.is-visible { opacity: 1; transform: none; }

/* Responsive */
@media (min-width: 768px) {
  .nav-links { 
    display: flex !important;
    position: static;
    flex-direction: row;
    background: transparent;
    padding: 0;
    box-shadow: none;
    border-top: none;
  }
  .nav-links.is-open {
    display: flex !important;
  }
  .nav-cta { display: inline-flex; }
  .mobile-menu-btn { display: none; }
  .hero-container { grid-template-columns: 1fr 1fr; }
  .hero-actions { flex-direction: row; }
  .testimonials-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1fr; }
  .footer-bottom { flex-direction: row; justify-content: space-between; text-align: left; }
  
  .form-group {
    flex-direction: row;
    flex-wrap: wrap; 
    align-items: stretch;
  }
  .form-group input {
    flex: 2 1 320px;
  }
  .form-group select {
    flex: 1 1 260px;
  }
  .form-group button {
    flex: 0 0 auto;
    white-space: nowrap;
    min-width: 240px;
  }
}

@media (min-width: 1024px) {
  .bento-grid { grid-template-columns: repeat(3, 1fr); }
  .card-large { grid-column: span 1; grid-row: span 2; }
  .card-wide { grid-column: span 2; }
}

/* ========================================= */
/* iOS Safari специфичные фиксы */
/* ========================================= */
@supports (-webkit-touch-callout: none) {
  .author-photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
  }
  
  .navbar {
    position: fixed;
    top: 0;
  }
}

/* ========================================= */
/* iOS Safari фиксы для меню */
/* ========================================= */
.nav-links a {
  text-decoration: none !important;
  -webkit-text-decoration: none !important;
}

.nav-links.is-open a {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

/* Убираем подчеркивание для всех ссылок в навигации */
.navbar a {
  text-decoration: none !important;
  -webkit-text-decoration: none !important;
}