/**
 * 首页样式 - 崖城风骨
 */

/* ===== 首屏 ===== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: slowZoom 25s ease-in-out infinite alternate;
}

@keyframes slowZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(45, 45, 45, 0.6) 0%,
        rgba(45, 45, 45, 0.4) 40%,
        rgba(45, 45, 45, 0.5) 70%,
        rgba(45, 45, 45, 0.8) 100%
    );
    z-index: 2;
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(201, 169, 97, 0.5);
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
}

@keyframes float {
    0%, 100% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 0.8; }
    90% { opacity: 0.8; }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 2rem;
    max-width: 900px;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: rgba(201, 169, 97, 0.2);
    border: 1px solid var(--color-gold);
    color: var(--color-gold);
    font-size: var(--text-sm);
    border-radius: 50px;
    margin-bottom: 2rem;
    animation: fadeInDown 1s ease-out 0.3s both;
}

.hero-title {
    margin-bottom: 1.5rem;
}

.title-main {
    display: block;
    font-family: var(--font-serif);
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 700;
    color: var(--color-white);
    text-shadow: 
        0 0 30px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.15em;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.title-sub {
    display: block;
    font-family: var(--font-serif);
    font-size: clamp(1.125rem, 3vw, 1.75rem);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    margin-top: 1rem;
    animation: fadeInUp 1s ease-out 0.7s both;
}

.hero-desc {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2rem;
    letter-spacing: 0.1em;
    animation: fadeInUp 1s ease-out 0.9s both;
}

.hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease-out 1.1s both;
}

.stat-item {
    text-align: center;
}

.stat-num {
    display: block;
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-gold);
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.25rem;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.3);
}

.btn-start {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 1rem 2.5rem;
    background: transparent;
    color: var(--color-white);
    font-size: var(--text-lg);
    font-weight: 500;
    border: 2px solid var(--color-gold);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
    animation: fadeInUp 1s ease-out 1.3s both, pulseGlow 2s ease-in-out 2s infinite;
    position: relative;
    overflow: hidden;
}

.btn-start::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-start:hover::before {
    left: 100%;
}

.btn-start:hover {
    background: var(--color-gold);
    color: var(--color-rock);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(201, 169, 97, 0.4);
}

.btn-start svg {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-normal);
}

.btn-start:hover svg {
    transform: translateY(3px);
}

.scroll-hint {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--text-sm);
    animation: fadeIn 1s ease-out 1.5s both;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    margin: 0.75rem auto 0;
    border-right: 2px solid var(--color-gold);
    border-bottom: 2px solid var(--color-gold);
    transform: rotate(45deg);
    animation: scrollBounce 1.5s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: rotate(45deg) translateY(0); }
    50% { transform: rotate(45deg) translateY(8px); }
}

/* ===== 引言部分 ===== */
.preface-section {
    padding: 4rem 2rem;
    background: linear-gradient(to bottom, var(--color-white), var(--color-paper));
}

.preface-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.preface-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    order: 1;
}

.preface-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.preface-image:hover img {
    transform: scale(1.05);
}

.preface-text {
    order: 2;
}

.preface-desc {
    font-family: var(--font-serif);
    font-size: var(--text-lg);
    color: var(--color-ink);
    line-height: 2;
    text-align: justify;
}

/* ===== 3D模型展示 ===== */
.model-section {
    padding: 6rem 2rem;
    background: linear-gradient(180deg, var(--color-paper) 0%, #e8e4dc 50%, var(--color-paper) 100%);
}

.model-section .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.model-viewer-wrapper {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    background: transparent;
}

.model-viewer {
    width: 100%    ;
    height: 550px;
    display: block;
}

.model-viewer canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.model-controls {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    gap: 0.75rem;
    z-index: 10;
}

.model-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 69, 19, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 69, 19, 0.2);
    border-radius: var(--radius-md);
    color: var(--color-ochre);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.model-btn:hover {
    background: rgba(139, 69, 19, 0.2);
    transform: scale(1.1);
}

.model-btn.active {
    background: var(--color-ochre);
    border-color: var(--color-ochre);
    color: var(--color-white);
}

.model-btn svg {
    width: 20px;
    height: 20px;
}

