/* ===== CSS Variables ===== */
:root {
  --primary: #007AFF;
  --primary-dark: #0056CC;
  --primary-light: rgba(0, 122, 255, 0.1);
  --secondary: #4996D7;
  --accent: #00C6FF;
  --success: #34C759;
  --error: #FF3B30;
  --warning: #FF9500;
  
  --text: #1E293B;
  --text-light: #64748B;
  --text-lighter: #94A3B8;
  
  --background: #F8FAFC;
  --card-bg: #FFFFFF;
  --overlay: rgba(0, 0, 0, 0.5);
  
  --gradient: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  --gradient-light: linear-gradient(135deg, rgba(0, 122, 255, 0.1) 0%, rgba(0, 198, 255, 0.1) 100%);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow: 0 8px 30px rgba(0, 122, 255, 0.12);
  --shadow-lg: 0 15px 40px rgba(0, 122, 255, 0.18);
  --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.05);
  
  --border: #E2E8F0;
  --border-radius: 16px;
  --border-radius-sm: 12px;
  --border-radius-lg: 20px;
  
  --transition: all 0.3s ease;
  --transition-fast: all 0.15s ease;
  
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-base: 16px;
  --line-height: 1.7;
  
  --container-width: 1200px;
  --container-padding: 20px;
}

/* ===== Reset & Base Styles ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text);
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
}

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

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

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  background: var(--gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 40px 20px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 20px;
}

.logo-container {
  margin-bottom: 2rem;
}

.logo-container img {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
}

.logo {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(45deg, #FFFFFF, #E0F2FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tagline {
  font-size: 1.5rem;
  margin-bottom: 3rem;
  opacity: 0.95;
  font-weight: 400;
}

.features-list {
  text-align: left;
  display: inline-block;
  margin-bottom: 3rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.feature-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

/* ===== Buttons ===== */
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: white;
  color: var(--primary);
  padding: 18px 40px;
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: none;
  cursor: pointer;
  min-height: 60px;
}

.cta-button:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  color: var(--primary-dark);
}

.cta-button.secondary {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.cta-button.secondary:hover {
  background: rgba(255, 255, 255, 0.25);
}

.arrow-icon {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.cta-button:hover .arrow-icon {
  transform: translateX(4px);
}

.btn-primary, .btn-secondary {
  padding: 14px 28px;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
}

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

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

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

.btn-secondary:hover {
  background: #F1F5F9;
}

/* ===== Sections ===== */
section {
  padding: 100px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text);
}

/* ===== Stats Section ===== */
.stats {
  background: var(--card-bg);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.stat-card {
  background: var(--card-bg);
  padding: 40px 30px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient);
}

.stat-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.stat-number {
  font-size: 3.5rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  line-height: 1;
}

/* ===== Charts Section ===== */
.charts {
  background: var(--background);
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 40px;
}

.chart-container {
  position: relative;
  border-radius: var(--border-radius-lg);
  /* Основной фон */
  background: white;
  /* Градиентная рамка через псевдоэлемент */
}

.chart-container::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--border-radius-lg);
  background: var(--gradient);
  z-index: -1;
}

/* ===== Features Section ===== */
.features {
  background: var(--card-bg);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.feature-card {
  text-align: center;
  padding: 40px 30px;
  background: var(--background);
  border-radius: var(--border-radius-lg);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.feature-card .feature-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 2rem;
  color: white;
}

/* ===== Partners Section ===== */
.partners {
  background: var(--background);
}

.partners-subtitle {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 40px;
  color: var(--text-light);
  font-size: 1.1rem;
}

.partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.partner-card {
  background: var(--card-bg);
  padding: 40px 30px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.partner-card.highlighted {
  border: 2px solid var(--primary);
  transform: scale(1.05);
}

.partner-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.partner-card.highlighted:hover {
  transform: translateY(-5px) scale(1.05);
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.partner-price {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.5rem;
  margin: 1rem 0;
  flex-grow: 1;
}

.apply-btn {
  background: var(--gradient);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: auto;
  width: 100%;
}

.apply-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.apply-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* ===== Partner Form Modal ===== */
.partner-form-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.partner-form-wrapper[aria-hidden="false"] {
  display: flex;
}

.partner-form-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--overlay);
  backdrop-filter: blur(5px);
}

.partner-form {
  background: var(--card-bg);
  padding: 40px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  z-index: 1001;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
  padding: 5px;
  border-radius: 4px;
  transition: var(--transition);
}

.close-modal:hover {
  color: var(--text);
  background: var(--background);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--border-radius-sm);
  font-size: 1rem;
  transition: var(--transition);
  font-family: var(--font-family);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 30px;
}

