/* ============================================
   Hard Roads in Shu - Digital Humanities Project
   Ink Wash Painting Style CSS
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,600;1,400&family=Noto+Serif+SC:wght@400;600;700&display=swap');

/* CSS Variables */
:root {
    --ink-black: #1a1a1a;
    --ink-gray: #4a4a4a;
    --ink-light: #7a7a7a;
    --paper: #f5f0e8;
    --paper-dark: #e8e0d4;
    --cinnabar: #b83e2f;
    --cinnabar-light: #c95444;
    --gold: #b8956a;
    --shadow: rgba(26, 26, 26, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Crimson Text', Georgia, serif;
    background-color: var(--paper);
    color: var(--ink-black);
    line-height: 1.8;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: 'Noto Serif SC', 'Crimson Text', serif;
    font-weight: 600;
}

.chinese-text {
    font-family: 'Noto Serif SC', serif;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(26, 26, 26, 0.95), rgba(26, 26, 26, 0.8));
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.5rem;
    color: var(--paper);
    text-decoration: none;
    letter-spacing: 0.1em;
}

.logo span {
    color: var(--cinnabar);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--paper);
    text-decoration: none;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    position: relative;
    padding-bottom: 0.3rem;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--cinnabar);
    transition: width 0.3s ease;
}

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

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

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--paper);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/hero-bg.jpg') center/cover no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(26, 26, 26, 0.7) 0%,
        rgba(26, 26, 26, 0.5) 50%,
        rgba(26, 26, 26, 0.9) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: var(--paper);
    padding: 0 2rem;
    max-width: 900px;
}

.hero-tag {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border: 1px solid rgba(245, 240, 232, 0.4);
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
}

.hero-title {
    font-size: clamp(3rem, 10vw, 7rem);
    margin-bottom: 1rem;
    letter-spacing: 0.15em;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    opacity: 0;
    animation: fadeInUp 1s ease 0.3s forwards;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(245, 240, 232, 0.8);
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: fadeInUp 1s ease 0.5s forwards;
}

.hero-quote {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.5rem;
    margin: 2rem 0;
    color: rgba(245, 240, 232, 0.9);
    opacity: 0;
    animation: fadeInUp 1s ease 0.7s forwards;
}

.hero-quote-en {
    font-style: italic;
    font-size: 1rem;
    color: rgba(245, 240, 232, 0.6);
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeInUp 1s ease 0.9s forwards;
}

.btn-explore {
    display: inline-block;
    padding: 1rem 3rem;
    background: var(--cinnabar);
    color: var(--paper);
    text-decoration: none;
    font-size: 1rem;
    letter-spacing: 0.1em;
    border-radius: 3px;
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeInUp 1s ease 1.1s forwards;
}

.btn-explore:hover {
    background: var(--cinnabar-light);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(184, 62, 47, 0.3);
}

/* Section Styles */
.section {
    padding: 6rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-dark {
    background: var(--ink-black);
    color: var(--paper);
}

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

.section-tag {
    display: inline-block;
    font-size: 0.8rem;
    letter-spacing: 0.3em;
    color: var(--cinnabar);
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
}

.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.section-divider::before,
.section-divider::after {
    content: '';
    width: 60px;
    height: 1px;
    background: var(--gold);
    opacity: 0.5;
}

.section-desc {
    max-width: 700px;
    margin: 0 auto;
    color: var(--ink-light);
    font-size: 1.1rem;
}

/* Background Section */
.bg-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.bg-text h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--gold);
}

.bg-text p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.bg-image {
    position: relative;
}

.bg-image img {
    width: 100%;
    border-radius: 5px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.bg-image-caption {
    position: absolute;
    bottom: -2rem;
    left: 2rem;
    right: 2rem;
    background: var(--paper);
    padding: 1.5rem;
    border-radius: 5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.bg-image-caption h4 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.bg-image-caption p {
    font-size: 0.9rem;
    color: var(--ink-light);
    margin: 0;
}

/* Reading Section */
.reading-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background: var(--paper-dark);
    border-radius: 10px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.reading-panel {
    position: relative;
}

.reading-panel h3 {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gold);
}

.verse {
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.verse:hover {
    background: rgba(184, 149, 106, 0.1);
}

.verse.active {
    background: rgba(184, 62, 47, 0.1);
    border-left: 3px solid var(--cinnabar);
}

.verse-number {
    display: inline-block;
    width: 24px;
    height: 24px;
    background: var(--gold);
    color: var(--paper);
    font-size: 0.75rem;
    text-align: center;
    line-height: 24px;
    border-radius: 50%;
    margin-right: 0.8rem;
}

.verse-cn {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.1rem;
    line-height: 2;
}

.verse-en {
    font-style: italic;
    color: var(--ink-light);
    line-height: 1.8;
    padding-left: 2.2rem;
}

.reading-divider {
    position: absolute;
    left: 50%;
    top: 10%;
    bottom: 10%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--gold), transparent);
}

