/* ================================================ */
/* BURGER MENU */
/* ================================================ */









.burger-menu {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 416px;
    height: auto;
    background: #111;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 20px;
    border-radius: 16px;
    transform: translateY(-20px) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.18, 1), opacity 0.3s ease;
}

.burger-menu.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: all;
}

.bm-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.bm-label {
    font-family: 'regular';
    font-size: 12px;
    color: rgba(249, 249, 249, 0.4);
}

.bm-close {
    position: relative;
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 9px;
    cursor: pointer;
    flex-shrink: 0;
}

.bm-close::before,
.bm-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 2px;
    background: #F9F9F9;
    border-radius: 2px;
}

.bm-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.bm-close::after  { transform: translate(-50%, -50%) rotate(-45deg); }

.bm-close .bm-corner,
.bm-close .bm-corner2 {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.bm-close .bm-corner::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 4px; height: 4px;
    border-top: 1px solid rgba(249, 249, 249, 0.7);
    border-right: 1px solid rgba(249, 249, 249, 0.7);
}

.bm-close .bm-corner::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 4px; height: 4px;
    border-bottom: 1px solid rgba(249, 249, 249, 0.7);
    border-left: 1px solid rgba(249, 249, 249, 0.7);
}

.bm-close .bm-corner2::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 4px;
    border-top: 1px solid rgba(249, 249, 249, 0.7);
    border-left: 1px solid rgba(249, 249, 249, 0.7);
}

.bm-close .bm-corner2::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 4px; height: 4px;
    border-bottom: 1px solid rgba(249, 249, 249, 0.7);
    border-right: 1px solid rgba(249, 249, 249, 0.7);
}

.bm-nav {
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(249, 249, 249, 0.1);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 7vh;
    margin-bottom: 8vh;
}

.bm-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    font-family: 'medium';
    
    color: #F9F9F9;
    text-decoration: none;
    border-bottom: 1px solid rgba(249, 249, 249, 0.1);
    transition: background 0.3s;
    letter-spacing: -0.02em;
}







.bm-link:last-child { border-bottom: none; }
.bm-link:hover { background: rgba(249, 249, 249, 0.05); }

.bm-num {
    font-family: 'regular';
    font-size: 1rem;
    color: #D04200;
    flex-shrink: 0;
}
.bm-social{
    padding: 0;
}

.bm-socials {
   
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4px;
    margin-top: 12px;
    width: 100%;
}

.bm-social:hover { background: rgba(208, 66, 0, 0.6); }


/* ================================================ */
/* КНОПКА НАВЕРХ */
/* ================================================ */

.back-to-top-container {
    position: absolute;
    right: 0;
    top: 25%;
    transform: translateY(-50%);
    padding: 0;
    background: none;
}

.back-to-top-btn {
    width: 65px;
    height: 65px;
    background: #0a0a0a;
    border-radius: 100px;
    border: 1px solid rgba(249, 249, 249, 0.40);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.6);
}

.back-to-top-btn:hover {
    background: #1a1a1a;
    border-color: #D04200;
    transform: scale(1.08);
}

.back-to-top-btn svg { transition: transform 0.3s ease; }
.back-to-top-btn:hover svg { transform: translateY(-4px); }

/* ================================================ */
/* MOBILE — 768px */
/* ================================================ */

@media (max-width: 768px) {
.burger{
    width: 14vw;
    height: 14vw;
    
}

    #cookie-banner {
        left: 20px !important;
        right: 20px !important;
        width: auto !important;
        max-width: calc(100vw - 40px) !important;
        box-sizing: border-box !important;
    }

    .cookie-buttons {
        display: flex;
        gap: 8px;
    }

    .cookie-buttons button {
        flex: 1;
        min-width: 0;
        padding: 14px 16px;
    }

.bm-num {
    font-family: 'regular';
    font-size: 4vw;
    color: #D04200;
    flex-shrink: 0;
}

.bm-close {
    position: relative;
    width: 14vw;
    height: 14vw;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 9px;
    cursor: pointer;
    flex-shrink: 0;
}

