@import url("./components/buttons.css");
@import url("./components/forms.css");
@import url("./components/card.css");
@import url("./components/bento-grid.css");
@import url("./components/discount-form.css");
@import url("./components/info-block.css");
@import url("./components/checklist.css");

/* Design System — tokens */
:root {
  --header-h: 72px;
  /* Colors - Фиолетово-голубая схема */
  --indigo-500: #3b82f6;  /* Голубой вместо #4f46e5 */
  --violet-500: #8b5cf6;  /* Фиолетовый вместо #7c3aed */
  --violet-600: #8b5cf6;
  --violet-200: rgba(139, 92, 246, 0.15);
  --orange-500: #f97316;
  --green-500: #10b981;
  --green-600: #059669;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-100: #f3f4f6;
  --bg: #ffffff;
  --bg-alt: #f0f4ff;      /* Светло-голубой фон */
  --bg-hero-1: #f0f4ff;   /* Светло-голубой фон героя */
  --bg-hero-2: #e0ebff;   /* Более насыщенный голубой */

  /* Typography */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  
  /* Typography Scale (12px-48px) */
  --fs-xs: 12px;     /* Labels, captions, мелкий текст */
  --fs-sm: 14px;     /* Body small, вторичный текст */
  --fs-base: 16px;   /* Body основной, базовый размер */
  --fs-lg: 18px;     /* Body large, акценты */
  --fs-xl: 20px;     /* Subtitle, лиды */
  --fs-2xl: 24px;    /* H4, карточки заголовки */
  --fs-3xl: 28px;    /* H3, большие числа */
  --fs-4xl: 32px;    /* H2, секции заголовки */
  --fs-5xl: 36px;    /* Hero numbers, countdown */
  --fs-6xl: 42px;    /* H1, главные заголовки */
  --fs-7xl: 48px;    /* Display, очень крупные элементы */
  
  /* Text Colors */
  --text-heading: var(--gray-900);
  --text-body: var(--gray-900);
  --text-body-secondary: var(--gray-800);
  --text-caption: var(--gray-700);
  --text-disabled: var(--gray-500);
  --text-accent: var(--violet-500);
  
  /* Form Control Heights */
  --form-control-height: 52px;      /* Стандартная высота инпутов и кнопок */
  --form-control-padding-y: 15px;   /* Вертикальные отступы для высоты 52px */
  --form-control-padding-y-btn: 16px; /* Вертикальные отступы для кнопок (с учётом border) */
  --form-control-padding-y-focus: calc(var(--form-control-padding-y) - 1px); /* Focus padding для компенсации увеличения border */
  --form-control-padding-y-mobile: 13px; /* Мобильные отступы */
  --form-control-padding-y-mobile-focus: calc(var(--form-control-padding-y-mobile) - 1px); /* Мобильный focus padding */
  --form-control-border-radius: var(--radius-12); /* Единое скругление для всех form элементов */
  
  /* Legacy variables (updated to use new scale) */
  --fs-sm: var(--fs-sm);
  --fs-h1: clamp(var(--fs-3xl), 4vw, var(--fs-6xl));
  --fs-h2: clamp(var(--fs-2xl), 3.5vw, var(--fs-5xl));
  --fs-h3: clamp(var(--fs-xl), 3vw, var(--fs-4xl));
  --fs-h4: clamp(var(--fs-lg), 2.5vw, var(--fs-2xl));

  /* Spacing */
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Radius */
  --radius-8: 8px;
  --radius-12: 12px;
  --radius-16: 16px;
  --radius-20: 20px;
  --radius-24: 24px;

  /* Shadows - обновлены под новую цветовую схему */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-btn: 0 6px 20px rgba(59, 130, 246, 0.3);  /* Голубые тени для кнопок */
  
  /* Purple-Blue shadows for components */
  --shadow-purple-sm: 0 2px 8px rgba(59, 130, 246, 0.1);
  --shadow-purple: 0 4px 16px rgba(59, 130, 246, 0.15);
  --shadow-purple-lg: 0 8px 24px rgba(59, 130, 246, 0.2);
  
  /* Semantic Typography */
  --fs-body-xs: var(--fs-xs);      /* 12px - badges, timestamps */
  --fs-body-sm: var(--fs-sm);      /* 14px - buttons, labels */
  --fs-body: var(--fs-base);       /* 16px - основной текст */
  --fs-body-lg: var(--fs-lg);      /* 18px - лиды, CTA текст */
  --fs-heading-sm: var(--fs-2xl);  /* 24px - H4, card titles */
  --fs-heading-md: var(--fs-3xl);  /* 28px - H3, stats */
  --fs-heading-lg: var(--fs-4xl);  /* 32px - H2, section titles */
  --fs-heading-xl: var(--fs-6xl);  /* 42px - H1, hero titles */
  --fs-display-sm: var(--fs-5xl);  /* 36px - numbers, countdown */
  --fs-display-lg: var(--fs-7xl);  /* 48px - hero numbers */

  /* Text Colors - более контрастные */
  --color-text-primary: var(--gray-900);    /* #111827 - основной текст */
  --color-text-secondary: var(--gray-800);  /* #1f2937 - вторичный текст */
  --color-text-muted: var(--gray-700);      /* #374151 - приглушенный текст */
  --color-text-light: var(--gray-600);      /* #4b5563 - светлый текст */
  --color-text-subtle: var(--gray-500);     /* #6b7280 - очень светлый */

  /* Semantic Text Colors */
  --text-heading: var(--color-text-primary);     /* Заголовки - самый темный */
  --text-body: var(--color-text-primary);        /* Основной текст - темный */
  --text-body-secondary: var(--color-text-muted); /* Описания */
  --text-caption: var(--color-text-muted);       /* Подписи, лейблы */
  --text-placeholder: var(--color-text-light);   /* Плейсхолдеры */
  --text-disabled: var(--color-text-subtle);     /* Неактивные элементы */
  
  /* Legacy text colors (updated) */
  --color-text: var(--text-body);
  --color-text-light: var(--text-caption);
  --color-primary: var(--indigo-500);
  --color-secondary: var(--violet-500);
}

