/* ===== CT Photos 3D Hero + GSAP ScrollTrigger 首页效果 ===== */
/* Apple/DJI 风格 - 撕裂感 + 视差滚动 */

/* ===== 全屏 Hero 区域 ===== */
.ct-hero-3d {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    background: #0a0a0f;
    margin-top: var(--ct-nav-height, 64px);
    perspective: 1200px;
}
.ct-hero-3d-bg {
    position: absolute;
    inset: 0;
    background: url('assets/images/hero-default.jpg') center/cover no-repeat;
    transform: scale(1.15);
    will-change: transform, opacity;
    filter: brightness(0.6) contrast(1.1);
}
.ct-hero-3d-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(10,10,15,0.3) 0%,
        rgba(10,10,15,0.1) 40%,
        rgba(10,10,15,0.6) 80%,
        rgba(10,10,15,0.95) 100%
    );
    z-index: 1;
}

/* 撕裂效果装饰线 */
.ct-hero-tear-lines {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}
.ct-tear-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
    height: 1px;
    width: 100%;
    will-change: transform;
}
.ct-tear-line:nth-child(1) { top: 20%; transform: rotate(-1deg) scaleX(0); }
.ct-tear-line:nth-child(2) { top: 45%; transform: rotate(0.5deg) scaleX(0); }
.ct-tear-line:nth-child(3) { top: 70%; transform: rotate(-0.8deg) scaleX(0); }

/* Hero 内容 */
.ct-hero-3d-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: #fff;
    padding: 0 24px;
}
.ct-hero-3d-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 18px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    letter-spacing: 2px;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(20px);
}
.ct-hero-3d-title {
    font-size: clamp(36px, 6vw, 72px);
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1.1;
    margin: 20px 0 16px;
    opacity: 0;
    transform: translateY(40px);
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.ct-hero-3d-subtitle {
    font-size: clamp(14px, 2vw, 18px);
    color: rgba(255,255,255,0.6);
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: 32px;
    opacity: 0;
    transform: translateY(30px);
}

/* Hero 搜索栏 */
.ct-hero-3d-search {
    max-width: 640px;
    width: 100%;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-radius: 60px;
    padding: 5px;
    display: flex;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 8px 40px rgba(0,0,0,0.3);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.3s ease;
}
.ct-hero-3d-search:focus-within {
    border-color: rgba(255,255,255,0.3);
    box-shadow: 0 8px 40px rgba(0,0,0,0.4), 0 0 0 4px rgba(79,70,229,0.15);
    transform: scale(1.02) !important;
}
.ct-hero-3d-search select {
    padding: 12px 14px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    outline: none;
    cursor: pointer;
    min-width: 80px;
}
.ct-hero-3d-search select option {
    color: #333;
    background: #fff;
}
.ct-hero-3d-search input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 15px;
    outline: none;
}
.ct-hero-3d-search input::placeholder {
    color: rgba(255,255,255,0.4);
}
.ct-hero-3d-search button {
    padding: 12px 28px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.ct-hero-3d-search button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(99,102,241,0.4);
}

/* 滚动提示 */
.ct-hero-scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.4);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: ct-scroll-bounce 2s ease-in-out infinite;
}
.ct-scroll-mouse {
    width: 24px;
    height: 38px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 12px;
    position: relative;
}
.ct-scroll-mouse::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 8px;
    background: rgba(255,255,255,0.5);
    border-radius: 2px;
    animation: ct-scroll-dot 2s ease-in-out infinite;
}
@keyframes ct-scroll-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}
@keyframes ct-scroll-dot {
    0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); }
    50% { opacity: 0.3; transform: translateX(-50%) translateY(10px); }
}

/* ===== 撕裂过渡区域 ===== */
.ct-tear-transition {
    position: relative;
    height: 120px;
    overflow: hidden;
    background: #0a0a0f;
    z-index: 20;
}
.ct-tear-svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ===== 特色标签 3D 版 ===== */
.ct-features-3d {
    background: var(--ct-surface, #fff);
    padding: 0;
    position: relative;
    z-index: 20;
}
.ct-features-3d .features-bar {
    margin-top: 0;
}

/* ===== 统计区域 3D 版 ===== */
.ct-stats-3d {
    position: relative;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 80px 24px;
    overflow: hidden;
    z-index: 20;
}
.ct-stats-3d-bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(99,102,241,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(59,130,246,0.08) 0%, transparent 50%);
}
.ct-stats-3d-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.ct-stat-3d-item {
    text-align: center;
    padding: 32px 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(40px) rotateX(15deg);
    transform-origin: center bottom;
    transition: all 0.4s ease;
}
.ct-stat-3d-item:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(99,102,241,0.3);
    transform: translateY(-4px) !important;
}
.ct-stat-3d-icon {
    font-size: 32px;
    margin-bottom: 12px;
}
.ct-stat-3d-number {
    font-size: 36px;
    font-weight: 900;
    color: #fff;
    letter-spacing: -1px;
    margin-bottom: 4px;
}
.ct-stat-3d-label {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    font-weight: 500;
}
.ct-stat-3d-desc {
    font-size: 11px;
    color: rgba(255,255,255,0.3);
    margin-top: 4px;
}

