html {
    scroll-behavior: smooth;
}

.hero-cta-btn {
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
    border: none;
    transition: all 0.2s ease;
}

.hero-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.hero-section {
    min-height: calc(100vh - 140px);
    display: flex;
    flex-direction: column;   /* ВАЖНО */
    justify-content: center;  /* центр по вертикали */
}

.hero-inner {
    width: 100%;
    max-width: 1100px;
}

.hero-text {
    text-align: left;
    position: relative;
    z-index: 2;
}

.hero-text p {
    max-width: 640px;
}


/* invoice preview */
.invoice-preview-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 430px;
    margin-top: 1rem;
    overflow: visible;
    z-index: 20;
}

.invoice-preview-stack {
    position: relative;
    width: 360px;
    height: 390px;
}

.invoice-preview-img {
    position: absolute;
    display: block;
    width: 250px;
    height: auto;
    aspect-ratio: 210 / 297;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease,
        filter 0.35s ease;
    will-change: transform;
    cursor: default;
}

/* задний лист */
.invoice-preview-img-back {
    top: 36px;
    left: 18px;
    transform: rotate(-8deg) scale(1);
    z-index: 21;
}

/* передний лист */
.invoice-preview-img-front {
    top: 0;
    left: 105px;
    transform: rotate(7deg) scale(1);
    z-index: 22;
}

/* hover отдельно для каждого листа */
.invoice-preview-img-back:hover {
    transform: rotate(-3deg) scale(1.5);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.24);
    filter: brightness(1.02);
    z-index: 30;
}

.invoice-preview-img-front:hover {
    transform: rotate(2deg) scale(1.5);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.24);
    filter: brightness(1.02);
    z-index: 31;
}

/* чтобы карточка формы не перекрывала увеличение */
.card {
    position: relative;
    z-index: 1;
}

@media (max-width: 991.98px) {
    .hero-text {
        text-align: center;
    }

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

    .invoice-preview-wrap {
        margin-top: 1.5rem;
        min-height: 340px;
        align-items: center;
    }

    .invoice-preview-stack {
        width: 300px;
        height: 320px;
    }

    .invoice-preview-img {
        width: 210px;
    }

    .invoice-preview-img-back {
        top: 28px;
        left: 10px;
    }

    .invoice-preview-img-front {
        top: 0;
        left: 82px;
    }

    .invoice-preview-img-back:hover {
        transform: rotate(-3deg) scale(1.1);
    }

    .invoice-preview-img-front:hover {
        transform: rotate(2deg) scale(1.1);
    }
}

@media (max-width: 575.98px) {
    .invoice-preview-wrap {
        min-height: 280px;
        margin-top: 1.25rem;
        justify-content: center;
        align-items: center;
    }

    .invoice-preview-stack {
        width: 260px;
        height: 260px;
    }

    .invoice-preview-img {
        width: 170px;
    }

    .invoice-preview-img-back {
        top: 22px;
        left: 8px;
        transform: rotate(-6deg) scale(1);
    }

    .invoice-preview-img-front {
        top: 0;
        left: 72px;
        transform: rotate(5deg) scale(1);
    }

    .invoice-preview-img-back:hover {
        transform: rotate(-2deg) scale(1.06);
    }

    .invoice-preview-img-front:hover {
        transform: rotate(1deg) scale(1.06);
    }
}

/* hero для телефона */
@media (max-width: 575.98px) {
    .hero-section {
        min-height: auto;
        padding-top: 1.25rem;
    }

    .hero-section .row.align-items-center {
        display: flex;
        flex-direction: column;
    }

    .hero-text {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .hero-text h1 {
        order: 1;
        margin-bottom: 1rem;
    }

    .invoice-preview-wrap {
        order: 2;
        min-height: 235px;
        margin-top: 0.25rem;
        margin-bottom: 1rem;
        justify-content: center;
        align-items: center;
    }

    .hero-text ul {
        order: 3;
        margin-top: 0;
        margin-bottom: 1rem;
    }

    .hero-text > p.text-muted {
        order: 4;
    }

    .hero-text > p.fw-bold {
        order: 5;
    }
}


.mobile-hero-cta {
    display: none;
}

@media (max-width: 575.98px) {
    .hero-cta-inline {
        display: none;
    }

    .mobile-hero-cta {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        left: 16px;
        right: 16px;
        bottom: 14px;
        z-index: 1200;
        min-height: 56px;
        padding: 0 20px;
        border-radius: 18px;
        background: #1f6fff;
        color: #fff;
        text-decoration: none;
        font-weight: 600;
        font-size: 1rem;
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
        transition:
            opacity 0.28s ease,
            transform 0.28s ease,
            visibility 0.28s ease;
        opacity: 1;
        visibility: visible;
    }

    .mobile-hero-cta.is-hidden {
        opacity: 0;
        visibility: hidden;
        transform: translateY(12px);
        pointer-events: none;
    }

    body {
        padding-bottom: 84px;
    }
}


/* ===== TOGGLE SWITCH ===== */

.toggle-wrapper {
    position: relative;
    display: flex;
    justify-content: center; /* toggle строго по центру */
    align-items: center;
    min-height: 56px;
    margin: 0 auto 2rem;
}

.custom-toggle {
    position: relative;
    z-index: 2;
    width: 78px;
    height: 42px;
    background: #9fc0ff;
    border: 1px solid rgba(120, 150, 220, 0.22);
    border-radius: 999px;
    cursor: pointer;
    transition:
        background 0.28s ease,
        box-shadow 0.28s ease,
        transform 0.2s ease;
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.45),
        0 4px 14px rgba(80, 120, 220, 0.18);
    flex: 0 0 auto;
}

