:root {
    --purple-950: #160021;
    --purple-900: #250038;
    --purple-800: #3c0757;
    --purple-700: #65058b;
    --purple-600: #8d0fb7;
    --magenta: #cb28e9;
    --blue: #188ee8;
    --cyan: #55d2ff;
    --white: #ffffff;
    --ink: #25172b;
    --muted: #756c79;
    --line: rgba(79, 32, 96, 0.13);
    --surface-soft: #faf7fc;
    --shadow: 0 20px 55px rgba(37, 0, 56, 0.15);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 15% 0%, rgba(203, 40, 233, 0.18), transparent 25rem),
        radial-gradient(circle at 100% 18%, rgba(24, 142, 232, 0.14), transparent 26rem),
        linear-gradient(180deg, #f6effb 0%, #fbf9fc 48%, #f0e7f6 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.5;
}

body.modal-open {
    overflow: hidden;
}

button,
input {
    font: inherit;
}

a {
    color: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.page-shell {
    width: min(100%, 780px);
    min-height: 100vh;
    margin: 0 auto;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.93);
    box-shadow: 0 0 70px rgba(37, 0, 56, 0.12);
}

.package-page-shell {
    width: min(100%, 1120px);
}

.site-header {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: 124px;
    align-items: center;
    justify-content: center;
    padding: 18px 24px 10px;
    background:
        radial-gradient(circle at 50% -80%, rgba(85, 210, 255, 0.42), transparent 60%),
        linear-gradient(145deg, var(--purple-950), var(--purple-800));
}

.site-header::after {
    position: absolute;
    right: -75px;
    bottom: -120px;
    width: 230px;
    height: 230px;
    border-radius: 50%;
    background: rgba(203, 40, 233, 0.14);
    content: "";
    pointer-events: none;
}

.centered-header {
    text-align: center;
}

.logo-brand {
    position: relative;
    z-index: 1;
    display: inline-flex;
    border-radius: 24px;
    text-decoration: none;
}

.brand-logo {
    display: block;
    width: 92px;
    height: 92px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 23px;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

.package-header {
    min-height: 116px;
}

.header-email {
    position: absolute;
    right: 22px;
    bottom: 14px;
    z-index: 1;
    max-width: 42%;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.72rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hero {
    position: relative;
    padding: 38px 18px 36px;
}

.hero::before {
    position: absolute;
    top: -1px;
    left: 50%;
    width: 78px;
    height: 5px;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--magenta), var(--blue));
    content: "";
    transform: translateX(-50%);
}

.hero-inner {
    width: min(100%, 550px);
    margin: 0 auto;
}

.hero-inner.wide {
    width: min(100%, 1040px);
}

.kicker {
    display: block;
    color: var(--purple-600);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-align: center;
    text-transform: uppercase;
}

h1 {
    margin: 7px 0 8px;
    color: var(--purple-900);
    font-size: clamp(2rem, 7vw, 3.25rem);
    line-height: 1.04;
    letter-spacing: -0.045em;
    text-align: center;
}

.subtitle {
    max-width: 620px;
    margin: 0 auto 26px;
    color: var(--muted);
    font-size: 0.96rem;
    text-align: center;
}

.form-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.form-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 24px;
}

.package-progress {
    width: min(100%, 420px);
    margin: 0 auto 26px;
    padding: 13px 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.84);
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #9a929d;
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
}

.progress-step b {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border-radius: 50%;
    background: #eee9f1;
    color: #786e7d;
    font-size: 0.7rem;
}

.progress-step.is-active,
.progress-step.is-complete {
    color: var(--purple-700);
}

.progress-step.is-active b {
    background: linear-gradient(135deg, var(--purple-700), var(--magenta));
    color: #fff;
    box-shadow: 0 6px 14px rgba(141, 15, 183, 0.28);
}

.progress-step.is-complete b {
    background: #e9f7ff;
    color: #057ac9;
}

.progress-line {
    width: 50px;
    height: 2px;
    margin: 0 10px;
    background: #e8e1eb;
}

.progress-line.is-complete {
    background: linear-gradient(90deg, var(--blue), var(--magenta));
}

.field {
    margin-bottom: 17px;
}