.bm-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    font-family: 'medium';
    font-size: 6vw;
    color: #F9F9F9;
    text-decoration: none;
    border-bottom: 1px solid rgba(249, 249, 249, 0.1);
    transition: background 0.3s;
    letter-spacing: -0.02em;
}
    html {
        font-size: 16px !important;
        -webkit-text-size-adjust: none !important;
        text-size-adjust: none !important;
    }

    /* ТИПОГРАФИКА — только vw и px, никаких rem */
    h1 { font-size: 8vw !important; }
    h2 { font-size: 6.5vw !important; }
    h3 { font-size: 5.5vw !important; }

    .structure         { font-size: 25vw !important; }
    .text h3           { font-size: 8.5vw !important; }
    .text p            { font-size: 5.5vw !important; }
    .brbr2 p           { font-size: 4vw !important; }

    .sixth-title       { font-size: 9vw !important; }
    .sixth-label       { font-size: 5vw !important; }
    .sixth-links a     { font-size: 5vw !important; }
    .sixth-nav a       { font-size: 5vw !important; }
    .sixth-copy        { font-size: 4.5vw !important; }

    .arr span          { font-size: 17px !important; }
    .title             { font-size: 5.5vw !important; }
    .num               { font-size: 5.5vw !important; }

    .page-title span   { font-size: 5vw !important; font-weight: 400 !important; font-family: 'regular' !important; }
    .page-title p      { font-size: 6vw !important; font-family: 'medium' !important; }

    .trisda {
        margin-top: 11vw;
        gap: 8vw;
    }

    .proj-num { margin-bottom: 4vw; }

     .proj-num { margin-top: 0; }

    /* ГЛОБАЛЬНЫЕ */
    .desktop { display: none; }
    .mobile  { display: flex; }
    #cookie-banner p.mobile { display: block !important; }

    html, body {
        overflow-x: hidden !important;
        max-width: 100% !important;
    }


.second-screen {
        display: flex;
        flex-direction: column;
    }

    .about {
        order: 1;
    }

    .about-us {
        order: 2;
    }


    /* FIRST SCREEN */
    .first-screen {
        position: relative;
        width: 100%;
        background-image: url(./img/mobi/mobile-version.png);
        background-size: 100% auto;
        background-position: center;
        background-repeat: no-repeat;
    }

    .first-screen .first2 { display: none !important; }

    /* HERO */
    .hero {
        flex-direction: column;
        align-items: flex-start;
        
        padding: 16px;
        padding-bottom: 16px;
        gap: 32px;
        margin-top: 0;
       
    }

    .hero section {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        margin-top: 0;
        gap: 32px;
    }

    .hero .structure  { margin-top: 0; order: 1; }
    .hero .brbr2      { order: 2; }

    .structure { margin-bottom: 0; }

    .brbr2 {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 20px;
    }

    .brbr2 p   { margin: 0; line-height: 140%; }
    .brbr2 svg { margin-top: 0.15em; }

    .description {
        margin-top: 0;
        align-items: flex-start;
    }

    .first2 {
        width: 100%;
        height: auto;
        position: relative;
    }

    /* SECOND SCREEN */
    .second-screen {
        display: flex;
        flex-direction: column;
        padding: 16px;
    }

    .about-us {
        width: 100%;
        flex-direction: column;
    }

    .photo1 {
        width: 100%;
        height: auto;
        margin-left: 0;
        margin-top: 16px;
    }

    .about {
        margin-left: 0;
        width: 100%;
        height: auto;
        margin-top: 32px;
    }

    .about-inner {
        margin-left: 0;
        width: 100%;
    }

    .services {
        width: 100%;
        margin-top: 32px;
    }

    /* services аккордеон */
    .services .service-item {
        display: grid;
        grid-template-columns: 64px 1fr auto;
        gap: 0;
    }

    .services .service-header { display: contents !important; }

    .services .num,
    .services .title { padding: 24px 0; }

    .services .num {
        padding-right: 16px;
        white-space: nowrap;
    }

    .services .title { grid-column: 2; grid-row: 1; }

    .services .icon {
        grid-column: 2; grid-row: 1;
        justify-self: end;
        align-self: center;
        padding: 24px 0;
    }

    .services .service-body {
        width: 95%;
        display: none;
        grid-column: 2; grid-row: 2;
        padding: 0 0 24px;
    }

    .services .service-body.open { display: block; }

    /* THIRD SCREEN */
    .third-screen {
        display: flex;
        flex-direction: column;
        margin-top: 0;
        padding: 16px;
    }

    .about3 {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        width: 100%;
        margin: 0;
    }

    .text3 { flex-direction: column !important; }
    .text3, .services3 { width: 100% !important; }

    .text3 span{
        font-size: 5vw;
    }

    .services3 { margin-top: 32px; }

    /* services3 аккордеон */
    .services3 .service-item {
        display: grid;
        grid-template-columns: 72px 1fr auto;
        gap: 0;
    }

    .services3 .service-header { display: contents !important; }

    .services3 .num,
    .services3 .title { padding: 24px 0; }

    .services3 .num { padding-right: 16px; }

    .services3 .title {
        grid-column: 2; grid-row: 1;
        font-size: 6.5vw !important;
        color: white !important;
    }

    .services3 .icon {
        grid-column: 2; grid-row: 1;
        justify-self: end;
        align-self: center;
        padding: 24px 0;
    }

    .services3 .service-body {
        width: 90%;
        display: none;
        grid-column: 2; grid-row: 2;
        padding: 0 0 24px;
    }

    .services3 .service-body.open { display: block; }

    .services3 .service-body p {
        
        padding: 0;
        margin-left: 0;
        font-size: 5vw !important;
    }

    /* FOURTH SCREEN */
    .fourth-screen { margin-top: 64px; }

    .imglogo { min-height: 50vh; }
    .imglogo img { width: 50%; height: auto; }

    /* FIFTH SCREEN */
    .fifth-screen { margin-top: 80px; }

    .fifth-header {
        flex-direction: column;
        gap: 8px;
    }

    .project-num,.project-name{
        font-size: 4vw;
    }

    .projects-grid {
        flex-direction: column;
        gap: 40px;
    }

    .projects-grid section .project-item { height: auto; }
    .projects-grid section .project-item img { height: 192px; object-fit: cover; }

    .fifth-bottom {
        flex-direction: column;
        margin-top: 40px;
        gap: 40px;
    }

    .fifth-bottom section .project-item { height: auto; }
    .fifth-bottom section .project-item img { height: 192px; object-fit: cover; }

    .fifth-footer {
        margin-top: 0;
        margin-left: 0;
        padding-bottom: 0;
        width: 100%;
        justify-content: flex-start;
    }

    /* PROJECT CAPTIONS */
    .project-caption {
    position: relative;
    border-bottom: 1px solid rgba(249, 249, 249, 0.15);
    padding-top: 10px;
   
    padding-bottom: 19px;
    width: 100%; /* убедись что не растягивается родителем сверх нужного */
    box-sizing: border-box;
}

