.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.hero-newsletter-btn {
    min-width: 260px;
    height: 64px;
    padding: 0 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    color: var(--main-color);
    font-family: inherit;
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.88);
    border: 2px solid var(--main-color);
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(40, 3, 150, 0.14);
    transition: color 0.3s ease, background-color 0.3s ease,
                box-shadow 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

.hero-newsletter-btn:hover {
    color: #ffffff;
    background: var(--main-color);
    box-shadow: 0 16px 34px rgba(40, 3, 150, 0.28);
    transform: translateY(-2px);
}

.hero-text .hero-newsletter-note {
    max-width: 570px;
    margin: 20px 0 0;
    color: #545464;
    font-size: 15px;
    line-height: 1.55;
}

#newsletter {
    scroll-margin-top: 120px;
}

body.newsletter-modal-open {
    overflow: hidden;
}

.newsletter-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s ease, opacity 0.3s ease;
}

.newsletter-modal.is-open {
    visibility: visible;
    opacity: 1;
}

.newsletter-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 10, 48, 0.72);
    backdrop-filter: blur(7px);
}

.newsletter-modal-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 570px;
    max-height: calc(100vh - 48px);
    padding: 54px 48px 42px;
    overflow-y: auto;
    text-align: center;
    background:
        radial-gradient(circle at 100% 0, rgba(40, 3, 150, 0.12), transparent 34%),
        #ffffff;
    border: 1px solid rgba(40, 3, 150, 0.1);
    border-radius: 24px;
    box-shadow: 0 28px 80px rgba(20, 10, 48, 0.36);
    transform: translateY(24px) scale(0.97);
    transition: transform 0.3s ease;
}

.newsletter-modal.is-open .newsletter-modal-dialog {
    transform: translateY(0) scale(1);
}

.newsletter-modal-close {
    position: absolute;
    top: 16px;
    right: 18px;
    width: 42px;
    height: 42px;
    padding: 0;
    color: #5d5968;
    font-size: 32px;
    font-weight: 300;
    line-height: 1;
    background: #f2effa;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.newsletter-modal-close:hover {
    color: #ffffff;
    background: var(--main-color);
    transform: rotate(5deg);
}

.newsletter-modal-accent {
    width: 74px;
    height: 74px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 30px;
    background: var(--main-color);
    border-radius: 22px;
    box-shadow: 0 14px 30px rgba(40, 3, 150, 0.28);
}

.newsletter-modal-eyebrow {
    margin: 0 0 9px;
    color: var(--main-color);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.newsletter-modal-dialog h2 {
    margin: 0 0 16px;
    color: #2f3038 !important;
    font-size: 31px;
    font-weight: 700;
    line-height: 1.2;
}

.newsletter-modal-copy {
    margin: 0 auto 28px;
    color: #696a73;
    font-size: 16px;
    line-height: 1.65;
}

.newsletter-modal-form {
    gap: 14px;
    text-align: left;
}

.newsletter-field {
    display: block;
}

.newsletter-field span {
    display: block;
    margin: 0 0 7px;
    color: #35343b;
    font-size: 14px;
    font-weight: 600;
}

.newsletter-modal-form input {
    width: 100%;
    height: 54px;
    box-sizing: border-box;
    color: #2f3038;
    background: #f8f7fb;
    border: 1px solid #ded9eb;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.newsletter-modal-form input:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 0 4px rgba(40, 3, 150, 0.1);
}

.newsletter-modal-form button {
    width: 100%;
    height: 56px;
    margin: 8px 0 0;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    background: var(--main-color);
    border: 2px solid var(--main-color);
    border-radius: 10px;
    box-shadow: 0 12px 26px rgba(40, 3, 150, 0.24);
}

.newsletter-modal-form button:hover {
    color: #ffffff;
    background: var(--main-color-hover);
    border-color: var(--main-color-hover);
}

.newsletter-modal-privacy {
    margin: 18px 0 0;
    color: #8a8790;
    font-size: 12px;
    line-height: 1.5;
}

@media (max-width: 1200px) {
    .hero-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero-actions .btn-primary,
    .hero-newsletter-btn {
        width: 100%;
        max-width: 320px;
    }
}

@media (max-width: 768px) {
    .hero-actions {
        align-items: center;
    }

    .hero-text .hero-newsletter-note {
        margin-right: auto;
        margin-left: auto;
    }

    .newsletter-modal {
        padding: 14px;
    }

    .newsletter-modal-dialog {
        max-height: calc(100vh - 28px);
        padding: 46px 22px 30px;
        border-radius: 18px;
    }

    .newsletter-modal-dialog h2 {
        font-size: 26px;
    }

    .newsletter-modal-accent {
        width: 64px;
        height: 64px;
        margin-bottom: 17px;
        font-size: 26px;
        border-radius: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .newsletter-modal,
    .newsletter-modal-dialog,
    .newsletter-modal-close,
    .hero-newsletter-btn {
        transition: none;
    }
}
