/* ============================================
   轧神仙 - 苏州民俗文化网站样式（优化版）
   中国风古风设计 · 朱砂红 + 金色 + 墨色
   2026-06-05 优化：降红、传说故事四列、影像瀑布流
   ============================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --red: #a02020;
    --red-dark: #1a0a0a;
    --red-light: #c0392b;
    --gold: #c9a84c;
    --gold-light: #e8d48b;
    --gold-dark: #a07830;
    --cream: #fdf6e3;
    --cream-dark: #f5e6c8;
    --ink: #1a1a2e;
    --ink-light: #4a4a6a;
    --paper: #faf8f2;
    --paper-dark: #f0ebe0;
    --border: #d4c5a0;
    --shadow: rgba(60, 20, 20, 0.12);
    --font-serif: 'Noto Serif SC', 'Songti SC', 'STSong', serif;
    --font-sans: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

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

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

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

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

img {
    max-width: 100%;
    display: block;
}

/* ---------- Header ---------- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(26, 10, 10, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(201, 168, 76, 0.3);
    transition: all 0.3s;
}

.header.scrolled {
    background: rgba(26, 10, 10, 0.99);
    box-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    background: var(--gold);
    color: var(--red-dark);
    font-family: var(--font-serif);
    font-weight: 900;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
    letter-spacing: 2px;
}

.logo-text {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 700;
    color: var(--gold-light);
    letter-spacing: 4px;
}

.nav {
    display: flex;
    gap: 6px;
}

.nav-link {
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    padding: 8px 14px;
    border-radius: 4px;
    transition: all 0.3s;
    letter-spacing: 1px;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--gold-light);
    background: rgba(201, 168, 76, 0.15);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--gold);
    border-radius: 1px;
}

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

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gold-light);
    border-radius: 2px;
    transition: all 0.3s;
}

/* Mobile Nav */
.mobile-nav {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(26, 10, 10, 0.98);
    backdrop-filter: blur(10px);
    z-index: 999;
    flex-direction: column;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(201, 168, 76, 0.3);
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.3s;
}

.mobile-nav.open {
    transform: translateY(0);
    opacity: 1;
}

.mobile-nav a {
    color: rgba(255,255,255,0.85);
    padding: 12px 0;
    font-size: 16px;
    border-bottom: 1px solid rgba(201, 168, 76, 0.2);
    letter-spacing: 2px;
}

.mobile-nav a:hover {
    color: var(--gold-light);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
        linear-gradient(135deg, #1a0000 0%, #3a0a0a 30%, #2d0000 60%, #1a0000 100%);
    overflow: hidden;
}

/* Hero 到内容区渐变过渡 */
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 180px;
    background: linear-gradient(to bottom, transparent, var(--paper));
    pointer-events: none;
    z-index: 3;
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* 灯笼动画 */
.lantern {
    position: absolute;
    width: 48px;
    height: 72px;
    background: radial-gradient(ellipse at center, #cc2222 0%, #990000 50%, #660000 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    box-shadow: 0 0 30px rgba(204, 34, 34, 0.5), 0 0 60px rgba(204, 34, 34, 0.2);
    animation: sway 3s ease-in-out infinite;
}

.lantern::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 10px;
    background: var(--gold);
    border-radius: 3px 3px 0 0;
}

.lantern::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 16px;
    background: var(--gold);
}

.lantern-1 { top: 8%; left: 10%; animation-delay: 0s; }
.lantern-2 { top: 5%; right: 15%; animation-delay: 1s; }
.lantern-3 { top: 12%; left: 50%; animation-delay: 0.5s; }

@keyframes sway {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

/* 云纹 */
.cloud {
    position: absolute;
    width: 200px;
    height: 60px;
    background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,0.06) 0%, transparent 70%);
    border-radius: 50%;
    animation: float-cloud 20s linear infinite;
}

.cloud-1 { top: 15%; left: -200px; animation-duration: 25s; }
.cloud-2 { top: 30%; left: -200px; animation-duration: 30s; animation-delay: 5s; }
.cloud-3 { top: 50%; left: -200px; animation-duration: 20s; animation-delay: 10s; }

@keyframes float-cloud {
    from { transform: translateX(0); }
    to { transform: translateX(calc(100vw + 400px)); }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 24px;
    max-width: 800px;
}

.hero-badge {
    display: inline-block;
    background: var(--gold);
    color: var(--red-dark);
    font-family: var(--font-serif);
    font-size: 13px;
    font-weight: 700;
    padding: 6px 20px;
    border-radius: 20px;
    letter-spacing: 3px;
    margin-bottom: 24px;
}

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

.title-sub {
    display: block;
    font-family: var(--font-sans);
    font-size: 16px;
    color: rgba(255,255,255,0.6);
    letter-spacing: 8px;
    margin-bottom: 12px;
    font-weight: 300;
}

