@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap");

:root {
    --color-cream: #f6f2e4;
    --color-green: #073831;
    --color-teal: #139c8f;
    --color-teal-dark: #062f2b;
    --color-text: #ffffff;
    --font-main: "Poppins", Arial, Helvetica, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--color-green);
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    font-family: var(--font-main);
    color: var(--color-text);
    background: #139c8f;
    background: linear-gradient(52deg, rgba(19, 156, 143, 1) 0%, rgba(9, 71, 63, 1) 67%, rgba(7, 56, 49, 1) 100%);
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

.topbar {
    min-height: 145px;
    flex: 0 0 auto;
    background: #f6f2e4;
}

.topbar__inner {
    width: 100%;
    min-height: 145px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 0 58px;
}

.topbar__logo {
    display: inline-flex;
    align-items: center;
    width: 158px;
}

.topbar__logo img {
    width: 158px;
    height: auto;
}

.topbar__contact {
    color: var(--color-green);
    font-size: clamp(18px, 1.65vw, 30px);
    line-height: 1.1;
    font-weight: 600;
    text-decoration: none;
    overflow-wrap: anywhere;
    text-align: right;
}

.page-shell {
    flex: 1;
    width: 100%;
    padding: 64px 20px 84px;
    background: #139c8f;
    background: linear-gradient(52deg, rgba(19, 156, 143, 1) 0%, rgba(9, 71, 63, 1) 67%, rgba(7, 56, 49, 1) 100%);
}

.page-shell--center {
    display: grid;
    place-items: center;
}

.form-panel,
.message-panel {
    width: 100%;
    max-width: 795px;
    margin: 0 auto;
}

.intro {
    width: 100%;
    max-width: 760px;
    margin: 0 auto 38px;
    text-align: center;
    overflow-wrap: break-word;
}

.intro h1,
.message-panel h1 {
    margin: 0 0 34px;
    color: var(--color-text);
    font-size: 32px;
    line-height: 1.2;
    font-weight: 700;
}

.intro p,
.message-panel p {
    margin: 0;
    color: var(--color-text);
    font-size: 16px;
    line-height: 1.38;
    font-weight: 400;
}

.intro__lead {
    margin-bottom: 26px !important;
    font-size: 18px !important;
    line-height: 1.35 !important;
    font-weight: 700 !important;
}

.form {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 44px;
    row-gap: 22px;
}

.field {
    min-width: 0;
}

.field--full {
    grid-column: 1 / -1;
}

.field__label {
    display: block;
    min-height: 20px;
    margin: 0 0 8px;
    color: var(--color-text);
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.field__input {
    width: 100%;
    height: 52px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--color-text);
    font-family: var(--font-main);
    font-size: 18px;
    font-weight: 500;
    outline: none;
}

.field__input:focus {
    box-shadow: 0 0 0 3px rgba(246, 242, 228, 0.28);
}

.field__select {
    appearance: none;
    color-scheme: light;
    padding-right: 44px;
    background-color: rgba(255, 255, 255, 0.02);
    background-image:
        linear-gradient(45deg, transparent 50%, #ffffff 50%),
        linear-gradient(135deg, #ffffff 50%, transparent 50%);
    background-position:
        calc(100% - 22px) 23px,
        calc(100% - 16px) 23px;
    background-repeat: no-repeat;
    background-size: 6px 6px;
}

.field__select option,
.field__select optgroup {
    color: #073831 !important;
    background-color: #f6f2e4 !important;
}

.field__select option:checked,
.field__select option:hover {
    color: #073831 !important;
    background-color: #ffffff !important;
}

.field__input:-webkit-autofill,
.field__input:-webkit-autofill:hover,
.field__input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--color-text);
    -webkit-box-shadow: 0 0 0 1000px #0b675f inset;
    caret-color: var(--color-text);
}

.field__error {
    margin: 8px 0 0;
    color: #ffe082;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 700;
}

.field__input.is-error {
    border-color: #ffe082;
}

