@media (max-width: 1439px) {
    .hero__content {
        flex-basis: 48%;
    }

    .hero__visual {
        margin-left: -40px;
    }
}

@media (max-width: 1199px) {
    .site-header__container {
        padding: 0 48px;
    }

    .hero {
        padding: 64px 48px;
    }

    .hero__content {
        flex-basis: 48%;
    }

    .hero__title {
        font-size: 52px;
        line-height: 58px;
    }

    .hero__text {
        font-size: 18px;
        line-height: 26px;
    }

    .hero__visual {
        margin-left: -24px;
        margin-right: -24px;
    }
}

@media (max-width: 991px) {
    .hero {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding-bottom: 48px;
    }

    .hero__content {
        flex-basis: auto;
        max-width: 656px;
    }

    .hero__visual {
        flex: none;
        width: 100%;
        max-width: 720px;
        margin: 32px auto 0;
    }

    .hero__stage {
        margin: 0;
    }
}

@media (max-width: 767px) {
    :root {
        --header-height: 64px;
    }

    .site-header__container {
        padding: 0 16px;
    }

    .site-header__cta {
        display: none;
    }

    .site-header__container {
        padding-right: 12px;
    }

    .site-header__logo,
    .site-header__logo img {
        width: 130px;
        height: auto;
    }

    .site-header__toggle {
        display: flex;
    }

    /* Logo and menu button stay above the open menu panel */
    .site-header__logo,
    .site-header__actions {
        position: relative;
        z-index: 2;
    }

    /* Open menu (Figma "Between / Mobile / 376"): fills the screen under the
       header; links on top with a divider, the demo button at the bottom.
       It starts at the very top, behind the header, so no hairline gap can
       open between the two and show the page through. */
    .site-header__nav {
        display: none;
        position: fixed;
        z-index: 1;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        flex-direction: column;
        align-items: stretch;
        justify-content: space-between;
        padding: var(--header-height) 0 0;
        overflow-y: auto;
        background-color: var(--header-bg);
        box-shadow: 0 12px 16px -4px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03), 0 2px 2px -1px rgba(0, 0, 0, 0.04);
    }

    .site-header.is-open .site-header__nav {
        display: flex;
    }

    .site-header__nav-link {
        padding: 12px 16px;
        border-radius: 0;
        font-weight: 600;
        line-height: 20px;
        letter-spacing: 0;
        color: var(--text-primary);
    }

    .site-header__nav-link:hover,
    .site-header__nav-link:focus-visible {
        background-color: #f8f9fa;
        color: var(--text-primary);
    }

    .site-header__nav-links {
        display: flex;
        flex-direction: column;
        gap: 2px;
        padding: 20px 0;
        border-bottom: 1px solid #e4e7eb;
    }

    .site-header__nav-footer {
        display: flex;
        padding: 24px 16px;
    }

    .site-header__nav-cta {
        display: flex;
        flex: 1 1 auto;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 8px 12px;
        border-radius: 8px;
        background-color: var(--header-brand);
        font-size: 14px;
        font-weight: 600;
        line-height: 20px;
        letter-spacing: 0.15px;
        color: #fff;
        text-decoration: none;
        transition: background-color 0.15s;
    }

    .site-header__nav-cta img {
        display: block;
        flex-shrink: 0;
    }

    .site-header__nav-cta:hover,
    .site-header__nav-cta:focus-visible {
        background-color: var(--brand-hover);
    }

    /* Menu open: the page is frozen in place (body is fixed at the current
       scroll position by the script) and the header is pinned to the top */
    html.is-menu-open body {
        position: fixed;
        left: 0;
        right: 0;
        overflow: hidden;
    }

    html.is-menu-open .site-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
    }

    .hero {
        padding: 48px 16px;
    }

    .hero__content {
        max-width: none;
        text-align: center;
    }

    .hero__title {
        font-size: 40px;
        line-height: 48px;
        letter-spacing: -1px;
    }

    .hero__text {
        font-size: 18px;
        line-height: 24px;
    }

    .hero__cta .btn--primary {
        flex: 1 1 auto;
        padding: 10px 16px;
    }

    .hero__cta .btn--link {
        display: none;
    }

    /*
     * Mobile visual: the desktop stage at 0.8 scale (763 units = 610.4px),
     * cropped to a 307px-high window that starts at the top of the outer circle.
     * Circles, chips and floating cards are re-arranged as in the mobile design.
     */
    .hero__visual {
        width: 610.4px;
        max-width: none;
        margin: 32px 0 0 -49.4px;
    }

    .hero__stage {
        margin: calc(var(--u) * -80) 0 calc(var(--u) * -146.25);
    }

    .hero__connector {
        display: none;
    }

    .hero__circle--outer {
        left: calc(var(--u) * 61.75);
        top: calc(var(--u) * 80);
        width: calc(var(--u) * 431.4);
        height: calc(var(--u) * 431.4);
    }

    .hero__circle--inner {
        left: calc(var(--u) * 114.75);
        top: calc(var(--u) * 132.4);
        width: calc(var(--u) * 325.3);
        height: calc(var(--u) * 325.3);
    }

    .hero__chip--web-chat { left: calc(var(--u) * 84.25); top: calc(var(--u) * 91.25); }
    .hero__chip--email { left: calc(var(--u) * 69.25); top: calc(var(--u) * 140); }
    .hero__chip--phone { left: calc(var(--u) * 65.5); top: calc(var(--u) * 187.5); }
    .hero__chip--messaging { left: calc(var(--u) * 48); top: calc(var(--u) * 235); }
    .hero__chip--social { left: calc(var(--u) * 59.25); top: calc(var(--u) * 287.5); }
    .hero__chip--sms { left: calc(var(--u) * 90.5); top: calc(var(--u) * 337.5); }

    .hero__card--skill { left: calc(var(--u) * 362); top: calc(var(--u) * 92.5); }
    .hero__ai-badge { left: calc(var(--u) * 359); top: calc(var(--u) * 344); }
    .hero__card--monitoring { left: calc(var(--u) * 360.5); top: calc(var(--u) * 396); }

    /* Product demo video: same video as desktop, fitted to the screen width
       and centred on the circles inside the cropped mobile window. */
    .hero__video {
        left: calc(var(--u) * 277.45);
        top: calc(var(--u) * 295.7);
        width: calc(100vw - 32px);
        max-width: 610px;
        height: auto;
        transform: translate(-50%, -50%);
    }
}

