/* ========== МАКСИМАЛЬНАЯ АДАПТАЦИЯ ПОД ВСЕ УСТРОЙСТВА ========== */
/* Версия: 2025-10-02-ultra-responsive */
/* Адаптация на уровне Claude Sonnet - плавное масштабирование */

/* ========== БАЗОВЫЕ НАСТРОЙКИ ========== */
* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  font-size: 16px;
  overflow-x: hidden;
  width: 100%;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  font-size: clamp(14px, 1.5vw, 16px);
  line-height: 1.6;
}

/* ========== НАВИГАЦИЯ - DESKTOP УЛУЧШЕНИЯ ========== */
@media (min-width: 1200px) {
  .nav-beautiful__container {
    max-width: 1400px;
    padding: 14px 32px;
  }

  .nav-beautiful__logo-img {
    width: 48px;
    height: 48px;
  }

  .nav-beautiful__logo-title {
    font-size: 22px;
  }

  .nav-beautiful__logo-slogan {
    font-size: 11px;
  }

  .nav-beautiful__btn {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
  }

  .nav-beautiful__cta {
    padding: 14px 28px;
    font-size: 15px;
  }

  .nav-beautiful__menu {
    gap: 16px;
  }
}

/* ========== НАВИГАЦИЯ - СРЕДНИЕ DESKTOP ========== */
@media (min-width: 1024px) and (max-width: 1199px) {
  .nav-beautiful__container {
    padding: 12px 24px;
  }

  .nav-beautiful__btn {
    padding: 10px 20px;
    font-size: 14px;
  }

  .nav-beautiful__cta {
    padding: 12px 24px;
    font-size: 14px;
  }

  .nav-beautiful__menu {
    gap: 12px;
  }
}

/* ========== НАВИГАЦИЯ - ПЛАНШЕТЫ ========== */
@media (min-width: 768px) and (max-width: 1023px) {
  .nav-beautiful__container {
    padding: 10px 20px;
  }

  .nav-beautiful__logo-img {
    width: 36px;
    height: 36px;
  }

  .nav-beautiful__logo-title {
    font-size: 18px;
  }

  .nav-beautiful__btn {
    padding: 8px 16px;
    font-size: 13px;
  }

  .nav-beautiful__cta {
    padding: 10px 20px;
    font-size: 13px;
  }

  .nav-beautiful__menu {
    gap: 10px;
  }

  .nav-beautiful__logo-slogan {
    font-size: 9px;
  }
}

