/* ================================================
   historygrapher.net - Museum Exhibition Gallery
   ================================================ */

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

html, body {
    height: 100%;
    overflow: hidden;
    background: #1c1c1c;
    color: #f0ebe3;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.7;
}

/* --- Gallery Container (horizontal scroll) --- */
.gallery-container {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    height: 100vh;
    width: 100vw;
    scrollbar-width: none;
}

.gallery-container::-webkit-scrollbar {
    display: none;
}

/* --- Card Base --- */
.card {
    min-width: 420px;
    max-width: 520px;
    height: 100vh;
    flex-shrink: 0;
    scroll-snap-align: start;
    background: #2a2a2a;
    border-right: 1px solid #3d3d3d;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-inner {
    padding: 48px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* --- Plinth Line (gold bottom border) --- */
.plinth-line {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: #d4a574;
    opacity: 0.5;
}

/* --- Hero / Entrance Card --- */
.hero-card {
    min-width: 100vw;
    max-width: 100vw;
    background: #1c1c1c;
    border-right: 1px solid #3d3d3d;
}

.hero-card .card-inner {
    align-items: center;
    text-align: center;
    gap: 24px;
}

.brand-name {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 56px;
    color: #f0ebe3;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.brand-dot {
    color: #d4a574;
}

.tagline {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: #8c8c8c;
    letter-spacing: 0.05em;
}

/* --- Scroll Arrow --- */
.scroll-arrow {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 32px;
    animation: arrowPulse 2.5s ease-in-out infinite;
}

.arrow-line {
    display: block;
    width: 60px;
    height: 1px;
    background: #d4a574;
}

.arrow-head {
    font-size: 24px;
    color: #d4a574;
    line-height: 1;
}

@keyframes arrowPulse {
    0%, 100% {
        opacity: 0.4;
        transform: translateX(0);
    }
    50% {
        opacity: 1;
        transform: translateX(8px);
    }
}

/* --- Room Number --- */
.room-num {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #8c8c8c;
    position: absolute;
    top: 32px;
    right: 32px;
}

/* --- Era Label --- */
.era-label {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #8c8c8c;
}

/* --- Exhibition Card Content --- */
.exhibit-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 40px;
    color: #f0ebe3;
    line-height: 1.15;
    margin-top: 8px;
}

.exhibit-text {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #f0ebe3;
    line-height: 1.7;
    opacity: 0.85;
    margin-top: 8px;
}

.exhibit-detail {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #8c8c8c;
    line-height: 1.7;
    margin-top: 4px;
}

/* --- Key Date --- */
.key-date {
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #c9a96e;
    letter-spacing: 0.02em;
    margin-top: 16px;
}

/* --- Highlight Cards (middle emphasis) --- */
.highlight-card {
    background: #2a2a2a;
}

.highlight-card .exhibit-title {
    color: #c9a96e;
    font-size: 44px;
}

.highlight-card .plinth-line {
    opacity: 1;
    height: 2px;
}

/* --- Exit Card --- */
.exit-card {
    min-width: 100vw;
    max-width: 100vw;
    background: #1c1c1c;
    border-right: none;
}

.exit-card .card-inner {
    align-items: center;
    text-align: center;
    gap: 20px;
}

.exit-text {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 32px;
    color: #f0ebe3;
}

.gold-divider {
    width: 80px;
    height: 1px;
    background: #d4a574;
}

.return-hint {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #8c8c8c;
}

.exit-brand {
    font-family: 'Roboto', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #3d3d3d;
    margin-top: 40px;
}

/* --- Scroll Progress Indicator --- */
.scroll-indicator {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 3px;
    background: #2a2a2a;
    z-index: 100;
}

.scroll-progress {
    height: 100%;
    width: 0%;
    background: #d4a574;
    transition: width 0.15s ease-out;
}

/* --- Grain Texture Overlay (subtle) --- */
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-size: 256px 256px;
    pointer-events: none;
}

/* --- Card Reveal Animations --- */
.exhibit-card .card-inner {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* --- Responsive --- */
@media (max-width: 600px) {
    .card {
        min-width: 100vw;
        max-width: 100vw;
    }

    .brand-name {
        font-size: 36px;
    }

    .exhibit-title {
        font-size: 28px;
    }

    .highlight-card .exhibit-title {
        font-size: 30px;
    }

    .card-inner {
        padding: 32px 24px;
    }

    .room-num {
        top: 20px;
        right: 20px;
    }
}