.custom-toggle:hover {
    transform: translateY(-1px);
}

.custom-toggle.active {
    background: #5d8eea;
}

.toggle-thumb {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.28s ease;
    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.custom-toggle.active .toggle-thumb {
    transform: translateX(36px);
}

.toggle-label {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition:
        color 0.2s ease,
        opacity 0.2s ease,
        transform 0.2s ease;
}

.toggle-label.left {
    right: 50%;
    margin-right: 68px;
    text-align: right;
}

.toggle-label.right {
    left: 50%;
    margin-left: 68px;
    text-align: left;
}

.toggle-label.active {
    color: #1f2a44;
    opacity: 1;
}

.toggle-label.text-muted {
    color: #aeb7c8 !important;
    opacity: 1;
}

/* планшеты и небольшие ноутбуки */
@media (max-width: 767.98px) {
    .toggle-wrapper {
        min-height: 52px;
        margin-bottom: 1.75rem;
    }

    .toggle-label {
        font-size: 1rem;
    }

    .toggle-label.left {
        margin-right: 62px;
    }

    .toggle-label.right {
        margin-left: 62px;
    }
}

/* телефоны */
@media (max-width: 575.98px) {
    .toggle-wrapper {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        column-gap: 12px;
        min-height: auto;
        width: 100%;
        max-width: 340px;
        margin: 0 auto 1.5rem;
    }

    .toggle-label {
        position: static;
        transform: none;
        font-size: 0.98rem;
        white-space: normal;
    }

    .toggle-label.left {
        margin-right: 0;
        text-align: right;
    }

    .toggle-label.right {
        margin-left: 0;
        text-align: left;
    }

    .custom-toggle {
        width: 74px;
        height: 40px;
        justify-self: center;
    }

    .toggle-thumb {
        width: 30px;
        height: 30px;
        top: 4px;
        left: 4px;
    }

    .custom-toggle.active .toggle-thumb {
        transform: translateX(34px);
    }
}

@media (max-width: 575.98px) {
    .hero-badges {
        order: 3;
        margin-bottom: 1rem;
        justify-content: center;
    }
}


/* Announce Bar */
.announce-bar {
    background: #ffd95a;
    border-radius: 18px;
    margin-bottom: 10px;
    overflow: visible;
}

.announce-bar__inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    position: relative;
}

.announce-bar__content {
    min-width: 0;
    flex: 1 1 auto;
}

.announce-bar__badge {
    display: inline-block;
    background: rgba(0, 0, 0, 0.12);
    color: #212529;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 4px 10px;
    margin-bottom: 10px;
}

.announce-bar__text {
    font-size: 0.98rem;
    line-height: 1.45;
    color: #212529;
}

.announce-bar__action {
    width: 100%;
    max-width: 360px;
    flex: 0 0 360px;
    position: relative;
}

.announce-bar__cta {
    width: 100%;
    font-weight: 600;
    border-radius: 12px;
}

.announce-bar__form {
    margin-top: 10px;
    border-radius: 14px;
}

@media (max-width: 991.98px) {
    .announce-bar__inner {
        flex-direction: column;
    }

    .announce-bar__action {
        max-width: 100%;
        flex-basis: auto;
    }
}

.waitlist-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(2px);
    z-index: 1040;
}

.waitlist-popover {
    position: fixed;
    top: 110px;
    left: 50%;
    transform: translateX(-50%);
    width: min(460px, calc(100vw - 24px));
    border-radius: 16px;
    z-index: 1050;
    animation: waitlistPopoverIn 0.18s ease;
}

@keyframes waitlistPopoverIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

body.waitlist-open {
    overflow: hidden;
}

@media (max-width: 575.98px) {
    .waitlist-popover {
        top: auto;
        bottom: 20px;
        width: calc(100vw - 20px);
        max-height: calc(100vh - 40px);
        overflow-y: auto;
    }
}

.announce-bar__price {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 6px;
}

.price-current {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff; /* для кнопки */
    line-height: 1;
}

.price-old {
    position: relative;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1;
}

/* диагональная линия */
.price-old::after {
    content: '';
    position: absolute;
    left: -2px;
    right: -2px;
    top: 50%;
    height: 2px;
    background: rgba(255, 255, 255, 0.9);
    transform: rotate(-20deg);
    transform-origin: center;
}

.announce-bar__price-note .price-current {
    color: #212529;
    font-size: 1.1rem;
    font-weight: 800;
}

.announce-bar__price-note .price-old {
    color: rgba(33, 37, 41, 0.6);
}

.announce-bar__price-note .price-old::after {
    background: rgba(33, 37, 41, 0.7);
}

.disabled-pro {
  opacity: 0.55;
  cursor: not-allowed;
}
