/* ============================================
   百抖AI官网 · 公共样式 common.css
   覆盖：Reset / 变量 / 导航 / 按钮 / Section 通用 /
         内页头图 / CTA / 页脚 / 公共响应式 / 滚动动画
   ============================================ */

/* ====== Reset & Base ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    font-size: 16px;
    color: #1a1a2e;
    background: #fff;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit
}

img {
    max-width: 100%;
}

ul {
    list-style: none
}

html {
    scroll-behavior: smooth;
}

:root {
    --maxw: 1600px;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --blue-light: #eff6ff;
    --gray-50: #f8f9fb;
    --gray-100: #f1f3f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --radius: 10px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, .08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, .1);
}

.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px
}

/* ====== Nav ====== */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid #e8ecf3; /* 实色边框，避免半透明边框在 Edge 中与深色背景叠出缝隙感 */
    transition: all .25s;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    gap: 24px;
}

.nav-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-logo img {
    height: 38px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 80px;
    flex: 1;
    justify-content: center;
}

.nav-links a {
    position: relative;
    font-size: 15px;
    color: var(--gray-700);
    font-weight: 500;
    padding: 6px 0;
    transition: color .2s;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%) scaleX(0);
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: var(--blue);
    transition: transform .25s;
}

.nav-links a:hover {
    color: var(--blue);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.nav-login {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    color: var(--blue);
    background: #fff;
    border: 1.5px solid var(--blue);
    transition: all .2s;
    cursor: pointer;
}

.nav-login:hover {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, .25);
}

.nav-login svg {
    width: 14px;
    height: 14px;
}

/* 移动端展开的菜单 */
.nav-links.show {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: #fff;
    padding: 20px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg)
}

/* ====== Buttons ====== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all .25s;
    white-space: nowrap;
}

.btn-blue {
    background: var(--blue);
    color: #fff
}

.btn-blue:hover {
    background: var(--blue-dark);
    box-shadow: 0 4px 14px rgba(37, 99, 235, .3)
}

.btn-outline {
    background: #fff;
    color: var(--blue);
    border: 1.5px solid var(--blue)
}

.btn-outline:hover {
    background: var(--blue-light)
}

.btn-white {
    background: #fff;
    color: var(--blue);
    box-shadow: var(--shadow-sm)
}

.btn-white:hover {
    box-shadow: var(--shadow-md)
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--gray-700)
}

/* ====== Section Common ====== */
section {
    padding: 88px 0;
    position: relative;
    overflow: hidden;
}

.section-gray {
    background: radial-gradient(ellipse 800px 300px at 50% 0%, rgba(37, 99, 235, .03) 0%, transparent 70%), linear-gradient(180deg, #f7f9fc 0%, #f0f3f9 50%, #f7f9fc 100%);
}

.section-white {
    background: radial-gradient(ellipse 600px 200px at 80% 100%, rgba(37, 99, 235, .025) 0%, transparent 70%), #fff;
}

/* 装饰背景图 */
.sec-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
}

.sec-bg-blue {
    background-image: url('../../index_back-1.png');
    opacity: .35;
}

.sec-bg-light {
    background-image: url('../../index_back-2.png');
    opacity: .55;
}

.sec-bg-pastel {
    background-image: url('../../index_back-3.png');
    opacity: .8;
}

section>.container {
    position: relative;
    z-index: 1;
}

.sec-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--blue);
    letter-spacing: .5px;
    margin-bottom: 12px;
    padding: 6px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1px solid #bfdbfe;
}

.sec-label::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 0 0 8px rgba(37, 99, 235, .4)
}

.sec-title {
    font-size: clamp(26px, 3.2vw, 38px);
    font-weight: 800;
    line-height: 1.2;
    color: var(--gray-900);
    margin-bottom: 12px
}

.sec-sub {
    font-size: 16px;
    color: var(--gray-500);
    max-width: 880px;
    line-height: 1.7
}

.sec-head {
    margin-bottom: 52px
}

/* ====== Page Hero（内页头图，背景色由各页面独有样式覆盖） ====== */
.page-hero {
    padding: 0;
    min-height: 360px;
    display: flex;
    align-items: center;
    margin-top: -1px; /* 吃掉 Edge 中导航毛玻璃与头图之间可能出现的 1px 缝隙 */
}

.page-hero-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    color: #fff;
    padding: 110px 24px 90px; /* 左右 64px 对齐首页 banner；会覆盖 .container 的 0 24px，必须自带边距 */
}

