:root{
    --accent-color: #5F00FF;
    --primary-color: #000000;
    --secondary-color: #1E1E1E;
    --background-color: #F7F2FF;
    /* #F7F2FF or purlper #F4EDFF*/

    --padding-horizontal: 76px;
    --padding-vertical: 56px;
}

@media (max-width: 710px) {
    :root{
        --padding-horizontal: 26px !important;
    }
}


::selection {
  background: #1E1E1E40; /* цвет фона выделения */
  color: var(--primary-color);        /* цвет текста при выделении */
}

body{
    width: 100vw;
    max-width: 100vw;
    margin: 0;
    padding: 0;

    background-color: var(--background-color);
    font-family: 'Manrope';

    overflow-x: hidden;
    overflow-y: scroll;
}
*{
    box-sizing: border-box;
    scroll-behavior: smooth;
}


h1, h2, h3, h4, h5, p{
    margin: 0;
}
a{
    text-decoration: none;
}
button{
    cursor: pointer;
    border: none;
}
img{
    user-select: none;
    -webkit-user-drag: none;
}

.typical {
    position: relative;
    z-index: 2;

    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;

    height: 48px;
    padding: 12px 18px;
    width: fit-content;

    border-radius: 24px;
    color: var(--background-color);
    font-weight: 600;

    transition: background 0.5s;

    user-select: none;
    -moz-user-select: none;
}

.typical::after {
    content: '';
    position: absolute;
    z-index: -1;

    background: var(--accent-color);
    border-radius: 64px;

    transition: inset 0.3s, background 0.3s;

    inset: 0;
}

.typical:hover::after {
    background: var(--accent-color);

    inset: -5px;
}

