/* ========================================
   字在兰亭官网 - 样式表
   品牌色: #C43C3C (朱砂红), #D4A574 (金色)
   ======================================== */

:root {
    --color-primary: #C43C3C;
    --color-primary-dark: #9e2f2f;
    --color-gold: #D4A574;
    --color-gold-light: #e8c9a8;
    --color-bg: #faf8f5;
    --color-bg-dark: #1a1410;
    --color-text: #2c2418;
    --color-text-light: #6b5d4d;
    --color-border: #e8e0d5;
    --font-serif: 'Noto Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
    --font-sans: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --shadow-sm: 0 2px 8px rgba(44, 36, 24, 0.06);
    --shadow-md: 0 4px 20px rgba(44, 36, 24, 0.1);
    --shadow-lg: 0 8px 40px rgba(44, 36, 24, 0.15);
    --radius: 12px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.7;
    overflow-x: hidden;
}

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

/* ========================================
   导航栏
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(250, 248, 245, 0.95);
    backdrop-filter: blur(20px);
    padding: 12px 0;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--color-text);
}

.nav-logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.nav-logo span {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 36px;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-text-light);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--color-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: var(--transition);
}

/* ========================================
   英雄区域
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding: 120px 0 60px;
    overflow: hidden;
}

.hero-bg-pattern {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(196, 60, 60, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(212, 165, 116, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(196, 60, 60, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

.hero-title {
    margin-bottom: 24px;
}

.hero-title-main {
    display: block;
    font-family: var(--font-serif);
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 900;
    color: var(--color-primary);
    line-height: 1.2;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

.hero-title-sub {
    display: block;
    font-family: var(--font-serif);
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 500;
    color: var(--color-text-light);
    letter-spacing: 0.1em;
}

.hero-desc {
    font-size: 1.05rem;
    color: var(--color-text-light);
    line-height: 2;
    margin-bottom: 36px;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 4px 16px rgba(196, 60, 60, 0.3);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(196, 60, 60, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--color-text);
    border: 2px solid var(--color-border);
}

.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-2px);
}

/* 英雄视觉 */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInRight 0.8s ease-out 0.2s both;
}

.phone-mockup {
    width: 280px;
    height: 560px;
    background: linear-gradient(145deg, #2c1810, #1a0f08);
    border-radius: 40px;
    padding: 12px;
    box-shadow: 
        0 20px 60px rgba(44, 36, 24, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: var(--color-bg);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.phone-app-icon {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
}

.hero-calligraphy {
    position: absolute;
    right: -40px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.calligraphy-char {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--color-primary);
    opacity: 0.15;
    animation: brushStroke 0.6s ease-out calc(var(--delay) * 0.2s) both;
}

/* 滚动提示 */
.hero-scroll-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--color-text-light);
    font-size: 0.85rem;
    animation: bounce 2s infinite;
}

/* ========================================
   功能特色
   ======================================== */
.features {
    padding: 120px 0;
    background: white;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-gold));
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-light);
    margin-top: 20px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    padding: 36px;
    background: var(--color-bg);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-gold-light);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.feature-card h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-text);
}

.feature-card p {
    color: var(--color-text-light);
    font-size: 0.95rem;
    line-height: 1.8;
}

/* 功能卡片徽章 */
.feature-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.badge {
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(196, 60, 60, 0.1), rgba(212, 165, 116, 0.1));
    border: 1px solid var(--color-border);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text);
    transition: var(--transition);
}

.feature-card:hover .badge {
    background: linear-gradient(135deg, var(--color-primary), var(--color-gold));
    color: white;
    border-color: transparent;
}

/* ========================================
   作品展示
   ======================================== */
.showcase {
    padding: 120px 0;
    background: var(--color-bg);
}

.showcase-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto auto;
    gap: 20px;
    max-height: 600px;
}

.showcase-item {
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}

