/* Базовые сбросы и переменные */
:root {
    --color-bg: #252930;
    --color-text: #E1E3E2;
    --color-accent-1: #20BFB4;
    --color-accent-2: #FF6B67;
    --color-panel: #5A616E;
    --font-main: 'Montserrat', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Прелоадер */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s, visibility 0.3s;
}

.preloader--hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid transparent;
    border-top-color: var(--color-accent-2);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Шапка */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: rgba(37, 41, 48, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.header__logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.3s;
}

.header__logo:hover {
    color: var(--color-accent-1);
}

.header__nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.header__nav-link {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.header__nav-link:hover {
    color: var(--color-accent-1);
}

.header__button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: var(--color-accent-2);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.header__button:hover {
    background-color: #e55a57;
}

.icon {
    flex-shrink: 0;
}

/* Бургер-меню */
.burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 1001;
}

.burger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--color-text);
    position: absolute;
    left: 0;
    transition: transform 0.3s, opacity 0.3s;
}

.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { top: 9px; }
.burger span:nth-child(3) { top: 18px; }

.burger--active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger--active span:nth-child(2) {
    opacity: 0;
}

.burger--active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-menu {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: var(--color-bg);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s, opacity 0.3s, visibility 0.3s;
    z-index: 999;
}

.mobile-menu--active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-menu__content {
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.mobile-menu__link {
    height: 60px;
    display: flex;
    align-items: center;
    color: var(--color-text);
    text-decoration: none;
    font-size: 1.2rem;
    border-bottom: 1px solid var(--color-panel);
    gap: 15px;
}

/* Герой */
.hero {
    height: 700px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    margin-top: 80px;
}

.hero__background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    will-change: transform;
    z-index: -1;
}

.hero__container {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero__content {
    max-width: 630px;
    padding-top: 300px;

}

.hero__title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero__subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.9;
}

.hero__scroll {
    position: absolute;
    bottom: -60px;
    left: 30px;
    transform: translateX(-50%);
    color: var(--color-text);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-10px) translateX(-50%); }
    60% { transform: translateY(-5px) translateX(-50%); }
}

/* Портфолио */
.portfolio {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
}

.portfolio__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.portfolio-item {
    aspect-ratio: 16/9;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

.portfolio-item__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.portfolio-item:hover .portfolio-item__image {
    transform: scale(1.05);
}

.portfolio-item__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
}

.portfolio-item:hover .portfolio-item__overlay {
    opacity: 1;
}

.portfolio-item__title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.portfolio-item__description {
    font-size: 0.75rem;
    opacity: 0.9;
}

/* Обо мне */
.about {
    padding: 80px 0;
    border: color(#888888);
    justify-content: bottom;
}

.about__photo {
    width: 100%;
    height: 620px;
    margin-bottom: 50px;
    overflow: hidden;
}

.about__photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.about__intro {
    font-size: 1em;
    margin-bottom: 50px;
    max-width: 800px;
    line-height: 1.8;

}

.about__columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-bottom: 50px;
}

.about__column-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--color-accent-1);
}

.about__list {
    list-style: none;
}

.about__list li {
    font-size: 0.9em;
    line-height: 1.6em;
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
}

.about__list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--color-accent-2);
}



.tools__title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--color-accent-1);
}

.tools__list {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Футер */
.footer {
    padding: 60px 0 30px;
    background-color: rgba(0, 0, 0, 0.2);
    text-align: center;
}

.footer__title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer__subtitle {
    font-size: 1.2rem;
    margin-bottom: 40px;
}

.footer__subtitle a {
    color: var(--color-accent-2);
    text-decoration: none;
    font-weight: 500;
}

.footer__subtitle a:hover {
    text-decoration: underline;
}

.footer__copyright {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Модальное окно */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal--active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal__content {
    position: relative;
    background-color: var(--color-bg);
    border-radius: 12px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    z-index: 2;
}

.modal__content--small {
    max-width: 500px;
}

.modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    padding: 5px;
    z-index: 3;
}

.modal__nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
    z-index: 2;
}

.modal__nav-btn {
    background: rgba(37, 41, 48, 0.7);
    border: none;
    color: var(--color-text);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
    transition: background-color 0.3s;
}

.modal__nav-btn:hover {
    background-color: var(--color-panel);
}

.modal__player {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    margin-bottom: 30px;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
}

.modal__video {
    width: 100%;
    height: 100%;
    display: block;
}

.modal__info {
    padding: 0 10px;
}

.modal__title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--color-accent-1);
}

.modal__client {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 15px;
    color: var(--color-accent-2);
}

.modal__description, .modal__goal {
    margin-bottom: 15px;
    line-height: 1.6;
}

.modal__goal {
    font-style: italic;
    border-left: 3px solid var(--color-accent-1);
    padding-left: 15px;
}

/* Контакты */
.contacts-main {
    padding: 140px 0 80px;
}

.contacts-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
}

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 60px;
}

.contacts-column {
    background-color: var(--color-panel);
    padding: 30px;
    border-radius: 12px;
}

.contacts-column__title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--color-accent-1);
}

.contacts-column__text {
    margin-bottom: 20px;
    line-height: 1.6;
}

.contacts-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-text);
    text-decoration: none;
    margin-bottom: 15px;
    transition: color 0.3s;
}

.contacts-link:hover {
    color: var(--color-accent-1);
}

.contacts-email {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}

.contacts-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Форма обратной связи */
.contacts-form-section {
    background-color: var(--color-panel);
    padding: 40px;
    border-radius: 12px;
}

.contacts-form-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 12px 15px;
    background-color: var(--color-bg);
    border: 1px solid rgba(225, 227, 226, 0.2);
    border-radius: 6px;
    color: var(--color-text);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--color-accent-1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-error {
    color: var(--color-accent-2);
    font-size: 0.9rem;
    margin-top: 5px;
    min-height: 20px;
}

.form-submit {
    background-color: var(--color-accent-2);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: block;
    margin: 30px auto 0;
}

.form-submit:hover {
    background-color: #e55a57;
}

.form-message {
    text-align: center;
    margin-top: 20px;
    min-height: 24px;
    font-weight: 500;
}

.success-message {
    text-align: center;
    padding: 40px 20px;
}

.success-message h3 {
    font-size: 1.8rem;
    margin: 20px 0 15px;
    color: var(--color-accent-1);
}

/* Адаптивность */
@media (max-width: 1024px) {
    .portfolio__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contacts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contacts-grid .contacts-column:last-child {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .header__nav {
        display: none;
    }
    
    .burger {
        display: block;
    }
    
    .hero__title {
        font-size: 2.2rem;
    }
    
    .hero__subtitle {
        font-size: 1rem;
    }
    
    .portfolio__grid {
        grid-template-columns: 1fr;
    }
    
    .about__columns {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .about__photo {
        height: 400px;
    }
    
    .contacts-grid {
        grid-template-columns: 1fr;
    }
    
    .contacts-grid .contacts-column:last-child {
        grid-column: span 1;
    }
    
    .modal__content {
        padding: 20px;
        width: 95%;
    }
    
    .modal__nav {
        padding: 0 10px;
    }
    
    .modal__nav-btn {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 500px;
    }
    
    .hero__title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .contacts-form-section {
        padding: 25px 20px;
    }
    
    .about__photo {
        height: 300px;
    }
}