.form-status {
  flex-basis: 100%;
  margin-top: 15px;
  padding: 12px;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
}

.form-status:not(:empty) {
  animation: fadeIn 0.3s ease;
}

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

.form-success {
  color: var(--success);
  background: rgba(52, 199, 89, 0.1);
  border: 1px solid rgba(52, 199, 89, 0.2);
}

.form-error {
  color: var(--error);
  background: rgba(255, 59, 48, 0.1);
  border: 1px solid rgba(255, 59, 48, 0.2);
}

.partner-login {
  text-align: center;
  margin-top: 40px;
}

.login-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  padding: 12px 24px;
  border-radius: var(--border-radius-sm);
  background: var(--background);
}

.login-btn:hover {
  color: var(--primary-dark);
  background: var(--primary-light);
}

/* ===== Final CTA ===== */
.final-cta {
  background: var(--gradient);
  color: white;
  text-align: center;
  padding: 100px 20px;
}

.final-cta h2 {
  color: white;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.final-cta p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

/* ===== Footer ===== */
footer {
  background: var(--text);
  color: white;
  padding: 60px 0 30px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3,
.footer-section h4 {
  color: white;
  margin-bottom: 1.5rem;
}

.footer-section p {
  color: #94A3B8;
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-link {
  color: #CBD5E1;
  text-decoration: none;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-link:hover {
  color: white;
  transform: translateX(5px);
}

.social-links {
  display: flex;
  gap: 16px;
  margin-top: 20px;
}

.social-link {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: white;
}

.social-link:hover {
  background: var(--primary);
  transform: translateY(-2px);
}

.copyright {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #94A3B8;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.footer-nav a {
  color: #94A3B8;
  text-decoration: none;
  transition: var(--transition);
}

.footer-nav a:hover {
  color: white;
}

/* ===== Animations ===== */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

.floating {
  animation: float 6s ease-in-out infinite;
}

/* ===== Accessibility ===== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles for keyboard navigation */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  z-index: 1001;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 10px;
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.2rem; }
  
  .logo { font-size: 3.5rem; }
  
  .charts-grid,
  .partner-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .partner-card.highlighted {
    transform: none;
  }
  
  .partner-card.highlighted:hover {
    transform: translateY(-5px);
  }
}

@media (max-width: 768px) {
  :root {
    --container-padding: 15px;
  }
  
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.3rem; }
  
  .logo { font-size: 2.8rem; }
  .tagline { font-size: 1.2rem; }
  
  section {
    padding: 70px 0;
  }
  
  .feature-item {
    font-size: 1rem;
  }
  
  .cta-button {
    padding: 16px 32px;
    font-size: 1.1rem;
  }
  
  .stats-grid,
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .partner-form {
    padding: 30px 20px;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .form-actions button {
    width: 100%;
  }
  
  .footer-nav {
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.7rem; }
  
  .logo { font-size: 2.2rem; }
  .tagline { font-size: 1.1rem; }
  
  .hero {
    min-height: 90vh;
  }
  
  .stat-number {
    font-size: 2.8rem;
  }
  
  .chart-container {
    padding: 20px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-link {
    justify-content: center;
  }
  
  .social-links {
    justify-content: center;
  }
}

/* Print styles */
@media print {
  .hero,
  .final-cta,
  footer {
    background: white !important;
    color: black !important;
  }
  
  .cta-button,
  .apply-btn,
  .social-links,
  .partner-form-wrapper {
    display: none !important;
  }
  
  a {
    color: black;
    text-decoration: underline;
  }
}