.model-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: transparent;
    color: var(--color-ochre);
    z-index: 5;
    transition: opacity 0.5s ease;
}

.model-loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(139, 69, 19, 0.15);
    border-top-color: var(--color-ochre);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.model-info {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1000px;
    margin: 2rem auto 0;
}

.model-info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.model-info-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.model-info-label {
    font-size: var(--text-xs);
    color: var(--color-stone);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.model-info-value {
    font-family: var(--font-serif);
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--color-ochre);
}

/* ===== 叙事开篇 ===== */
.intro-section {
    padding: 6rem 2rem;
    background: linear-gradient(to bottom, var(--color-paper), var(--color-white));
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.intro-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.section-title {
    font-family: var(--font-serif);
    font-size: var(--text-3xl);
    color: var(--color-ochre);
    margin-bottom: 1rem;
}

.intro-quote {
    font-family: var(--font-serif);
    font-size: var(--text-xl);
    color: var(--color-ink);
    font-style: italic;
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 3px solid var(--color-gold);
}

.intro-desc {
    color: var(--color-stone);
    line-height: 1.9;
    margin-bottom: 2rem;
}

.intro-features {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(139, 69, 19, 0.08);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    color: var(--color-ochre);
}

.feature-icon {
    font-size: 1.25rem;
}

.intro-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.intro-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.intro-image:hover img {
    transform: scale(1.05);
}

/* ===== 四层叙事入口 ===== */
.narrative-section {
    padding: 6rem 2rem;
    background: linear-gradient(to bottom, var(--color-white), var(--color-paper));
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: rgba(139, 69, 19, 0.1);
    color: var(--color-ochre);
    font-size: var(--text-sm);
    font-weight: 500;
    border-radius: 50px;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: var(--text-lg);
    color: var(--color-stone);
    margin-top: 0.5rem;
}

.narrative-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.narrative-card {
    display: block;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    text-decoration: none;
}

.narrative-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.card-image {
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.narrative-card:hover .card-image img {
    transform: scale(1.1);
}

.card-overlay {
    position: absolute;
    top: 1rem;
    left: 1rem;
}

.card-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--color-ochre);
    color: var(--color-white);
    font-family: var(--font-serif);
    font-size: var(--text-xl);
    font-weight: 700;
    border-radius: 50%;
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    font-family: var(--font-serif);
    font-size: var(--text-xl);
    color: var(--color-ink);
    margin-bottom: 0.75rem;
}

.card-content p {
    color: var(--color-stone);
    font-size: var(--text-sm);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-ochre);
    font-weight: 500;
    font-size: var(--text-sm);
    transition: all var(--transition-fast);
}

.card-link .arrow {
    transition: transform var(--transition-fast);
}

.narrative-card:hover .card-link .arrow {
    transform: translateX(5px);
}

/* ===== 页脚 ===== */
.footer {
    background: var(--color-rock);
    color: var(--color-white);
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    font-family: var(--font-serif);
    font-size: var(--text-lg);
    color: var(--color-gold);
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section li {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.footer-section ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-section a {
    transition: color var(--transition-fast);
}

.footer-section a:hover {
    color: var(--color-gold);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.6);
    margin: 0.25rem 0;
}

/* ===== 滚动显示动画 ===== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.scroll-reveal.delay-1 { transition-delay: 0.1s; }
.scroll-reveal.delay-2 { transition-delay: 0.2s; }
.scroll-reveal.delay-3 { transition-delay: 0.3s; }
.scroll-reveal.delay-4 { transition-delay: 0.4s; }

/* ===== 响应式 ===== */
@media (max-width: 992px) {
    .preface-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .preface-image {
        order: 1;
    }
    
    .preface-text {
        order: 2;
    }
    
    .intro-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .narrative-cards {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .model-viewer {
        height: 400px;
    }

    .model-info {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat-divider {
        width: 40px;
        height: 1px;
    }
    
    .intro-features {
        flex-direction: column;
    }

    .model-viewer {
        height: 300px;
    }

    .model-info {
        grid-template-columns: 1fr;
    }

    .model-controls {
        bottom: 1rem;
        right: 1rem;
    }

    .model-btn {
        width: 38px;
        height: 38px;
    }
}
