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

:root {
    --primary: #129fd0;
    --primary-dark: #0c6699;
    --primary-soft: #e8f7fc;

    --navy: #17324d;
    --background: #073c52;
    --surface: #ffffff;
    --surface-soft: #f6f9fa;

    --text: #17232d;
    --muted: #71808c;
    --border: #dfe7eb;

    --danger: #d93737;

    --radius-lg: 24px;
    --radius-md: 14px;
    --radius-sm: 10px;

    --shadow: 0 24px 70px rgba(1, 32, 45, 0.2);
    --container: 1340px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;

    color: var(--text);
    background: var(--background);

    font-family: "Inter", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

button,
input,
select {
    font: inherit;
}

a {
    color: var(--primary-dark);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.payment-page {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    padding: 0 24px 30px;

    background:
        radial-gradient(circle at 15% 13%, rgba(35, 160, 194, 0.28), transparent 30%),
        radial-gradient(circle at 80% 70%, rgba(0, 112, 163, 0.25), transparent 34%),
        linear-gradient(135deg, #0a5f72 0%, #06445f 48%, #052e49 100%);
}

.payment-page::before,
.payment-page::after {
    content: "";
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
    filter: blur(4px);
}

.payment-page::before {
    width: 650px;
    height: 650px;
    left: -240px;
    top: 250px;

    border: 80px solid rgba(35, 164, 191, 0.08);
    transform: rotate(-18deg);
}

.payment-page::after {
    width: 540px;
    height: 540px;
    right: -210px;
    top: -170px;

    border: 65px solid rgba(31, 129, 184, 0.08);
}

.payment-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
}

.brand-header {
    display: flex;
    justify-content: center;
    margin-bottom: 48px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;

    min-height: 128px;
    padding: 14px 30px 16px 22px;

    color: var(--navy);
    background: var(--surface);
    border-radius: 0 0 22px 22px;

    box-shadow: 0 14px 35px rgba(1, 31, 43, 0.18);
}

.brand:hover {
    text-decoration: none;
}

.brand img {
    display: block;
    width: 92px;
    height: 92px;
    object-fit: contain;
    flex: 0 0 auto;
}

.brand__content {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand__content strong {
    color: #172d46;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.brand__content small {
    margin-top: 7px;
    color: #25384b;
    font-size: 9px;
    font-weight: 800;
}

.payment-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 24px;
    align-items: start;
}

.card {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.form-card {
    padding: 48px 52px 52px;
}

.summary-card {
    position: sticky;
    top: 24px;
    padding: 34px;
}

.page-heading {
    margin-bottom: 42px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border);
}

.page-heading__tag {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    margin-bottom: 12px;

    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.page-heading__tag::before {
    content: "";
    width: 9px;
    height: 9px;

    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 0 6px var(--primary-soft);
}

.page-heading h1 {
    margin: 0 0 12px;

    color: var(--navy);
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1.12;
    letter-spacing: -0.045em;
}

.page-heading p {
    max-width: 700px;
    margin: 0;

    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
}

.form-section + .form-section {
    margin-top: 44px;
}

.section-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 24px;
}

.section-heading__number {
    flex: 0 0 auto;
    display: grid;
    place-items: center;

    width: 34px;
    height: 34px;

    color: #ffffff;
    background: var(--primary);
    border-radius: 11px;

    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(18, 159, 208, 0.24);
}

.section-heading h2 {
    margin: 1px 0 4px;

    color: var(--navy);
    font-size: 18px;
    line-height: 1.3;
}

.section-heading p {
    margin: 0;

    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 19px;
}

.col-12 {
    grid-column: span 12;
}

.col-6 {
    grid-column: span 6;
}

.col-4 {
    grid-column: span 4;
}

.form-group {
    min-width: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;

    color: #3b4b58;
    font-size: 13px;
    font-weight: 700;
}

.form-group label span {
    color: var(--danger);
}

.form-control,
.amount-field {
    width: 100%;
    min-height: 58px;

    color: var(--text);
    background: #ffffff;

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

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.form-control {
    padding: 0 17px;
    font-size: 15px;
}

select.form-control {
    cursor: pointer;
}

.form-control::placeholder,
.amount-field input::placeholder {
    color: #9ba8b1;
}

.form-control:hover,
.amount-field:hover {
    border-color: #bfcdd3;
}

.form-control:focus,
.amount-field:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(18, 159, 208, 0.12);
}

.input-with-icon {
    position: relative;
}

.input-with-icon .form-control {
    padding-right: 60px;
}

.card-icon {
    position: absolute;
    right: 17px;
    top: 50%;
    width: 30px;
    height: 22px;

    border: 2px solid #627582;
    border-radius: 5px;

    transform: translateY(-50%);
}

.card-icon::before {
    content: "";
    position: absolute;
    left: -2px;
    right: -2px;
    top: 5px;
    height: 4px;

    background: #627582;
}

.summary-heading {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 28px;
}

.summary-heading__icon {
    display: grid;
    place-items: center;

    width: 44px;
    height: 44px;

    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), #0c6699);
    border-radius: 13px;

    font-size: 20px;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(18, 159, 208, 0.24);
}

.summary-heading span:not(.summary-heading__icon) {
    display: block;
    margin-bottom: 2px;

    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.summary-heading h2 {
    margin: 0;

    color: var(--navy);
    font-size: 21px;
    line-height: 1.25;
}

.amount-field {
    display: flex;
    align-items: center;
    overflow: hidden;
}

.amount-field > span {
    display: grid;
    place-items: center;
    align-self: stretch;

    width: 54px;

    color: var(--primary-dark);
    background: var(--primary-soft);
    border-right: 1px solid var(--border);

    font-size: 22px;
    font-weight: 800;
}

.amount-field input {
    min-width: 0;
    flex: 1;
    height: 56px;
    padding: 0 16px;

    color: var(--navy);
    background: transparent;
    border: 0;
    outline: 0;

    font-size: 20px;
    font-weight: 750;
}

.field-note {
    margin: 10px 0 0;

    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.summary-list {
    margin: 26px 0;
    padding: 18px;

    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.summary-list > div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 8px 0;

    color: var(--muted);
    font-size: 13px;
}

.summary-list strong {
    color: var(--navy);
    font-weight: 700;
}

.summary-list__total {
    margin-top: 8px;
    padding-top: 16px !important;
    border-top: 1px solid var(--border);
}

.summary-list__total span,
.summary-list__total strong {
    color: var(--navy);
    font-size: 16px;
    font-weight: 800;
}

.agreement {
    position: relative;
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 10px;
    align-items: flex-start;

    margin: 4px 0 22px;

    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
    cursor: pointer;
}

.agreement input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.agreement__box {
    position: relative;
    width: 22px;
    height: 22px;

    background: #ffffff;
    border: 1px solid #cfd9de;
    border-radius: 5px;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.agreement input:focus-visible + .agreement__box {
    box-shadow: 0 0 0 4px rgba(18, 159, 208, 0.14);
}

.agreement input:checked + .agreement__box {
    background: var(--primary);
    border-color: var(--primary);
}

.agreement input:checked + .agreement__box::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 3px;

    width: 5px;
    height: 10px;

    border: solid #ffffff;
    border-width: 0 2px 2px 0;

    transform: rotate(45deg);
}

.agreement a {
    font-weight: 700;
}

.payment-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    width: 100%;
    min-height: 58px;
    padding: 14px 18px;

    color: #ffffff;
    background: linear-gradient(135deg, #18a9d6, #0c75ad);
    border: 0;
    border-radius: 11px;

    cursor: pointer;

    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: 0.01em;

    box-shadow: 0 14px 28px rgba(12, 102, 153, 0.25);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.payment-button:hover {
    filter: brightness(1.035);
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(12, 102, 153, 0.31);
}

.payment-button:active {
    transform: translateY(0);
}

.payment-button:focus-visible {
    outline: 4px solid rgba(18, 159, 208, 0.23);
    outline-offset: 3px;
}

.payment-button__arrow {
    font-size: 20px;
    line-height: 1;
}

.security-information {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-top: 22px;
    padding-top: 20px;

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

.security-information__icon {
    position: relative;
    flex: 0 0 auto;

    width: 34px;
    height: 38px;

    background: var(--primary-soft);
    border: 2px solid var(--primary);
    border-radius: 7px 7px 10px 10px;
}

.security-information__icon::before {
    content: "";
    position: absolute;

    width: 17px;
    height: 15px;
    left: 6px;
    top: -11px;

    border: 3px solid var(--primary);
    border-bottom: 0;
    border-radius: 12px 12px 0 0;
}

.security-information__icon::after {
    content: "";
    position: absolute;
    left: 13px;
    top: 13px;

    width: 5px;
    height: 9px;

    background: var(--primary);
    border-radius: 5px;
}

.security-information strong {
    display: block;
    color: var(--navy);
    font-size: 13px;
}

.security-information p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.security-badges {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.security-badges span {
    flex: 1;
    padding: 8px 10px;

    color: #506571;
    background: #f7fafb;
    border: 1px solid var(--border);
    border-radius: 8px;

    text-align: center;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.payment-footer {
    padding: 26px 0 0;
    text-align: center;
}

.payment-footer p {
    margin: 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 12px;
}

@media (max-width: 1080px) {
    .payment-layout {
        grid-template-columns: minmax(0, 1fr) 360px;
    }

    .form-card {
        padding: 40px 38px 44px;
    }

    .summary-card {
        padding: 28px;
    }
}

@media (max-width: 900px) {
    .payment-page {
        padding-inline: 18px;
    }

    .payment-layout {
        grid-template-columns: 1fr;
    }

    .summary-card {
        position: static;
    }
}

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

    .brand-header {
        margin-bottom: 26px;
    }

    .brand {
        min-height: 100px;
        padding: 12px 17px 14px 14px;
        border-radius: 0 0 18px 18px;
    }

    .brand img {
        width: 70px;
        height: 70px;
    }

    .brand__content strong {
        font-size: 15px;
    }

    .brand__content small {
        margin-top: 5px;
        font-size: 7px;
    }

    .card {
        border-radius: 18px;
    }

    .form-card,
    .summary-card {
        padding: 26px 20px;
    }

    .page-heading {
        margin-bottom: 32px;
    }

    .page-heading h1 {
        font-size: 30px;
    }

    .form-grid {
        gap: 16px;
    }

    .col-6,
    .col-4 {
        grid-column: span 12;
    }

    .section-heading p {
        display: none;
    }

    .form-control {
        min-height: 56px;
    }
}

@media (max-width: 430px) {
    .brand__content {
        display: none;
    }

    .brand {
        padding-inline: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
