* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    scroll-behavior: smooth;
    scrollbar-width: none;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    font-family: Arial, sans-serif;
    color: #ffffff;
	background-image: url('pic/top-left.webp'),
                      url('pic/top-right.webp'),
                      url('pic/bottom-left.webp'),
                      url('pic/bottom-right.webp'),
					  url('pic/fon9.jpg');
	background-position: top left, 
                         top right, 
                         bottom left, 
                         bottom right, 
                         center;
	background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;
    background-size: 200px, 200px, 200px, 200px, cover;					 
    background-attachment: fixed;
}

.falling-text {
    font-size: 3em;
    font-weight: bold;
    display: inline-block;
}

.falling-text span {
    display: inline-block;
    opacity: 0;
    animation: fall 1s forwards;
}

.falling-text span:nth-child(1) {
    animation-delay: 0s;
}
.falling-text span:nth-child(2) {
    animation-delay: 0.1s;
}
.falling-text span:nth-child(3) {
    animation-delay: 0.2s;
}
.falling-text span:nth-child(4) {
    animation-delay: 0.3s;
}
.falling-text span:nth-child(5) {
    animation-delay: 0.4s;
}
.falling-text span:nth-child(6) {
    animation-delay: 0.5s;
}
.falling-text span:nth-child(7) {
    animation-delay: 0.6s;
}
.falling-text span:nth-child(8) {
    animation-delay: 0.7s;
}
.falling-text span:nth-child(9) {
    animation-delay: 0.8s;
}
.falling-text span:nth-child(10) {
    animation-delay: 0.9s;
}
.falling-text span:nth-child(11) {
    animation-delay: 1s;
}
.falling-text span:nth-child(12) {
    animation-delay: 1.1s;
}
.falling-text span:nth-child(13) {
    animation-delay: 1.2s;
}
.falling-text span:nth-child(14) {
    animation-delay: 1.3s;
}
.falling-text span:nth-child(15) {
    animation-delay: 1.4s;
}
.falling-text span:nth-child(16) {
    animation-delay: 1.5s;
}
.falling-text span:nth-child(17) {
    animation-delay: 1.6s;
}
.falling-text span:nth-child(18) {
    animation-delay: 1.7s;
}
.falling-text span:nth-child(19) {
    animation-delay: 1.8s;
}
.falling-text span:nth-child(20) {
    animation-delay: 1.9s;
}
.falling-text span:nth-child(21) {
    animation-delay: 2s;
}
.falling-text span:nth-child(22) {
    animation-delay: 2.1s;
}
.falling-text span:nth-child(23) {
    animation-delay: 2.2s;
}
.falling-text span:nth-child(24) {
    animation-delay: 2.3s;
}
.falling-text span:nth-child(25) {
    animation-delay: 2.4s;
}
.falling-text span:nth-child(26) {
    animation-delay: 2.5s;
}
.falling-text span:nth-child(27) {
    animation-delay: 2.6s;
}
.falling-text span:nth-child(28) {
    animation-delay: 2.7s;
}
.falling-text span:nth-child(29) {
    animation-delay: 2.8s;
}
.falling-text span:nth-child(30) {
    animation-delay: 2.9s;
}
.falling-text span:nth-child(31) {
    animation-delay: 3.0s;
}
.falling-text span:nth-child(32) {
    animation-delay: 3.1s;
}
.falling-text span:nth-child(33) {
    animation-delay: 3.2s;
}
.falling-text span:nth-child(34) {
    animation-delay: 3.3s;
}
.falling-text span:nth-child(35) {
    animation-delay: 3.4s;
}

@keyframes fall {
    0% {
        transform: translateY(-50px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

::-webkit-scrollbar {
    display: none;
}

.overlay {
    background: rgba(0, 0, 0, 0);
    min-height: 100vh;
    width: 100%;
    position: relative;
    z-index: 1;
}

header {
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10;
}

header h1 {
    font-family: sans-serif;
    font-weight: 700;
    background: linear-gradient(90deg, #090979, #090979);
    -webkit-background-clip: text;
    -webkit-text-fill-color: #86fce0f7;
    text-shadow: 0 0 5px #ffcf40,
                 0 0 10px #ffcf40,
                 0 0 20px #ff6c00,
                 0 0 30px #ff6c00;
    font-size: 2.5rem;
    transition: font-size 0.3s;
}

nav a {
    color: #fff;
    margin-left: 20px;
    text-decoration: none;
    font-size: 18px;
    transition: 0.3s;
	font-size: 1.5em;
}

nav a:hover { color: #f40606; }

nav p {
	font-weight: bold;
}
	
nav p:hover { color: #093cd5; }

.btn-gallery {
    margin-top: 5px;
    padding: 12px 18px;
    background: linear-gradient(90deg, #e3212100, #5c697500);
    color: #ffffff;
    font-weight: bold;
    text-decoration: none;
    border-radius: 30px;
    transition: 0.3s;
}

.btn-gallery:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(244, 6, 6, 0.8);
}

.main-content { flex-grow: 1; padding: 10px; }

.hero {
    padding-top: 60px;
    text-align: center;
    animation: fadeIn 5s ease;
}

/* === 3D-ПРИБЛИЖЕНИЕ === */
.hero {
    max-width: 800px;
    margin: 80px auto;
    padding: 40px;

    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0);

    /* стартовое состояние */
    transform:
        perspective(1000px)
        translateZ(-400px)
        scale(0.4)
        rotateX(10deg);

    opacity: 0;

    /* анимация */
    animation: zoom3D 2.5s ease-out forwards;
}

/* КЛЮЧЕВЫЕ КАДРЫ */
@keyframes zoom3D {
    to {
        transform:
            perspective(1000px)
            translateZ(0)
            scale(1)
            rotateX(0deg);
        opacity: 1;
    }
}

.hero h2 { 
        font-size: 48px;
        margin-bottom: 20px;
}

.hero p {
    font-size: 22px;
    max-width: 600px;
    margin: auto;
}

.section {
    padding: 80px 20px;
    text-align: center;
}

footer {
    position: fixed;
    bottom: 10px;
    width: 100%;
    text-align: center;
    color: #ffffff;
    font-size: 0.4em;
    z-index: 2;

    pointer-events: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes swipeLeftClose {
    from { transform: translateX(0) scale(1); opacity: 1; }
    to   { transform: translateX(-150%) scale(0.8); opacity: 0; }
}
.swipe-left-close { animation: swipeLeftClose 0.4s ease forwards; }

@media (max-width: 768px) {
    nav a {font-size: large;}
	.hero h2 {font-size: 10vw;}
}

@media (max-width: 480px) {
    header {padding: 20px 0px; text-align: center;}
	.btn-gallery {padding: 12px 0px;}
	.hero h2 {font-size: 26px;}
}

@media (max-width: 1024px) {
    #closeViewer { font-size: 30px; }
    #viewerVideo { max-width: 95%; max-height: 85vh; }
}

@media (max-width: 768px) {
    #closeViewer { font-size: 25px; }
    #viewerVideo { max-height: 80vh; }
    .video-gallery { grid-template-columns: 1fr; }
    footer p { font-size: 14px; }
}

@media (max-width: 480px) {
    #closeViewer {
        font-size: clamp(40px, 12vw, 65px);
        top: 10px;
        right: 10px;
    }
    #viewerVideo { max-height: 75vh; }
    footer p { font-size: 12px; }
}

@media (max-width: 320px) {
    #closeViewer { font-size: 20px; }
    footer p { font-size: 10px; }
}

@media screen and (max-width: 768px) {
  body {
    background-size: 100px, 100px, 100px, 100px, cover;
  }
}