/**
 * Native Gutenberg components for the Clouddi homepage.
 *
 * These styles are scoped to dedicated cld-gb-* classes so they do not
 * affect existing pages or blocks.
 */

/* ==========================================================================
   Homepage hero
   ========================================================================== */

.cld-gb-hero {
    position: relative;
    min-height: 720px !important;
    overflow: hidden;
    color: #171525;
    background-color: #f7f4ff;
}

.cld-gb-hero .wp-block-cover__image-background {
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    object-position: center center !important;
}

/*
 * Very light veil on the copy area.
 *
 * The image is already bright on the left, so only a restrained gradient
 * is needed on desktop.
 */
.cld-gb-hero .wp-block-cover__background {
    z-index: 1;
    opacity: 1 !important;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.2) 0%,
        rgba(255, 255, 255, 0.12) 24%,
        rgba(255, 255, 255, 0.04) 40%,
        rgba(255, 255, 255, 0) 54%
    ) !important;
}

.cld-gb-hero .wp-block-cover__inner-container {
    position: relative;
    z-index: 2;
    box-sizing: border-box;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding-right: max(22px, calc((100% - 1200px) / 2));
    padding-left: max(22px, calc((100% - 1200px) / 2));
    color: #171525;
}

.cld-gb-hero .cld-gb-hero__badge {
    display: table;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 24px 0 !important;
    padding: 10px 18px;
    border: 1px solid rgba(67, 33, 101, 0.1);
    border-radius: 999px;
    color: #432165;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 24px rgba(67, 33, 101, 0.08);
    font-size: 15px !important;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
}

.cld-gb-hero .cld-gb-hero__title {
    max-width: 540px;
    margin: 0 !important;
    color: #171525;
    font-size: clamp(44px, 4.55vw, 74px) !important;
    font-weight: 850;
    letter-spacing: -0.035em;
    line-height: 0.96;
    text-align: left;
    text-wrap: balance;
}

.cld-gb-hero .cld-gb-hero__lead {
    max-width: 640px;
    margin: 28px 0 0 !important;
    color: #3e4250;
    font-size: clamp(17px, 1.4vw, 21px) !important;
    font-weight: 400;
    line-height: 1.72;
    text-align: left;
}

.cld-gb-hero .cld-gb-hero__actions {
    display: flex;
    width: 100% !important;
    max-width: 640px;
    flex-wrap: wrap;
    align-items: center;
    align-self: flex-start;
    justify-content: flex-start !important;
    gap: 14px;
    margin: 34px auto 0 0 !important;
}

.cld-gb-hero__actions .wp-block-button {
    margin: 0;
}

.cld-gb-hero__actions .wp-block-button__link {
    display: inline-flex;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        background-color 180ms ease;
}

.cld-gb-hero__actions .wp-block-button__link:hover,
.cld-gb-hero__actions .wp-block-button__link:focus-visible {
    transform: translateY(-2px);
}