header{
    position: fixed;
    z-index: 100;

    display: flex;
    justify-content: space-between;

    width: calc(100% - var(--padding-horizontal) - var(--padding-horizontal) + 16px);
    /* 68px */
    height: 64px;
    margin: 0 calc( var(--padding-horizontal) - 8px);
    margin-top: 24px;
    padding: 8px;

    border-radius: 32px;
    
    transition: margin 0.3s, width 0.3s, border-radius 0.3s;

    .link-wr{
        display: flex;
        gap: 5px;

        .link{
            position: relative;
            z-index: 2;

            display: flex;
            justify-content: center;
            align-items: center;
            gap: 12px;

            height: 48px;
            padding: 12px 18px;

            border-radius: 24px;
            color: var(--secondary-color);
            font-weight: 600;

            transition: background 0.5s;

            user-select: none;
            -moz-user-select: none;

            img.fill{
                display: none;
            }
        }
        a.enabled{
            img.fill{
                display: flex;
            }
            img.outline{
                display: none;
            }
        }


        .after-bg {
            position: relative;
        }

        .after-bg::after {
            content: '';
            position: absolute;
            z-index: -1;

            background: rgba(30, 30, 30, 0.04);
            border-radius: 64px;
            
            transition: inset 0.3s, background 0.3s;

            inset: 0;
        }

        .after-bg:hover::after {
            background: rgba(30, 30, 30, 0.08);

            inset: -5px;
        }


        .after-bg.contact::after{
            background-color: #5F00FF;
        }

        a:active { 
            opacity: 0.5;
        }

        /* .with-popup::after{
            position: absolute;
            top: -10px;
        } */
        .with-popup{
            position: relative;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            align-items: flex-end;

            padding: 0;
            height: 48px;
            width: fit-content;

            border-radius: 24px;
            
            .head{
                display: flex;
                align-items: center;
                gap: 12px;

                height: 48px;
                padding: 12px 18px;

                font-weight: 600;

                cursor: pointer;
                user-select: none;
                -moz-user-select: none;
                -webkit-user-drag: none;
            }
            .popup{
                position: absolute;
                display: flex;
                flex-direction: column;
                align-items: center;

                width: fit-content;
                color: var(--secondary-color) !important;
                border-radius: 24px;

                z-index: 12;

                opacity: 0;
                pointer-events: none;

                .absolute-head{
                    display: flex;
                    align-items: center;
                    justify-content: space-between;
                    gap: 36px;

                    height: 48px;
                    width: 100%;
                    padding: 12px 18px;

                    font-weight: 600;

                    cursor: pointer;
                    user-select: none;
                    -moz-user-select: none;

                    .img-wrapper{
                        position: relative;
                        width: 16px;
                        height: 16px;
                        transition: 1.0s cubic-bezier(0.075, 0.82, 0.165, 1);

                        img {
                            position: absolute;
                        }
    
                        .second {
                            width: 12px;
                            opacity: 0;
                        }
                    }
                }
            }
            .info-wr{
                display: flex;
                flex-direction: column;
                width: 100%;

                .info{
                    display: flex;
                    align-items: flex-end;

                    padding: 2px 18px;
                    width: 380px;
                    min-width: fit-content;

                    color: var(--secondary-color);

                    user-select: none;

                    h3{
                        font-size: 48px;
                        font-weight: 300;
                        width: 100%;
                        text-align: left;

                        transition: font-weight 0.4s;
                    }
                    p{
                        font-size: 16px;
                        font-weight: 400;
                        padding-bottom: 11px;
                        white-space: nowrap;
                    }
                    p.invisible{
                        opacity: 0;
                        transition: opacity 0.5s;
                    }
                }
                .info:active{
                    h3{
                        font-weight: 450;
                    }
                }
                .info.enabled{
                    h3{                    
                        font-weight: 600;
                    }
                }
                .info{
                    transition: opacity 0.2s;
                }
                .info:hover{
                    opacity: 1 !important;
                    p.invisible{
                        opacity: 0.5;
                    }
                }
            }
            .info-wr:hover .info{
                opacity: 0.5;
            }
            
            .legal-mini{
                display: flex;
                justify-content: space-between;
                align-items: center;
                gap: 32px;

                margin-top: 32px;
                padding: 18px 18px;
                width: 100%;

                a, p{
                    color: var(--secondary-color);
                    opacity: 0.5;
                    font-size: 14px;
                }
                a{
                    text-decoration: underline;
                    text-decoration-color: #1E1E1E90;
                    text-underline-offset: 2px;
                }
            }
            
        }

        .with-popup{
            transition: background-color 0.3s, transform 0.3s;

            .head{
                transition: opacity 0.2s;
            }

            .popup{
                opacity: 0;
                pointer-events: none;

                background-color: #F6F6F6;
                color: #1E1E1E;
                
                transform-origin: right top;
                transform: scaleY(55%) scaleX(55%) translateY(40px);

                transition: transform 0.3s, background-color 0.2s, opacity 0.4s 0s;
            }
        }

        .with-popup.active::after{
            background-color: rgba(30, 30, 30, 0.08);
            inset: 0;
        }
        .with-popup.active{
            color: var(--secondary-color);
            background-color: transparent;
            
            transform: translateY(10px);

            z-index: 20;

            .head{
                opacity: 0;
            }

            .popup{
                opacity: 1;
                pointer-events: all;
                transform: scaleY(100%) scaleX(100%) translateX(-10px) translateY(-10px);

                transition: transform 0.3s, background-color 0.2s, opacity 0.1s 0s;
                
                .absolute-head{
                    .img-wrapper {
                        transform: rotateY(360deg);
                        scale: 1.1;

                        .first {
                            opacity: 0;
                        }

                        .second {
                            opacity: 1;
                        }
                    }
                }

            }
        }

        .contact{
            background-color: var(--accent-color);
            color: #FFFFFF;

            .head{
                justify-content: space-between;
                gap: 36px;
            }

            .popup{
                background-color: #C19DFF;
            }
            .info-wr{
                .info{
                    justify-content: space-between;
                    gap: 58px;

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

                width: 110%;
                padding: 24px 32px;
                margin-bottom: 18px;
                margin-top: 6px;
                transform: rotate(-3deg);

                background-color: var(--accent-color);
                color: white;
                border-radius: 64px;

                font-size: 28px;

                transition: transform 0.2s;
            }
            .book:hover{
                transform: rotate(1deg) scale(1.08);
            }
        }
    }
}
.contact .head {

    img {
        position: absolute;
    }

    .second {
        opacity: 0;
    }
    .img-wrapper {
        position: relative;

        width: 16px;
        height: 16px;
        
        transition: 1.6s cubic-bezier(0.075, 0.82, 0.165, 1);

        .first, .second {
            transition: opacity 0.2s 0.2s;
        }
    }
}
.contact:hover {
    .img-wrapper {
        transform: rotateY(360deg);
        scale: 1.1;

        .first {
            opacity: 0;
        }

        .second {
            opacity: 1;
        }
    }
}
header.scrolled{
    width: calc(100% - var(--padding-horizontal) - var(--padding-horizontal) + 40px);
    margin: 0 calc(var(--padding-horizontal) - 20px);
    margin-top: 24px;
    background-color: #FFFFFF;
}
@media (max-width: 1100px) {
    h1{
        font-size: 48px !important;
    }
    p{
        font-size: 16px;
    }
    header{
        .link-wr{
            .link{
                display: none !important;
            }
            .menu{
                display: flex !important;
            }
        }
    }
}
@media (max-width: 580px) {
    header{
        .menu, .contact{
            max-width: 48px;
            
            .head span{
                display: none;
            }
        }
        .contact{
            .head{
                padding-left: 24px !important;
                padding-right: 17px !important;
            }
            .first{
                opacity: 0 !important;
            }
            .second{
                opacity: 1 !important;
            }
        }
    }
    header.scrolled{
        width: 100%;
        margin: 0;
         border-radius: 0;
    }
}

.header-gap{
    height: 96px;
    pointer-events: none;
}



footer{
    display: flex;
    flex-direction: column;

    width: 100%;
    padding-top: 48px;

    background: linear-gradient(180deg, #F4EDFF 0%, #5F00FF 100%);

    .legal{
        display: flex;
        justify-content: space-between;
        align-items: center;

        padding: 32px var(--padding-horizontal) 48px var(--padding-horizontal);
        width: 100%;

        a, p{
            color: white !important;

            font-size: 16px;
            opacity: 0.5;
        }
        a{
            padding: 8px 14px;
            border-radius: 32px;

            text-decoration-line: underline;
            text-decoration-style: solid;
            text-decoration-skip-ink: all;
            text-decoration-thickness: 1px;
            text-underline-offset: 1px;
            text-underline-position: from-font;
            text-decoration-color: #FFFFFF70;

            transition: background-color 0.3s, text-decoration-color 0.2s;
        }
        a:hover{
            text-decoration-color: transparent;

            background-color: var(--accent-color);
        }
    }
}





#content{
    width: 100vw;
    overflow: hidden;
}

.page{
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 32px;

    width: 100%;

    padding: var(--padding-vertical) var(--padding-horizontal);
    color: var(--primary-color);

    *{
        z-index: 2;
    }
    h1{
        font-size: 48px;
        font-weight: 400;
        span{
            color: var(--accent-color);
        }
    }
    h1.bold{
        font-size: 64px;
        font-weight: 600;
    }
    h2{
        font-size: 32px;
        font-weight: 400;
        b{
            font-weight: 600;
        }
    }
    h3{
        font-size: 20px;
        font-weight: 500;
    }
    h3.mono{
        max-width: 840px;

        color: var(--secondary-color);

        font-size: 16px;
        font-weight: 300;
        font-family: 'Martian Mono';
        line-height: 180%;
    }
    p{
        font-size: 14px;
        font-weight: 400;
        line-height: 140%;
    }
}


.page.hero {
    height: 70vh;

    .wave-wrapper {
        display: flex;
        align-items: center;

        height: 300px;
        width: 100%;

        margin-left: calc( -1 * var(--padding-horizontal));
        padding-bottom: 64px;

        pointer-events: none;
        user-select: none;
        -webkit-user-drag: none;
        -webkit-user-select: none;
    }
    h1, h2, p{
        z-index: 2;
    }

}


.page.hero.works{
    .card-wrapper{
        display: flex;
        flex-direction: column;
        gap: 32px;
    }
    .tags{
        display: flex;
        gap: 4px;

        button{
            display: flex;
            align-items: center;
            gap: 18px;

            padding: 12px 18px;

            border-radius: 51px;
            background: #2B2B2B;

            p{
                font-size: 18px;
                font-weight: 550;
            }
        }
    }
    .card{
        display: flex;
        flex-direction: column;
        gap: 18px;

        img{
            width: 100%;
            height: 380px;
            max-height: 380px;

            border-radius: 18px;
            object-fit: cover;
        }
        .text{
            display: flex;
            flex-direction: column;
            gap: 12px;

            padding-left: 12px;

            h3{
                font-size: 24px;
                font-weight: 600;
            }
            p{
                font-size: 14px;
                font-weight: 400;

                opacity: 0.5;
            }
        }
    }
}



.page.service {
    .card-wrapper {
        position: relative;
        display: flex;
        flex-direction: column;
    }

    .card {
        position: relative;
        display: flex;
        align-items: center;
        gap: 48px;

        width: 100%;
        padding: 12px 0;

        cursor: pointer;

        h1 {
            color: var(--accent-color);
            font-weight: 400;
        }

        img {
            background-color: var(--accent-color);
            height: fit-content;

            transition: margin 0.3s, padding 0.4s;
        }
    }

    .card:hover {
        img {
            margin-left: calc(-1 * var(--padding-horizontal));
            padding-left: var(--padding-horizontal);
        }
    }

    .absolute {
        position: absolute;
        z-index: 6;

        display: flex;
        gap: 28px;
        position: absolute;
        transition: none;
        top: 0;
        right: 0;
        max-width: 780px;
        width: 780px;
        padding: 18px 32px;

        background-color: var(--accent-color);
        color: var(--background-color);

        /* background-color: #5F00FF3f;
                    color: #5F00FF;
                    backdrop-filter: blur(32px); */

        font-family: "Martian Mono";
        font-size: 18px;
        font-weight: 300;
        line-height: 180%;

        font-size: 24px;
        line-height: 170%;

        opacity: 0.2;
        pointer-events: none;

        span {
            font-size: 32px;
            font-weight: 700;
        }
    }
}


.page.blog{
    .card-wrapper{
        display: flex;
        gap: 12px;
    }

    .card{
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 21px;

        width: 450px;
        min-width: 350px;
        padding: 0 24px 24px 21px;

        border-radius: 12px;
        outline: 2px solid rgba(95, 0, 255, 0.12);
        color: var(--secondary-color);
        outline-offset: -2px;

        overflow: hidden;

        *{
            z-index: 5;
        }
        .text{
            display: flex;
            flex-direction: column;
            gap: 8px;
            p{
                opacity: 0.5;
            }
        }
        img{
            width: calc(100% + 21px + 21px + 3px);
            max-height: 380px;
            object-fit: cover;
            margin-left: -21px;
            margin-right: -21px;
        }
    }
    .card.gold{
        outline: 2px solid rgba(249, 216, 157, 0.4);
    }

    .card.subscribe{
        position: relative;
        display: flex;
        justify-content: flex-end;
        gap: 6px;

        max-width: 390px;
        min-width: 390px;

        background: linear-gradient(180deg, #F4EDFF 0%, #5F00FF 100%), #5F00FF;
        color: var(--background-color);

        overflow: hidden;
    }
    .card.subscribe::before{
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: 50%;

        background: radial-gradient(75.52% 55.98% at 50% 100%, #5F00FF 0%, rgba(95, 0, 255, 0.00) 100%), linear-gradient(180deg, #5F00FF 0%, #5F00FF 100%), #5F00FF;
        border-radius: 512px;
        filter: blur(20px);

        opacity: 0.12;
        transform: translateY(440px) translate3d(-0px, 0, 120px);

        transition: opacity 1.2s, transform 1.8s ease-out, filter 2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    .card.subscribe:hover::before{
        opacity: 1;
        transform: initial;
        filter: blur(220px);
    }
    .card.subscribe::after{
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        right: 0;
        width: 50%;

        background: radial-gradient(75.52% 55.98% at 50% 100%, #5F00FF 0%, rgba(95, 0, 255, 0.00) 100%), linear-gradient(180deg, #5F00FF 0%, #5F00FF 100%), #5F00FF;
        border-radius: 512px;
        filter: blur(20px);

        opacity: 0.12;
        transform: translateY(500px) translate3d(-0px, 0, 120px);

        transition: opacity 1.3s, transform 2s ease-out, filter 2.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    .card.subscribe:hover::after{
        opacity: 1;
        transform: initial;
        filter: blur(220px);
    }
}


.page.error{
    padding-top: 30vh;
    justify-content: flex-start;
    align-items: center;
    text-align: center;

    height: 90vh;
}





.scroll-x{
    overflow-x: auto;
    margin: 0 calc(-1 * var(--padding-horizontal));
    padding: 0 calc(var(--padding-horizontal));
}



html, body {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background: transparent;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  transition: background 0.3s ease;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}



.default-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.default-scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.default-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.default-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  transition: background 0.3s ease;
}

.default-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}



.transparent-scroll {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.transparent-scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.transparent-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.transparent-scroll::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 4px;
}

.transparent-scroll::-webkit-scrollbar-thumb:hover {
  background: transparent;
}









.page.loading{
    height: 80vh;
}
.loader {
  position: relative;
  padding-top: 100px;
  width: 40px;
  margin: auto;

  .circle {
    position: absolute;
    width: 38px;
    height: 38px;
    opacity: 0;
    transform: rotate(225deg);
    animation-iteration-count: infinite;
    animation-name: orbit;
    animation-duration: 5.5s;
    
    &:after {
      content: '';
      position: absolute;
      width: 5px;
      height: 5px;
      border-radius: 5px;
      background: var(--accent-color); /* Pick a color */
    }
    
    &:nth-child(2) {  animation-delay: 240ms; }
    &:nth-child(3) {  animation-delay: 480ms; }
    &:nth-child(4) {  animation-delay: 720ms; }
    &:nth-child(5) {  animation-delay: 960ms; }
  }
}

@keyframes orbit {
    0% {
        transform: rotate(225deg);
        opacity: 1;
        animation-timing-function: ease-out;
    }

    7% {
        transform: rotate(345deg);
        animation-timing-function: linear;
    }

    30% {
        transform: rotate(455deg);
        animation-timing-function: ease-in-out;
    }

    39% {
        transform: rotate(690deg);
        animation-timing-function: linear;
    }

    70% {
        transform: rotate(815deg);
        opacity: 1;
        animation-timing-function: ease-out;
    }

    75% {
        transform: rotate(945deg);
        animation-timing-function: ease-out;
    }

    76% {
        transform: rotate(945deg);
        opacity: 0;
    }

    100% {
        transform: rotate(945deg);
        opacity: 0;
    }
}





canvas{
    z-index: 0;
    position: absolute;

    opacity: 0.4;
    margin-top: -220px;
    top: 50vh;
    
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
    user-select: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
    overflow: visible;
}

body.works{
    background-color: #222222;
    color: white !important;

    *{
        color: white !important;
    }

    header{
        .logo{
            filter: brightness(0) contrast(100%) invert(100%);
        }

        .after-bg::after {
            background-color: rgba(256, 256, 256, 0.04);
        }
        .after-bg:hover::after {
            background: rgba(256, 256, 256, 0.08);
        }
        .after-bg.contact::after{
            background-color: #5F00FF;
        }
        .with-popup.active::after{
            background-color: rgba(256, 256, 256, 0.08);
            inset: 0;
        }
        .link-wr a:not(.contact) img, .invert-on-works {
            filter: invert(100%);
        }
        .with-popup .popup *{
            color: var(--secondary-color) !important;
        }
        .with-popup .popup .book{
            color: #FFFFFF !important;
        }
    }
    header.scrolled{
        background-color: #0000003D;
        backdrop-filter: blur(64px);
        
    }

    canvas{
        filter: invert(100%) contrast(0);
        opacity: 0.7;
    }

    footer{
        background: linear-gradient(180deg, rgba(34, 34, 34, 0.00) 0%, rgba(95, 0, 255, 0.24) 100%);

        img{
            opacity: 0.2;
        }
    }


    .wave-wrapper{
        img{
            filter: brightness(0) contrast(100%) invert(100%);
        }
    }
}







.with-popup.menu{
    display: none !important;
}
