/* Подключение пользовательских шрифтов */
@font-face {
    font-family: 'FortMain';
    src: url('fonts/fort-main.woff2') format('woff2'),
         url('fonts/fort-main.woff') format('woff'),
         url('fonts/fort-main.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'FortMain';
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #0a0f1e; 
    color: #fff;
    line-height: 1.6;
    position: relative;  
    min-height: 100vh;   
}

.bordered-section {
    position: relative;
}

.bordered-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 99;
    background: 
        url(assets/border-left.png) repeat-y left top / 12px auto,
        url(assets/border-right.png) repeat-y right top / 12px auto,
        url(assets/border-bottom.png) repeat-x left bottom / auto 12px,
        url(assets/border-top.png) repeat-x left top / auto 12px;
}

@media (min-width: 768px) {
    .bordered-section::before {
        background: 
            url(assets/border-left.png) repeat-y left top / 32px auto,
            url(assets/border-right.png) repeat-y right top / 32px auto,
            url(assets/border-bottom.png) repeat-x left bottom / auto 26px,
            url(assets/border-top.png) repeat-x left top / auto 26px;
    } 
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Первый экран */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(rgb(10 15 30 / 0%), rgb(10 15 30 / 64%)), url(assets/background.png) no-repeat center center / cover;
    background-size: cover;
    background-repeat: repeat-x;
    animation: moveBackground 100s linear infinite;
    z-index: 0;
    background-attachment: fixed;
}

@keyframes moveBackground {
    0% {
        background-position: 0 0;
    }
    50% {
        background-position: 100vw 0;
    }
    100% {
        background-position: 0 0;
    }
}

/* Логотип анимация */
.logo {
    opacity: 0;
    transform: scale(0.8);
    transition: none; 
    animation: bounceScale 2s ease-in-out infinite;
    z-index: 99;
    position: relative;
    width: 20rem;
}

@keyframes bounceScale {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
    }
}

