:root {
    --primary-950: #13293d;
    --primary-900: #17324a;
    --primary-800: #204361;
    --primary-700: #2b5677;
    --surface: #ffffff;
    --surface-muted: #f5f7fa;
    --surface-soft: #eef2f6;
    --border: #d9e1e9;
    --text-900: #1b2733;
    --text-700: #445464;
    --text-500: #6b7b8b;
    --accent: #b89a63;
    --success: #166341;
    --success-soft: #e8f4ee;
    --danger: #a43232;
    --danger-soft: #faecec;
    --shadow-lg: 0 24px 48px rgba(19, 41, 61, 0.08);
    --shadow-md: 0 12px 28px rgba(19, 41, 61, 0.08);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-900);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)),
        linear-gradient(135deg, #f3f5f7 0%, #f7f9fb 48%, #eef2f5 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(19, 41, 61, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(19, 41, 61, 0.035) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 78%);
}

.page-shell {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 28px 0 56px;
}

.hero-header {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 34px;
    background:
        linear-gradient(180deg, rgba(19, 41, 61, 0.96), rgba(28, 57, 82, 0.96)),
        var(--primary-900);
    box-shadow: var(--shadow-lg);
}

.hero-header::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(184, 154, 99, 0.08) 46%, transparent 100%);
    pointer-events: none;
}

.hero-header__inner {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    margin: 0 auto;
    text-align: center;
    padding: 54px 28px 58px;
}

.hero-header__kicker,
.section-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 16px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-header__kicker {
    color: #f5eddf;
    background: rgba(184, 154, 99, 0.18);
    border: 1px solid rgba(184, 154, 99, 0.18);
}

.hero-header__title {
    margin: 0;
    color: #ffffff;
    font-size: clamp(2.4rem, 5.4vw, 4.6rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
    font-weight: 800;
}

.hero-header__subtitle {
    width: min(620px, 100%);
    margin: 18px auto 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(0.98rem, 1.8vw, 1.08rem);
    line-height: 1.72;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 28px;
    margin-top: 28px;
}

.info-card,
.cta-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.info-card {
    padding: 34px;
}

.section-label {
    color: var(--primary-700);
    background: var(--surface-soft);
}

.info-card h2,
.cta-card h2,
.modal__header h2 {
    margin: 0;
    color: var(--primary-950);
    font-size: clamp(1.9rem, 3vw, 2.5rem);
    line-height: 1.16;
}

.info-card__text,
.cta-card__text,
.modal__lead,
.field-help,
.footer-note {
    color: var(--text-700);
    line-height: 1.8;
}

.info-card__text {
    margin: 20px 0 0;
    font-size: 1.02rem;
}

.cta-card {
    display: grid;
    align-content: center;
    gap: 18px;
    padding: 34px;
    background:
        linear-gradient(180deg, rgba(238, 242, 246, 0.82), rgba(255, 255, 255, 0.96)),
        var(--surface);
}

.cta-card__text {
    margin: 0;
}

.cta-button,
.submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 62px;
    border: 0;
    border-radius: 18px;
    padding: 18px 28px;
    font: inherit;
    font-size: 1.06rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, opacity 160ms ease;
}

.cta-button {
    width: 100%;
    color: #ffffff;
    background: linear-gradient(180deg, var(--primary-800), var(--primary-950));
    box-shadow: 0 16px 28px rgba(23, 50, 74, 0.18);
}

.cta-button:hover,
.cta-button:focus-visible,
.submit-button:hover,
.submit-button:focus-visible {
    transform: translateY(-2px);
}

.cta-button:focus-visible,
.submit-button:focus-visible,
.modal__close:focus-visible,
.captcha-box__refresh:focus-visible,
input:focus,
textarea:focus,
.city-picker__search:focus {
    outline: 3px solid rgba(184, 154, 99, 0.35);
    outline-offset: 2px;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 18px;
}

.modal.is-hidden {
    display: none;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 23, 34, 0.62);
    backdrop-filter: blur(3px);
}

.modal__dialog {
    position: relative;
    z-index: 1;
    width: min(860px, 100%);
    max-height: min(90vh, 920px);
    overflow: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 30px;
    box-shadow: 0 40px 80px rgba(12, 23, 34, 0.2);
    padding: 34px;
}