/* Base */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  padding-top: var(--header-h);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  color: var(--text-body);
  background: var(--bg);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1200px; width: 100%; margin-inline: auto; padding-inline: 20px; }

/* Typography */
h1, .h1 { font-size: var(--fs-h1); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 var(--space-4); color: var(--text-heading); }
h2, .h2 { font-size: var(--fs-h2); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 var(--space-4); color: var(--text-heading); }
h3, .h3 { font-size: var(--fs-h2); font-weight: 600; margin: 0 0 var(--space-8); color: var(--text-heading); }
.h4 { font-size: var(--fs-h4); font-weight: 600; margin: 0 0 var(--space-2); color: var(--text-caption); }
.subtitle { font-size: clamp(16px, 2vw, 20px); line-height: 1.6; color: var(--text-disabled); margin: 0 0 var(--space-6); }
.overline { font-size: var(--fs-body-sm); font-weight: 600; color: var(--indigo-500); text-transform: uppercase; letter-spacing: .08em; display: inline-block; margin-bottom: var(--space-3); }
.text-accent { background: linear-gradient(135deg, var(--indigo-500), var(--violet-500)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.text-center { text-align: center; }


/* Header (fixed) */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,.04);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.logo { font-weight: 700; font-size: var(--fs-heading-sm); letter-spacing: -0.02em; color: var(--text-heading); display: flex; align-items: center; }
.logo img { height: 32px; width: auto; }
.logo__accent { color: var(--indigo-500); }
.nav { display: none; gap: 6px; }
.nav__link { padding: 10px 12px; border-radius: var(--radius-8); color: var(--text-disabled); font-weight: 400; transition: .2s; font-size: 14px; white-space: nowrap; }
.nav__link:hover { color: var(--indigo-500); background: rgba(59,130,246,.08); }
.header__actions { display: flex; align-items: center; gap: 12px; }
.header-cta { box-shadow: var(--shadow-btn); }

.burger { display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; width: 40px; height: 40px; border: 0; background: transparent; padding: 8px; border-radius: 8px; cursor: pointer; }
.burger span { display: block; height: 2px; background: var(--indigo-500); border-radius: 2px; width: 100%; transition: all 0.3s ease; }

/* Burger animation when open */
.burger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu { position: fixed; top: var(--header-h); left: 0; right: 0; height: calc(100vh - var(--header-h)); background: #fff; transform: translateX(-100%); transition: transform .3s ease; padding: 24px 20px; z-index: 1001; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.mobile-menu.open { transform: translateX(0); }
.mobile-menu__link { padding: 14px 10px; border-bottom: 1px solid #f3f4f6; color: var(--text-caption); font-weight: 400; }
.mobile-menu__link:hover { color: var(--indigo-500); }

/* Hero */
.section-hero { background: linear-gradient(135deg, var(--bg-hero-1) 0%, var(--bg-hero-2) 100%); }
.hero-section { min-height: 50vh; display: flex; align-items: center; padding: 48px 0 64px; position: relative; overflow: hidden; }

.hero__content { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }

.hero-title { font-size: var(--fs-h1); font-weight: 700; line-height: 1.1; color: var(--text-heading); letter-spacing: -0.02em; margin-bottom: var(--space-4); }

.hero__right { display: flex; flex-direction: column; gap: 24px; }

.hero-course-block { background: #fff; border-radius: var(--radius-24); padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.1); }

.course-cover { 
  position: relative; 
  margin-bottom: 24px; 
  height: 100%;
  display: flex;
  align-items: center;
}
.course-image { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  border-radius: var(--radius-16); 
}
.course-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--indigo-500);
  color: white;
  padding: 6px 12px;
  border-radius: var(--radius-20);
  font-size: var(--fs-body-sm);
  font-weight: 600;
}

.hero-form {
  background: #fff;
  border-radius: var(--radius-16);
  padding: var(--space-6);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59,130,246,.08);
  margin-top: var(--space-12);
}

.form-title {
  font-size: var(--fs-lg);
  font-weight: 600;
  text-align: center;
  margin: 0 0 var(--space-4);
  color: var(--text-heading);
}

.form-disclaimer {
  font-size: var(--fs-body-xs);
  color: var(--text-disabled);
  text-align: center;
  margin-top: var(--space-4);
  line-height: 1.4;
}

/* Sections */
.section { padding: var(--space-16) 0; }
.section-alt { background: var(--bg-alt); }

.section-title {
  font-size: var(--fs-h2);
  font-weight: 600;
  color: var(--text-heading);
  margin: 0 0 var(--space-8);
  text-align: center;
}

/* Features */
.features-grid { display: grid; place-items: center; margin-bottom: var(--space-16); }

.features-list { display: grid; gap: var(--space-4); }

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--fs-body);
  color: var(--text-body-secondary);
}