.field label {
    display: block;
    margin-bottom: 7px;
    color: #3e3142;
    font-size: 0.79rem;
    font-weight: 850;
}

.field input {
    width: 100%;
    height: 52px;
    padding: 0 14px;
    border: 1px solid #ddd5e1;
    border-radius: 13px;
    outline: none;
    background: #fcfafc;
    color: var(--ink);
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.field input::placeholder {
    color: #aaa2ad;
}

.field input:focus {
    border-color: var(--purple-600);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(141, 15, 183, 0.1);
}

.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 72px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    padding: 7px 10px;
    border: 0;
    border-radius: 9px;
    background: #eee8f2;
    color: var(--purple-700);
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 900;
    transform: translateY(-50%);
}

.field-note {
    display: block;
    margin-top: 6px;
    color: #918894;
    font-size: 0.7rem;
}

.cta-btn,
.select-btn {
    display: flex;
    width: 100%;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--purple-700), var(--magenta));
    color: #fff;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 950;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    box-shadow: 0 14px 30px rgba(141, 15, 183, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.cta-btn:hover,
.cta-btn:focus-visible,
.select-btn:hover,
.select-btn:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 18px 35px rgba(84, 1, 111, 0.32);
}

.cta-btn:active,
.select-btn:active {
    transform: scale(0.99);
}

.cta-btn:disabled,
.select-btn:disabled {
    cursor: wait;
    opacity: 0.72;
    transform: none;
}

.arrow {
    font-size: 1.25rem;
    line-height: 1;
}

.privacy-note {
    margin: 14px 0 0;
    color: #928998;
    font-size: 0.69rem;
    text-align: center;
}

.support-text {
    padding: 22px 24px 28px;
    border-top: 1px solid var(--line);
    background: #faf7fc;
    color: #726978;
    font-size: 0.77rem;
    line-height: 1.65;
    text-align: center;
}

.support-text a {
    color: var(--purple-700);
    font-weight: 900;
}

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

.package-card {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 16px 42px rgba(37, 0, 56, 0.12);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.package-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 54px rgba(37, 0, 56, 0.17);
}

.package-card.featured {
    border-color: rgba(203, 40, 233, 0.35);
}

.package-card.preselected {
    outline: 3px solid rgba(24, 142, 232, 0.35);
    outline-offset: 4px;
}