.modal__close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface-muted);
    color: var(--primary-950);
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
}

.modal__header {
    max-width: 640px;
    margin-bottom: 24px;
}

.modal__lead {
    margin: 16px 0 0;
}

.form-feedback {
    margin: 0 0 20px;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    font-weight: 700;
}

.form-feedback.is-hidden {
    display: none;
}

.form-feedback.is-success {
    color: var(--success);
    background: var(--success-soft);
    border-color: rgba(22, 99, 65, 0.14);
}

.form-feedback.is-error {
    color: var(--danger);
    background: var(--danger-soft);
    border-color: rgba(164, 50, 50, 0.14);
}

.application-form,
.field {
    display: grid;
    gap: 10px;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

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

label {
    display: block;
    color: var(--primary-950);
    font-weight: 700;
}

input,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px 18px;
    background: #ffffff;
    color: var(--text-900);
    font: inherit;
}

textarea {
    min-height: 136px;
    resize: vertical;
}

.city-picker {
    position: relative;
}

.city-picker__search-wrap {
    position: relative;
}

.city-picker__icon {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: var(--text-500);
    font-size: 1.05rem;
    pointer-events: none;
}

.city-picker__search {
    padding-left: 44px;
}

.city-picker__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 4;
    display: none;
    max-height: 280px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: 0 18px 36px rgba(19, 41, 61, 0.12);
}

.city-picker.is-open .city-picker__dropdown {
    display: block;
}

.city-picker__list {
    margin: 0;
    padding: 8px;
    list-style: none;
}

.city-picker__option {
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 12px 14px;
    background: transparent;
    color: var(--text-900);
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.city-picker__option:hover,
.city-picker__option:focus-visible,
.city-picker__option.is-active {
    background: var(--surface-soft);
}

.city-picker__empty {
    padding: 14px;
    color: var(--text-500);
    font-size: 0.95rem;
}

.field-error {
    min-height: 18px;
    color: var(--danger);
    font-size: 0.92rem;
}

.field-help {
    font-size: 0.93rem;
}

.captcha-box {
    display: grid;
    gap: 10px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface-muted);
}

.captcha-box__row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.captcha-box__image {
    display: block;
    width: 220px;
    max-width: 100%;
    height: 68px;
    border-radius: 14px;
    border: 1px solid rgba(19, 41, 61, 0.12);
    background: #e6eaee;
}

.captcha-box__refresh {
    width: 46px;
    height: 46px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #ffffff;
    color: var(--primary-900);
    font-size: 1.2rem;
    cursor: pointer;
}

.captcha-box__refresh:hover,
.captcha-box__refresh:focus-visible {
    background: var(--surface-soft);
}

.captcha-box__help {
    margin: 0;
    color: var(--text-700);
    font-size: 0.95rem;
}

.checkbox-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 6px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface-muted);
    color: var(--text-900);
}

.checkbox-card input {
    width: 18px;
    height: 18px;
    margin-top: 3px;
}

.form-footer {
    display: grid;
    gap: 12px;
    margin-top: 8px;
}

.submit-button {
    width: 100%;
    color: #ffffff;
    background: linear-gradient(180deg, var(--primary-800), var(--primary-900));
    box-shadow: 0 14px 24px rgba(23, 50, 74, 0.14);
}

.submit-button:disabled {
    cursor: wait;
    opacity: 0.78;
}

.footer-note {
    margin: 0;
    font-size: 0.95rem;
}

.hidden-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.is-invalid {
    border-color: rgba(164, 50, 50, 0.55);
}

.modal-open {
    overflow: hidden;
}

@media (max-width: 900px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .cta-card {
        order: -1;
    }
}

@media (max-width: 720px) {
    .page-shell {
        width: min(100% - 18px, 1180px);
        padding: 18px 0 28px;
    }

    .hero-header__inner {
        padding: 42px 18px 46px;
    }

    .info-card,
    .cta-card,
    .modal__dialog {
        padding: 22px;
    }

    .field-grid {
        grid-template-columns: 1fr;
    }

    .modal {
        padding: 10px;
    }

    .modal__dialog {
        border-radius: 24px;
    }
}