/* historic.quest - Horizontal Scroll Gallery */

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

:root {
    --antiquity-terra: #C4563A;
    --medieval-forest: #2D5A27;
    --renaissance-blue: #1D3557;
    --industrial-iron: #3D4F5F;
    --modern-white: #F5F5F5;
    --gallery-dark: #1A1A2E;
    --exhibition-gold: #C9A96E;
    --parchment-light: #FFF8E7;
}

html, body {
    overflow: hidden;
    height: 100%;
    background: var(--gallery-dark);
}

body {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--parchment-light);
}

#scroll-container {
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

#horizontal-track {
    display: flex;
    height: 100vh;
    will-change: transform;
    transition: transform 0.1s ease-out;
}

.panel {
    flex: 0 0 100vw;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.corridor {
    flex: 0 0 200px;
    width: 200px;
    height: 100vh;
}

/* Entrance Panel */
.entrance-panel {
    background: var(--gallery-dark);
}

.pillar {
    position: absolute;
    top: 0;
    width: 80px;
    height: 100%;
    background: var(--gallery-dark);
    box-shadow: inset -4px 0 12px rgba(0, 0, 0, 0.3);
    z-index: 2;
    transform: scaleY(0);
    transform-origin: bottom;
    animation: pillar-grow 0.6s ease forwards;
}

.pillar-left {
    left: 10%;
    box-shadow: inset -4px 0 12px rgba(0, 0, 0, 0.3);
}

.pillar-right {
    right: 10%;
    box-shadow: inset 4px 0 12px rgba(0, 0, 0, 0.3);
}

@keyframes pillar-grow {
    0% { transform: scaleY(0); }
    100% { transform: scaleY(1); }
}

.entrance-content {
    text-align: center;
    z-index: 3;
    opacity: 0;
    animation: fade-in 0.5s ease forwards 0.8s;
}

.gallery-title {
    font-family: 'Cinzel Decorative', serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--exhibition-gold);
    margin-bottom: 2rem;
}

.scroll-indicator {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--parchment-light);
    opacity: 0;
    animation: fade-in 0.4s ease forwards 1.2s;
}

.arrow {
    display: inline-block;
    animation: arrow-slide 2s ease-in-out infinite;
}

@keyframes arrow-slide {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(20px); }
}

@keyframes fade-in {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Epoch Panels */
.epoch-content {
    max-width: 640px;
    max-height: 80vh;
    text-align: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.epoch-content.visible {
    opacity: 1;
}

.era-name {
    font-family: 'Cinzel Decorative', serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--parchment-light);
    margin-bottom: 0.5rem;
}

.era-dates {
    font-family: 'Cinzel', serif;
    font-weight: 400;
    font-size: clamp(1rem, 2vw, 1.4rem);
    letter-spacing: 0.12em;
    color: var(--exhibition-gold);
    margin-bottom: 1.5rem;
}

.era-text {
    color: var(--parchment-light);
    max-width: 560px;
    margin: 0 auto;
}

/* Modern panel overrides */
.modern-name {
    color: var(--gallery-dark);
}

.modern-dates {
    color: var(--industrial-iron);
}

.modern-text {
    color: #333;
}

/* Era Rules */
.era-rule {
    position: relative;
    height: 1px;
    background: var(--exhibition-gold);
    margin: 1.5rem auto;
    max-width: 300px;
}

.rule-diamond {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: var(--exhibition-gold);
    transform: translate(-50%, -50%) rotate(45deg);
}

/* Exit Panel */
.exit-panel {
    background: var(--gallery-dark);
}

.exit-content {
    text-align: center;
}

.exit-text {
    font-family: 'Cinzel Decorative', serif;
    font-weight: 700;
    font-size: clamp(8rem, 20vw, 16rem);
    color: var(--parchment-light);
    display: flex;
    align-items: baseline;
    justify-content: center;
}

.exit-letter {
    display: inline-block;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.exit-letter.visible {
    opacity: 1;
    transform: scale(1);
}

.exit-question {
    color: var(--exhibition-gold);
}