/* ==== Partners ==== */

@media (max-width: 1439px) {
    .partners__list {
        padding: 0 24px;
    }

    .partners__item {
        padding: 0 4px;
    }

    .partners__imagine {
        margin-top: 0;
    }
}

@media (max-width: 1199px) {
    .partners__list {
        flex-wrap: wrap;
        justify-content: center;
        row-gap: 8px;
        padding: 0 48px;
    }

    .partners__item {
        flex: 0 0 20%;
    }
}

@media (max-width: 767px) {
    /* One row of 160px cells that scrolls by itself (see the script at the
       end of the page) and can be swiped or dragged */
    .partners__list {
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding: 0;
        overflow-x: auto;
        scrollbar-width: none;
        cursor: grab;
        user-select: none;
    }

    .partners__list.is-dragging {
        cursor: grabbing;
    }

    .partners__list img {
        -webkit-user-drag: none;
        pointer-events: none;
    }

    .partners__item.is-clone {
        display: flex;
    }

    .partners__list::-webkit-scrollbar {
        display: none;
    }

    .partners__item {
        flex: 0 0 160px;
        padding: 0 23px 0 0;
    }

    .partners__item--imagine {
        padding-right: 0;
    }
}

/* ==== Platform ==== */

@media (max-width: 1439px) {
    .platform__product {
        gap: 40px;
    }

    .platform__product-content {
        flex-basis: 380px;
    }

    .platform__title {
        font-size: 44px;
        line-height: 52px;
    }

    .platform__point {
        font-size: 18px;
        line-height: 26px;
    }

    .platform__card {
        flex-direction: column;
        min-height: 0;
    }

    .platform__card-demo {
        flex: none;
        align-self: stretch;
        height: 240px;
    }

    .platform__outcome {
        flex-wrap: wrap;
        row-gap: 24px;
    }

    .platform__outcome-list {
        order: 3;
        flex: 1 1 100%;
        gap: 32px 48px;
        flex-wrap: wrap;
    }
}

@media (max-width: 1199px) {
    .platform {
        padding: 64px 24px;
    }

    .platform__container {
        gap: 56px;
        padding: 64px 24px;
    }

    .platform__header {
        margin-bottom: -16px;
    }

    .platform__heading {
        font-size: 44px;
        line-height: 50px;
        letter-spacing: -1px;
    }

    .platform__product {
        flex-direction: column;
        align-items: stretch;
        gap: 32px;
    }

    .platform__product-content {
        flex: none;
        max-width: 640px;
    }

    .platform__title {
        font-size: 38px;
        line-height: 46px;
    }

    .platform__title br {
        display: none;
    }

    .platform__demo {
        flex: none;
        width: 100%;
    }

    .platform__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .platform__card {
        flex-direction: row;
        min-height: 409px;
    }

    .platform__card-demo {
        flex: 0 1 280px;
        align-self: flex-start;
        height: 345px;
    }

    .platform__outcome {
        margin-top: -16px;
    }
}

