/* Basic Reset & Variables */
:root {
    --primary-color: #000000;
    /* Глубокий черный, как на референсе */
    --accent-color: #1a1a1a;
    /* Цвет кнопок */
    --bg-color: #ffffff;
    --light-bg: #f9f9f9;
    --text-color: #000000;
    /* Черный текст */
    --font-heading: 'Bebas Neue', sans-serif;
    /* Акцентный шрифт для заголовков */
    --font-body: 'Manrope', sans-serif;
    /* Шрифт для текста */
    --container-width: 1400px;
    /* Шире контейнер, как на референсе */
    --gutter: 40px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    /* Для четкости шрифтов */
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* Utility Classes */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 20px 40px;
    background-color: var(--accent-color);
    color: #ffffff;
    text-transform: none;
    /* Manrope обычно используется в normal case в кнопках референса, но проверим */
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: none;
    border-radius: 0;
    /* Острые углы */
}

.btn:hover {
    background-color: #333;
    color: #fff;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 6rem;
    /* Крупные заголовки */
    line-height: 0.9;
    font-weight: 400;
    /* Bebas обычно идет одним весом */
    margin-bottom: 3rem;
    text-align: left;
    /* Чаще слева */
    text-transform: uppercase;
    color: var(--primary-color);
    letter-spacing: 1px;
}

/* Анимации появления (Fade In Up) */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: transparent;
    transition: background-color 0.3s ease, padding 0.3s ease;
    z-index: 1000;
    padding: 25px 0;
}

.header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header__inner {
    display: flex;
    justify-content: center;
    /* Меню по центру, как на референсе */
    align-items: center;
    gap: 60px;
}

.header__btn {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    padding: 12px 25px;
    font-size: 12px;
}

/* Logo - убран, заголовок и есть лого */

.nav__list {
    display: flex;
    align-items: center;
    gap: 50px;
}

.nav__link {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    color: #000;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #000;
    transition: width 0.3s;
}

.nav__link:hover::after {
    width: 100%;
}

/* Telegram icon in header */
.header__tg {
    display: flex;
    align-items: center;
    color: #000;
    transition: opacity 0.3s;
}

.header__tg:hover {
    opacity: 0.6;
}

/* Hero Section - FINAL REFERENCE STYLE */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    background-color: #fff;
    padding: 120px 40px 0;
    overflow: hidden;
}

.hero__wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    flex: 1;
}

.hero__description {
    max-width: 280px;
    padding-top: 50px;
}

.hero__description p {
    font-size: 14px;
    line-height: 1.7;
    color: #333;
    margin-bottom: 20px;
}

.hero__link {
    font-size: 13px;
    font-weight: 600;
    color: #000;
    text-decoration: none;
    border-bottom: 1px solid #000;
    padding-bottom: 2px;
}

.hero__link:hover {
    opacity: 0.6;
}

.hero__content {
    flex: 1;
    text-align: center;
}

.hero__title {
    font-family: var(--font-heading);
    font-size: 11vw;
    /* Уменьшен с 15vw */
    line-height: 0.85;
    font-weight: 400;
    margin: 0;
    text-transform: uppercase;
    color: #000;
    letter-spacing: -3px;
}

/* Hero Gallery - animated photo strip */
.hero__gallery {
    width: 100%;
    overflow: hidden;
    padding: 40px 0;
}

.hero__gallery-track {
    display: flex;
    gap: 10px;
    animation: scrollGallery 40s linear infinite;
    width: max-content;
}

.hero__gallery-track img {
    height: 200px;
    width: 300px;
    object-fit: cover;
    flex-shrink: 0;
    filter: grayscale(20%);
    transition: filter 0.3s, transform 0.3s;
}

.hero__gallery-track img:hover {
    filter: grayscale(0%);
    transform: scale(1.02);
}

/* Infinite scroll animation */
@keyframes scrollGallery {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Mobile Menu Trigger (hidden by default) */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Mobile Menu Logic */
.nav.nav--open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.nav.nav--open .nav__link {
    color: #000;
}

/* About Section */
.about__inner {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about__text {
    flex: 1;
}

.about__text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.about__features {
    list-style: none;
    margin-top: 2rem;
}

.about__features li {
    margin-bottom: 10px;
    padding-left: 30px;
    position: relative;
    font-weight: 500;
}

.about__features li::before {
    content: '✅';
    position: absolute;
    left: 0;
    top: 0;
}

.about__img {
    flex: 1;
    position: relative;
}

.about__img img {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    border: none;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.05);
    border-radius: 0;
    padding: 30px;
    background: #fff;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border-color: transparent;
}

.service-card__icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #000;
    /* Иконки черные */
}

.service-card__title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.service-card__list {
    list-style: disc;
    padding-left: 20px;
    color: #666;
    margin-bottom: 20px;
}

.service-card__list li {
    margin-bottom: 5px;
}