.form-error-box {
    display: grid;
    gap: 4px;
    margin: 0 0 28px;
    padding: 14px 16px;
    border: 1px solid #ffe082;
    border-radius: 6px;
    color: var(--color-text);
    font-size: 15px;
    line-height: 1.4;
    background: rgba(7, 56, 49, 0.28);
}

.form-error-box strong {
    color: #ffe082;
}

.btn-submit {
    display: block;
    width: min(425px, 100%);
    min-height: 86px;
    margin: 9px auto 0;
    border: 0;
    border-radius: 15px;
    background: #f6f2e4;
    color: #073831;
    font-family: var(--font-main);
    font-size: 29px;
    line-height: 1;
    font-weight: 800;
    cursor: pointer;
}

.btn-submit:hover {
    background: #ffffff;
}

.btn-submit:focus-visible,
.topbar__contact:focus-visible,
.footer__links a:focus-visible,
.text-link:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 4px;
}

.btn-submit[disabled] {
    opacity: 0.72;
    cursor: not-allowed;
}

.footer {
    min-height: 76px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #f6f2e4;
}

.footer__links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 35px;
    flex-wrap: wrap;
}

.footer__links a,
.text-link {
    color: var(--color-green);
    font-size: 16px;
    line-height: 1;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.message-panel {
    max-width: 720px;
    padding: 44px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    background: rgba(7, 56, 49, 0.35);
    text-align: center;
}

.message-panel__logo {
    width: 146px;
    margin: 0 auto 26px;
    filter: brightness(0) invert(1);
}

.message-panel__lead {
    margin-bottom: 18px !important;
    font-weight: 800 !important;
}

.message-panel__reference {
    margin-top: 28px !important;
    font-size: 16px !important;
}

.modal-legal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-legal.is-open {
    display: flex;
}

.modal-legal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
}

.modal-legal__dialog {
    position: relative;
    width: min(820px, 100%);
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
    color: var(--color-green);
    border-radius: 8px;
}

.modal-legal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 22px;
    background: var(--color-green);
    color: #ffffff;
}

.modal-legal__title {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
}

.modal-legal__close {
    border: 0;
    background: transparent;
    color: #ffffff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.modal-legal__body {
    padding: 28px 32px;
    overflow-y: auto;
    color: var(--color-green);
    font-size: 14px;
    line-height: 1.65;
}

.modal-legal__body h3 {
    margin: 1.3em 0 0.5em;
    font-size: 18px;
}

.modal-legal__loading,
.modal-legal__error {
    padding: 32px 16px;
    text-align: center;
}

.modal-legal__error {
    color: #b42318;
}

body.modal-open {
    overflow: hidden;
}

@media (max-width: 920px) {
    .topbar__inner {
        min-height: 112px;
        padding: 0 24px;
    }

    .topbar__logo,
    .topbar__logo img {
        width: 128px;
    }

    .page-shell {
        padding: 44px 16px 60px;
    }

    .form {
        column-gap: 28px;
    }
}

@media (max-width: 680px) {
    .topbar__inner {
        flex-direction: column;
        justify-content: center;
        gap: 14px;
        padding: 18px 20px;
        text-align: center;
    }

    .topbar__contact {
        font-size: 15px;
        text-align: center;
    }

    .intro {
        margin-bottom: 32px;
    }

    .intro h1,
    .message-panel h1 {
        margin-bottom: 26px;
        font-size: 29px;
    }

    .intro p,
    .message-panel p {
        font-size: 16px;
    }

    .intro__lead {
        font-size: 17px !important;
    }

    .form {
        grid-template-columns: 1fr;
        row-gap: 22px;
    }

    .field--full {
        grid-column: auto;
    }

    .field__label {
        font-size: 16px;
    }

    .btn-submit {
        min-height: 68px;
        font-size: 22px;
    }

    .message-panel {
        padding: 32px 20px;
    }
}

@media (max-width: 520px) {
    .form-panel,
    .intro {
        width: calc(100vw - 32px);
        max-width: 358px;
        margin-left: 0;
        margin-right: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