@media (max-width: 767px) {
    .platform {
        padding: 48px 16px;
    }

    .platform__container {
        gap: 48px;
        padding: 48px 16px;
    }

    /* Header, then a divider before the product */
    .platform__header {
        margin-bottom: 0;
        padding-bottom: 48px;
        border-bottom: 1px solid #264b73;
    }

    .platform__header .platform__kicker {
        display: none;
    }

    .platform__heading {
        margin-top: 0;
        font-size: 36px;
        line-height: 44px;
        letter-spacing: -1px;
    }

    .platform__heading br {
        display: none;
    }

    .platform__lead {
        margin-top: 24px;
        font-size: 18px;
        line-height: 24px;
        font-weight: 400;
    }

    .platform__product-content {
        max-width: none;
    }

    .platform__eyebrow {
        justify-content: center;
        font-size: 14px;
        line-height: 20px;
        letter-spacing: 0.15px;
    }

    .platform__eyebrow-icon {
        display: none;
    }

    .platform__title {
        margin-top: 16px;
        font-size: 32px;
        line-height: 40px;
        text-align: center;
    }

    .platform__points {
        margin-top: 32px;
    }

    /* Every point is "open": white text, accent icon and its own demo */

    .platform__point,
    .platform__point--active {
        flex-wrap: wrap;
        padding: 20px 0 0;
        margin-bottom: 32px;
        border-bottom: none;
        font-size: 20px;
        line-height: 28px;
        color: #fff;
        opacity: 0.5;
        cursor: default;
        transition: opacity 0.3s ease;
    }

    /* No tab / progress behaviour on mobile */
    .platform__point::after {
        display: none;
    }

    .platform__point.is-current {
        opacity: 1;
    }

    /* Divider above every point after the first, as in the design */
    .platform__point + .platform__point {
        border-top: 1px solid #264b73;
    }

    .platform__point:last-child {
        margin-bottom: 0;
    }

    .platform__point > span:nth-child(2) {
        flex: 1 1 0;
        min-width: 0;
    }

    .platform__point .platform__point-icon {
        background-color: #b5870e;
    }

    .platform__demo {
        display: none;
    }

    /* The whole 886 x 600 demo, scaled to the box width (311 x 254 in the design) */
    .platform__point-demo {
        display: block;
        flex: 1 1 100%;
        /* aspect-ratio: 311 / 254; */
        margin-top: 8px;
        overflow: hidden;
        border-radius: 12px;
        background-color: #1a295b;
        container-type: inline-size;
    }

    .platform__point-demo .platform__stage {
        border-radius: 0;
    }

    .platform__subheading {
        margin-top: 16px;
        font-size: 28px;
        line-height: 36px;
    }

    .platform__grid {
        margin-top: 32px;
        gap: 32px;
    }

    .platform__card {
        flex-direction: column;
        gap: 32px;
        min-height: 0;
        padding: 24px;
    }

    .platform__card-text {
        font-size: 16px;
    }

    /* Demo box sits inside the card padding, top of the image showing */
    .platform__card-demo {
        flex: none;
        align-self: stretch;
        justify-content: center;
        align-items: flex-start;
        height: 200px;
        padding: 0;
        border-radius: 16px;
    }

    .platform__outcome {
        flex-direction: column;
        align-items: stretch;
        gap: 24px;
        margin-top: -8px;
        padding: 20px;
    }

    .platform__outcome-heading br {
        display: none;
    }

    .platform__outcome-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 16px;
    }

    .platform__outcome-item br {
        display: none;
    }

    .platform__outcome-cta {
        order: 4;
        width: 100%;
        box-sizing: border-box;
    }
}

/* ==== AI + Integrations ==== */

@media (max-width: 1439px) {
    .ai__panel {
        padding: 40px;
    }

    .ai-card {
        padding: 28px;
    }

    .integrations__container {
        gap: 48px;
    }

    .integrations__content {
        flex-basis: 460px;
    }
}

@media (max-width: 1199px) {
    .ai {
        padding: 0 48px 64px;
    }

    .ai__panel {
        gap: 16px;
        padding: 32px;
    }

    .ai-card {
        padding: 24px;
    }

    .ai-card__title {
        font-size: 24px;
        line-height: 32px;
    }

    .integrations {
        padding: 64px 48px;
    }

    .integrations__container {
        flex-direction: column;
        align-items: stretch;
        gap: 40px;
    }

    .integrations__content {
        flex-basis: auto;
        max-width: 640px;
    }

    .integrations__aside {
        flex: none;
    }
}