/* ===== 3D 照片展示区域 ===== */
.ct-showcase-3d {
    position: relative;
    padding: 80px 0;
    background: var(--ct-surface, #fff);
    overflow: hidden;
    z-index: 20;
}
.ct-showcase-3d-header {
    text-align: center;
    margin-bottom: 48px;
    padding: 0 24px;
}
.ct-showcase-3d-header h2 {
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 900;
    letter-spacing: -1px;
    color: var(--ct-text, #1a1a2e);
    margin: 0 0 12px;
    opacity: 0;
    transform: translateY(30px);
}
.ct-showcase-3d-header p {
    font-size: 16px;
    color: var(--ct-text-secondary, #6b7280);
    max-width: 500px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(20px);
}

/* 3D 照片滚动画廊 */
.ct-gallery-scroll {
    position: relative;
    height: 400px;
    perspective: 1000px;
    overflow: hidden;
}
.ct-gallery-scroll-track {
    display: flex;
    gap: 20px;
    padding: 0 40px;
    will-change: transform;
}
.ct-gallery-scroll-item {
    flex-shrink: 0;
    width: 300px;
    height: 380px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
}
.ct-gallery-scroll-item:hover {
    transform: scale(1.05) rotateY(-5deg);
}
.ct-gallery-scroll-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.ct-gallery-scroll-item:hover img {
    transform: scale(1.1);
}
.ct-gallery-scroll-item .ct-gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 16px 16px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: #fff;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
}
.ct-gallery-scroll-item:hover .ct-gallery-overlay {
    opacity: 1;
    transform: none;
}
.ct-gallery-overlay-title {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ct-gallery-overlay-author {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 4px;
}

/* ===== 分割线动画 ===== */
.ct-divider-animated {
    position: relative;
    height: 1px;
    max-width: 1100px;
    margin: 0 auto;
    overflow: hidden;
}
.ct-divider-animated::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--ct-primary, #4f46e5), transparent);
    transform: scaleX(0);
    transform-origin: center;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .ct-stats-3d-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .ct-gallery-scroll-item {
        width: 260px;
        height: 340px;
    }
}
@media (max-width: 768px) {
    .ct-hero-3d {
        min-height: 500px;
    }
    .ct-hero-3d-title {
        letter-spacing: -1px;
    }
    .ct-stats-3d {
        padding: 48px 16px;
    }
    .ct-stats-3d-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .ct-stat-3d-item {
        padding: 20px 12px;
    }
    .ct-stat-3d-number {
        font-size: 28px;
    }
    .ct-hero-scroll-hint {
        bottom: 20px;
    }
    .ct-gallery-scroll-item {
        width: 220px;
        height: 300px;
    }
    .ct-showcase-3d {
        padding: 48px 0;
    }
    .ct-hero-3d-search {
        flex-wrap: wrap;
        border-radius: 16px;
        padding: 8px;
    }
    .ct-hero-3d-search select {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .ct-hero-3d-search button {
        width: 100%;
        border-radius: 12px;
        margin-top: 4px;
    }
}
@media (max-width: 480px) {
    .ct-stats-3d-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .ct-stat-3d-number {
        font-size: 24px;
    }
    .ct-stat-3d-icon {
        font-size: 24px;
    }
    .ct-gallery-scroll-item {
        width: 180px;
        height: 250px;
    }
}

/* 覆盖animations.js的anim-ready对photo-card的影响，让GSAP完全控制 */
.photo-card.anim-ready {
    opacity: 1 !important;
    transform: none !important;
    transition: box-shadow 0.3s ease, border-color 0.3s ease !important;
}
.photo-card.anim-ready.anim-visible {
    opacity: 1 !important;
    transform: none !important;
}