.feature-item svg {
  flex-shrink: 0;
  color: var(--indigo-500);
  margin-top: 2px;
}

/* CTA Block */
.cta-block {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.cta-text {
  font-size: var(--fs-body);
  color: var(--text-body-secondary);
  margin-bottom: var(--space-8);
  line-height: 1.5;
}

/* Program Section */
.program-block { margin-bottom: var(--space-12); }

.lessons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
}

.lessons-list {
  list-style: decimal;
  padding-left: 20px;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text-body-secondary);
}

.lessons-list li {
  margin-bottom: var(--space-3);
}

/* Results Section */
.results-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.results-text {
  font-size: var(--fs-body-lg);
  color: var(--text-body-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-6);
}

.results-form {
  background: transparent;
  padding: 0;
  box-shadow: none;
  border: none;
}

.results-text-section {
  margin-bottom: 32px;
}

.results-form-block {
  background: #fff;
  border-radius: var(--radius-16);
  padding: var(--space-6);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59,130,246,.08);
}

.results-form .section-title {
  text-align: left;
  margin-bottom: var(--space-4);
}

/* Footer - White background version */
.footer {
  background: #fff;
  border-top: 1px solid rgba(79,70,229,.08);
  color: var(--text-body-secondary);
  padding: 24px 0;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.footer__brand {
  text-align: center;
}

.footer__copy {
  font-size: var(--fs-body-xs);
  color: var(--text-body-secondary);
  text-align: center;
}

.footer__link { 
  color: var(--text-body-secondary); 
  text-decoration: none; 
  position: relative;
}
.footer__link:hover { color: var(--text-body-secondary); text-decoration: underline; }

.mobile-break {
  display: none;
}

/* Hide separators on mobile, keep inline on desktop */
.desktop-only {
  display: inline;
}

/* Footer links row and separators */
.footer__links {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}
.footer__copyright { color: var(--text-body-secondary); }
.footer__links .footer__link + .footer__link {
  margin-left: 20px;
}
.footer__links .footer__link:not(:last-child)::after {
  content: "|";
  color: var(--text-disabled);
  position: absolute;
  right: -10px;
  pointer-events: none;
}

/* Адаптивные разделители - скрываем когда ссылки переносятся */
@media (max-width: 550px) {
  .footer__links {
    flex-direction: column;
    gap: 8px;
    align-items: center;
  }
  
  .footer__links .footer__link + .footer__link {
    margin-left: 0;
  }
  
  .footer__links .footer__link:not(:last-child)::after {
    display: none;
  }
}

.course-cover-mobile {
  display: none;
}

.course-cover-desktop {
  display: block;
}

/* Legacy footer styles for backwards compatibility */
.site-footer {
  background: var(--gray-100);
  padding: var(--space-12) 0 var(--space-8);
}

.site-footer .footer__content {
  text-align: center;
}

.site-footer .footer__author {
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--text-heading);
  margin: 0 0 var(--space-4);
}

.site-footer .footer__links {
  margin: 0 0 var(--space-6);
}

.site-footer .footer__copyright {
  font-size: var(--fs-body-sm);
  color: var(--text-disabled);
  margin: 0;
}

/* Decorations */
.hero-decoration {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--indigo-500), var(--violet-500));
  opacity: 0.1;
}

.decoration-1 {
  width: 300px;
  height: 300px;
  top: 10%;
  right: -100px;
}

.decoration-2 {
  width: 200px;
  height: 200px;
  bottom: 20%;
  left: -80px;
}

/* Additional styles for the free course page */
.discount-form--centered {
  max-width: 500px;
  margin: 0 auto;
}

.discount-form--centered .form-fields-horizontal {
  justify-content: center;
}

/* Fix for form spacing on mobile */
@media (max-width: 767px) {
  .discount-form--centered .form-fields-horizontal {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  
  .course-badge {
    font-size: var(--fs-body-xs);
    padding: 4px 8px;
  }
}