@media (max-width: 991px) {
    .ai__title,
    .integrations__title {
        font-size: 40px;
        line-height: 48px;
    }

    .ai__title {
        letter-spacing: -1px;
    }

    .ai__panel {
        flex-direction: column;
        margin-top: 40px;
        padding: 24px;
    }
}

@media (max-width: 767px) {
    .ai {
        padding: 48px 16px;
    }

    .ai__title {
        font-size: 36px;
        line-height: 44px;
        letter-spacing: -0.5px;
    }

    .integrations__title {
        font-size: 32px;
        line-height: 36px;
    }

    .ai__text {
        margin-top: 8px;
        font-size: 18px;
        line-height: 24px;
    }

    .ai__panel {
        gap: 24px;
        margin-top: 32px;
        padding: 16px;
        border-radius: 16px;
    }

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

    .ai-card__title {
        font-size: 20px;
        line-height: 28px;
        letter-spacing: 0.1px;
    }

    .integrations {
        padding: 48px 16px 64px;
    }

    .integrations__container {
        gap: 32px;
    }

    .integrations__card {
        padding: 20px;
    }

    .integrations__card-title {
        font-size: 16px;
    }

    /* Logo tiles only */
    .integrations__tools {
        gap: 12px;
    }

    .integrations__tool {
        justify-content: center;
        width: 74px;
        height: 56px;
        padding: 8px 12px;
        box-sizing: border-box;
    }

    .integrations__tool-text {
        display: none;
    }

    .integrations__pill {
        white-space: normal;
    }

    /* Mobile order from the design: CRM, Authentication, Customer databases,
       Billing, External channels, AI platforms, Business applications */
    .integrations__pill:nth-child(1) { order: 1; }
    .integrations__pill:nth-child(3) { order: 2; }
    .integrations__pill:nth-child(2) { order: 3; }
    .integrations__pill:nth-child(4) { order: 4; }
    .integrations__pill:nth-child(6) { order: 5; }
    .integrations__pill:nth-child(7) { order: 6; }
    .integrations__pill:nth-child(5) { order: 7; }

    .integrations__stat {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
        padding: 16px 32px;
    }

    .integrations__stat-text {
        gap: 24px;
    }

    .integrations__stat-caption {
        flex: 1 1 0;
    }
}

/* ==== Industries ==== */

@media (max-width: 1199px) {
    .industries {
        padding: 0 48px 40px;
    }

    /* Two industries per row once one row no longer fits */
    .industries__list {
        flex-wrap: wrap;
    }

    .industries__pill {
        flex: 0 0 calc(50% - 8px);
    }
}

@media (max-width: 991px) {
    .industries__heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .industries__title,
    .industries__text {
        flex: none;
    }

    .industries__case {
        flex-direction: column;
    }

    .industries__case-text {
        flex-basis: auto;
    }

    .industries__stats {
        flex-basis: auto;
        width: 100%;
    }
}

@media (max-width: 767px) {
    .industries {
        padding: 48px 16px;
    }

    .industries__container {
        gap: 24px;
        padding: 20px;
        background-color: #fff;
    }

    .industries__top {
        gap: 24px;
    }

    /* Mobile design: title only, industries as pills, then the case study */
    .industries__text,
    .industries__br {
        display: none;
    }

    .industries__title {
        font-size: 28px;
        line-height: 36px;
        color: #101938;
    }

    .industries__list {
        gap: 16px 12px;
        padding: 0;
        border-top: none;
    }

    .industries__pill {
        flex: none;
        max-width: 100%;
        box-sizing: border-box;
        padding: 6px 20px;
        border-radius: 24px;
        background-color: #f1f3f5;
        font-size: 16px;
    }

    .industries__case {
        display: flex;
        gap: 24px;
        padding: 20px;
    }

    .industries__stats {
        flex-direction: column;
        gap: 16px;
    }
}

/* Very narrow phones: let the longest industry pill wrap instead of overflowing */
@media (max-width: 359px) {
    .industries__pill {
        white-space: normal;
    }
}

/* ==== Testimonials + News ==== */

@media (max-width: 1199px) {
    .testimonials,
    .news {
        padding: 64px 48px;
    }

    .testimonials__title,
    .news__title {
        font-size: 40px;
        line-height: 48px;
    }
}

