﻿:root {
	--bg-light: #f5f5f5;
	--bg-dark: #3f36c0;
	--bg-darker: #b02020;
	--bg-section-dark-gradient: linear-gradient(
		135deg,
		rgba(13, 13, 13, 0.95),
		rgba(30, 30, 30, 0.85)
	);
	--bg-section-light-gradient: linear-gradient(
		135deg,
		rgba(20, 20, 20, 0.95),
		rgba(45, 45, 45, 0.85)
	);
	--text-light: #fff;
	--accent: #8d46e7;
}

/* --- Reset --- */
* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html,
body {
	overscroll-behavior-y: contain; /* предотвращает «выпрыгивание» фиксированных элементов */
	/* или для полностью блокировки */
	/* overflow-y: hidden; */
}

body {
  -webkit-overflow-scrolling: auto; /* 3️⃣ Для iOS Safari отключает инерцию, фиксирует элементы */
}

body {
	font-family: Helvetica, Arial, sans-serif;
	background: var(--bg-light);
	color: var(--text-light);
	line-height: 1.6;
	scroll-behavior: smooth;
	overflow-x: hidden;
}

/* --- Main --- */
main {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
}

/* --- Sections --- */
section {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 100px 20px;
	width: 100%;
	position: relative;
	overflow: hidden;
	margin: 0;
	border-radius: 0px;
}

/* --- backgrounds for sections --- */
main > section:not(.hero):nth-of-type(odd) {
	background: var(--bg-section-dark-gradient);
}

main > section:not(.hero):nth-of-type(even) {
	background: var(--bg-section-light-gradient);
}

/* Псевдо-слой для легкого шума */
main > section:not(.hero)::before {
	content: '';
	position: absolute;
	inset: 0;
	pointer-events: none;
	background-image: url('https://www.transparenttextures.com/patterns/asfalt-light.png');
	opacity: 0.1;
	mix-blend-mode: overlay;
}

/* --- Blocks & Images --- */
.block,
.image {
	width: 85%;
	margin: 20px 0;
	padding: 40px;
	background: rgba(255, 255, 255, 0.08);
	backdrop-filter: blur(10px);
	border-radius: 18px;
	opacity: 0;
	transform: translateY(60px);
	will-change: opacity, transform;
}

.image {
	display: flex;
	justify-content: center;
	align-items: center;
	height: 300px;
	background-size: cover;
	background-position: center;
	opacity: 0; /* 🆕 добавлено — предотвращает резкое появление */
	transition: opacity 0.6s ease; /* 🆕 добавлено — плавный fade-in */
}

/* --- Fade-in только для фоновых изображений (без влияния на layout) --- */
.image.fade-in {
	opacity: 1; /* 🆕 добавлено — делает мягкое проявление */
}

/* --- Cascade Animation --- */
@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(60px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* --- появление контента при скролле --- */
.visible {
	opacity: 1;
	animation: fadeInUp 0.9s ease-out forwards;
}

/* --- Footer --- */
footer {
	text-align: center;
	padding: 60px 20px;
	font-size: 0.9rem;
	color: rgba(255, 255, 255, 0.6);
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(13, 13, 13, 0.9);
	backdrop-filter: blur(6px);
}
