/**
 * XKMCM homepage hero migrated from Custom HTML widget.
 * All selectors are scoped under .xkm-home-hero to avoid parent-theme pollution.
 */

/* The module is injected as a runtime widget into Zibll's homepage top full-width area.
   Remove the parent widget chrome so the liquid-glass hero keeps its own shape. */
.widget_zibll_child_home_hero,
.zib-widget.widget_zibll_child_home_hero {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.xkm-home-hero,
.xkm-home-hero * {
    box-sizing: border-box;
}

.xkm-home-hero {
    --xkm-main: #0d3869;
    --xkm-blue: #2f6edb;
    --xkm-cyan: #56c7ff;
    --xkm-text: rgba(15, 23, 42, 0.82);
    --xkm-muted: rgba(15, 23, 42, 0.60);
    position: relative;
    overflow: hidden;
    max-width: 1180px;
    margin: 22px auto 34px;
    border-radius: 30px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.96), rgba(255,255,255,0.48)),
        radial-gradient(circle at 0% 0%, rgba(86,199,255,0.15), transparent 38%),
        radial-gradient(circle at 100% 100%, rgba(13,56,105,0.09), transparent 42%);
    box-shadow:
        0 18px 52px rgba(13, 56, 105, 0.08),
        inset 0 1px 0 rgba(255,255,255,0.88);
}

.xkm-home-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.xkm-home-hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.54;
}

.xkm-home-hero-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(13,56,105,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(13,56,105,0.035) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(circle at 50% 36%, rgba(0,0,0,0.62), transparent 72%);
    -webkit-mask-image: radial-gradient(circle at 50% 36%, rgba(0,0,0,0.62), transparent 72%);
    animation: xkmHomeHeroGridMove 12s linear infinite;
}

.xkm-home-hero-scan {
    position: absolute;
    left: -20%;
    top: 24%;
    width: 140%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(13,56,105,0.06), rgba(86,199,255,0.30), rgba(13,56,105,0.06), transparent);
    animation: xkmHomeHeroScanMove 6s ease-in-out infinite;
}

.xkm-home-hero-orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(30px);
    pointer-events: none;
    opacity: 0.48;
}

.xkm-home-hero-orb-a {
    width: 280px;
    height: 280px;
    left: -110px;
    top: 54px;
    background:
        radial-gradient(circle at 34% 28%, rgba(255,255,255,0.92), transparent 24%),
        radial-gradient(circle, rgba(86,199,255,0.22), transparent 68%);
    animation: xkmHomeHeroOrbA 13s ease-in-out infinite alternate;
}

.xkm-home-hero-orb-b {
    width: 340px;
    height: 340px;
    right: -140px;
    bottom: -110px;
    background:
        radial-gradient(circle at 34% 28%, rgba(255,255,255,0.86), transparent 24%),
        radial-gradient(circle, rgba(13,56,105,0.12), transparent 70%);
    animation: xkmHomeHeroOrbB 16s ease-in-out infinite alternate;
}

.xkm-home-hero-inner {
    position: relative;
    z-index: 1;
    padding: 62px 52px 50px;
    border-radius: 29px;
    border: 1px solid rgba(255,255,255,0.70);
    background:
        linear-gradient(135deg, rgba(255,255,255,0.74), rgba(255,255,255,0.38)),
        radial-gradient(circle at 96% 0%, rgba(86,199,255,0.09), transparent 42%);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.92),
        inset 0 -1px 0 rgba(255,255,255,0.30);
}

.xkm-home-hero-content {
    position: relative;
    z-index: 2;
    max-width: 980px;
    margin: 0 auto;
    text-align: center;
}

.xkm-home-hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 0 auto 28px;
    padding: 8px 16px;
    border-radius: 999px;
    color: var(--xkm-main);
    font-size: 13px;
    font-weight: 850;
    line-height: 1.6;
    background: linear-gradient(135deg, rgba(255,255,255,0.88), rgba(255,255,255,0.56));
    border: 1px solid rgba(13,56,105,0.055);
    box-shadow: 0 8px 22px rgba(13,56,105,0.045), inset 0 1px 0 rgba(255,255,255,0.88);
}