@media (max-width: 767px) {
    .testimonials,
    .news {
        padding: 48px 16px;
    }

    .testimonials__container,
    .news__container {
        gap: 24px;
    }

    /* Arrows move below the cards, right-aligned */
    .testimonials__header,
    .news__header {
        display: contents;
    }

    .testimonials__arrows,
    .news__arrows {
        order: 3;
        align-self: flex-end;
    }

    .testimonials__heading,
    .news__heading {
        flex: none;
        gap: 16px;
    }

    /* 32px from the heading to the cards, 24px from the cards to the arrows */
    .testimonials__heading,
    .news__heading {
        margin-bottom: 8px;
    }

    .testimonials__title,
    .news__title {
        font-size: 28px;
        line-height: 36px;
    }

    .testimonials__title {
        color: var(--text-primary);
    }

    .testimonials__track {
        gap: 16px;
    }

    .news__track {
        gap: 32px;
    }

    .testimonials__card {
        flex-basis: 100%;
        min-height: 452px;
        padding: 20px;
        border-radius: 16px;
    }

    .testimonials__card-title {
        font-size: 20px;
        line-height: 28px;
    }

    .testimonials__quote p {
        font-size: 16px;
        line-height: 24px;
    }

    .testimonials__logo {
        width: 60px;
    }

    .testimonials__logo-emblem {
        left: 12px;
    }

    .testimonials__logo-ararat {
        left: 0;
        width: 60px;
        height: auto;
        top: 16px;
    }

    .testimonials__logo-team {
        left: 0;
        width: 60px;
        height: auto;
        top: 4px;
    }

    .testimonials__logo-vxsoft {
        left: 3px;
        top: 5px;
        width: 57px;
        height: 26px;
    }

    .testimonials__logo-ameria {
        left: 0;
        top: 5px;
        width: 60px;
        height: 28px;
    }

    .news__card {
        flex-basis: 282px;
        min-height: 0;
    }

    .news__card-title {
        font-size: 20px;
        line-height: 28px;
    }
}

/* ==== Demo request + Footer ==== */

@media (max-width: 1439px) {
    .demo__facts {
        gap: 24px;
        padding: 16px 0;
    }

    .demo__br {
        display: none;
    }
}

@media (max-width: 1199px) {
    .demo {
        padding: 64px 48px;
    }

    .demo__facts {
        gap: 24px;
        padding: 16px 0;
    }

    .demo__fact-value {
        font-size: 18px;
        line-height: 26px;
    }

    .site-footer {
        padding: 40px 48px;
    }
}

@media (max-width: 991px) {
    .demo__container {
        flex-direction: column;
        align-items: stretch;
        gap: 40px;
    }

    .demo__intro,
    .demo__form {
        flex: none;
    }

    .demo__title {
        max-width: 640px;
        font-size: 44px;
        line-height: 50px;
        letter-spacing: -1px;
    }

    .demo__br {
        display: none;
    }

    .demo__text {
        max-width: 640px;
    }

    .demo__facts {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 24px;
        padding: 24px 0;
    }

    .demo__divider {
        display: none;
    }

    .demo__fact-value {
        white-space: normal;
    }

    .site-footer__content,
    .site-footer__main {
        flex-wrap: wrap;
        gap: 16px 20px;
    }
}

@media (max-width: 767px) {
    .demo {
        gap: 48px;
        padding: 48px 16px;
    }

    .demo__container {
        gap: 64px;
    }

    .demo__title {
        font-size: 36px;
        line-height: 44px;
        letter-spacing: -1px;
    }

    .demo__br {
        display: inline;
    }

    .demo__form {
        gap: 24px;
        padding: 20px;
    }

    .demo__form-text br {
        display: none;
    }

    .demo__row {
        flex-direction: column;
    }

    .demo__submit {
        align-self: stretch;
    }

    .demo__facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 0;
        padding: 16px 20px 20px;
    }

    .demo__fact--powered {
        grid-column: 1 / -1;
    }

    /* Right-hand column gets a divider, as in the mobile design */
    .demo__fact:nth-child(5),
    .demo__fact:nth-child(9) {
        padding-left: 16px;
        border-left: 1px solid #143252;
    }

    .demo__fact:nth-child(3),
    .demo__fact:nth-child(7) {
        padding-right: 16px;
    }

    .site-footer {
        padding: 48px 16px;
    }

    .site-footer__content {
        flex-direction: column;
        align-items: stretch;
        gap: 32px;
    }

    .site-footer__main {
        flex: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .site-footer__nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .site-footer__nav-link {
        padding: 4px 8px;
        color: #3b434c;
    }

    .site-footer__social {
        padding-top: 32px;
        border-top: 1px solid #d1d6db;
    }

    .site-footer__container {
        gap: 16px;
    }
}
