:root {
    --bg: #050505;
    --text: #ffffff;
    --muted: rgba(255, 255, 255, 0.78);
    --line: rgba(255, 255, 255, 0.14);
    --brand: #f2bf11;
    --brand-2: #ffd54a;
    --input-bg: rgba(255, 255, 255, 0.98);
    --error: #ff6b5f;
    --error-soft: rgba(255, 107, 95, 0.13);
    --success: #8ef0b5;
    --radius-xl: 36px;
    --radius-lg: 24px;
    --radius-pill: 999px;
    --shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Manrope", "Segoe UI", sans-serif;
    overflow-x: hidden;
}

button,
input,
select,
textarea {
    font: inherit;
}

.page {
    min-height: 100vh;
    position: relative;
    isolation: isolate;
    padding: 28px;
    overflow-x: hidden;
}

.bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(2, 4, 8, 0.9) 0%, rgba(4, 6, 12, 0.68) 34%, rgba(5, 7, 12, 0.58) 60%, rgba(2, 4, 8, 0.9) 100%),
        url("../img/itm-bg.jpg") center center / cover no-repeat;
}

.bg::before,
.bg::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.bg::before {
    background:
        radial-gradient(circle at 16% 25%, rgba(242, 191, 17, 0.14), transparent 24%),
        radial-gradient(circle at 80% 78%, rgba(242, 191, 17, 0.1), transparent 20%);
}

.bg::after {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.22));
}

.shell {
    position: relative;
    z-index: 2;
    width: min(1180px, 100%);
    margin: 0 auto;
    display: grid;
    gap: 26px;
    opacity: 1;
    transform: none;
}

.site-menu {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 18px;
    min-height: 235px;
    padding: 18px 22px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(8, 10, 18, 0.82);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.menu-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    grid-column: 2;
    grid-row: 1;
    width: 288px;
    min-width: 288px;
    height: 208px;
    text-decoration: none;
}

.brand-logo {
    width: auto;
    max-width: 288px;
    max-height: 208px;
    object-fit: contain;
}

.language-switch {
    display: inline-grid;
    grid-column: 3;
    justify-self: end;
    grid-template-columns: repeat(2, 52px);
    gap: 8px;
    margin: 0;
    padding: 0;
}

.language-switch a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.82);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-decoration: none;
    transition: background .18s ease, color .18s ease;
}

.language-switch a.is-active {
    border-color: transparent;
    background: linear-gradient(180deg, var(--brand-2), var(--brand));
    color: #101010;
    box-shadow: 0 16px 28px rgba(242, 191, 17, 0.24);
}

.menu-title,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.09);
    color: rgba(255, 255, 255, 0.92);
    font-size: 13px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.menu-title {
    grid-column: 1;
    justify-self: start;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 16px rgba(242, 191, 17, 0.9);
}

.panel {
    position: relative;
    overflow: hidden;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: linear-gradient(180deg, rgba(18, 22, 33, 0.82), rgba(8, 10, 18, 0.78));
    box-shadow: var(--shadow);
}

.panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 25%, transparent 70%, rgba(242, 191, 17, 0.1));
    pointer-events: none;
}

.panel::after {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    right: -50px;
    top: -60px;
    background: radial-gradient(circle, rgba(242, 191, 17, 0.18), transparent 70%);
    pointer-events: none;
}

.alert,
.application-form,
.success-screen {
    position: relative;
    z-index: 1;
}

.application-form {
    display: grid;
    gap: 26px;
}

.section {
    display: grid;
    gap: 16px;
}

.section-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 4px;
}

.section-no {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(180deg, var(--brand-2), var(--brand));
    color: #101010;
    font-weight: 900;
    box-shadow: 0 10px 26px rgba(242, 191, 17, 0.24);
}

.section-head h2 {
    margin: 0;
    color: #ffffff;
    font-size: 22px;
    letter-spacing: -0.02em;
}

.section-head span {
    display: block;
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 13px;
    font-weight: 700;
}

.grid,
.grid-3 {
    display: grid;
    gap: 16px;
}

.grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.field {
    display: grid;
    gap: 9px;
}

.field > span,
.label-title {
    color: rgba(255, 255, 255, 0.94);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
    padding-left: 6px;
}

.required::after {
    content: " *";
    color: var(--brand-2);
}

.input,
select,
textarea {
    width: 100%;
    border: 0;
    border-radius: var(--radius-pill);
    outline: none;
    background: var(--input-bg);
    color: #181818;
    padding: 17px 22px;
    font-size: 16px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.02), 0 10px 24px rgba(0, 0, 0, 0.08);
    transition: box-shadow .18s ease, background .18s ease;
}

