*{
    box-sizing:border-box;
}


html, body {
    height: 100%;
    margin: 0;
}

/* фикс нижнего фрейма */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main, section {
    flex: 1;
}

body{
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, serif;
    background:#0b0c0e;
    color:#e6e6e6;
    margin:0;
    line-height:1.7;
}

/* ================= NAV ================= */

nav{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:22px 40px;
    border-bottom:1px solid #1a1c20;

    /* institutional fix */
    position:sticky;
    top:0;
    z-index:1000;
    background:#0b0c0e;
}

.logo{
    letter-spacing:1px;
    font-weight:600;
}

/* desktop menu */
.menu{
    display:flex;
    flex-direction: row;
    align-items:center;
}

.menu a{
    color:#cfcfcf;
    margin-left:28px;
    text-decoration:none;
    font-size:14px;
}

.menu a:hover{
    color:white;
}

/* burger hidden on desktop */
.burger{
    display:none;
    font-size:28px;
    cursor:pointer;
    z-index: 1001;
}

/* Overlay */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    transition: opacity 0.35s ease;
    opacity: 0;
    z-index: 1000;
}

.overlay.active { display:block; opacity:1; }

/* ================= CONTENT ================= */

section {
    max-width: 920px;
    margin: 0 auto;
    padding: 5% 5%; /* фиксированный процент от ширины экрана */
    box-sizing: border-box;
    transition: all 0.3s ease; /* плавный переход при ресайзе */
}

main, section {
    flex: 1;
    opacity: 1;
    transition: opacity 0.35s ease;
}

main.hide, section.hide {
    opacity: 0;
    pointer-events: none;
}



h1{
    font-size:40px;
    font-weight:500;
    margin-bottom:20px;
}

h2{
    margin-top:70px;
    font-weight:500;
}

h3{
    margin-top:40px;
}

.lead{
    font-size:20px;
    color:#b8c0cc;
}

.note{
    color:#8b93a1;
}

.focus{
    border-left:2px solid #6a7cff;
    padding-left:18px;
    margin:25px 0;
}

blockquote{
    font-size:24px;
    color:#d0d6ff;
    margin:40px 0;
}

.service-block{
    margin-top:60px;
}

.tag{
    color:#7f8cff;
    font-size:13px;
    letter-spacing:1px;
}

ul{
    margin-top:20px;
}

/* ================= FOOTER ================= */

footer {
    background: #0b0c10;
    color: #9aa0a6;
    text-align: center;
    padding: 20px;
    font-size: 14px;

    /* ключевой фикс */
    margin-top:auto;
}

/* ================= MOBILE ================= */

@media(max-width:768px){

    .burger {
        display: block;
        z-index: 1002; /* выше overlay */
    }


    /* Скрываем меню по умолчанию */
    .menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%; /* можно 100% при желании */
        height: 100vh;
        background: #0b0c0e;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 80px;
        transition: right 0.35s ease;
        z-index: 1001;
        overflow-y: auto;
    }

    /* Когда меню открыто */
    .menu.active {
        right: 0;
    }

    .menu a {
        font-size: 18px;
        margin: 18px 0;
        color: #cfcfcf;
        text-decoration: none;
    }

    .menu a:hover {
        color: white;
    }

    .menu.active { right: 0; }
    
    .overlay {
        display: none;
        opacity: 0;
        transition: opacity 0.35s ease;
    }

    .overlay.active {
        display: block;
        opacity: 1;
    }

    /* Логотип и бургер на одной линии */
    .nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 18px 20px;
        border-bottom: 1px solid #1a1c20;
        position: sticky;
        top: 0;
        z-index: 1001;
    }

    section {
        padding: 50px 18px;
        font-size: 16px; /* Под мобильный */
        line-height: 1.6;
    }

    h1 { font-size: 26px; }
    h2 { font-size: 22px; margin-top: 50px; }
    h3 { font-size: 18px; margin-top: 35px; }
    .lead { font-size: 18px; }
    blockquote { font-size: 20px; }
}