.project-caption::before,
.project-caption::after {
    content: '';
    position: absolute;
    bottom: 0;
    width: 1px;
    height: 10px;
    background: rgba(249, 249, 249, 0.15);
}

.project-caption::before { left: 0; }
.project-caption::after  { right: 0; }





.projects-grid section,
.fifth-bottom section {
    display: flex;
    flex-direction: column;
    min-width: 0; /* важно — убирает flex-overflow */
}
    /* SIXTH SCREEN */
    .sixth-screen { margin-top: 64px; }

    .sixth-top {
        display: flex;
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .sixth-title { margin-left: 0; text-align: left; }

    .sixth-contacts {
        display: flex;
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
        margin-top: 0;
    }

    .sixth-label {
        margin-left: 0;
        margin-top: 0;
        margin-bottom: 0;
        opacity: 0.4;
    }

    .sixth-links {
        display: flex;
        gap: 0;
        justify-content: space-between;
        align-items: center;
        align-self: stretch;
        margin-left: 0;
        margin-top: 0;
    }

    .sixth-image {
        background-image: url(./img/mobi/mobi-foot.png);
        background-size: 100% auto;
        background-position: top center;
        background-repeat: no-repeat;
        position: static;
        transform: none;
        width: 100vw;
        margin-left: -16px;
        margin-right: -16px;
        aspect-ratio: 3 / 4;
        flex: 1;
        margin-bottom: -48px;
    }

    .sixth-image img { display: none; }

    .sixth-footer {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 32px;
        width: 100%;
        margin-top: 32px;
    }

    .sixth-nav {
        display: flex;
        flex-direction: column;
        gap: 18px;
        width: 100%;
        margin: 0;
    }

    .sixth-nav a {
        font-weight: 400;
        line-height: 1.3;
        letter-spacing: -0.2px;
        padding: 6px 0;
        
        transition: color 0.3s ease;
        display: inline-block;
    }
    .page-img img:last-child{
        border-radius:0.25rem ;
        padding: 0;
    }


    .sixth-nav a:hover { color: #D04200; }

    .sixth-socials {
        display: flex;
        flex-direction: row;
        gap: 14px;
        width: 100%;
        margin-left: 0;
        padding: 0 4px;
    }

    .social-btn {
        width: 100%;
        padding: 17px 22px;
        min-height: 64px;
    }

    .sixth-copy {
        line-height: 140%;
        letter-spacing: -0.2px;
        margin-top: 24px;
    }

    .line-divider { margin-top: -128px; }

    .line{
        width: 20px;
    }
.corner-box i::before {
    content: '';
    position: absolute;
    top: 0px; right: 0px;
    width: 5px; height: 5px;
    border-top: 1px solid rgba(249,249,249,0.7);
    border-right: 1px solid rgba(249,249,249,0.7);
}


.proj-images-left{
    gap: 1vw;
}


.corner-box i::after {
    content: '';
    position: absolute;
    bottom: 0px; left: 0px;
    width: 5px; height: 5px;
    border-bottom: 1px solid rgba(249,249,249,0.7);
    border-left: 1px solid rgba(249,249,249,0.7);
}

.corner-box::before {
    content: '';
    position: absolute;
    top: 0px; left: 0px;
    width: 5px; height: 5px;
    border-top: 1px solid rgba(249,249,249,0.7);
    border-left: 1px solid rgba(249,249,249,0.7);
}

.corner-box::after {
    content: '';
    position: absolute;
    bottom: 0px; right: 0px;
    width: 5px; height: 5px;
    border-bottom: 1px solid rgba(249,249,249,0.7);
    border-right: 1px solid rgba(249,249,249,0.7);
}
    /* BURGER */
    .burger-menu {
        width: calc(100vw - 32px);
        right: 16px;
        top: 16px;
        
    }

    .burger { margin-left: 0; }

    /* BUTTONS */
    .parent.btn-group { max-width: 100%; }
    .arr.corner-box   { padding: 15px 20px; }
    .arrow-but.corner-box { width: 74px; }

    .arr {
        height: 74px !important;
        font-size: 17px !important;
        min-width: 0 !important;
    }

    .arrow-but {
        height: 74px !important;
        width: 74px !important;
    }

    /* WORKS PAGE */
    .proj-type   { margin-top: 0; 
    top: unset;
}
    .proj-num    { color: #ff6a00; opacity: 1 !important; }
    .work-tag    { color: #ff6a00; }

    .work-content  { padding-left: 0; }
    .work-meta     { grid-template-columns: 1fr 1fr; gap: 4px; }
    .work-category { align-items: end; justify-content: end; }
    .work-num      { display: none; }
    .work-row      { grid-template-columns: 1fr; }
    .work-name-meta { text-align: right; }

    .page         { flex-direction: column; }
    .page-img     { order: 2; width: 100%; }
    .page-info    { order: 1; width: 100%; padding-top: 24px; }

    .abt-project  { margin-top: 96px; padding: 0 16px; }

    .abt {
        margin-top: -48px;
        display: flex;
        flex-direction: row;
        padding: 16px;
        margin-bottom: 64px;
    }

    /* GALLERY */
    .proj-image {
        padding: 0;
        display: flex;
        gap: 4px;
        align-items: flex-start;
        height: 25vh;
    }

    .proj-img-wrap1 { flex: 1.2; }
    .proj-img-wrap2 { flex: 0.5; }
    .proj-img-wrap3 { display: none; }

    .proj-thumb  { margin-left: auto; }
    .proj-logo   { font-style: normal; font-weight: 500; line-height: 120%; letter-spacing: -0.4px; font-family: 'regular'; }

    /* COOKIE */
    #cookie-banner {
        width: min(520px, calc(100vw - 40px)) !important;
        max-width: 520px;
        left: 20px;
        right: 20px;
        margin: 0 auto;
    }

    /* OVERFLOW FIX */
    .first-screen,
    .fourth-screen .video-screen,
    .sixth-screen,
    .sixth-image img {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .marka { margin: 0; }

    .service-body p { font-size: 4.5vw !important; }

    .lini { margin-top: 48px; }

    .screen { margin-bottom: 48px; }

    .back-to-top-container { display: flex; }

    .back-to-top-btn {
        width: 58px;
        height: 58px;
    }

    .back-to-top-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* ================================================ */
/* MOBILE — 480px */
/* ================================================ */

@media (max-width: 480px) {

    html {
        font-size: 16px !important;
        -webkit-text-size-adjust: none !important;
        text-size-adjust: none !important;
    }

    html, body {
        overflow-x: hidden !important;
        max-width: 100% !important;
    }

    /* HEADER */
    .header-buttons {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .header-buttons .brbr { display: none !important; }
    .header-buttons .pup  { display: none; }

    .header-text-grid {
        margin-left: 0;
        display: grid;
        grid-template-rows: auto auto;
        gap: 0;
        align-items: start;
    }

    /* FOOTER */
    .sixth-footer {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box;
        position: relative;
    }

    .back-to-top-container.mobile {
        position: absolute;
        right: 20px !important;
        top: 25%;
        transform: translateY(-50%);
        padding: 0;
        background: none;
        z-index: 10;
    }

    .sixth-socials {
        width: 100% !important;
        padding: 0 !important;
        gap: 14px;
        margin-top: 24px;
        box-sizing: border-box;
    }

    .sixth-socials .social-btn {
        width: auto !important;
        flex: 1;
        min-width: 0;
    }
.process {
    display: none;
}
    /* GALLERY */
    .proj-image,
    .work-images {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        overflow: hidden;
    }

    /* ТИПОГРАФИКА 480px — чисто vw и px */
    .structure    { font-size: 15vw !important; }
    h1            { font-size: 8vw !important; }
    h2            { font-size: 9vw !important; }
    h3            { font-size: 6vw !important; }
    p, .brbr2 p   { font-size: 4.5vw !important; }

    .arr {
        height: 74px !important;
        font-size: 17px !important;
    }
    .arrow-but {
        height: 74px !important;
        width: 74px !important;
    }

    /* COOKIE */
    #cookie-banner {
        display: block !important;
        position: fixed;
        bottom: 20px;
        right: 20px;
        left: auto;
        width: min(520px, calc(100vw - 40px));
        background: #1a1a1a;
        color: #ddd;
        border-radius: 16px;
        padding: 32px 28px 28px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
        z-index: 9999;
        font-family: 'medium';
        opacity: 0;
        pointer-events: none;
        transition: all 0.4s ease;
    }

    #cookie-banner.show { opacity: 1; pointer-events: all; }

    #cookie-banner h2 {
        margin: 0 0 20px 0;
        font-size: 19px;
        font-weight: 550;
        line-height: 130%;
        color: #ffffff;
        text-align: left;
        font-family: "medium";
    }

    #cookie-banner p {
        margin: 0 0 28px 0;
        font-size: 3vw;
        line-height: 1.3;
        color: #ddd;
    }

    #cookie-banner a {
        display: inline;
        color: #ff6a00;
        font-size: 3vw !important;
    }

    .cookie-buttons {
        display: flex;
        justify-content: space-between;
        margin-top: 8px;
    }

    .cookie-buttons button {
        padding: 14px 32px;
        border: none;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.25s ease;
        
    }

    #cookie-banner h1 {
  margin: 0 0 20px 0;
  font-size: 6.5vw!important;
  font-style: normal;
  font-weight: 550;
  line-height: 130%;
  letter-spacing: -0.0175rem;
  color: #ffffff;
  text-align: left;
  font-family: "medium";
}
#cookie-banner a {
    display: inline; /* не block! */
  color: #ff6a00;
  font-size: 4.5vw!important;
}



    .cookie-buttons {
        width: 100%;
    }
.cookie-buttons button {
        min-width: 0;
        flex: 1;
        padding: 14px 16px;
    }

    /* WORKS */
    .work-meta::after {
        content: '';
        position: absolute;
        top: 0; right: 0;
        width: 1px; height: 14px;
        background: rgba(249, 249, 249, 0.15);
    }

    .work-meta::before {
        
        background: rgba(249, 249, 249, 0.15);
    }


    .work-meta{
        border-top: 1px solid rgba(249, 249, 249, 0.15);
    }

    .burger-menu {
        width: calc(100vw - 16px);
        right: 8px;
        top: 8px;
    }

    .photo1 { margin-top: 32px; }

    .description {
        margin-top: 0;
        align-items: flex-start;
    }

    
}