/**
 * Bento Grid 布局组件
 * 餐盘式网格，让卡片错落有致
 */

/* Bento 网格容器 */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto;
    gap: 20px;
    padding: 20px 0;
}

/* 大卡片 - 占2列2行 */
.bento-card-large {
    grid-column: span 2;
    grid-row: span 2;
}

/* 中卡片 - 占2列1行 */
.bento-card-wide {
    grid-column: span 2;
    grid-row: span 1;
}

/* 高卡片 - 占1列2行 */
.bento-card-tall {
    grid-column: span 1;
    grid-row: span 2;
}

/* 标准卡片 - 1列1行 */
.bento-card {
    grid-column: span 1;
    grid-row: span 1;
}

/* 入场动画 - 飞入效果 */
@keyframes bento-enter {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.bento-card,
.bento-card-large,
.bento-card-wide,
.bento-card-tall {
    animation: bento-enter 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

/* 交错动画延迟 */
.bento-card:nth-child(1) { animation-delay: 0.05s; grid-area: 1 / 1 / 3 / 3; }
.bento-card:nth-child(2) { animation-delay: 0.1s; grid-area: 1 / 3 / 2 / 4; }
.bento-card:nth-child(3) { animation-delay: 0.15s; grid-area: 1 / 4 / 2 / 5; }
.bento-card:nth-child(4) { animation-delay: 0.2s; grid-area: 2 / 3 / 3 / 5; }
.bento-card:nth-child(5) { animation-delay: 0.25s; grid-area: 3 / 1 / 4 / 2; }
.bento-card:nth-child(6) { animation-delay: 0.3s; grid-area: 3 / 2 / 4 / 3; }
.bento-card:nth-child(7) { animation-delay: 0.35s; grid-area: 3 / 3 / 4 / 4; }
.bento-card:nth-child(8) { animation-delay: 0.4s; grid-area: 3 / 4 / 4 / 5; }

/* 响应式 */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .bento-card-large {
        grid-column: span 2;
        grid-row: span 2;
    }
    .bento-card-wide {
        grid-column: span 2;
    }
}

@media (max-width: 600px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .bento-card-large,
    .bento-card-wide,
    .bento-card-tall {
        grid-column: span 1;
        grid-row: span 1;
    }
}

/* ==================== 通用入场动画 ==================== */

/* 淡入上浮 */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fade-in-up 0.5s ease-out backwards;
}

/* 淡入缩放 */
@keyframes fade-in-scale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fade-in-scale {
    animation: fade-in-scale 0.4s ease-out backwards;
}

/* 滑入 */
@keyframes slide-in-left {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slide-in-left 0.5s ease-out backwards;
}

@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slide-in-right 0.5s ease-out backwards;
}

/* 金属光泽扫过效果 */
@keyframes shine-sweep {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.shine-sweep {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 45%,
        rgba(255, 255, 255, 0.5) 50%,
        rgba(255, 255, 255, 0.3) 55%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shine-sweep 3s ease-in-out infinite;
}

/* 脉冲光晕 */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(243, 156, 18, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(243, 156, 18, 0.6);
    }
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* ==================== 卡片hover效果 ==================== */

.card-hover-lift {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card-hover-lift:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* 3D翻转效果 */
.card-flip {
    perspective: 1000px;
}

.card-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card-flip:hover .card-flip-inner {
    transform: rotateY(10deg) rotateX(5deg);
}

/* 边框发光 */
.card-border-glow {
    position: relative;
}

.card-border-glow::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #f39c12, #e74c3c, #f39c12);
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-border-glow:hover::before {
    opacity: 0.5;
}

/* ==================== 文字效果 ==================== */

/* 打字机效果 */
.typewriter {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid #f39c12;
    animation:
        typing 2s steps(20) forwards,
        blink-caret 0.5s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    50% { border-color: transparent; }
}

/* 渐变文字 */
.text-gradient {
    background: linear-gradient(135deg, #f39c12 0%, #e74c3c 50%, #f39c12 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 浮雕文字 */
.text-emboss {
    color: transparent;
    text-shadow:
        1px 1px 1px rgba(255, 255, 255, 0.5),
        -1px -1px 1px rgba(0, 0, 0, 0.5);
    background: linear-gradient(135deg, #2c3e50, #34495e);
    -webkit-background-clip: text;
    background-clip: text;
}

/* ==================== Hero 区域 ==================== */
.hero-section {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #0d0d1a;
}

/* 极简渐变 */
.hero-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(60, 80, 120, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

/* 简洁光晕 */
.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(60, 80, 120, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* Hero 内容 */
.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 4rem 2rem;
    max-width: 800px;
    width: 100%;
}

/* 玻璃卡片 - 简洁风格 */
.hero-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    margin-bottom: 2.5rem;
    animation: hero-card-enter 1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s backwards;
}

@keyframes hero-card-enter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-section .hero-badge {
    display: inline-block;
    background: rgba(201, 169, 110, 0.1);
    border: 1px solid rgba(201, 169, 110, 0.2);
    border-radius: 4px;
    padding: 0.4rem 1rem;
    font-size: 0.75rem;
    color: #c9a96e;
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
}

.hero-section .hero-title {
    font-family: 'ZCOOL XiaoWei', 'Noto Serif SC', serif;
    font-size: 3.2rem;
    font-weight: normal;
    color: #fff;
    letter-spacing: 6px;
    margin-bottom: 1rem;
}

.hero-section .hero-title span {
    color: #c9a96e;
}

.hero-section .hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
}

.hero-section .hero-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.hero-section .hero-location,
.hero-section .hero-year {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

/* 统计数字 */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
    animation: hero-stat-enter 0.6s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.hero-stat:nth-child(1) { animation-delay: 0.4s; }
.hero-stat:nth-child(2) { animation-delay: 0.5s; }
.hero-stat:nth-child(3) { animation-delay: 0.6s; }

@keyframes hero-stat-enter {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-stats .stat-number {
    font-family: 'ZCOOL XiaoWei', serif;
    font-size: 2.8rem;
    font-weight: bold;
    color: #fff;
    line-height: 1.2;
}

.hero-stats .stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 0.5rem;
    letter-spacing: 1px;
}

/* 下滑提示动画 - 简洁优雅 */
.scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    opacity: 0;
    animation: scroll-hint-fade-in 1s ease-out 2.5s forwards;
}

@keyframes scroll-hint-fade-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.scroll-hint.hidden {
    animation: scroll-hint-fade-out 0.5s ease-out forwards;
}

@keyframes scroll-hint-fade-out {
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
        visibility: hidden;
    }
}

.scroll-hint-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.scroll-hint-text {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 2px;
}

.scroll-hint-arrow {
    color: rgba(201, 169, 110, 0.5);
    animation: scroll-hint-bounce 2s ease-in-out infinite;
}

@keyframes scroll-hint-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(6px);
    }
}

/* 滚动淡入动画 */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* 响应式 */
@media (max-width: 768px) {
    .hero-section {
        min-height: 60vh;
        padding: 2rem 0;
    }

    .hero-card {
        padding: 2rem 1.5rem;
        margin-bottom: 2rem;
    }

    .hero-section .hero-title {
        font-size: 2rem;
        letter-spacing: 4px;
    }

    .hero-section .hero-subtitle {
        font-size: 0.9rem;
    }

    .hero-section .hero-meta {
        gap: 1.5rem;
    }

    .hero-stats {
        gap: 2.5rem;
    }

    .hero-stats .stat-number {
        font-size: 2.2rem;
    }

    .scroll-hint {
        bottom: 1.5rem;
    }

    .scroll-hint-text {
        font-size: 0.7rem;
    }
}