.cld-gb-hero__primary .wp-block-button__link {
    color: #171525;
    background: linear-gradient(135deg, #ffbd43 0%, #ffa617 100%);
    box-shadow: 0 14px 30px rgba(255, 166, 23, 0.24);
}

.cld-gb-hero__primary .wp-block-button__link:hover,
.cld-gb-hero__primary .wp-block-button__link:focus-visible {
    color: #171525;
    background: linear-gradient(135deg, #ffc75d 0%, #ffae27 100%);
    box-shadow: 0 18px 34px rgba(255, 166, 23, 0.3);
}

.cld-gb-hero__secondary .wp-block-button__link {
    border-color: rgba(67, 33, 101, 0.1);
    color: #432165;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 24px rgba(67, 33, 101, 0.08);
}

.cld-gb-hero__secondary .wp-block-button__link:hover,
.cld-gb-hero__secondary .wp-block-button__link:focus-visible {
    color: #432165;
    background: #ffffff;
    box-shadow: 0 14px 28px rgba(67, 33, 101, 0.13);
}

/* ==========================================================================
   Why Clouddi section
   ========================================================================== */

.cld-gb-why {
    position: relative;
    box-sizing: border-box;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding:
        112px
        max(22px, calc((100% - 1200px) / 2))
        124px;
    overflow: hidden;
    color: #171525;
    background:
        radial-gradient(
            circle at 88% 12%,
            rgba(149, 111, 225, 0.13) 0,
            rgba(149, 111, 225, 0.04) 24%,
            transparent 45%
        ),
        radial-gradient(
            circle at 6% 88%,
            rgba(255, 174, 39, 0.1) 0,
            rgba(255, 174, 39, 0.025) 24%,
            transparent 42%
        ),
        #ffffff;
}

.cld-gb-why::before {
    position: absolute;
    top: 56px;
    right: -180px;
    width: 520px;
    height: 520px;
    border: 1px solid rgba(106, 65, 170, 0.07);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.cld-gb-why::after {
    position: absolute;
    bottom: -210px;
    left: -210px;
    width: 460px;
    height: 460px;
    border: 1px solid rgba(255, 174, 39, 0.09);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.cld-gb-why > * {
    position: relative;
    z-index: 1;
}

.cld-gb-why .cld-gb-why__intro {
    display: grid !important;
    grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
    align-items: center;
    gap: clamp(54px, 8vw, 120px);
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 72px !important;
}

.cld-gb-why__intro > .wp-block-column {
    min-width: 0;
    margin: 0 !important;
}

.cld-gb-why .cld-gb-why__badge {
    display: table;
    width: fit-content;
    margin: 0 0 22px !important;
    padding: 9px 15px;
    border: 1px solid rgba(67, 33, 101, 0.08);
    border-radius: 999px;
    color: #432165;
    background: #f4effb;
    box-shadow: 0 8px 22px rgba(67, 33, 101, 0.05);
    font-size: 13px !important;
    font-weight: 800;
    letter-spacing: 0.055em;
    line-height: 1.2;
    text-transform: uppercase;
}

.cld-gb-why .cld-gb-why__title {
    max-width: 580px;
    margin: 0 !important;
    color: #171525;
    font-size: clamp(44px, 4vw, 68px) !important;
    font-weight: 850;
    letter-spacing: -0.04em;
    line-height: 0.98;
    text-wrap: balance;
}

.cld-gb-why .cld-gb-why__lead {
    max-width: 610px;
    margin: 28px 0 0 !important;
    color: #555b6d;
    font-size: clamp(17px, 1.45vw, 20px) !important;
    line-height: 1.72;
}

/* ==========================================================================
   Why Clouddi visual
   ========================================================================== */

.cld-gb-why .cld-gb-why__visual {
    position: relative;
    width: 100%;
    min-height: 330px;
    margin: 0 !important;
    isolation: isolate;
}

.cld-gb-why .cld-gb-why__visual::before {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: -2;
    width: 360px;
    height: 230px;
    border: 1px solid rgba(111, 73, 171, 0.13);
    border-radius: 50%;
    background:
        radial-gradient(
            circle,
            rgba(137, 99, 205, 0.12) 0,
            rgba(137, 99, 205, 0.035) 44%,
            transparent 70%
        );
    content: "";
    transform: translate(-50%, -50%) rotate(-8deg);
    pointer-events: none;
}

.cld-gb-why .cld-gb-why__visual::after {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: -1;
    width: 460px;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(112, 73, 170, 0.18),
        rgba(255, 174, 39, 0.22),
        transparent
    );
    content: "";
    transform: translate(-50%, -50%) rotate(-12deg);
    pointer-events: none;
}

.cld-gb-why__visual .wp-block-image {
    position: absolute;
    margin: 0 !important;
}

.cld-gb-why__visual .wp-block-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cld-gb-why__visual .cld-gb-why__logo {
    top: 50%;
    left: 50%;
    z-index: 4;
    width: 126px;
    height: 126px;
    padding: 18px;
    border: 1px solid rgba(67, 33, 101, 0.08);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow:
        0 24px 55px rgba(67, 33, 101, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: translate(-50%, -50%);
}

.cld-gb-why__visual .cld-gb-why__office,
.cld-gb-why__visual .cld-gb-why__mobile,
.cld-gb-why__visual .cld-gb-why__client {
    z-index: 3;
    display: grid;
    width: 72px;
    height: 72px;
    place-items: center;
    padding: 18px;
    border: 1px solid rgba(67, 33, 101, 0.07);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow:
        0 18px 42px rgba(67, 33, 101, 0.11),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.cld-gb-why__visual .cld-gb-why__office {
    top: 32%;
    left: 11%;
    transform: rotate(-4deg);
}

.cld-gb-why__visual .cld-gb-why__mobile {
    right: 22%;
    bottom: 4%;
    transform: rotate(4deg);
}

.cld-gb-why__visual .cld-gb-why__client {
    top: 24%;
    right: 4%;
    transform: rotate(5deg);
}

.cld-gb-why__visual .cld-gb-why__office::after,
.cld-gb-why__visual .cld-gb-why__mobile::after,
.cld-gb-why__visual .cld-gb-why__client::after {
    position: absolute;
    width: 9px;
    height: 9px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: #a984e7;
    box-shadow: 0 4px 12px rgba(67, 33, 101, 0.18);
    content: "";
}

.cld-gb-why__visual .cld-gb-why__office::after {
    top: -5px;
    right: -5px;
}

.cld-gb-why__visual .cld-gb-why__mobile::after {
    top: -5px;
    left: -5px;
    background: #d7baf8;
}

.cld-gb-why__visual .cld-gb-why__client::after {
    right: -5px;
    bottom: -5px;
    background: #ffb024;
}

/* ==========================================================================
   Why Clouddi feature cards
   ========================================================================== */

.cld-gb-why .cld-gb-why__grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto !important;
}

.cld-gb-why__grid > .cld-gb-feature {
    position: relative;
    box-sizing: border-box;
    min-width: 0;
    min-height: 300px;
    margin: 0 !important;
    padding: 30px 30px 32px;
    overflow: hidden;
    border: 1px solid rgba(67, 33, 101, 0.075);
    border-radius: 24px;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.98),
            rgba(249, 247, 253, 0.94)
        );
    box-shadow:
        0 18px 44px rgba(42, 24, 67, 0.055),
        inset 0 1px 0 rgba(255, 255, 255, 0.98);
    transition:
        transform 220ms ease,
        border-color 220ms ease,
        box-shadow 220ms ease;
}

.cld-gb-why__grid > .cld-gb-feature::before {
    position: absolute;
    right: -52px;
    bottom: -58px;
    width: 155px;
    height: 155px;
    border: 1px solid rgba(126, 85, 190, 0.08);
    border-radius: 50%;
    background:
        radial-gradient(
            circle,
            rgba(147, 105, 212, 0.08),
            transparent 66%
        );
    content: "";
    pointer-events: none;
}

.cld-gb-why__grid > .cld-gb-feature::after {
    position: absolute;
    right: 30px;
    bottom: 26px;
    width: 45px;
    height: 26px;
    opacity: 0.22;
    background-image: radial-gradient(
        circle,
        #7144a8 1.4px,
        transparent 1.6px
    );
    background-size: 9px 9px;
    content: "";
    pointer-events: none;
}

.cld-gb-why__grid > .cld-gb-feature:hover {
    border-color: rgba(111, 70, 168, 0.17);
    box-shadow:
        0 25px 58px rgba(42, 24, 67, 0.11),
        inset 0 1px 0 rgba(255, 255, 255, 0.98);
    transform: translateY(-5px);
}

.cld-gb-why__grid > .cld-gb-feature:nth-child(2),
.cld-gb-why__grid > .cld-gb-feature:nth-child(5) {
    background:
        linear-gradient(
            145deg,
            rgba(252, 249, 255, 0.99),
            rgba(246, 240, 253, 0.96)
        );
}

.cld-gb-why__grid > .cld-gb-feature:nth-child(3),
.cld-gb-why__grid > .cld-gb-feature:nth-child(6) {
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.99),
            rgba(255, 249, 240, 0.92)
        );
}

