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

:root{

    --glass:rgba(255,255,255,.14);
    --glass-hover:rgba(255,255,255,.22);

    --border:rgba(255,255,255,.22);

    --text:#ffffff;
    --text2:rgba(255,255,255,.82);

}

html{

    min-height:100%;

}

body{

    min-height:100vh;

    font-family:
        Inter,
        Segoe UI,
        Arial,
        sans-serif;

    color:var(--text);

    overflow-x:hidden;

    background:#000;

}

.background{

    position:fixed;

    inset:0;

    background:url("img/house.jpg") center center no-repeat;

    background-size:cover;

    transform:scale(1.05);

    z-index:-2;

}

.background::after{

    content:"";

    position:absolute;

    inset:0;

    background:linear-gradient(
        to bottom,
        rgba(0,0,0,.35),
        rgba(0,0,0,.60)
    );

}

.overlay{

    min-height:100vh;

    display:flex;

    flex-direction:column;

    justify-content:center;

    align-items:center;

    padding:60px 25px;

}

.header{

    text-align:center;

    margin-bottom:55px;

    animation:fadeDown .8s;

}

.header h1{

    font-size:56px;

    font-weight:700;

    letter-spacing:.5px;

    text-shadow:0 4px 20px rgba(0,0,0,.45);

}

.header p{

    margin-top:14px;

    font-size:22px;

    color:var(--text2);

}

.cards{

    width:100%;

    max-width:1200px;

    display:grid;

    grid-template-columns:repeat(auto-fit,minmax(290px,1fr));

    gap:28px;

}

.card{

    display:block;

    text-decoration:none;

    color:white;

    padding:34px;

    border-radius:22px;

    background:var(--glass);

    border:1px solid var(--border);

    backdrop-filter:blur(18px);

    transition:
        transform .25s,
        background .25s,
        box-shadow .25s;

    animation:fadeUp .8s;

    box-shadow:
        0 10px 30px rgba(0,0,0,.18);

}

.card:hover{

    transform:translateY(-8px);

    background:var(--glass-hover);

    box-shadow:
        0 20px 45px rgba(0,0,0,.28);

}

.icon{

    font-size:54px;

    margin-bottom:22px;

}

.card h2{

    margin-bottom:14px;

    font-size:27px;

}

.card p{

    line-height:1.65;

    color:var(--text2);

}

.footer{

    margin-top:60px;

    color:rgba(255,255,255,.65);

    font-size:15px;

    text-align:center;

}

/* ---------- Планшеты ---------- */

@media (max-width:900px){

    .overlay{

        justify-content:flex-start;

        padding-top:55px;

    }

    .header{

        margin-bottom:35px;

    }

    .header h1{

        font-size:42px;

    }

    .header p{

        font-size:20px;

    }

}

/* ---------- Телефоны ---------- */

@media (max-width:600px){

    .overlay{

        padding:35px 18px 40px;

    }

    .header h1{

        font-size:30px;

    }

    .header p{

        font-size:17px;

    }

    .cards{

        grid-template-columns:1fr;

        gap:18px;

    }

    .card{

        padding:24px;

        border-radius:18px;

    }

    .icon{

        font-size:42px;

        margin-bottom:14px;

    }

    .card h2{

        font-size:22px;

    }

    .footer{

        margin-top:35px;

        font-size:13px;

    }

}

/* ---------- Анимации ---------- */

@keyframes fadeDown{

    from{

        opacity:0;

        transform:translateY(-30px);

    }

    to{

        opacity:1;

        transform:translateY(0);

    }

}

@keyframes fadeUp{

    from{

        opacity:0;

        transform:translateY(35px);

    }

    to{

        opacity:1;

        transform:translateY(0);

    }

}

/* ---------- Авторизация ---------- */

.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 20px;

    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(8px);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity .2s,
        visibility .2s;
}

.auth-modal.show {
    opacity: 1;
    visibility: visible;
}

.auth-box {
    width: 100%;
    max-width: 420px;

    position: relative;

    padding: 32px;

    border-radius: 22px;

    background: rgba(30, 30, 30, .78);
    border: 1px solid var(--border);

    backdrop-filter: blur(20px);

    box-shadow:
        0 20px 60px rgba(0, 0, 0, .4);

    transform: translateY(-15px);
    transition: transform .2s;
}

.auth-modal.show .auth-box {
    transform: translateY(0);
}

.auth-box h2 {
    margin-bottom: 28px;

    text-align: center;

    font-size: 28px;
}

.auth-close {
    position: absolute;
    top: 12px;
    right: 16px;

    width: 36px;
    height: 36px;

    border: 0;
    border-radius: 50%;

    background: transparent;
    color: white;

    font-size: 30px;
    line-height: 30px;

    cursor: pointer;

    opacity: .75;
}

.auth-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, .1);
}

#auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

#auth-form label {
    display: flex;
    flex-direction: column;
    gap: 8px;

    color: var(--text2);

    font-size: 15px;
}

#auth-form input {
    width: 100%;

    padding: 13px 15px;

    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 12px;

    outline: none;

    background: rgba(255, 255, 255, .1);
    color: white;

    font: inherit;
}

#auth-form input::placeholder {
    color: rgba(255, 255, 255, .45);
}

#auth-form input:focus {
    border-color: rgba(255, 255, 255, .55);
    background: rgba(255, 255, 255, .14);
}

.auth-submit {
    margin-top: 4px;

    padding: 13px 20px;

    border: 0;
    border-radius: 12px;

    background: rgba(255, 255, 255, .2);
    color: white;

    font: inherit;
    font-weight: 600;

    cursor: pointer;

    transition:
        background .2s,
        transform .2s;
}

.auth-submit:hover {
    background: rgba(255, 255, 255, .28);
    transform: translateY(-1px);
}

.auth-submit:disabled {
    opacity: .6;
    cursor: wait;
    transform: none;
}

#auth-error {
    min-height: 20px;

    color: #ffb4b4;

    font-size: 14px;
    text-align: center;
}

/* ---------- Авторизация на телефонах ---------- */

@media (max-width:600px) {

    .auth-modal {
        align-items: flex-start;
        padding: 20px 16px;
    }

    .auth-box {
        margin-top: 10vh;
        padding: 26px 20px;
        border-radius: 18px;
    }

    .auth-box h2 {
        font-size: 24px;
        margin-bottom: 24px;
    }

}

.phone-input {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0 15px;

    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 12px;

    background: rgba(255, 255, 255, .1);
}

.phone-input span {
    flex: 0 0 auto;

    color: rgba(255, 255, 255, .7);
    font-size: 15px;

    margin-right: 8px;
}

.phone-input input {
    flex: 1;
    min-width: 0;

    padding: 13px 0 !important;
    font-size: 18px;
    border: 0 !important;
    background: transparent !important;
}

.phone-input:focus-within {
    border-color: rgba(255, 255, 255, .55);
    background: rgba(255, 255, 255, .14);
}