.package-top {
    position: relative;
    min-height: 188px;
    padding: 31px 22px 24px;
    overflow: hidden;
    background:
        radial-gradient(circle at 100% 0, rgba(85, 210, 255, 0.33), transparent 13rem),
        linear-gradient(145deg, var(--purple-950), #4c096a 63%, #7d0da0);
    color: #fff;
}

.package-top::after {
    position: absolute;
    right: -48px;
    bottom: -74px;
    width: 170px;
    height: 170px;
    border: 24px solid rgba(255, 255, 255, 0.07);
    border-radius: 50%;
    content: "";
}

.starter-top {
    background:
        radial-gradient(circle at 100% 0, rgba(203, 40, 233, 0.25), transparent 13rem),
        linear-gradient(145deg, #071e45, #0b629e 66%, var(--blue));
}

.badge {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1;
    padding: 5px 9px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 0.58rem;
    font-weight: 950;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
}

.package-label {
    position: relative;
    z-index: 1;
    display: block;
    margin-bottom: 8px;
    color: var(--cyan);
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.starter-top .package-label {
    color: #bdeaff;
}

.package-name {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: clamp(1.45rem, 4vw, 2rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.package-price {
    position: relative;
    z-index: 1;
    margin: 15px 0 0;
    font-size: clamp(2.2rem, 6vw, 3rem);
    font-weight: 950;
    line-height: 1;
    letter-spacing: -0.05em;
}

.package-type {
    position: relative;
    z-index: 1;
    margin: 7px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.78rem;
}

.package-body {
    display: flex;
    height: 100%;
    flex-direction: column;
    padding: 20px;
}

.feature-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.feature-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid #eee9f0;
    font-size: 0.76rem;
}

.feature-list li:last-child {
    border-bottom: 0;
}

.feature-title {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
    color: #554b58;
    font-weight: 750;
}

.icon-dot {
    display: grid;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    place-items: center;
    border-radius: 8px;
    background: #f2e8f7;
    color: var(--purple-700);
    font-size: 0.62rem;
    font-weight: 950;
}

.feature-value {
    flex: 0 0 auto;
    color: var(--purple-700);
    font-weight: 900;
    text-align: right;
    white-space: nowrap;
}

.feature-list .feature-total {
    margin-top: 5px;
    padding: 12px 10px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #f6edfa, #edf8ff);
}

.feature-total .feature-title,
.feature-total .feature-value {
    color: var(--purple-900);
    font-weight: 950;
}

.extra-benefit {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 18px 0;
    padding: 13px 14px;
    border: 1px solid rgba(24, 142, 232, 0.15);
    border-radius: 13px;
    background: #f5faff;
}

.extra-benefit strong {
    color: #126ba7;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.extra-benefit span {
    color: #66727c;
    font-size: 0.68rem;
    line-height: 1.5;
}

.package-bottom {
    margin-top: auto;
}

.select-btn {
    min-height: 51px;
    font-size: 0.75rem;
}

.select-btn--starter {
    background: linear-gradient(135deg, #0876c1, var(--blue));
    box-shadow: 0 14px 30px rgba(24, 142, 232, 0.26);
}

.package-disclaimer {
    max-width: 760px;
    margin: 22px auto 0;
    color: #918995;
    font-size: 0.68rem;
    line-height: 1.55;
    text-align: center;
}

.back-link {
    display: table;
    margin: 18px auto 0;
    color: var(--purple-700);
    font-size: 0.76rem;
    font-weight: 900;
    text-decoration: none;
}

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

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(18, 0, 27, 0.72);
    backdrop-filter: blur(7px);
}

.modal-content {
    width: min(100%, 390px);
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
    text-align: center;
    animation: modalIn 0.22s ease-out;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-icon {
    display: grid;
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    place-items: center;
    border-radius: 50%;
    background: #f4e8f8;
    color: var(--purple-700);
    font-size: 1.25rem;
    font-weight: 950;
}

.modal-brand img {
    border-radius: 15px;
    box-shadow: 0 9px 22px rgba(37, 0, 56, 0.16);
}

.modal-title {
    margin: 8px 0 7px;
    color: var(--purple-900);
    font-size: 1.3rem;
}

.modal-body-text {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.6;
}

.modal-btn {
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 10px;
    border: 0;
    border-radius: 13px;
    color: #fff;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 900;
    text-decoration: none;
}

.modal-btn svg {
    fill: currentColor;
}

.btn-pay-now {
    background: linear-gradient(135deg, var(--purple-700), var(--magenta));
}

.btn-telegram {
    background: #229ed9;
}

.btn-email {
    background: #4e3b55;
}

.btn-close {
    margin-top: 13px;
    padding: 8px 14px;
    border: 0;
    background: transparent;
    color: #796f7d;
    cursor: pointer;
    font-size: 0.76rem;
    font-weight: 850;
}

.loading-spinner {
    width: 17px;
    height: 17px;
    border: 2px solid rgba(255, 255, 255, 0.42);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

    .package-card.featured {
        order: -1;
    }

    .package-header {
        min-height: 126px;
    }

    .header-email {
        right: 14px;
        bottom: 8px;
        left: 14px;
        max-width: none;
        text-align: center;
    }
}

@media (max-width: 520px) {
    .site-header {
        min-height: 112px;
        padding-top: 14px;
    }

    .brand-logo {
        width: 82px;
        height: 82px;
        border-radius: 21px;
    }

    .hero {
        padding: 31px 14px 30px;
    }

    .form-card {
        padding: 20px 16px;
        border-radius: 20px;
    }

    .field input {
        height: 50px;
    }

    .package-top,
    .package-body {
        padding-right: 18px;
        padding-left: 18px;
    }

    .feature-list li {
        align-items: flex-start;
    }

    .feature-value {
        max-width: 48%;
        white-space: normal;
    }

    .form-progress {
        margin-bottom: 21px;
    }

    .progress-line {
        width: 35px;
        margin: 0 7px;
    }
}

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