.cld-gb-feature .cld-gb-feature__number {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    margin: 0 !important;
    border: 1px solid rgba(67, 33, 101, 0.06);
    border-radius: 13px;
    color: #432165;
    background: #f3eef9;
    font-size: 13px !important;
    font-weight: 850;
    line-height: 1;
}

.cld-gb-feature .cld-gb-feature__icon {
    position: absolute;
    top: 26px;
    right: 26px;
    display: grid;
    box-sizing: border-box;
    width: 58px;
    height: 58px;
    place-items: center;
    margin: 0 !important;
    padding: 14px;
    border: 1px solid rgba(67, 33, 101, 0.06);
    border-radius: 18px;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.98),
            rgba(242, 234, 250, 0.94)
        );
    box-shadow: 0 12px 28px rgba(67, 33, 101, 0.08);
}

.cld-gb-feature .cld-gb-feature__icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cld-gb-feature .cld-gb-feature__title {
    max-width: calc(100% - 48px);
    margin: 54px 0 0 !important;
    color: #171525;
    font-size: clamp(21px, 1.65vw, 27px) !important;
    font-weight: 820;
    letter-spacing: -0.025em;
    line-height: 1.08;
}

.cld-gb-feature .cld-gb-feature__title::after {
    display: block;
    width: 34px;
    height: 3px;
    margin-top: 18px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ffa617, #ffcc68);
    content: "";
}