.xkm-home-hero-title {
    margin: 0;
    color: var(--xkm-main);
    font-size: clamp(34px, 5vw, 60px);
    font-weight: 950;
    line-height: 1.24;
    letter-spacing: -0.055em;
}

.xkm-home-hero-title span {
    display: block;
    margin-top: 10px;
    background: linear-gradient(120deg, var(--xkm-main), var(--xkm-blue), var(--xkm-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.xkm-home-hero-subtitle {
    display: inline-block;
    max-width: 100%;
    margin: 30px auto 0;
    color: var(--xkm-text);
    font-size: 17px;
    font-weight: 750;
    line-height: 2;
    white-space: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.xkm-home-hero-subtitle::-webkit-scrollbar {
    display: none;
}

.xkm-home-hero-desc {
    margin: 22px auto 0;
    max-width: 800px;
    color: var(--xkm-muted);
    font-size: 14px;
    line-height: 2.15;
    text-align: left;
    text-indent: 2em;
}

.xkm-home-hero-desc strong {
    color: var(--xkm-main);
    font-weight: 850;
}

.xkm-home-hero-identity {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 42px;
}

.xkm-home-hero-id {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 86px;
    padding: 18px 16px;
    border-radius: 20px;
    text-align: left;
    background: linear-gradient(135deg, rgba(255,255,255,0.78), rgba(255,255,255,0.42));
    border: 1px solid rgba(13,56,105,0.055);
    box-shadow: 0 8px 22px rgba(13,56,105,0.045), inset 0 1px 0 rgba(255,255,255,0.84);
}

.xkm-home-hero-id::after {
    content: "";
    position: absolute;
    right: -28px;
    bottom: -34px;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(86,199,255,0.12), transparent 68%);
}

.xkm-home-hero-id-icon {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--xkm-main);
    font-size: 18px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.84), rgba(255,255,255,0.42)),
        radial-gradient(circle at 90% 92%, rgba(86,199,255,0.18), transparent 46%);
    border: 1px solid rgba(255,255,255,0.66);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.86);
}

.xkm-home-hero-id-text {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.xkm-home-hero-id-text strong {
    display: block;
    color: var(--xkm-main);
    font-size: 15px;
    font-weight: 900;
    line-height: 1.45;
}

.xkm-home-hero-id-text span {
    display: block;
    margin-top: 6px;
    color: var(--xkm-muted);
    font-size: 12px;
    line-height: 1.65;
}

.xkm-home-hero-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 36px;
}

.xkm-home-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 13px;
    border-radius: 999px;
    color: rgba(13,56,105,0.80);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.6;
    white-space: nowrap;
    background: linear-gradient(135deg, rgba(255,255,255,0.80), rgba(255,255,255,0.44));
    border: 1px solid rgba(13,56,105,0.055);
    box-shadow: 0 7px 18px rgba(13,56,105,0.04), inset 0 1px 0 rgba(255,255,255,0.82);
}

.xkm-home-hero-svg {
    width: 20px;
    height: 20px;
    display: block;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.xkm-home-hero-tag-icon {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    display: inline-block;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.xkm-home-hero-note {
    max-width: 860px;
    margin: 40px auto 0;
    padding: 17px 18px;
    border-radius: 20px;
    color: rgba(13,56,105,0.72);
    font-size: 13px;
    line-height: 2;
    text-align: center;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.76), rgba(255,255,255,0.40)),
        radial-gradient(circle at 100% 0%, rgba(86,199,255,0.08), transparent 42%);
    border: 1px solid rgba(13,56,105,0.055);
    box-shadow: 0 8px 22px rgba(13,56,105,0.04), inset 0 1px 0 rgba(255,255,255,0.82);
}

.xkm-home-hero-note strong {
    color: var(--xkm-main);
    font-weight: 900;
}

@keyframes xkmHomeHeroGridMove {
    0% { background-position: 0 0, 0 0; }
    100% { background-position: 42px 42px, 42px 42px; }
}

@keyframes xkmHomeHeroScanMove {
    0%, 100% { opacity: 0.20; transform: translateY(-22px); }
    50% { opacity: 0.76; transform: translateY(42px); }
}