.page-crumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, .72);
    margin-bottom: 18px;
}

.page-crumb a {
    color: rgba(255, 255, 255, .72);
    transition: color .2s;
}

.page-crumb a:hover {
    color: #fff;
}

.page-crumb .sep {
    color: rgba(255, 255, 255, .4);
}

.page-crumb .cur {
    color: #fff;
    font-weight: 600;
}

.page-hero h1 {
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 14px;
}

.page-hero .page-subtitle {
    font-size: 17px;
    color: rgba(255, 255, 255, .85);
    max-width: 680px;
    line-height: 1.7;
}

.page-hero .back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 28px;
    padding: 9px 20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .28);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    transition: all .25s;
}

.page-hero .back-btn:hover {
    background: rgba(255, 255, 255, .22);
    transform: translateY(-2px);
}

.page-hero .back-btn .arrow-left {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
}

/* ====== CTA ====== */
.cta {
    background: linear-gradient(135deg, #1a2d4a 0%, #1e3a6e 30%, #1e40af 60%, #1a3560 100%);
    color: #fff;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden
}

.cta::before {
    content: "";
    position: absolute;
    right: -80px;
    top: -180px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .03);
    box-shadow: inset 0 0 120px rgba(255, 255, 255, .04)
}

.cta::after {
    content: "";
    position: absolute;
    left: -120px;
    bottom: -120px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .02)
}

.cta .grid-pattern {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none
}

.cta-inner {
    position: relative;
    z-index: 1
}

.cta h3 {
    font-size: clamp(26px, 3vw, 40px);
    font-weight: 800;
    margin-bottom: 12px
}

.cta p {
    font-size: 16px;
    color: rgba(255, 255, 255, .8);
    max-width: 800px;
    margin: 0 auto 28px
}

.cta-inner .btn-white {
    font-size: 15px;
    padding: 12px 28px
}

/* ====== Footer ====== */
footer {
    background: #111827;
    color: #9ca3af;
    padding: 52px 0 24px
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    margin-bottom: 32px
}

.footer-grid h5 {
    color: #fff;
    font-size: 14px;
    margin-bottom: 14px;
    font-weight: 600;
    text-align: right;
}

.footer-grid p {
    font-size: 13px;
    line-height: 1.7;
    color: #9ca3af;
    text-align: right;
}

.footer-grid a {
    display: block;
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 8px;
    transition: color .2s
}

.footer-grid a:hover {
    color: #fff
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px
}

.footer-brand img {
    height: 32px;
    width: auto
}

.footer-brand span {
    color: #fff;
    font-weight: 700;
    font-size: 17px
}

.copyright {
    border-top: 1px solid #1f2937;
    padding-top: 18px;
    text-align: center;
    font-size: 12px;
    color: #6b7280
}

/* ====== Scroll reveal ====== */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: all .7s cubic-bezier(.22, 1, .36, 1)
}

.reveal.in {
    opacity: 1;
    transform: translateY(0);
    width: 100%;
}

/* ====== 公共响应式 ====== */
@media(max-width:1024px) {
    .page-hero-inner {
        padding: 90px 36px 70px;
    }
}

@media(max-width:720px) {
    .nav-links {
        display: none
    }

    .nav-right .nav-login span {
        display: none;
    }

    .nav-login {
        padding: 8px 12px;
    }

    .menu-toggle {
        display: block
    }

    section {
        padding: 60px 0
    }

    .page-hero-inner {
        padding: 80px 20px 60px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* ====== 悬浮式滚动条（默认隐藏，滚动时出现，自动淡出） ====== */
/* 原生滚动条彻底隐藏：由 JS 驱动的悬浮条替代 */
::-webkit-scrollbar {
    width: 0;
    height: 0;
}

* {
    scrollbar-width: none;
}

/* 悬浮滚动条：平时 opacity 0，滚动时加 .show 淡入 */
.bd-scrollbar {
    position: fixed;
    right: 3px;
    top: 0;
    width: 4px;
    border-radius: 4px;
    background: rgba(37, 99, 235, .45);
    opacity: 0;
    transition: opacity .35s ease;
    z-index: 9999;
    pointer-events: auto;
    cursor: default;
}

.bd-scrollbar.show {
    opacity: 1;
}

.bd-scrollbar:active {
    background: rgba(37, 99, 235, .7);
}

/* 触摸设备不需要悬浮滚动条 */
@media (hover: none) {
    .bd-scrollbar {
        display: none;
    }
}