.hero-text {
    font-size: 2.5rem;
    margin: 40px auto;
    max-width: 800px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.cta-button {
    display: inline-block;
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    background: url(assets/btn.svg) no-repeat center center / cover !important;
    height: 50px;
    width: 220px;
    padding-top: 7px;
}

.cta-button:hover {
    transform: translateY(-5px); 
}

/* Второй экран */
.about {
    padding: 100px 0;
    background-color: #0f1525;
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
    min-width: 300px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.about-image {
    flex: 1;
    min-width: 300px;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 30px 30px rgba(0, 0, 0, 0.5);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: #d98000;
}

p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.feature {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #ff8c00;
}

.feature i {
    font-size: 2rem;
    color: #ff8c00;
    margin-bottom: 15px;
}

/* Третий экран */
.platforms {
    padding: 100px 0;
    text-align: center;
    background-color: #0a0f1e;
}

.platforms-text {
    font-size: 1.8rem;
    margin-bottom: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.platform-icons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 50px;
}

.platform {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
}

.platform:hover {
    transform: translateY(-10px);
}

.platform-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, #ff8c00, #d98000);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    font-size: 2.5rem;
    color: #0a0f1e;
}

.platform-name {
    font-size: 1.2rem;
    font-weight: bold;
}

/* Футер */
footer {
    background-color: #070a14;
    padding: 50px 0 20px;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
}

.footer-section h3 {
    color: #d98000;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.footer-links a {
    display: block;
    color: #ccc;
    text-decoration: none;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #ff8c00;
}
 
.copyright {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
    font-size: 0.9rem;
}

/* Адаптивность */

/* Маленькие мобильные */
@media (max-width: 360px) {
    .about-text,
    .about-image {
        min-width: auto;
        flex: none;
        width: 100%;
    }

    .about-content {
        gap: 25px;
    }

    .about-text p {
        font-size: 1rem;
        line-height: 1.5;
    }

    h2 {
        font-size: 1.75rem;
    }

    .logo {
        width: 15rem;
    }

    .hero-text {
        font-size: 1.5rem;
    }

    .platform-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

/* Мобильные до планшетов (до 768px) */
@media (max-width: 768px) {
    .logo {
        width: 15rem;
    }

    .hero-text {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 2rem;
    }

    .about-content {
        flex-direction: column;
    }

    .platform-icons {
        gap: 20px;
    }

    .platform-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
}

/* Планшеты: 768px – 1023px — увеличиваем отступы из-за толстых бордюров */
@media (min-width: 768px) and (max-width: 1023px) {
    .container {
        padding: 0 40px;
    }
}

/* Узкие планшеты: 768px – 899px — переключаем about на колонки для лучшей читаемости */
@media (min-width: 768px) and (max-width: 899px) {
    .about-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .about-text {
        max-width: 600px;
    }
}

/* Верхний ряд земли */
.ground-top-row {
    position: absolute;
    bottom: 60px;
    left: 0;
    width: 100%;
    height: 120px;
    background-image: url(assets/ground-top.png);
    background-repeat: repeat-x;
    background-position: 0 center;
    background-size: 120px 120px;
    pointer-events: none;
    z-index: 1;
}

.ground-top-row::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    pointer-events: none;
    z-index: 1;
    border-radius: inherit;
}

/* Нижний ряд земли */
.ground-bottom-row {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-image: url(assets/ground.png);
    background-repeat: repeat-x;
    background-position: 0 bottom;
    background-size: 120px 60px;
    pointer-events: none;
    z-index: 1;
}

/* Контейнер для воды */
.water-container {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -35px;
    height: 180px;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

/* Основной слой воды */
.water {
    position: absolute;
    width: 200%;
    height: 100%;
    bottom: 0;
    left: -50%;
    background-image: url(assets/water.png);
    background-repeat: repeat-x;
    background-size: 300px 120px;
    background-position: 0 center;
    animation: moveWater 20s linear infinite, floatWater 3s ease-in-out infinite;
}

/* Анимация движения воды */
@keyframes moveWater {
    0% {
        background-position-x: 0;
    }
    100% {
        background-position-x: 300px;
    }
}

/* Анимация воды "плавания" */
@keyframes floatWater {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Облака */
.clouds-container {
    top: 0px;
    position: absolute;
    width: 100%;
    height: 150px;
    overflow: hidden;
    margin-top: 10px;
    z-index: 1;
}

.cloud {
    position: absolute;
    height: 100px;
    border-radius: 12px;
    opacity: 0.9;
    animation: moveRight 50s linear infinite;
    left: 0;
    top: 30px;
}

.cloud-1 {
    width: 180px;
    background-image: url("assets/cloud1.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation-delay: -2s;
    top: 10px;
}

.cloud-2 {
    width: 200px;
    background-image: url("assets/cloud2.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation-delay: -16s;
    top: 15px;
}

.cloud-3 {
    width: 160px;
    background-image: url("assets/cloud3.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation-delay: -28s;
    top: 25px;
}

.cloud-4 {
    width: 120px;
    background-image: url("assets/cloud1.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation-delay: -40s;
    top: 25px;
}

@keyframes moveRight {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(calc(100vw + 200px));
    }
}

/* Анимация снарядов */
.projectile-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.projectile {
    position: absolute;
    width: 32px;
    height: 32px;
    background-image: url('assets/cannon_ball.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0;
}

.projectile-smooth-arc {
    bottom: 120px;
    left: -150px;
    animation: 
        moveX 6s linear infinite,
        moveY 6s ease-in-out infinite,
        rotate 6s linear infinite,
        fade 6s ease-in-out infinite;
}

.projectile-smooth-arc-reverse {
    bottom: 120px;
    right: -150px;
    animation: 
        moveXReverse 6s linear infinite,
        moveY 6s ease-in-out infinite,
        rotateReverse 6s linear infinite,
        fade 6s ease-in-out infinite;
    animation-delay: 3s;
}

@keyframes moveX {
    0% { left: -200px; }
    100% { left: calc(100% + 300px); }
}

@keyframes moveXReverse {
    0% { right: -200px; }
    100% { right: calc(100% + 300px); }
}

@keyframes moveY {
    0%, 100% { bottom: 20px; }
    50% { bottom: calc(100% - 200px); }
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes rotateReverse {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-360deg); }
}

@keyframes fade {
    0%, 100% { opacity: 0; }
    10%, 90% { opacity: 1; }
}