.cld-gb-feature .cld-gb-feature__text {
    position: relative;
    z-index: 1;
    max-width: 92%;
    margin: 20px 0 0 !important;
    color: #596072;
    font-size: 16px !important;
    line-height: 1.65;
}

/* ==========================================================================
   Tablet
   ========================================================================== */

@media (max-width: 1024px) {
    .cld-gb-hero {
        min-height: 680px !important;
    }

    .cld-gb-hero .wp-block-cover__image-background {
        object-position: 66% center !important;
    }

    .cld-gb-hero .wp-block-cover__background {
        background: linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.62) 0%,
            rgba(255, 255, 255, 0.48) 38%,
            rgba(255, 255, 255, 0.12) 72%,
            rgba(255, 255, 255, 0.02) 100%
        ) !important;
    }

    .cld-gb-hero .wp-block-cover__inner-container {
        padding-right: 24px;
        padding-left: 24px;
    }

    .cld-gb-hero .cld-gb-hero__title {
        max-width: 540px;
        font-size: clamp(42px, 6vw, 62px) !important;
    }

    .cld-gb-hero .cld-gb-hero__lead {
        max-width: 570px;
    }

    .cld-gb-why {
        padding: 88px 24px 98px;
    }

    .cld-gb-why .cld-gb-why__intro {
        grid-template-columns: minmax(0, 1fr) minmax(340px, 0.9fr);
        gap: 44px;
        margin-bottom: 58px !important;
    }

    .cld-gb-why .cld-gb-why__title {
        font-size: clamp(40px, 5.5vw, 58px) !important;
    }

    .cld-gb-why .cld-gb-why__visual {
        min-height: 300px;
    }

    .cld-gb-why__visual .cld-gb-why__logo {
        width: 110px;
        height: 110px;
    }

    .cld-gb-why__visual .cld-gb-why__office,
    .cld-gb-why__visual .cld-gb-why__mobile,
    .cld-gb-why__visual .cld-gb-why__client {
        width: 64px;
        height: 64px;
        padding: 16px;
    }

    .cld-gb-why .cld-gb-why__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 767px) {
    .cld-gb-hero {
        min-height: 720px !important;
        align-items: flex-start;
        padding-top: 72px;
        padding-bottom: 56px;
    }

    .cld-gb-hero .wp-block-cover__image-background {
        object-position: 72% center !important;
    }

    .cld-gb-hero .wp-block-cover__background {
        background: linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.82) 0%,
            rgba(255, 255, 255, 0.68) 58%,
            rgba(255, 255, 255, 0.24) 100%
        ) !important;
    }

    .cld-gb-hero .wp-block-cover__inner-container {
        padding-right: 16px;
        padding-left: 16px;
    }

    .cld-gb-hero .cld-gb-hero__badge {
        margin-bottom: 20px !important;
        padding: 9px 14px;
        font-size: 13px !important;
    }

    .cld-gb-hero .cld-gb-hero__title {
        max-width: 100%;
        font-size: clamp(38px, 11vw, 54px) !important;
        line-height: 1;
    }

    .cld-gb-hero .cld-gb-hero__lead {
        max-width: 100%;
        margin-top: 22px !important;
        font-size: 17px !important;
        line-height: 1.55;
    }

    .cld-gb-hero .cld-gb-hero__actions {
        display: grid;
        width: 100% !important;
        max-width: none;
        gap: 12px;
        margin: 28px 0 0 !important;
    }

    .cld-gb-hero__actions .wp-block-button,
    .cld-gb-hero__actions .wp-block-button__link {
        width: 100%;
    }

    .cld-gb-hero__actions .wp-block-button__link {
        min-height: 52px;
        padding: 13px 18px;
        font-size: 15px;
    }

    .cld-gb-why {
        padding: 76px 16px 82px;
    }

    .cld-gb-why::before {
        top: 140px;
        right: -250px;
    }

    .cld-gb-why .cld-gb-why__intro {
        display: flex !important;
        flex-direction: column;
        gap: 38px;
        margin-bottom: 46px !important;
    }

    .cld-gb-why .cld-gb-why__intro > .wp-block-column {
        width: 100%;
        flex-basis: auto !important;
    }

    .cld-gb-why .cld-gb-why__badge {
        margin-bottom: 18px !important;
        font-size: 12px !important;
    }

    .cld-gb-why .cld-gb-why__title {
        max-width: 100%;
        font-size: clamp(38px, 11vw, 52px) !important;
        line-height: 1;
    }

    .cld-gb-why .cld-gb-why__lead {
        margin-top: 22px !important;
        font-size: 17px !important;
        line-height: 1.58;
    }

    .cld-gb-why .cld-gb-why__visual {
        min-height: 265px;
    }

    .cld-gb-why .cld-gb-why__visual::before {
        width: 285px;
        height: 190px;
    }

    .cld-gb-why .cld-gb-why__visual::after {
        width: 330px;
    }

    .cld-gb-why__visual .cld-gb-why__logo {
        width: 104px;
        height: 104px;
        padding: 15px;
        border-radius: 24px;
    }

    .cld-gb-why__visual .cld-gb-why__office,
    .cld-gb-why__visual .cld-gb-why__mobile,
    .cld-gb-why__visual .cld-gb-why__client {
        width: 58px;
        height: 58px;
        padding: 14px;
        border-radius: 17px;
    }

    .cld-gb-why__visual .cld-gb-why__office {
        top: 25%;
        left: 4%;
    }

    .cld-gb-why__visual .cld-gb-why__mobile {
        right: 20%;
        bottom: 1%;
    }

    .cld-gb-why__visual .cld-gb-why__client {
        top: 20%;
        right: 2%;
    }

    .cld-gb-why .cld-gb-why__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .cld-gb-why__grid > .cld-gb-feature {
        min-height: 270px;
        padding: 25px 23px 27px;
        border-radius: 21px;
    }

    .cld-gb-feature .cld-gb-feature__icon {
        top: 22px;
        right: 22px;
        width: 54px;
        height: 54px;
        padding: 13px;
    }

    .cld-gb-feature .cld-gb-feature__title {
        margin-top: 46px !important;
        font-size: 23px !important;
    }

    .cld-gb-feature .cld-gb-feature__text {
        max-width: 100%;
        font-size: 15.5px !important;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .cld-gb-hero__actions .wp-block-button__link,
    .cld-gb-why__grid > .cld-gb-feature {
        transition: none;
    }

    .cld-gb-hero__actions .wp-block-button__link:hover,
    .cld-gb-hero__actions .wp-block-button__link:focus-visible,
    .cld-gb-why__grid > .cld-gb-feature:hover {
        transform: none;
    }
}