/* ========== НАВИГАЦИЯ - МОБИЛЬНЫЕ ========== */
@media (max-width: 767px) {
  .nav-beautiful__container {
    padding: 10px 16px;
    height: auto;
    min-height: 60px;
  }

  .nav-beautiful__logo {
    z-index: 1002;
  }

  .nav-beautiful__logo-img {
    width: 36px;
    height: 36px;
  }

  .nav-beautiful__logo-title {
    font-size: 17px;
  }

  .nav-beautiful__logo-slogan {
    font-size: 9px;
  }

  /* Мобильное меню */
  .nav-beautiful__menu {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: calc(100vh - 60px);
    height: calc(100dvh - 60px);
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(40px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 20px;
    gap: 12px;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
  }

  .nav-beautiful.open .nav-beautiful__menu {
    transform: translateX(0);
  }

  /* Кнопки в мобильном меню */
  .nav-beautiful__dropdown-wrapper {
    width: 100%;
  }

  .nav-beautiful__btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
    justify-content: space-between;
  }

  /* Dropdown в мобильном меню */
  .nav-beautiful__dropdown {
    position: static;
    transform: none;
    max-width: none;
    margin-top: 8px;
    max-height: 0;
    overflow: hidden;
    transition:
      max-height 0.3s ease,
      opacity 0.3s ease;
    opacity: 0;
  }

  .nav-beautiful__dropdown-wrapper.open .nav-beautiful__dropdown {
    max-height: 1000px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* CTA в мобильном меню */
  .nav-beautiful__cta {
    width: 100%;
    padding: 14px 24px;
    font-size: 15px;
    justify-content: center;
    margin-top: 12px;
  }

  /* Бургер-меню */
  .nav-beautiful__mobile-toggle {
    z-index: 1002;
  }
}

/* ========== HERO СЕКЦИЯ - АДАПТАЦИЯ ========== */
@media (min-width: 1200px) {
  .hero {
    padding-top: 100px;
    padding-bottom: 80px;
  }

  .hero-title {
    font-size: clamp(40px, 5vw, 56px);
    line-height: 1.2;
    margin-bottom: 24px;
  }

  .hero-subtitle {
    font-size: clamp(18px, 2vw, 22px);
    line-height: 1.6;
    max-width: 900px;
    margin: 0 auto 40px;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .hero {
    padding-top: 80px;
    padding-bottom: 60px;
  }

  .hero-title {
    font-size: clamp(32px, 4vw, 42px);
    line-height: 1.2;
    margin-bottom: 20px;
  }

  .hero-subtitle {
    font-size: clamp(16px, 2vw, 19px);
    line-height: 1.5;
    max-width: 700px;
    margin: 0 auto 32px;
  }
}

@media (max-width: 767px) {
  .hero {
    padding-top: 70px;
    padding-bottom: 50px;
  }

  .hero-title {
    font-size: clamp(26px, 6vw, 34px);
    line-height: 1.2;
    margin-bottom: 16px;
  }

  .hero-subtitle {
    font-size: clamp(15px, 3.5vw, 17px);
    line-height: 1.5;
    margin-bottom: 28px;
  }
}

/* ========== FLOW CHART - АДАПТАЦИЯ ========== */
@media (min-width: 1200px) {
  .flow-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
  }

  .flow-box {
    padding: 24px;
    min-height: 180px;
  }

  .flow-icon {
    font-size: 48px;
    margin-bottom: 12px;
  }

  .flow-text {
    font-size: 16px;
    line-height: 1.4;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .flow-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .flow-box {
    padding: 20px;
    min-height: 160px;
  }

  .flow-icon {
    font-size: 40px;
    margin-bottom: 10px;
  }

  .flow-text {
    font-size: 15px;
    line-height: 1.4;
  }
}

@media (max-width: 767px) {
  .flow-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .flow-box {
    padding: 18px;
    min-height: auto;
  }

  .flow-icon {
    font-size: 36px;
    margin-bottom: 8px;
  }

  .flow-text {
    font-size: 14px;
    line-height: 1.4;
  }

  /* Скрываем стрелки на мобильных */
  .flow-arrow {
    display: none;
  }
}

/* ========== КАРТОЧКИ - АДАПТАЦИЯ ========== */
@media (min-width: 1200px) {
  .card,
  .investor-card {
    padding: 28px;
  }

  .card h3,
  .investor-card h3 {
    font-size: 22px;
    margin-bottom: 14px;
  }

  .card p,
  .investor-card p {
    font-size: 16px;
    line-height: 1.6;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .card,
  .investor-card {
    padding: 22px;
  }

  .card h3,
  .investor-card h3 {
    font-size: 19px;
    margin-bottom: 12px;
  }

  .card p,
  .investor-card p {
    font-size: 15px;
    line-height: 1.5;
  }
}

@media (max-width: 767px) {
  .card,
  .investor-card {
    padding: 18px;
  }

  .card h3,
  .investor-card h3 {
    font-size: 17px;
    margin-bottom: 10px;
  }

  .card p,
  .investor-card p {
    font-size: 14px;
    line-height: 1.5;
  }
}

/* ========== КОНТЕЙНЕРЫ - АДАПТАЦИЯ ========== */
@media (min-width: 1200px) {
  .container {
    max-width: 1200px;
    padding-left: 32px;
    padding-right: 32px;
  }

  .section {
    padding-top: 80px;
    padding-bottom: 80px;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .container {
    max-width: 960px;
    padding-left: 24px;
    padding-right: 24px;
  }

  .section {
    padding-top: 60px;
    padding-bottom: 60px;
  }
}

@media (max-width: 767px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .section {
    padding-top: 50px;
    padding-bottom: 50px;
  }
}

/* ========== ТИПОГРАФИКА - АДАПТАЦИЯ ========== */
@media (min-width: 1200px) {
  h1 {
    font-size: clamp(36px, 4vw, 48px);
  }
  h2 {
    font-size: clamp(30px, 3.5vw, 38px);
  }
  h3 {
    font-size: clamp(24px, 3vw, 30px);
  }
  p {
    font-size: clamp(16px, 1.5vw, 18px);
    line-height: 1.7;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  h1 {
    font-size: clamp(28px, 4vw, 36px);
  }
  h2 {
    font-size: clamp(24px, 3.5vw, 30px);
  }
  h3 {
    font-size: clamp(20px, 3vw, 24px);
  }
  p {
    font-size: clamp(15px, 1.5vw, 17px);
    line-height: 1.6;
  }
}

@media (max-width: 767px) {
  h1 {
    font-size: clamp(24px, 5vw, 30px);
  }
  h2 {
    font-size: clamp(20px, 4vw, 26px);
  }
  h3 {
    font-size: clamp(18px, 3.5vw, 22px);
  }
  p {
    font-size: clamp(14px, 3vw, 16px);
    line-height: 1.6;
  }
}

/* ========== КНОПКИ - АДАПТАЦИЯ ========== */
@media (min-width: 1200px) {
  .btn,
  .cta-button {
    padding: 14px 32px;
    font-size: 16px;
    min-height: 52px;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .btn,
  .cta-button {
    padding: 12px 28px;
    font-size: 15px;
    min-height: 48px;
  }
}

@media (max-width: 767px) {
  .btn,
  .cta-button {
    padding: 12px 24px;
    font-size: 15px;
    min-height: 48px;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }
}

/* ========== ТЕКСТ - ПЕРЕПОЛНЕНИЕ ========== */
h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
a,
li {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* ========== ИЗОБРАЖЕНИЯ И МЕДИА ========== */
img,
video,
iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========== GRID СИСТЕМЫ ========== */
.grid,
.investors-grid,
.feature-grid,
.highlight-grid {
  display: grid;
  gap: clamp(16px, 2.5vw, 32px);
  width: 100%;
}

@media (max-width: 767px) {
  .grid,
  .investors-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .grid,
  .investors-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px;
  }
}

@media (min-width: 1024px) {
  .grid,
  .investors-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px;
  }
}

/* ========== SAFE AREA ========== */
.nav-beautiful {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-top: env(safe-area-inset-top);
}

.nav-beautiful__menu {
  padding-bottom: env(safe-area-inset-bottom);
}

/* ========== МАЛЫЕ МОБИЛЬНЫЕ (<360px) ========== */
@media (max-width: 359px) {
  .nav-beautiful__logo-title {
    font-size: 15px;
  }

  .nav-beautiful__logo-slogan {
    display: none;
  }

  .hero-title {
    font-size: 22px;
  }

  .hero-subtitle {
    font-size: 14px;
  }

  .flow-box {
    padding: 14px;
  }

  .card,
  .investor-card {
    padding: 14px;
  }
}

/* ========== БОЛЬШИЕ ДЕСКТОПЫ (>1600px) ========== */
@media (min-width: 1600px) {
  .nav-beautiful__container {
    max-width: 1600px;
  }

  .container {
    max-width: 1400px;
  }

  .hero-title {
    font-size: 60px;
  }

  .hero-subtitle {
    font-size: 24px;
  }
}

/* ========== ULTRA-WIDE DISPLAYS (>2000px) ========== */
@media (min-width: 2000px) {
  .container {
    max-width: 1800px;
  }

  .hero-title {
    font-size: 72px;
  }

  .hero-subtitle {
    font-size: 28px;
  }
}

/* ========== RETINA ДИСПЛЕИ ========== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  * {
    -webkit-font-smoothing: subpixel-antialiased;
  }
}

/* ========== PERFORMANCE OPTIMIZATIONS ========== */
/* Smooth transitions for all interactive elements */
a,
button,
.btn,
.nav-beautiful__btn {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Prevent layout shift on hover */
.footer-nav a,
.nav-beautiful__dropdown-item {
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* Optimize for touch devices */
@media (hover: none) and (pointer: coarse) {
  .btn,
  button,
  a {
    min-height: 44px;
    min-width: 44px;
  }

  .nav-beautiful__btn {
    padding: 14px 20px;
  }
}

/* Optimize animations */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .btn,
  .nav-beautiful__btn {
    border-width: 3px;
  }
}

/* ========== LANDSCAPE MOBILE DEVICES ========== */
@media (max-width: 896px) and (orientation: landscape) {
  .hero {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .section {
    padding-top: 40px;
    padding-bottom: 40px;
  }
}

/* ========== TABLET PORTRAIT ========== */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  .container {
    max-width: 720px;
    padding-left: 32px;
    padding-right: 32px;
  }

  .hero-title {
    font-size: clamp(36px, 5vw, 44px);
  }
}

/* ========== PRINT STYLES ========== */
@media print {
  .nav-beautiful,
  .footer,
  .scroll-top-btn {
    display: none !important;
  }

  .section {
    page-break-inside: avoid;
  }
}

/* ========== КОНТЕЙНЕРЫ С ПЛАВНЫМ МАСШТАБИРОВАНИЕМ ========== */
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  transition:
    max-width 0.3s ease,
    padding 0.3s ease;
}

/* ========== FOOTER RESPONSIVENESS ========== */
@media (max-width: 768px) {
  .scroll-top-btn {
    right: 1rem;
    width: 52px;
    height: 52px;
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .scroll-top-btn {
    right: 0.75rem;
    width: 48px;
    height: 48px;
    top: -30px;
  }
}
