/* -------------------------------------------------------------------------- */
/*                                 Font Imports                               */
/* -------------------------------------------------------------------------- */
/* 引入思源黑体作为中文字体，Playfair Display作为衬线体装饰 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500&family=Playfair+Display:ital,wght@0,400;0,500;1,400&display=swap');

/* -------------------------------------------------------------------------- */
/*                                Base Settings                               */
/* -------------------------------------------------------------------------- */
:root {
    --color-bg: #F5F5F5;
    --color-text-main: #333333;
    --color-text-sub: #777777;
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    /* 优先使用英文无衬线，中文思源黑体 */
    font-family: 'Helvetica Now', 'Avenir Next', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

main {
    flex: 1; /* 确保footer固定底部 */
}

/* -------------------------------------------------------------------------- */
/*                            Typography Utilities                            */
/* -------------------------------------------------------------------------- */
.font-serif {
    font-family: 'Playfair Display', serif;
}

.tracking-wide-custom {
    letter-spacing: 0.05em;
}

/* -------------------------------------------------------------------------- */
/*                            Navigation Effects                              */
/* -------------------------------------------------------------------------- */
.nav-item {
    position: relative;
    padding-bottom: 2px;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: currentColor;
    transition: width 0.3s var(--ease-out-expo);
}

.nav-item:hover::after,
.nav-item.active::after {
    width: 100%;
}

/* -------------------------------------------------------------------------- */
/*                           Hero Slider Animation                            */
/* -------------------------------------------------------------------------- */
.hero-slider-container {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 1.2s ease-in-out, transform 8s ease-out;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

.hero-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 40%);
}

/* -------------------------------------------------------------------------- */
/*                              Horizontal Scroll                             */
/* -------------------------------------------------------------------------- */
/* 隐藏滚动条但保留功能 */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* -------------------------------------------------------------------------- */
/*                         Masonry Layout (Style Page)                        */
/* -------------------------------------------------------------------------- */
.masonry-grid {
    column-count: 1;
    column-gap: 1.5rem; /* Tailwind gap-6 equivalent */
}

@media (min-width: 768px) {
    .masonry-grid {
        column-count: 2;
    }
}

@media (min-width: 1024px) {
    .masonry-grid {
        column-count: 3;
    }
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    position: relative;
}

/* -------------------------------------------------------------------------- */
/*                         Image Interactions & Effects                       */
/* -------------------------------------------------------------------------- */
.group:hover .group-hover\:scale-103 {
    transform: scale(1.03);
}

/* 视差背景效果 */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}
@media (max-width: 768px) {
    .parallax-bg {
        background-attachment: scroll; /* 移动端禁用视差以提升性能 */
    }
}

/* 图片加载占位动画 */
.skeleton-bg {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* -------------------------------------------------------------------------- */
/*                            Animation Utilities                             */
/* -------------------------------------------------------------------------- */
.fade-in-up {
    animation: fadeInUp 0.8s var(--ease-out-expo) forwards;
    opacity: 0;
    transform: translateY(20px);
}

/* 级联延迟，配合JS添加 style="animation-delay: 0.1s" 使用 */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* -------------------------------------------------------------------------- */
/*                                Footer                                      */
/* -------------------------------------------------------------------------- */
footer {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem; /* text-sm */
    color: var(--color-text-sub);
}