/* ===== ریست و پایه ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --cream: #f5f0e8;
    --dark: #1a1a1a;
    --gray-warm: #2c2c2c;
    --gold: #c49b5c;
    --gold-dim: rgba(196, 155, 92, 0.3);
    --white-dim: rgba(255, 255, 255, 0.7);
    --transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--cream);
    color: var(--dark);
    direction: rtl;
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* ===== هدر ===== */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition);
    background: transparent;
}

#main-header.scrolled {
    background: rgba(26, 26, 26, 0.92);
    backdrop-filter: blur(12px);
    padding: 8px 0;
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.1);
}

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

.logo {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 1px;
}

.logo-sub {
    font-size: 0.65rem;
    font-weight: 300;
    color: var(--gold);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.scrolled .logo-name {
    color: var(--cream);
}
.scrolled .logo-sub {
    color: var(--gold);
}

.main-nav {
    display: flex;
    gap: 32px;
    align-items: center;
}

.main-nav a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 1px;
    transition: var(--transition);
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 0;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: var(--transition);
}

.main-nav a:hover {
    color: #fff;
}
.main-nav a:hover::after {
    width: 100%;
}

.nav-cta {
    padding: 8px 20px;
    border: 1px solid var(--gold);
    border-radius: 30px;
    color: var(--gold) !important;
    font-weight: 400 !important;
}

.nav-cta:hover {
    background: var(--gold);
    color: var(--dark) !important;
}

.lang-toggle {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 300;
    letter-spacing: 1px;
    transition: var(--transition);
}

.lang-toggle:hover {
    color: #fff;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ===== بخش ۱: Hero ===== */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.2) 60%, rgba(0, 0, 0, 0.1) 100%);
}

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

.hero-title {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: clamp(2.2rem, 7vw, 4.8rem);
    color: #fff;
    line-height: 1.3;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(40px);
    animation: heroFadeUp 1.4s 0.4s forwards;
}

.hero-title-light {
    font-weight: 300;
    opacity: 0.7;
}

@keyframes heroFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subtitle {
    font-size: clamp(0.9rem, 1.4vw, 1.2rem);
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
    line-height: 1.8;
    opacity: 0;
    animation: heroFadeUp 1.4s 0.8s forwards;
}

.hero-stats {
    color: var(--gold);
    font-weight: 400;
    letter-spacing: 1px;
}

.hero-scroll-btn {
    display: inline-block;
    margin-top: 50px;
    text-decoration: none;
    opacity: 0;
    animation: heroFadeUp 1.4s 1.2s forwards;
}

.scroll-ring {
    display: block;
    width: 50px;
    height: 50px;
    margin: 0 auto 10px;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    position: relative;
    transition: var(--transition);
}

.scroll-ring::after {
    content: '↓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.2rem;
    transition: var(--transition);
}

.hero-scroll-btn:hover .scroll-ring {
    border-color: var(--gold);
}
.hero-scroll-btn:hover .scroll-ring::after {
    color: var(--gold);
}

.scroll-label {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.7rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    transition: var(--transition);
}

.hero-scroll-btn:hover .scroll-label {
    color: var(--gold);
}

/* ===== بخش ۲: مسیر ===== */
.path-section {
    position: relative;
    background: var(--cream);
    padding: 80px 0;
    overflow: hidden;
}

.path-track {
    display: flex;
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform;
}

.path-station {
    min-width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 0 60px;
}

.station-image {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.station-image img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    filter: grayscale(60%);
    transition: var(--transition);
}

.station-image:hover img {
    filter: grayscale(0%);
    transform: scale(1.02);
}

.station-number {
    position: absolute;
    top: -10px;
    right: -10px;
    font-family: 'Playfair Display', serif;
    font-size: 5rem;
    font-weight: 400;
    color: rgba(26, 26, 26, 0.06);
    line-height: 1;
}

.station-text h2 {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: clamp(1.6rem, 2.5vw, 2.8rem);
    margin-bottom: 16px;
    line-height: 1.3;
}

.station-text p {
    font-size: 1.05rem;
    color: #555;
    font-weight: 300;
    line-height: 1.8;
}

.path-progress {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 50px;
}

.progress-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.progress-dot.active {
    background: var(--gold);
    width: 30px;
    border-radius: 5px;
}

/* ===== بخش ۳: کهکشان ===== */
.constellation-section {
    position: relative;
    min-height: 100vh;
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 80px 24px;
}

.constellation-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#constellationCanvas {
    width: 100%;
    height: 100%;
}

.constellation-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 700px;
}

.constellation-title {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: clamp(1.8rem, 3vw, 3rem);
    color: var(--gold);
    margin-bottom: 12px;
}

.constellation-sub {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
    font-size: 0.95rem;
    letter-spacing: 1px;
}

.hover-hint {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.75rem;
    letter-spacing: 2px;
    margin-top: 30px;
}