@keyframes xkmHomeHeroOrbA {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(86px, 24px, 0) scale(1.08); }
}

@keyframes xkmHomeHeroOrbB {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(-82px, -24px, 0) scale(0.96); }
}

@media (max-width: 980px) {
    .xkm-home-hero-inner {
        padding: 48px 30px 40px;
    }

    .xkm-home-hero-content {
        max-width: 100%;
    }

    .xkm-home-hero-identity {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }
}

@media (max-width: 680px) {
    .xkm-home-hero {
        margin: 14px 0 24px;
        border-radius: 22px;
    }

    .xkm-home-hero-inner {
        padding: 34px 16px 24px;
        border-radius: 21px;
    }

    .xkm-home-hero-canvas {
        opacity: 0.34;
    }

    .xkm-home-hero-bg::before {
        background-size: 34px 34px;
        opacity: 0.34;
    }

    .xkm-home-hero-scan {
        top: 18%;
        opacity: 0.48;
    }

    .xkm-home-hero-orb-a {
        width: 210px;
        height: 210px;
        left: -135px;
        top: 70px;
        opacity: 0.34;
    }

    .xkm-home-hero-orb-b {
        width: 230px;
        height: 230px;
        right: -150px;
        bottom: -80px;
        opacity: 0.30;
    }

    .xkm-home-hero-badge {
        margin-bottom: 20px;
        font-size: 12px;
        padding: 6px 11px;
        line-height: 1.6;
    }

    .xkm-home-hero-title {
        font-size: 29px;
        line-height: 1.34;
        letter-spacing: -0.045em;
    }

    .xkm-home-hero-title span {
        margin-top: 8px;
    }

    .xkm-home-hero-subtitle {
        margin-top: 22px;
        font-size: 14px;
        line-height: 2;
    }

    .xkm-home-hero-desc {
        margin-top: 18px;
        font-size: 13px;
        line-height: 2;
        text-align: left;
        text-indent: 2em;
    }

    .xkm-home-hero-identity {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-top: 30px;
    }

    .xkm-home-hero-id {
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        min-height: 112px;
        gap: 10px;
        padding: 13px 11px;
        border-radius: 16px;
    }

    .xkm-home-hero-id-icon {
        width: 34px;
        height: 34px;
        border-radius: 13px;
    }

    .xkm-home-hero-svg {
        width: 18px;
        height: 18px;
    }

    .xkm-home-hero-id-text strong {
        font-size: 12px;
    }

    .xkm-home-hero-id-text span {
        margin-top: 4px;
        font-size: 10px;
        line-height: 1.5;
    }

    .xkm-home-hero-tags {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        gap: 8px;
        margin-top: 30px;
        padding-bottom: 5px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .xkm-home-hero-tags::-webkit-scrollbar {
        display: none;
    }

    .xkm-home-hero-tag {
        flex: 0 0 auto;
        padding: 7px 11px;
        font-size: 11px;
    }

    .xkm-home-hero-tag-icon {
        width: 14px;
        height: 14px;
    }

    .xkm-home-hero-note {
        margin-top: 30px;
        padding: 14px 13px;
        border-radius: 16px;
        font-size: 12px;
        line-height: 1.9;
    }
}

@media (max-width: 390px) {
    .xkm-home-hero-inner {
        padding: 30px 14px 22px;
    }

    .xkm-home-hero-title {
        font-size: 27px;
    }

    .xkm-home-hero-desc {
        font-size: 12px;
        line-height: 1.9;
    }

    .xkm-home-hero-id {
        min-height: 104px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .xkm-home-hero-bg::before,
    .xkm-home-hero-scan,
    .xkm-home-hero-orb {
        animation: none !important;
    }

    .xkm-home-hero-canvas {
        display: none !important;
    }
}

.xkm-home-hero[data-motion="0"] .xkm-home-hero-bg::before,
.xkm-home-hero[data-motion="0"] .xkm-home-hero-scan,
.xkm-home-hero[data-motion="0"] .xkm-home-hero-orb {
    animation: none !important;
}

.xkm-home-hero[data-motion="0"] .xkm-home-hero-canvas {
    display: none !important;
}
