/* 
 * Project: Modern Fashion Women Showcase
 * Theme: Minimalist, Elegant, High-end
 * Version: 1.1.0
 * Copyright: @2026 HAISNAP
 */

/* =========================================
   1. Global Settings & Typography
   ========================================= */
:root {
    --color-bg-primary: #FFFFFF;
    --color-bg-secondary: #FAFAFA;
    --color-text-primary: #1A1A1A;
    --color-text-secondary: #666666;
    --color-accent: #8C8C8C;
    /* 优化后的缓动曲线，更具高级感 */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out-circ: cubic-bezier(0.85, 0, 0.15, 1);
}

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

body {
    background-color: var(--color-bg-secondary);
    color: var(--color-text-primary);
    font-family: 'Helvetica Now Display', 'Helvetica Neue', 'Helvetica', 'Arial', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    overflow-x: hidden;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.no-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* =========================================
   2. Animations & Transitions
   ========================================= */

/* Optimized Fade In Up Animation with Blur */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
        filter: blur(2px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 1.4s var(--ease-out-expo) forwards;
    opacity: 0; /* Initially hidden */
}

/* Image Reveal Effect */
.img-reveal-container {
    overflow: hidden;
    position: relative;
    /* 修复 Safari 上的圆角溢出问题 */
    mask-image: -webkit-radial-gradient(white, black);
    -webkit-mask-image: -webkit-radial-gradient(white, black); 
}

.img-reveal {
    transition: transform 1.6s var(--ease-out-expo), filter 1.6s var(--ease-out-expo);
    width: 100%;
    height: 100%;
    object-fit: cover;
    will-change: transform;
}

.img-reveal-container:hover .img-reveal {
    transform: scale(1.05);
}

/* Overlay that lightens on hover */
.img-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0);
    transition: background 0.6s ease;
    pointer-events: none;
    z-index: 10;
}

.img-reveal-container:hover .img-overlay {
    background: rgba(255, 255, 255, 0.08);
}

/* Advanced Text Hover Effect (Left-to-Right Underline) */
.hover-underline {
    position: relative;
    display: inline-block;
    text-decoration: none;
}

.hover-underline::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.5s var(--ease-out-expo);
}

.hover-underline:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* =========================================
   3. Specific Layout Components
   ========================================= */

/* Hero Section Typography */
.hero-text {
    font-weight: 100;
    letter-spacing: 0.05em;
    text-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* Navigation Link Active State */
.nav-link {
    opacity: 0.6;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    opacity: 1;
}

/* Style Archive Horizontal Scroll - Responsive Optimized */
.horizontal-scroll-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1.5rem; /* Mobile gap */
    padding-bottom: 2rem;
    -webkit-overflow-scrolling: touch;
    /* Hide scrollbar */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.horizontal-scroll-container::-webkit-scrollbar {
    display: none;
}

.horizontal-scroll-item {
    scroll-snap-align: center;
    flex: 0 0 auto;
    width: 80vw;
    /* 使用 CSS clamp 确保在平板上不过大 */
    max-width: 400px; 
    transition: opacity 0.5s ease;
}

@media (min-width: 768px) {
    .horizontal-scroll-container {
        gap: 2.5rem; /* Desktop gap */
    }
    .horizontal-scroll-item {
        width: 30vw;
        max-width: 450px;
    }
}

/* Parallax Effect Utility */
.parallax-bg {
    background-attachment: scroll; /* Mobile fallback */
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

@media (min-width: 1024px) {
    .parallax-bg {
        background-attachment: fixed;
    }
}

/* Article Card Hover */
.article-card {
    transition: transform 0.6s var(--ease-out-expo), opacity 0.6s ease;
    will-change: transform;
}

.article-card:hover {
    transform: translateY(-8px);
}

/* =========================================
   4. Utility Classes & Helpers
   ========================================= */

.font-thin-custom {
    font-weight: 100;
}

.tracking-ultra-wide {
    letter-spacing: 0.2em;
}

/* Smooth Image Loading Placeholder */
.image-placeholder {
    background-color: #f3f3f3;
    animation: pulse 2.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .6; }
}

/* Consistent Tone Mask */
.tone-mask {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.03); 
    pointer-events: none;
    z-index: 5;
}

/* Reveal on Scroll Class */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s var(--ease-out-expo), transform 1.2s var(--ease-out-expo);
}

.reveal-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Desktop Custom Cursor Interactions (Optional Enhancement) */
@media (hover: hover) and (pointer: fine) {
    /* More pronounced hover effects on desktop */
    .img-reveal-container:hover .img-reveal {
        transform: scale(1.06);
    }
}