/* Map Section */
.map-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    height: 700px;
}

.map-area {
    position: relative;
    background: var(--paper-dark);
    border-radius: 10px;
    overflow: hidden;
}

.map-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-point {
    position: absolute;
    width: 24px;
    height: 24px;
    background: var(--cinnabar);
    border: 3px solid var(--paper);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(184, 62, 47, 0.4);
    z-index: 10;
}

.map-point:hover {
    transform: scale(1.3);
    background: var(--gold);
}

.map-point.active {
    transform: scale(1.3);
    background: var(--gold);
    animation: pulse 2s infinite;
}

.map-point::after {
    content: attr(data-name);
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ink-black);
    color: var(--paper);
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 3px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.map-point:hover::after {
    opacity: 1;
}

.map-info {
    background: var(--paper);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.map-info h3 {
    color: var(--cinnabar);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gold);
}

.map-info-item {
    margin-bottom: 1.5rem;
}

.map-info-item h4 {
    font-size: 0.9rem;
    color: var(--gold);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.map-info-item p {
    font-size: 1rem;
    color: var(--ink-gray);
}

.map-info-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
    margin-top: 1rem;
}

.map-info-default {
    text-align: center;
    color: var(--ink-light);
    padding: 3rem 1rem;
}

.map-info-default p {
    margin-top: 1rem;
}

/* Future Section */
.future-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.future-card {
    background: var(--paper);
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-top: 4px solid var(--gold);
}

.future-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

.future-card h3 {
    color: var(--cinnabar);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.future-card p {
    color: var(--ink-gray);
    font-size: 0.95rem;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
}

.team-member {
    text-align: center;
    padding: 3rem;
    background: var(--paper);
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.member-avatar {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--gold), var(--cinnabar));
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--paper);
}

.team-member h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.team-member .role {
    color: var(--cinnabar);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.team-member p {
    color: var(--ink-gray);
    font-size: 0.95rem;
}

.about-shared {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    background: var(--paper-dark);
    border-radius: 10px;
    margin-top: 1rem;
}

.about-shared h4 {
    color: var(--gold);
    margin-bottom: 1rem;
}

.about-shared p {
    color: var(--ink-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* Footer */
.footer {
    background: var(--ink-black);
    color: var(--paper);
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(245, 240, 232, 0.1);
}

.footer-brand h3 {
    font-family: 'Noto Serif SC', serif;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.footer-brand h3 span {
    color: var(--cinnabar);
}

.footer-brand p {
    color: rgba(245, 240, 232, 0.7);
    max-width: 400px;
}

.footer-links h4,
.footer-contact h4 {
    color: var(--gold);
    font-size: 1rem;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

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

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: rgba(245, 240, 232, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 2rem;
    text-align: center;
}

.footer-quote {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.3rem;
    color: rgba(245, 240, 232, 0.4);
    margin-bottom: 1rem;
}

.footer-copyright {
    font-size: 0.85rem;
    color: rgba(245, 240, 232, 0.5);
}

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

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(184, 149, 106, 0.4);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(184, 149, 106, 0);
    }
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
    .bg-content,
    .reading-container,
    .map-container {
        grid-template-columns: 1fr;
    }
    
    .reading-divider {
        display: none;
    }
    
    .future-grid {
        grid-template-columns: 1fr;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--ink-black);
        flex-direction: column;
        padding: 1rem 2rem;
        gap: 1rem;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .section {
        padding: 4rem 1.5rem;
    }
    
    .map-container {
        height: auto;
    }
    
    .map-area {
        height: 400px;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--paper-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--cinnabar);
}

/* Selection */
::selection {
    background: rgba(184, 62, 47, 0.3);
    color: var(--ink-black);
}