.showcase-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.showcase-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.showcase-img {
    width: 100%;
    height: 100%;
    min-height: 180px;
    max-height: 360px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* 滚动展示图片 - 旋转90度横向展示，缓慢从右向左滚动 */
.showcase-scroll {
    cursor: pointer;
}

.showcase-scroll-img {
    width: auto;
    height: 170%;
    max-width: none;
    object-fit: cover;
    object-position: center center;
    opacity: 0.8;
    transform-origin: center center;
    transform: rotate(90deg) translateY(15%);
    animation: scroll-right-to-left 20s ease-in-out infinite alternate;
}

.showcase-item.large .showcase-scroll-img {
    animation-duration: 25s;
}

/* 从右向左缓慢滚动动画 */
@keyframes scroll-right-to-left {
    0% {
        transform: rotate(90deg) translateY(15%);
    }
    100% {
        transform: rotate(90deg) translateY(-25%);
    }
}

.showcase-item:not(.large) .showcase-scroll-img {
    animation-duration: 18s;
}

/* 悬停时暂停动画，清晰展示 */
.showcase-scroll:hover .showcase-scroll-img {
    opacity: 1;
    animation-play-state: paused;
}

.showcase-item.large .showcase-img {
    min-height: 280px;
}

.showcase-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    z-index: 2;
}

/* 滚动提示图标 - 左右移动提示 */
.scroll-hint {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    animation: bounce-left 2s infinite;
    z-index: 3;
    transition: var(--transition);
}

.showcase-scroll:hover .scroll-hint {
    opacity: 0;
    transform: scale(0.8);
}

@keyframes bounce-left {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(0);
    }
    40% {
        transform: translateX(-5px);
    }
    60% {
        transform: translateX(-3px);
    }
}

.showcase-dynasty {
    display: inline-block;
    padding: 4px 10px;
    background: var(--color-primary);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.showcase-overlay h4 {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.showcase-overlay p {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* ========================================
   数据统计
   ======================================== */
.stats {
    padding: 80px 0;
    background: var(--color-bg-dark);
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.stat-number {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 900;
    color: var(--color-gold);
    line-height: 1;
}

.stat-unit {
    font-size: 1.2rem;
    color: var(--color-gold-light);
    margin-top: -20px;
}

.stat-label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 8px;
}

/* ========================================
   下载区域
   ======================================== */
.download {
    padding: 120px 0;
    background: white;
    text-align: center;
}

.download-content {
    max-width: 600px;
    margin: 0 auto;
}

.download-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 20px;
}

.download-desc {
    font-size: 1.05rem;
    color: var(--color-text-light);
    line-height: 1.9;
    margin-bottom: 40px;
}

.download-actions {
    margin-bottom: 32px;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 18px 36px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    border-radius: var(--radius);
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(196, 60, 60, 0.3);
}

.btn-download:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(196, 60, 60, 0.4);
}

.btn-download svg {
    width: 32px;
    height: 32px;
}

.btn-download-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.btn-download-label {
    font-size: 1.1rem;
    font-weight: 700;
}

.btn-download-hint {
    font-size: 0.8rem;
    opacity: 0.8;
}

.download-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.qr-placeholder {
    padding: 16px;
    background: white;
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
}

.qr-hint {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* ========================================
   页脚
   ======================================== */
.footer {
    background: var(--color-bg-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 60px 0 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
}

.footer-brand-text h4 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: white;
    margin-bottom: 4px;
}

.footer-brand-text p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-links {
    display: flex;
    gap: 60px;
}

.footer-col h5 {
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    margin-bottom: 16px;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

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

.footer-bottom {
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ========================================
   动画
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes brushStroke {
    from {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }
    to {
        opacity: 0.15;
        transform: scale(1) rotate(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ========================================
   响应式
   ======================================== */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-desc {
        margin: 0 auto 36px;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-visual {
        display: none;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .showcase-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .showcase-item.large {
        grid-column: span 2;
        grid-row: span 1;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        box-shadow: var(--shadow-md);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero {
        padding: 100px 0 60px;
        min-height: auto;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .showcase-gallery {
        grid-template-columns: 1fr;
    }
    
    .showcase-item.large {
        grid-column: span 1;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        flex-direction: column;
        gap: 40px;
    }
    
    .footer-links {
        gap: 40px;
    }
    
    .hero-scroll-hint {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-title-main {
        font-size: 2.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .stat-number {
        font-size: 2.2rem;
    }
    
    .btn-download {
        flex-direction: column;
        text-align: center;
    }
    
    .btn-download-text {
        align-items: center;
    }
}
