/* ========================================
   Архитектура Проекта — Design System v2
   Градиенты, анимации, типографика
   ======================================== */

:root {
  /* Основные цвета */
  --accent: #2f6fed;
  --accent-dark: #1a5ad1;
  --accent-light: #e8f0fe;
  --text: #1a1a2e;
  --text-secondary: #5a5a6e;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --border: #e2e8f0;

  /* Градиенты */
  --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  --gradient-blue: linear-gradient(135deg, #2f6fed 0%, #1a5ad1 100%);
  --gradient-card: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(247,249,252,0.8) 100%);

  /* Тени */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --shadow-hover: 0 8px 30px rgba(47,111,237,0.18);

  /* Скругления */
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Анимации */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Сброс */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: var(--accent); transition: var(--transition); }
a:hover { color: var(--accent-dark); }

/* ========================================
   АНИМАЦИИ
   ======================================== */

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

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

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.animate {
  opacity: 0;
  animation: fadeInUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ========================================
   HEADER
   ======================================== */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.85);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.nav { display: flex; gap: 28px; }
.nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 4px 0;
}
.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.nav a:hover { color: var(--accent); }
.nav a:hover::after { width: 100%; }

/* ========================================
   HERO
   ======================================== */

.hero {
  position: relative;
  background: var(--gradient-hero);
  color: #fff;
  padding: 100px 24px 80px;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.3;
}

.hero > * { position: relative; z-index: 1; }

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 20px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.hero h1 span {
  background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero > p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 640px;
  margin: 0 auto 32px;
  opacity: 0.95;
  line-height: 1.6;
}

.hero-btns {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========================================
   КНОПКИ
   ======================================== */

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--gradient-blue);
  color: #fff;
  box-shadow: 0 4px 16px rgba(47,111,237,0.35);
  transition: var(--transition);
  border: none;
  cursor: pointer;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(47,111,237,0.45);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.5);
  box-shadow: none;
}
.btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.8);
  color: #fff;
}

.btn-white {
  background: #fff;
  color: var(--accent);
  box-shadow: var(--shadow);
}
.btn-white:hover {
  background: var(--bg);
  box-shadow: var(--shadow-lg);
}

/* ========================================
   КОНТЕЙНЕР
   ======================================== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 24px;
}

.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 40px;
}

.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}

/* ========================================
   КАРТОЧКИ
   ======================================== */

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(47,111,237,0.2);
}

.card:hover::before { transform: scaleX(1); }

.card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.card p { color: var(--text-secondary); font-size: 0.95rem; }

.tag {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 12px;
}

/* ========================================
   FEATURES
   ======================================== */

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

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
}

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

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 1.4rem;
}

.feature h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature p { color: var(--text-secondary); font-size: 0.94rem; line-height: 1.6; }

/* ========================================
   STEPS
   ======================================== */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  counter-reset: step;
}

.step {
  position: relative;
  padding-left: 60px;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
  background: var(--gradient-blue);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(47,111,237,0.3);
}

.step h4 { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.step p { color: var(--text-secondary); font-size: 0.93rem; }

/* ========================================
   ALSO SECTION
   ======================================== */

.also-section {
  background: linear-gradient(135deg, #f8faff 0%, #f0f4ff 100%);
  border-radius: var(--radius-xl);
  padding: 40px;
  margin-top: 48px;
  border: 1px solid var(--border);
}

.also-section h2 { margin-bottom: 8px; }
.also-section > p { color: var(--text-secondary); margin-bottom: 24px; }

.also-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.also-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition);
}

.also-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(47,111,237,0.25);
}

.also-card h4 { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.also-card p { font-size: 0.88rem; color: var(--text-secondary); }

/* ========================================
   TEASER
   ======================================== */

.teaser {
  background: linear-gradient(135deg, #fff8f0 0%, #fff 100%);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.teaser-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.8rem;
  animation: float 3s ease-in-out infinite;
}

.teaser h3 { font-size: 1.3rem; margin-bottom: 10px; }
.teaser p { color: var(--text-secondary); max-width: 600px; margin: 0 auto; }

/* ========================================
   ФОРМА
   ======================================== */

.form-section {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 48px;
  margin: 48px 0;
  position: relative;
  overflow: hidden;
}

.form-section::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(47,111,237,0.2) 0%, transparent 70%);
}

.form-section h2 {
  font-size: 1.8rem;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.form-section > p {
  opacity: 0.7;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.form-field {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 14px 18px;
  color: #fff;
  font-size: 0.95rem;
  transition: var(--transition);
  width: 100%;
}

.form-field::placeholder { color: rgba(255,255,255,0.45); }
.form-field:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255,255,255,0.12);
}

.form-field.textarea {
  grid-column: 1 / -1;
  min-height: 120px;
  resize: vertical;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
  background: var(--text);
  color: #b0b8c8;
  padding: 56px 24px 24px;
}

.footer-inner { max-width: 1200px; margin: 0 auto; }

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

.footer-col h4 {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.footer-col p { font-size: 0.9rem; line-height: 1.7; }
.footer-col a {
  display: block;
  color: #b0b8c8;
  font-size: 0.9rem;
  margin-bottom: 8px;
  transition: color 0.2s;
}
.footer-col a:hover { color: #fff; }

.phone-link {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}
.phone-link:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 20px;
  font-size: 0.82rem;
  color: #6b7280;
}

/* ========================================
   АДАПТИВНОСТЬ
   ======================================== */

@media (max-width: 768px) {
  .header-inner { flex-direction: column; gap: 12px; padding: 12px 16px; }
  .nav { gap: 16px; flex-wrap: wrap; justify-content: center; }
  .hero { padding: 60px 16px 48px; }
  .container { padding: 40px 16px; }
  .also-section { padding: 24px; }
  .form-section { padding: 32px 24px; }
  .footer-grid { gap: 24px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.6rem; }
  .btn { padding: 12px 24px; font-size: 0.9rem; }
  .grid, .features, .also-grid { grid-template-columns: 1fr; }
}

/* ========================================
   ФОТО: HERO SPLIT, ГАЛЕРЕЯ, ШИРОКОЕ ФОТО
   ======================================== */

/* Hero с фото справа */
.hero-split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  text-align: left;
}

.hero-split .hero-text > p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 640px;
  margin: 0 0 32px;
  opacity: 0.95;
  line-height: 1.6;
}

.hero-split .hero-btns { justify-content: flex-start; }

.hero-media { position: relative; }

.hero-media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  transition: var(--transition);
}

.hero-media img:hover { transform: translateY(-4px) scale(1.01); }

/* Hero с фоновой фотографией (фон задаётся инлайн) */
.hero-photo {
  background-size: cover;
  background-position: center;
}

.hero-photo::before { opacity: 0.12; }

/* Галерея фотографий */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery a {
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.gallery a:hover img { transform: scale(1.06); }

/* Широкое фото внутри контента */
.photo-wide {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 48px;
  border: 1px solid var(--border);
}

.photo-wide img { width: 100%; display: block; }

.photo-caption {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: -40px;
  margin-bottom: 48px;
}

@media (max-width: 900px) {
  .hero-split { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .hero-split .hero-btns { justify-content: center; }
  .hero-split .hero-text > p { margin-left: auto; margin-right: auto; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

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