/* ====== FONTS: GERBERA ====== */
@font-face {
    font-family: "Gerbera";
    src: url("../fonts/Gerbera-Light.ttf") format("truetype");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Gerbera";
    src: url("../fonts/Gerbera.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Gerbera";
    src: url("../fonts/Gerbera-Medium.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* ====== BASE ====== */
:root {
    --bg: #FFFFFF;
    --dark: #101B20;
    --g80: #40464D;
    --g60: #707479;
    --g40: #9CA0A3;
    --container: 1240px;
}

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

html, body {
    font-family: "Gerbera", system-ui, -apple-system, sans-serif;
    color: var(--dark);
    background: var(--bg);
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 40px;
}

/* ====== HEADER ====== */
.header {
    position: sticky;
    top: 0;
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(16,27,32,.06);
    z-index: 100;
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    position: relative;
}

.header__brand {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
}

.header__logo {
    display: block;
    height: 64px;
    width: auto;
    max-width: none;
    max-height: none;
    object-fit: contain;
}

/* Nav centered */
.header__nav {
    display: flex;
    gap: 32px;
    align-items: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-link {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--dark);
    transition: opacity .2s;
}

.nav-link:hover {
    opacity: .6;
}

.nav-link--active {
    opacity: 1;
    font-weight: 500;
}

/* Social icons */
.header__socials {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.header__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(16,27,32,.15);
    transition: all .3s;
    overflow: hidden;
}

.header__social-link:hover {
    border-color: var(--dark);
    background: rgba(16,27,32,.05);
    transform: translateY(-2px);
}

.header__social-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.header__burger {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 12px;
    flex-shrink: 0;
}

.header__burger span {
    display: block;
    height: 1px;
    background: var(--dark);
    margin: 6px 0;
}

/* Mobile menu */
.mobile-menu {
    display: none;
    background: #fff;
    border-top: 1px solid rgba(16,27,32,.08);
}

.mobile-menu--open {
    display: block;
}

.mobile-menu__inner {
    padding: 20px 40px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-link {
    font-size: 12px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.mobile-menu__socials {
    display: flex;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(16,27,32,.08);
}

.mobile-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(16,27,32,.2);
    transition: all .3s;
}

.mobile-social-link:hover {
    border-color: var(--dark);
    background: rgba(16,27,32,.05);
}

.mobile-social-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* ====== PAGE ====== */
.page {
    padding-bottom: 0;
}

/* Breadcrumbs */
.crumbs {
    padding: 24px 0 0;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--g60);
}

.crumbs span {
    margin: 0 8px;
}

/* Page title */
.page__title {
    margin: 48px 0 64px;
    text-align: center;
    font-size: 64px;
    font-weight: 400;
    letter-spacing: .02em;
    text-transform: uppercase;
    line-height: 1;
}

/* ====== BRANDS SECTION ====== */
.brands {
    padding: 0 0 80px;
}

.brands__intro {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 20px;
    margin-bottom: 40px;
}

.brand-feature {
    display: flex;
    flex-direction: column;
}

.brand-feature__img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
    margin-bottom: 24px;
}

.brand-feature__title {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
    line-height: 1.4;
    margin-bottom: 16px;
}

.brand-feature__text {
    font-size: 12px;
    line-height: 1.7;
    color: var(--g60);
    margin-bottom: 24px;
}

.brand-feature__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border: 1px solid var(--dark);
    border-radius: 999px;
    background: transparent;
    font-family: inherit;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--dark);
    cursor: pointer;
    transition: all .2s;
    width: fit-content;
}

.brand-feature__btn:hover {
    background: var(--dark);
    color: #fff;
}

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

.brand-card {
    position: relative;
    height: 420px;
    overflow: hidden;
}

.brand-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.brand-card__logo {
    position: absolute;
    bottom: 24px;
    left: 24px;
    height: 32px;
    width: auto;
    filter: brightness(0) invert(1);
}

/* Сетка логотипов брендов */
.brands__logos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid rgba(16,27,32,.1);
    border-left: 1px solid rgba(16,27,32,.1);
    margin-top: 60px;
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    border-right: 1px solid rgba(16,27,32,.1);
    border-bottom: 1px solid rgba(16,27,32,.1);
    padding: 16px;
    transition: background .2s;
}

.brand-logo:hover {
    background: rgba(16,27,32,.03);
}

.brand-logo img {
    width: 100px;
    height: 50px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: .6;
    transition: all .2s;
}

.brand-logo:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* ====== PROJECTS SECTION ====== */
.projects {
    padding: 80px 0;
    background: #fafafa;
}

.projects__title {
    font-size: 32px;
    font-weight: 400;
    letter-spacing: .02em;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 20px;
}

.projects__subtitle {
    font-size: 12px;
    color: var(--g60);
    text-align: center;
    margin-bottom: 48px;
}

/* Фильтры */
.projects__filters {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 48px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(16,27,32,.1);
}

.filter-btn {
    appearance: none;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 12px;
    color: var(--g60);
    cursor: pointer;
    transition: color .2s;
    padding: 8px 0;
}

.filter-btn:hover,
.filter-btn.is-active {
    color: var(--dark);
}

.filter-btn.is-active {
    font-weight: 500;
}

/* Сетка проектов */
.projects__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 24px;
}

.project-card {
    cursor: pointer;
    display: block;
    transition: transform .3s;
}

.project-card:hover {
    transform: translateY(-4px);
}

.project-card__img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    margin-bottom: 16px;
    transition: transform .3s;
}

.project-card:hover .project-card__img {
    transform: scale(1.02);
}

.project-card__title {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: .02em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.project-card__tag {
    font-size: 12px;
    color: var(--g60);
}

/* Первый проект — большой */
.project-card--large {
    grid-column: span 2;
    grid-row: span 2;
}

.project-card--large .project-card__img {
    height: 600px;
}

/* ====== FOOTER ====== */
.footer {
    background: var(--dark);
    color: #fff;
    padding: 64px 0 0;
}

.footer__inner {
    display: grid;
    gap: 48px;
}

.footer__brand {
    display: flex;
    align-items: center;
}

.footer__logo {
    height: 64px;
    width: auto;
}

.footer__cols {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.footer__title {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .5;
    margin-bottom: 20px;
}

.footer__col a,
.footer__col div {
    display: block;
    font-size: 13px;
    font-weight: 400;
    line-height: 2;
    opacity: .8;
}

.footer__col a:hover {
    opacity: 1;
}

.footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    font-size: 12px;
    opacity: .5;
}

.footer__bottom a {
    opacity: 1;
}

.footer__bottom a:hover {
    opacity: .7;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 1100px) {
    .brands__intro {
        grid-template-columns: 1fr;
    }

    .brands__row {
        grid-template-columns: repeat(2, 1fr);
    }

    .brands__logos {
        grid-template-columns: repeat(3, 1fr);
    }

    .projects__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-card--large {
        grid-column: span 1;
        grid-row: span 1;
    }

    .project-card--large .project-card__img {
        height: 280px;
    }

    .footer__cols {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .header__nav {
        display: none;
    }

    .header__burger {
        display: block;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 0 20px;
    }

    .page__title {
        font-size: 36px;
        margin: 32px 0 40px;
    }

    .brands__row {
        grid-template-columns: 1fr;
    }

    .brand-card {
        height: 300px;
    }

    .brands__logos {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects__grid {
        grid-template-columns: 1fr;
    }

    .projects__filters {
        gap: 12px;
    }

    .filter-btn {
        font-size: 11px;
    }

    .footer__cols {
        grid-template-columns: 1fr;
    }

    .footer__bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}