.title-main {
    display: block;
    font-family: var(--font-serif);
    font-size: clamp(48px, 10vw, 96px);
    color: var(--gold-light);
    letter-spacing: 16px;
    font-weight: 900;
    text-shadow: 0 0 40px rgba(201, 168, 76, 0.4);
    line-height: 1.1;
}

.title-en {
    display: block;
    font-family: var(--font-sans);
    font-size: 14px;
    color: rgba(255,255,255,0.35);
    letter-spacing: 4px;
    margin-top: 12px;
    font-weight: 300;
    text-transform: uppercase;
}

.hero-desc {
    font-size: 16px;
    color: rgba(255,255,255,0.7);
    line-height: 2;
    margin-bottom: 36px;
    letter-spacing: 1px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 48px;
}

.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.btn-primary {
    background: var(--gold);
    color: var(--red-dark);
}

.btn-primary:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(201, 168, 76, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--gold-light);
    border: 1px solid var(--gold);
}

.btn-outline:hover {
    background: rgba(201, 168, 76, 0.1);
    transform: translateY(-2px);
}

.hero-info {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.6);
    font-size: 14px;
}

.info-icon {
    font-size: 18px;
}

.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.4);
    font-size: 12px;
    letter-spacing: 2px;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid rgba(255,255,255,0.4);
    border-bottom: 2px solid rgba(255,255,255,0.4);
    transform: rotate(45deg);
    animation: scroll-bounce 2s infinite;
}

@keyframes scroll-bounce {
    0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.4; }
    50% { transform: rotate(45deg) translate(5px, 5px); opacity: 1; }
}

/* ---------- Section Common ---------- */
.section {
    padding: 100px 0;
    position: relative;
}

/* 宣纸纹理叠加 */
.section::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.03;
    pointer-events: none;
    background-image:
        radial-gradient(ellipse at 20% 50%, #8b7355 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, #a0522d 0%, transparent 40%),
        radial-gradient(ellipse at 50% 80%, #6b5b4a 0%, transparent 60%);
    background-size: 100% 100%;
}

.section-story::before {
    opacity: 0.04;
}

.section-story {
    background: var(--paper);
}

.section-custom {
    background: var(--cream);
}

.section-custom::before {
    opacity: 0.05;
}

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

.section-tag {
    display: inline-block;
    font-family: var(--font-serif);
    font-size: 12px;
    color: var(--red);
    letter-spacing: 4px;
    border: 1px solid var(--red);
    padding: 4px 16px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 4px;
    margin-bottom: 12px;
}

.section-desc {
    font-size: 15px;
    color: var(--ink-light);
    letter-spacing: 1px;
}

/* ---------- Story Section ---------- */
.story-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    align-items: start;
}

.story-card {
    background: white;
    border-radius: 12px;
    padding: 32px 24px;
    box-shadow: 0 4px 24px var(--shadow);
    border: 1px solid var(--border);
    transition: transform 0.3s;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.story-card:hover {
    transform: translateY(-4px);
}

.story-card-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.story-card h3 {
    font-family: var(--font-serif);
    color: var(--red-dark);
    margin-bottom: 12px;
    letter-spacing: 2px;
    font-size: 17px;
}

.story-card p {
    font-size: 13px;
    color: var(--ink-light);
    line-height: 1.8;
    text-align: left;
    text-indent: 2em;
}

/* ---------- Custom Section ---------- */
.section-custom {
    background: var(--cream);
}

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

.custom-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s;
    border: 1px solid rgba(0,0,0,0.06);
}

.custom-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(26, 10, 10, 0.15);
}

.custom-card-img {
    background: linear-gradient(135deg, #1a1a2e, #2e2e4a);
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-card-emoji {
    font-size: 42px;
}

.custom-card h3 {
    font-family: var(--font-serif);
    font-size: 17px;
    color: var(--ink);
    padding: 18px 18px 6px;
    letter-spacing: 2px;
}

.custom-card p {
    padding: 0 18px 20px;
    font-size: 13px;
    color: var(--ink-light);
    line-height: 1.8;
}

/* ---------- Heritage Section ---------- */
.section-heritage {
    background: var(--paper);
}

.heritage-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: stretch;
}

.heritage-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
}