select.input {
    appearance: none;
    cursor: pointer;
    padding-right: 46px;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--brand) 50%),
        linear-gradient(135deg, var(--brand) 50%, transparent 50%);
    background-position:
        calc(100% - 25px) 24px,
        calc(100% - 17px) 24px;
    background-size: 8px 8px, 8px 8px;
    background-repeat: no-repeat;
}

select option {
    color: #181818;
    background: #ffffff;
}

textarea.input {
    min-height: 110px;
    border-radius: var(--radius-lg);
    resize: vertical;
}

.input::placeholder {
    color: #8e8e8e;
}

.input:focus,
select:focus,
textarea:focus {
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(242, 191, 17, 0.3), 0 14px 28px rgba(0, 0, 0, 0.14);
}

.options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    border: 0;
}

.option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease;
}

.option:hover {
    border-color: rgba(242, 191, 17, 0.5);
    background: rgba(255, 255, 255, 0.12);
}

.option input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--brand);
}

.option strong {
    display: block;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.35;
}

.option span {
    display: block;
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}

.radio-group {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

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

.submit-row {
    display: grid;
    gap: 14px;
    margin-top: 4px;
}

.btn,
.secondary-action {
    appearance: none;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 100%;
    border: 0;
    border-radius: var(--radius-pill);
    padding: 20px 34px;
    cursor: pointer;
    color: #101010;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-decoration: none;
    text-transform: uppercase;
    transition: box-shadow .18s ease, filter .18s ease;
}

.btn-primary,
.secondary-action {
    background: linear-gradient(180deg, var(--brand-2), var(--brand));
    box-shadow: 0 20px 44px rgba(242, 191, 17, 0.28);
}

.btn-primary:hover,
.secondary-action:hover {
    filter: brightness(1.03);
}

.note {
    margin: 0;
    color: rgba(255, 255, 255, 0.62);
    font-size: 13px;
    line-height: 1.7;
    text-align: center;
}

.alert {
    margin: 0 0 22px;
    padding: 18px;
    border: 1px solid rgba(255, 107, 95, 0.38);
    border-radius: var(--radius-lg);
    background: var(--error-soft);
    color: #ffd1cc;
    line-height: 1.6;
}

.alert strong {
    display: block;
    margin-bottom: 4px;
}

.alert ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.field-error {
    margin: -4px 0 0;
    color: #ffd1cc;
    font-size: 13px;
    font-weight: 800;
}

.inline-error {
    margin-top: -2px;
}

.success-screen {
    display: grid;
    justify-items: start;
    gap: 14px;
    padding: clamp(16px, 3vw, 28px);
}

.success-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--brand-2), var(--brand));
    color: #050505;
    font-size: 34px;
    font-weight: 950;
    box-shadow: 0 20px 42px rgba(242, 191, 17, 0.26);
}

.success-screen h2 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.success-screen p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 17px;
    line-height: 1.75;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
}

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

    .site-menu {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 12px;
        min-height: auto;
        border-radius: 20px;
    }

    .menu-logo {
        grid-column: 1;
        width: 220px;
        min-width: 220px;
        height: 160px;
    }

    .menu-title {
        padding: 8px 12px;
        font-size: 12px;
        letter-spacing: 0.1em;
    }

    .panel {
        padding: 22px;
        border-radius: 28px;
    }

    .grid,
    .grid-3,
    .options,
    .radio-group {
        grid-template-columns: 1fr;
    }

    .brand-logo {
        max-width: 220px;
        max-height: 160px;
    }

    .menu-title,
    .language-switch {
        grid-column: 1;
        justify-self: center;
    }

    .input,
    select,
    textarea {
        padding: 16px 20px;
        font-size: 15px;
    }

    .bg {
        background-position: 58% center;
    }
}

@media (max-width: 520px) {
    .page {
        padding: 12px;
    }

    .site-menu {
        grid-template-columns: 1fr;
        justify-content: center;
    }

    .menu-title {
        grid-column: 1 / -1;
        justify-content: center;
        width: 100%;
    }

    .language-switch {
        grid-template-columns: repeat(2, 48px);
    }

    .menu-logo {
        width: 184px;
        min-width: 184px;
        height: 134px;
    }

    .brand-logo {
        max-width: 184px;
        max-height: 134px;
    }

    .btn,
    .secondary-action {
        padding: 18px 22px;
        font-size: 14px;
    }
}
