:root {
    --ux-nav-offset: 88px;
    --ux-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --ux-focus-ring: 0 0 0 4px rgba(0, 112, 234, 0.14);
    --ux-safe-bottom: calc(env(safe-area-inset-bottom, 0px) + 0.9rem);
}

html {
    scroll-padding-top: var(--ux-nav-offset);
}

body {
    overscroll-behavior-x: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a,
button {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

a[class],
button[class] {
    transition:
        transform 0.18s ease,
        box-shadow 0.22s ease,
        background-color 0.22s ease,
        color 0.22s ease,
        border-color 0.22s ease,
        opacity 0.22s ease;
}

a[class].ux-pressable.is-pressed,
button[class].ux-pressable.is-pressed {
    transform: translateY(1px) scale(0.985);
}

a[class]:focus-visible,
button[class]:focus-visible,
.ux-backtotop:focus-visible {
    outline: none;
    box-shadow: var(--ux-focus-ring), 0 14px 34px rgba(15, 23, 42, 0.14);
}

body.is-scrolled nav.fixed {
    background: rgba(255, 255, 255, 0.92) !important;
    border-color: rgba(197, 198, 205, 0.32) !important;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08) !important;
}

.ux-reveal {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
    transition:
        opacity 0.72s var(--ux-ease),
        transform 0.72s var(--ux-ease);
    will-change: opacity, transform;
}

.ux-reveal.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.ux-backtotop {
    position: fixed;
    right: 1rem;
    bottom: var(--ux-safe-bottom);
    z-index: 70;
    width: 3rem;
    height: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 9999px;
    background: rgba(13, 28, 50, 0.9);
    color: #ffffff;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    opacity: 0;
    pointer-events: none;
    transform: translate3d(0, 14px, 0);
    transition:
        opacity 0.24s ease,
        transform 0.24s ease,
        box-shadow 0.24s ease,
        background-color 0.24s ease;
}

.ux-backtotop:hover {
    background: rgba(0, 89, 187, 0.92);
    box-shadow: 0 24px 46px rgba(0, 89, 187, 0.2);
}

.ux-backtotop.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
}

.ux-backtotop .material-symbols-outlined {
    font-size: 1.35rem;
    font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

.wechat-modal {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.wechat-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.wechat-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 15, 28, 0.62);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.wechat-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 30rem);
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(197, 198, 205, 0.4);
    box-shadow: 0 32px 72px rgba(15, 23, 42, 0.22);
    overflow: hidden;
    transform: translate3d(0, 14px, 0) scale(0.985);
    transition: transform 0.24s var(--ux-ease);
}

.wechat-modal.is-open .wechat-modal__dialog {
    transform: translate3d(0, 0, 0) scale(1);
}

.wechat-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.25rem 0.75rem;
}

.wechat-modal__title {
    color: #0f172a;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.5rem;
}

.wechat-modal__subtitle {
    color: #475569;
    font-size: 0.92rem;
    line-height: 1.55rem;
    margin-top: 0.25rem;
}

.wechat-modal__close {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background: #f8fafc;
    color: #0f172a;
    border: 1px solid rgba(197, 198, 205, 0.36);
}

.wechat-modal__body {
    padding: 0 1.25rem 1.25rem;
}

.wechat-modal__qr-shell {
    border-radius: 1.25rem;
    overflow: hidden;
    background: linear-gradient(180deg, #3ccf7f 0%, #25c26f 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.wechat-modal__qr {
    width: 100%;
    height: auto;
    display: block;
}

.wechat-modal__meta {
    display: grid;
    gap: 0.25rem;
    margin-top: 1rem;
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    background: #f8fafc;
    border: 1px solid rgba(197, 198, 205, 0.32);
}

.wechat-modal__label {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.wechat-modal__value {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5rem;
    word-break: break-word;
}

.wechat-modal__hint {
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.35rem;
}

.wechat-modal__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.wechat-modal__action {
    min-height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.95rem;
    padding: 0.9rem 1rem;
    font-weight: 700;
    text-align: center;
}

.wechat-modal__action--primary {
    background: linear-gradient(135deg, #0d1c32 0%, #0059bb 100%);
    color: #ffffff;
}

.wechat-modal__action--secondary {
    background: #f8fafc;
    color: #0f172a;
    border: 1px solid rgba(197, 198, 205, 0.4);
}

#use-case-tabs {
    scrollbar-width: none;
}

#use-case-tabs::-webkit-scrollbar {
    display: none;
}

#use-case-tabs .use-case-tab {
    min-height: 3.25rem;
}

