/* 引入思源黑体 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

/* =========================================
   全局基础设置 (Base & Typography)
   ========================================= */
:root {
    --font-primary: 'Helvetica Neue', Helvetica, 'Noto Sans SC', Arial, sans-serif;
    --transition-cubic: cubic-bezier(0.22, 1, 0.36, 1);
    --color-selection: #be185d; /* 玫红色选中态 */
}

body {
    font-family: var(--font-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    background-color: #ffffff;
    color: #1a1a1a;
}

/* 选中文本颜色 */
::selection {
    background: rgba(0, 0, 0, 0.1);
    color: var(--color-selection);
}

/* 极简滚动条设计 */
::-webkit-scrollbar {
    width: 4px; /* 极细滚动条 */
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* =========================================
   组件样式 (Components)
   ========================================= */

/* 导航栏动态过渡 */
.nav-glass {
    transition: all 0.4s ease;
    backdrop-filter: blur(0px);
    background-color: rgba(255, 255, 255, 0);
}

.nav-glass.scrolled {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
    box-shadow: 0 1px 0 rgba(0,0,0,0.03);
}

/* 汉堡菜单动画图标 */
.hamburger-line {
    transform-origin: center;
    transition: all 0.3s ease-in-out;
}
.menu-active .line-top {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-active .line-middle {
    opacity: 0;
    transform: translateX(-10px);
}
.menu-active .line-bottom {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* 移动端全屏菜单 */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: #ffffff;
    z-index: 40;
    transform: translateX(100%);
    transition: transform 0.5s var(--transition-cubic);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.mobile-menu-overlay.open {
    transform: translateX(0);
}

/* =========================================
   交互动画 (Interactions)
   ========================================= */

/* 图片容器：悬停放大 */
.group-hover-trigger {
    overflow: hidden;
    position: relative;
    cursor: none; /* 可配合自定义光标 */
}

.image-scale-effect {
    transition: transform 1.2s var(--transition-cubic), filter 0.5s ease;
    will-change: transform;
}

.group-hover-trigger:hover .image-scale-effect {
    transform: scale(1.08);
}

/* 文字遮罩层 */
.content-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
}
.group-hover-trigger:hover .content-overlay {
    opacity: 1;
}

/* =========================================
   轮播与过渡 (Carousel & Transitions)
   ========================================= */

/* 首页轮播图淡入淡出 */
.carousel-item {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 0;
}
.carousel-item.active {
    opacity: 1;
    z-index: 10;
}

/* 文字进入动画 */
@keyframes slideUpFade {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up {
    opacity: 0;
    animation: slideUpFade 1s var(--transition-cubic) forwards;
}

/* 延迟工具类 */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-500 { animation-delay: 0.5s; }

/* 页面加载时的渐入 */
.page-enter {
    animation: fadeIn 0.8s ease-out forwards;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 视频背景适配 */
.video-background {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: -1;
}