.heritage-card {
    background: white;
    border-radius: 12px;
    padding: 20px 28px;
    box-shadow: 0 4px 20px var(--shadow);
    border: 1px solid var(--border);
    transition: transform 0.3s;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.heritage-card:hover {
    transform: translateY(-3px);
}

.heritage-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.heritage-card h3 {
    font-family: var(--font-serif);
    font-size: 16px;
    color: var(--red-dark);
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.heritage-card p {
    font-size: 13px;
    color: var(--ink-light);
    line-height: 1.9;
}

.heritage-card strong {
    color: var(--red);
}

/* Timeline */
.heritage-timeline {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 20px var(--shadow);
    border: 1px solid var(--border);
}

.heritage-timeline h3 {
    font-family: var(--font-serif);
    font-size: 17px;
    color: var(--red-dark);
    margin-bottom: 24px;
    letter-spacing: 2px;
}

.timeline {
    position: relative;
    padding-left: 28px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--red), var(--gold), var(--red));
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -28px;
    top: 4px;
    width: 14px;
    height: 14px;
    background: var(--paper-dark);
    border: 2px solid var(--red);
    border-radius: 50%;
}

.timeline-dot.active {
    background: var(--red);
    box-shadow: 0 0 0 4px rgba(160, 32, 32, 0.2);
}

.timeline-content {
    padding-left: 12px;
}

.timeline-year {
    display: inline-block;
    font-family: var(--font-serif);
    font-size: 13px;
    font-weight: 700;
    color: var(--red);
    background: rgba(160, 32, 32, 0.08);
    padding: 2px 10px;
    border-radius: 4px;
    margin-bottom: 4px;
}

.timeline-content p {
    font-size: 12px;
    color: var(--ink-light);
    line-height: 1.7;
}

/* ---------- Travel Section ---------- */
.section-travel {
    background: var(--cream);
}

.travel-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.travel-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s;
    border: 1px solid rgba(0,0,0,0.06);
}

.travel-card:hover {
    transform: translateY(-4px);
}

.travel-card-header {
    background: linear-gradient(135deg, #1a0a0a, #3a1a1a);
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.travel-icon {
    font-size: 24px;
}

.travel-card-header h3 {
    font-family: var(--font-serif);
    font-size: 17px;
    color: white;
    letter-spacing: 2px;
}

.travel-card-body {
    padding: 20px 24px;
}

.travel-card-body p {
    font-size: 13px;
    color: var(--ink-light);
    line-height: 1.9;
    margin-bottom: 6px;
}

.travel-card-body p:last-child {
    margin-bottom: 0;
}

.travel-card-body strong {
    color: var(--red);
}

/* ---------- Gallery Masonry ---------- */
.section-gallery {
    background: var(--paper);
}
/* Masonry 瀑布流 */
.gallery-masonry {
    columns: 3;
    column-gap: 16px;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 16px;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s;
}

.gallery-item:hover {
    transform: translateY(-4px) scale(1.02);
}

.gallery-item-tall {
    /* 高条目标记 */
}

.gallery-placeholder {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-radius: 12px;
    transition: all 0.3s;
    cursor: pointer;
    color: rgba(255,255,255,0.9);
    text-align: center;
    padding: 24px 16px;
}

.gallery-placeholder:hover {
    opacity: 0.92;
    filter: brightness(1.05);
}

.gallery-emoji {
    font-size: 48px;
    filter: grayscale(0.2);
}

.gallery-placeholder span {
    font-size: 13px;
    letter-spacing: 2px;
    font-family: var(--font-serif);
}

/* ---------- Footer ---------- */
.footer {
    background: #1a1a2e;
    color: rgba(255,255,255,0.7);
    padding: 64px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand h3 {
    font-family: var(--font-serif);
    font-size: 24px;
    color: var(--gold-light);
    letter-spacing: 4px;
    margin-bottom: 8px;
}

.footer-brand p {
    font-size: 14px;
    margin-bottom: 4px;
}

.footer-slogan {
    color: var(--gold);
    font-family: var(--font-serif);
    letter-spacing: 2px;
}

.footer-links h4,
.footer-contact h4 {
    font-family: var(--font-serif);
    font-size: 15px;
    color: var(--gold-light);
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.footer-links a {
    display: block;
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    padding: 4px 0;
    transition: color 0.3s;
}

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

.footer-contact p {
    font-size: 14px;
    margin-bottom: 6px;
}

.footer-bottom {
    text-align: center;
    padding: 24px 0;
    font-size: 13px;
    color: rgba(255,255,255,0.35);
    line-height: 2;
}

/* ---------- Scroll Animation ---------- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .story-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .heritage-content {
        grid-template-columns: 1fr;
    }
    .custom-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav { display: none; }
    .menu-toggle { display: flex; }

    .title-main {
        font-size: 48px;
        letter-spacing: 8px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .custom-grid {
        grid-template-columns: 1fr;
    }

    .travel-grid {
        grid-template-columns: 1fr;
    }

    .gallery-masonry {
        columns: 2;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .section {
        padding: 64px 0;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .hero-info {
        gap: 16px;
    }

    .mobile-nav {
        display: flex;
    }
}

@media (max-width: 480px) {
    .gallery-masonry {
        columns: 1;
    }

    .title-main {
        font-size: 36px;
        letter-spacing: 4px;
    }
}
