{step.description}
@@ -146,7 +153,6 @@ const { font-family: 'Inter', system-ui, -apple-system, sans-serif; } - /* Декоративные элементы фона */ .steps-section::before { content: ''; position: absolute; @@ -177,7 +183,6 @@ const { z-index: 2; } - /* Заголовок секции */ .section-header { margin-bottom: 4rem; text-align: center; @@ -226,14 +231,14 @@ const { line-height: 1.6; } - /* --- АНИМАЦИИ ПРИ СКРОЛЛИНГЕ --- */ + /* ИСПРАВЛЕНИЕ LCP: opacity: 1 по умолчанию! */ .animate-on-scroll { - opacity: 0; + opacity: 1; + transform: translateY(0); will-change: opacity, transform; } [data-animation="fade-up"] { - transform: translateY(40px); transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1); } @@ -243,7 +248,6 @@ const { transform: translateY(0); } - /* Контейнер шагов */ .steps-container { display: flex; justify-content: space-between; @@ -258,7 +262,6 @@ const { position: relative; } - /* Вертикальный соединитель для мобильной версии (скрыт по умолчанию) */ .mobile-connector { display: none; position: absolute; @@ -288,7 +291,6 @@ const { box-shadow: 0 0 10px var(--color-accent); } - /* Карточка шага */ .step-card { position: relative; background: rgba(255, 255, 255, 0.03); @@ -303,8 +305,6 @@ const { flex-direction: column; } - /* Убрана верхняя полоса внутри карточки */ - .step-card:hover { transform: translateY(-8px); background: rgba(255, 255, 255, 0.05); @@ -328,7 +328,6 @@ const { opacity: 1; } - /* Заголовок шага */ .step-header { display: flex; align-items: center; @@ -402,7 +401,6 @@ const { transform: scale(1.1); } - /* Текст шага */ .step-content { flex: 1; } @@ -422,7 +420,6 @@ const { margin: 0; } - /* Статистика */ .stats-bar { display: flex; justify-content: center; @@ -465,7 +462,6 @@ const { background: rgba(255, 255, 255, 0.1); } - /* CTA кнопка */ .steps-cta { text-align: center; } @@ -515,7 +511,6 @@ const { box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); } - /* --- АДАПТИВНОСТЬ --- */ @media (max-width: 1024px) { .steps-container { flex-direction: column; @@ -531,7 +526,6 @@ const { margin-bottom: 0; } - /* Показываем вертикальные соединители */ .mobile-connector { display: block; } @@ -619,12 +613,11 @@ const { } } - /* Уважаем prefers-reduced-motion */ @media (prefers-reduced-motion: reduce) { .animate-on-scroll { - opacity: 1; - transform: none; - transition: none; + opacity: 1 !important; + transform: none !important; + transition: none !important; } .step-card, @@ -651,7 +644,6 @@ const { const duration = 1500; const startTime = performance.now(); - // Easing функция (ease-out cubic) const easeOutCubic = (t: number) => 1 - Math.pow(1 - t, 3); function update(currentTime: number) { @@ -679,11 +671,9 @@ const { setTimeout(() => { el.classList.add('is-visible'); - // Если это stats-bar, запускаем анимацию счётчиков if (el.id === 'stats-bar') { const counters = el.querySelectorAll('.stat-number'); counters.forEach((counter, index) => { - // Небольшая задержка между счётчиками для каскадного эффекта setTimeout(() => { animateCounter(counter as HTMLElement); }, index * 150); @@ -696,7 +686,6 @@ const { }); }, observerOptions); - // Наблюдаем за всеми анимируемыми элементами document.querySelectorAll('.animate-on-scroll').forEach((el) => { observer.observe(el); }); diff --git a/frontend/src/components/home/WhyUs.astro b/frontend/src/components/home/WhyUs.astro index 368f4f9..d6e5dc4 100644 --- a/frontend/src/components/home/WhyUs.astro +++ b/frontend/src/components/home/WhyUs.astro @@ -4,7 +4,7 @@ const sectionData = { subtitle: "Почему мы?", title: "Локальная экспертиза в Сургуте", floatingText: - "Знаем специфику судов Сургута и регламенты местной полиции изнутри.", + "Знаем специфику судов Сургута и регламенты местной полиции изнутри.", imageUrl: "/images/home/dogovor.avif", }; @@ -28,25 +28,42 @@ const features = [ ]; --- + + +{sectionData.floatingText}
{feature.desc}
+{feature.desc}
+