/* Responsiveness */
@media (max-width: 900px) {
    .about__inner {
        flex-direction: column-reverse;
    }

    .about__img {
        width: 100%;
    }

    .nav {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
        color: #fff;
        /* По умолчанию в Hero белый */
    }

    .header.scrolled .mobile-menu-btn {
        color: #000;
    }

    .hero__title {
        font-size: 5rem;
        /* Меньше на мобилках */
    }

    .contacts-wrapper {
        flex-direction: column;
    }
}

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.portfolio-item {
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: 0;
    /* Острые углы */
    cursor: pointer;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

/* Steps Section */
.steps-list {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
    counter-reset: steps-counter;
}

.step-item {
    flex: 1;
    min-width: 200px;
    background: #fff;
    padding: 30px;
    border-radius: 0;
    position: relative;
    border-top: 2px solid #000;
    /* Черная линия */
}

.step-item::before {
    counter-increment: steps-counter;
    content: "0" counter(steps-counter);
    font-size: 3rem;
    font-weight: 700;
    color: #eee;
    /* Более светлый номер */
    position: absolute;
    top: 10px;
    right: 20px;
    z-index: 0;
}

.step-item h3,
.step-item p {
    position: relative;
    z-index: 1;
}

.step-item h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

/* Contacts Section */
.contacts-wrapper {
    display: flex;
    gap: 50px;
}

.contacts-info {
    flex: 1;
}

.contacts-form-wrapper {
    flex: 1;
    background: #f4f4f4;
    /* Светло-серый фон формы */
    padding: 40px;
    border-radius: 0;
    box-shadow: none;
}

.contact-item {
    margin-bottom: 30px;
}

.contact-item h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #888;
}

.contact-item p,
.contact-item a {
    font-size: 1.5rem;
    font-weight: 500;
}

.form-group {
    margin-bottom: 20px;
}

.form-input {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 0;
    font-family: inherit;
    font-size: 1rem;
    background: #fff;
}

.form-input:focus {
    outline: none;
    border-color: #000;
}

.btn-full {
    width: 100%;
    background-color: #000;
    color: #fff;
    text-align: center;
    border-radius: 0;
}

.btn-full:hover {
    background-color: #333;
}

/* Messenger Buttons */
.contact-buttons {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.btn-messenger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 25px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-messenger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.btn-whatsapp {
    background-color: #25D366;
    color: #fff;
}

.btn-whatsapp:hover {
    background-color: #20bd5a;
}

.btn-telegram {
    background-color: #0088cc;
    color: #fff;
}

.btn-telegram:hover {
    background-color: #0077b5;
}

/* Footer */
.footer {
    background-color: #000;
    color: #fff;
    padding: 40px 0;
    text-align: center;
    font-size: 0.9rem;
    color: #888;
    font-family: var(--font-body);
}

/* =====================================================
   MOBILE RESPONSIVE STYLES
   ===================================================== */

/* Tablet (max 1024px) */
@media (max-width: 1024px) {
    .hero__title {
        font-size: 14vw;
    }

    .hero__description {
        max-width: 220px;
    }

    .hero__gallery-track img {
        height: 160px;
        width: 250px;
    }

    .section-title {
        font-size: 4rem;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile (max 768px) */
@media (max-width: 768px) {

    /* Header Mobile */
    .header {
        padding: 15px 0;
    }

    .header__inner {
        justify-content: space-between;
        padding: 0 20px;
    }

    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    .nav.nav--open {
        display: flex;
    }

    .nav__list {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }

    .mobile-menu-btn {
        display: block;
        font-size: 24px;
        background: none;
        border: none;
        cursor: pointer;
    }

    .header__btn {
        display: none;
    }

    .header__tg {
        display: none;
    }

    /* Hero Mobile */
    .hero {
        padding: 100px 20px 0;
        min-height: auto;
    }

    .hero__wrapper {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .hero__description {
        max-width: 100%;
        padding-top: 20px;
        order: 2;
        text-align: center;
    }

    .hero__content {
        order: 1;
    }

    .hero__title {
        font-size: 18vw;
        letter-spacing: -1px;
    }

    .hero__link {
        display: inline-block;
        margin-top: 10px;
    }

    .hero__gallery-track img {
        height: 120px;
        width: 180px;
    }

    /* Sections Mobile */
    .section-title {
        font-size: 3rem;
        margin-bottom: 2rem;
    }

    .about__inner {
        flex-direction: column-reverse;
        gap: 30px;
    }

    .about__img {
        width: 100%;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .steps-list {
        flex-direction: column;
    }

    .step-item {
        min-width: 100%;
    }

    .contacts-wrapper {
        flex-direction: column;
        gap: 30px;
    }

    .contacts-form-wrapper {
        padding: 25px;
    }
}

/* Small Mobile (max 480px) */
@media (max-width: 480px) {
    .hero__title {
        font-size: 22vw;
    }

    .hero__gallery-track img {
        height: 100px;
        width: 150px;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .btn {
        padding: 15px 25px;
        font-size: 13px;
    }

    .contact-item p,
    .contact-item a {
        font-size: 1.2rem;
    }
}