@media (hover: hover) and (pointer: fine) {
    a[class].ux-pressable:hover,
    button[class].ux-pressable:hover {
        transform: translateY(-1px);
    }
}

@media (hover: none) {
    .motion-card:hover {
        transform: none;
        box-shadow: inherit;
    }
}

@media (max-width: 767px) {
    :root {
        --ux-nav-offset: 76px;
    }

    nav.fixed .max-w-7xl,
    nav.fixed .max-w-screen-2xl {
        height: auto !important;
        min-height: 4.4rem;
        padding-top: calc(0.8rem + env(safe-area-inset-top, 0px));
        padding-bottom: 0.75rem;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    nav.fixed {
        border-bottom-width: 1px;
    }

    .brand-badge-image {
        height: 1.8rem !important;
    }

    .px-12,
    .px-8,
    .px-6 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .py-32 {
        padding-top: 4.75rem !important;
        padding-bottom: 4.75rem !important;
    }

    .py-24 {
        padding-top: 3.75rem !important;
        padding-bottom: 3.75rem !important;
    }

    .pt-40 {
        padding-top: 7.25rem !important;
    }

    .pt-32 {
        padding-top: 6.5rem !important;
    }

    .pt-24 {
        padding-top: 4.75rem !important;
    }

    .pb-20 {
        padding-bottom: 4rem !important;
    }

    .gap-16,
    .gap-12 {
        gap: 2rem !important;
    }

    .text-5xl {
        font-size: clamp(2.35rem, 11vw, 3.2rem) !important;
        line-height: 1.02 !important;
    }

    .text-4xl {
        font-size: clamp(1.95rem, 8vw, 2.55rem) !important;
        line-height: 1.08 !important;
    }

    .text-3xl {
        font-size: clamp(1.5rem, 6.2vw, 1.9rem) !important;
        line-height: 1.12 !important;
    }

    .text-xl {
        font-size: 1.05rem !important;
        line-height: 1.7rem !important;
    }

    .min-h-screen {
        min-height: min(100svh, 980px) !important;
    }

    #use-case-tabs {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        gap: 0.75rem !important;
        padding: 0 0.125rem 0.25rem !important;
        margin: 0 -0.125rem 2rem !important;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    #use-case-tabs .use-case-tab {
        flex: 0 0 auto;
        min-width: 8.5rem;
        scroll-snap-align: start;
    }

    #use-cases .max-w-4xl {
        max-width: none !important;
    }

    #use-cases .bg-surface-container-lowest {
        padding: 1.5rem !important;
    }

    #use-cases .flex.items-center.gap-4.py-4 {
        flex-wrap: wrap;
        gap: 0.75rem !important;
    }

    footer .gap-8,
    footer .gap-6 {
        justify-content: center;
        flex-wrap: wrap;
        row-gap: 0.75rem;
    }

    input,
    select,
    textarea {
        font-size: 16px !important;
    }

    .ux-backtotop {
        right: 0.75rem;
        width: 2.8rem;
        height: 2.8rem;
    }

    .wechat-modal {
        padding: 1rem;
        align-items: end;
    }

    .wechat-modal__dialog {
        width: min(100%, 26rem);
        border-bottom-left-radius: 1rem;
        border-bottom-right-radius: 1rem;
    }

    .wechat-modal__actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 479px) {
    .p-12,
    .p-10 {
        padding: 1.25rem !important;
    }

    .px-10 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .rounded-\[2rem\],
    .rounded-3xl {
        border-radius: 1.25rem !important;
    }
}
