@font-face {
    font-family: "Nunito";
    src: url("fonts/Nunito-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Nunito";
    src: url("fonts/Nunito-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Nunito";
    src: url("fonts/Nunito-Black.ttf") format("truetype");
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-left: #fffffb;
    --bg-right: #f8f8fa;
    --text-dark: #000000;
    --text-gray: #636363;
    --text-label: #c6c6c4;
    --text-value: #323232;
    --red: #dd3142;
    --red-logo: #d72f3f;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Nunito", sans-serif;
    color: var(--text-dark);
}

button,
input {
    font-family: inherit;
}

.page {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 27px 0 191px;
    background: linear-gradient(
        to right,
        var(--bg-left) 50%,
        var(--bg-right) 50%
    );
}

.logo {
    margin-right: 8px;
    font-size: 36px;
    font-weight: 900;
    text-transform: uppercase;
    text-align: center;
    color: var(--text-dark);
}

.logo b {
    font-size: 48px;
    color: var(--red-logo);
}

.main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 112px;
    max-width: 1920px;
    margin: 0 auto;
}

.main-content {
    display: flex;
    align-items: flex-start;
    width: 100%;
    gap: 22px;
}

.form-panel {
    display: flex;
    flex: 1 1 50%;
    align-items: flex-end;
    padding-right: 30px;
    flex-direction: column;
}

.signup-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 42px;
    width: 100%;
    max-width: 496px;
}

.title {
    margin: 0;
    width: 100%;
    max-width: 496px;
    font-size: 36px;
    font-weight: 700;
    line-height: normal;
    color: var(--text-dark);
}

.subtitle {
    margin: 7px 0 0;
    width: 100%;
    max-width: 496px;
    font-size: 22px;
    font-weight: 700;
    line-height: 27px;
    color: var(--text-gray);
}

.demo-note {
    margin: 8px 0 0;
    width: 100%;
    max-width: 496px;
    font-size: 16px;
    font-weight: 700;
    line-height: 22px;
    color: var(--text-gray);
}

.field {
    display: block;
    max-width: 452px;
}

.field__label {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-label);
}

.field__input {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 0 0 6px;
    border: none;
    border-bottom: 1px solid var(--text-label);
    background: transparent;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-value);
    outline: none;
}

.field__input:focus {
    border-bottom-color: var(--red);
}

.field__input[aria-invalid="true"] {
    border-bottom-color: var(--red);
}

.field__error {
    display: block;
    margin-top: 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--red);
}

.field__error[hidden] {
    display: none;
}

.field__input::placeholder {
    color: var(--text-label);
    font-weight: 400;
}

.checkbox-block {
    max-width: 439px;
}

.checkbox-row {
    margin-top: 9px;
    max-width: 439px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.checkbox-row__input {
    appearance: none;
    width: 16px;
    height: 16px;
    min-width: 16px;
    border: 1px solid var(--text-label);
    border-radius: 4px;
    cursor: pointer;
    margin: 0;
}

.checkbox-row__input:checked {
    border: none;
    background-image: url("images/checkbox-checked.png");
    background-size: cover;
}

.checkbox-row__label {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-gray);
    cursor: pointer;
}

.submit-btn {
    display: block;
    align-self: flex-start;
    margin: 21px 0 0 124px;
    min-width: 210px;
    height: 70px;
    padding: 0 30px;
    border: none;
    border-radius: 40px;
    background: var(--red);
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
}

.submit-btn:hover,
.modal-box__btn:hover {
    filter: brightness(1.05);
}

.login-link {
    display: block;
    margin: 24px 0 0 138px;
    padding: 0;
    border: none;
    background: none;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-gray);
    text-decoration: none;
    text-align: left;
    cursor: pointer;
}

.login-link:hover {
    text-decoration: underline;
}

.art-panel {
    display: flex;
    flex: 1 1 50%;
    justify-content: flex-start;
    padding-top: 60px;
}

.art__illustration {
    display: block;
    width: 100%;
    max-width: 543px;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    padding: 16px;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.modal-overlay[hidden] {
    display: none;
}

.modal-box {
    display: flex;
    flex-direction: column;
    background: var(--bg-left);
    border-radius: 24px;
    padding: 48px 40px;
    max-width: 420px;
    width: 100%;
    max-height: 100%;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.modal-box__text {
    margin: 0 0 32px;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overflow-wrap: anywhere;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.4;
}

.modal-box__btn {
    flex-shrink: 0;
    min-width: 150px;
    height: 60px;
    padding: 0 30px;
    border: none;
    border-radius: 40px;
    background: var(--red);
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 1099px) {
    .page {
        padding: 24px 20px 48px;
        background: var(--bg-left);
    }

    .main {
        gap: 40px;
    }

    .main-content {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

    .form-panel {
        align-items: center;
        padding-right: 0;
        width: 100%;
        flex: 1 1 auto;
    }

    .art-panel {
        justify-content: center;
        padding-top: 0;
        width: 100%;
        flex: 1 1 auto;
    }

    .art__illustration {
        margin: 0 auto;
    }

    .submit-btn {
        align-self: center;
        margin: 21px 0 0;
    }

    .login-link {
        margin: 24px 0 0;
        text-align: center;
        align-self: center;
    }
}

@media (max-width: 767px) {
    .page {
        padding: 16px 16px 32px;
    }

    .logo {
        font-size: 28px;
        margin-right: 0;
    }

    .logo b {
        font-size: 36px;
    }

    .main {
        gap: 24px;
    }

    .title {
        font-size: 28px;
    }

    .subtitle {
        font-size: 18px;
        line-height: 24px;
    }

    .demo-note,
    .title,
    .subtitle,
    .signup-form,
    .field,
    .checkbox-block {
        max-width: 100%;
    }

    .submit-btn {
        width: 100%;
        min-width: 0;
    }

    .modal-box {
        padding: 32px 20px;
    }
}

.is-hidden {
    display: none;
}