.audio-player-mini {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.play-btn {
    background: var(--gold);
    border: none;
    color: #0a0a0a;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8rem;
    transition: var(--transition);
}

.play-btn:hover {
    transform: scale(1.05);
}

.waveform {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 24px;
}

.waveform span {
    display: block;
    width: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    animation: waveAnim 1.2s ease-in-out infinite alternate;
}

.waveform span:nth-child(2) {
    height: 12px;
    animation-delay: 0.1s;
}
.waveform span:nth-child(3) {
    height: 18px;
    animation-delay: 0.2s;
}
.waveform span:nth-child(4) {
    height: 22px;
    animation-delay: 0.3s;
}
.waveform span:nth-child(5) {
    height: 18px;
    animation-delay: 0.4s;
}
.waveform span:nth-child(6) {
    height: 12px;
    animation-delay: 0.5s;
}
.waveform span:nth-child(7) {
    height: 8px;
    animation-delay: 0.6s;
}
.waveform span:nth-child(8) {
    height: 4px;
    animation-delay: 0.7s;
}

@keyframes waveAnim {
    0% {
        opacity: 0.2;
        transform: scaleY(0.5);
    }
    100% {
        opacity: 1;
        transform: scaleY(1);
    }
}

.audio-label {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.7rem;
    letter-spacing: 1px;
}

/* ===== بخش ۴: کتاب ===== */
.book-section {
    padding: 100px 24px;
    background: var(--cream);
}

.book-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 0.8fr 1.4fr 0.8fr;
    gap: 40px;
    align-items: center;
}

.book-quote blockquote {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: 1.3rem;
    line-height: 1.8;
    color: var(--dark);
    opacity: 0.7;
    border-right: 2px solid var(--gold);
    padding-right: 20px;
}

.book-object {
    text-align: center;
}

.book-3d {
    position: relative;
    perspective: 1200px;
    margin-bottom: 20px;
}

.book-3d img {
    width: 80%;
    max-width: 300px;
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    transition: transform 0.6s ease;
}

.book-3d img:hover {
    transform: rotateY(-8deg) rotateX(4deg);
}

.book-shadow {
    width: 80%;
    max-width: 300px;
    height: 20px;
    margin: 0 auto;
    background: radial-gradient(ellipse, rgba(0, 0, 0, 0.1) 0%, transparent 70%);
}

.book-info h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: 1.4rem;
}

.book-subtitle {
    color: #666;
    font-weight: 300;
    font-size: 0.9rem;
}

.book-link {
    display: inline-block;
    margin-top: 8px;
    color: var(--gold);
    text-decoration: none;
    font-weight: 400;
    transition: var(--transition);
}

.book-link:hover {
    color: var(--dark);
}

.book-archive-img {
    position: relative;
}

.book-archive-img img {
    width: 100%;
    border-radius: 4px;
    filter: grayscale(40%);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.archive-label {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 4px 14px;
    font-size: 0.7rem;
    letter-spacing: 1px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

/* ===== بخش ۵: گالری ===== */
.gallery-section {
    padding: 80px 24px 60px;
    background: #fff;
}

.gallery-title {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: 2.4rem;
    text-align: center;
    margin-bottom: 40px;
    color: var(--dark);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 16px 14px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    color: #fff;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.gallery-item:hover .caption {
    transform: translateY(0);
}

.gallery-item .caption .city {
    font-size: 0.8rem;
    font-weight: 300;
    opacity: 0.7;
}

.gallery-item .caption .memory {
    font-size: 0.9rem;
    font-weight: 400;
}

.gallery-footer {
    text-align: center;
    margin-top: 50px;
}

.btn-gold-outline {
    display: inline-block;
    padding: 14px 40px;
    border: 1.5px solid var(--gold);
    color: var(--gold);
    text-decoration: none;
    font-weight: 400;
    letter-spacing: 1px;
    border-radius: 40px;
    transition: var(--transition);
    font-size: 0.9rem;
}

.btn-gold-outline:hover {
    background: var(--gold);
    color: #fff;
}

/* ===== بخش ۶: پایان ===== */
.ending-section {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    overflow: hidden;
}

.ending-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('assets/images/desert-sunset.jpg') center/cover no-repeat;
    filter: brightness(0.5) saturate(0.6);
}

.ending-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
}

.ending-quote {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: clamp(1.8rem, 3.5vw, 3.2rem);
    color: #fff;
    line-height: 1.6;
    margin-bottom: 50px;
    opacity: 0.85;
}

.ending-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-gold-solid {
    display: inline-block;
    padding: 14px 40px;
    background: var(--gold);
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    border-radius: 40px;
    transition: var(--transition);
    font-size: 0.9rem;
}

.btn-gold-solid:hover {
    background: #d4a86a;
    transform: translateY(-2px);
}

.ending-actions .btn-gold-outline {
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

.ending-actions .btn-gold-outline:hover {
    background: #fff;
    color: var(--dark);
    border-color: #fff;
}

/* ===== فوتر ===== */
.site-footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.4);
    padding: 30px 24px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 300;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-social {
    display: flex;
    gap: 20px;
}

.footer-social a {
    color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.75rem;
    letter-spacing: 1px;
}

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

/* ===== ریسپانسیو ===== */
@media (max-width: 992px) {
    .path-station {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 24px;
    }
    .station-image img {
        height: 300px;
    }
    .book-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .book-quote {
        order: 2;
    }
    .book-object {
        order: 1;
    }
    .book-archive-img {
        order: 3;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
    .menu-toggle {
        display: block;
    }
    .path-station {
        padding: 0 16px;
        gap: 20px;
    }
    .station-image img {
        height: 220px;
    }
    .station-number {
        font-size: 3.5rem;
    }
    .ending-actions {
        flex-direction: column;
        align-items: center;
    }
    .ending-actions a {
        width: 100%;
        text-align: center;
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

@media (max-width: 480px) {
    .logo-name {
        font-size: 0.9rem;
    }
    .hero-title {
        font-size: 1.8rem;
    }
}