/* mystery.boo - Terminal Gothic Investigation */
/* Colors: #5A6070, #000000, #0E1A2D, #F5EFE0, #1A1A2E, #9B8EA0, #4ADE80, #8B7355 */
/* Fonts: Libre Baskerville, Source Sans 3, Fira Code */

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

body {
    font-family: 'Source Sans 3', sans-serif;
    color: #F5EFE0;
    background: #000000;
    overflow-x: hidden;
}

/* CRT Scanlines */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1000;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.08) 2px,
        rgba(0, 0, 0, 0.08) 4px
    );
}

/* Chapters */
.chapter {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    overflow: hidden;
}

.chapter--boot {
    background: #000000;
}

.chapter--clue {
    background: #0E1A2D;
}

.chapter--cipher {
    background: #1A1A2E;
}

.chapter--conclusion {
    background: #0E1A2D;
}

.chapter--footer {
    background: #000000;
    min-height: 30vh;
}

.chapter-content {
    max-width: 700px;
    width: 100%;
}

/* Terminal */
.terminal-window {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: #4ADE80;
    margin-bottom: 32px;
}

.terminal-line {
    display: inline;
}

.cursor-blink {
    display: inline;
    animation: blink 1s step-end infinite;
}

.terminal-prompt {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: #4ADE80;
    margin-bottom: 24px;
    opacity: 0.7;
}

.terminal-prompt--final {
    margin-top: 32px;
    margin-bottom: 0;
    opacity: 0.5;
}

/* Chapter Titles */
.chapter-title {
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #F5EFE0;
    margin-bottom: 32px;
}

.chapter-title--hero {
    opacity: 0;
    text-align: center;
}

.chapter-subtitle {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1rem;
    font-weight: 300;
    color: #9B8EA0;
    text-align: center;
    opacity: 0;
}

/* Manuscript Cards */
.manuscript-card {
    background: #F5EFE0;
    padding: 32px;
    margin-bottom: 24px;
    border-radius: 2px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.manuscript-card::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 1px solid #8B7355;
    opacity: 0.2;
    pointer-events: none;
}

.manuscript-text {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.95rem;
    line-height: 1.8;
    color: #1A1A2E;
}

/* Evidence Fragments */
.evidence-fragment {
    background: rgba(139, 115, 85, 0.1);
    border: 1px solid rgba(139, 115, 85, 0.3);
    padding: 20px 24px;
    margin-top: 16px;
    position: relative;
    transform: rotate(-1deg);
}

.evidence-fragment--2 {
    transform: rotate(0.5deg);
}

.evidence-label {
    font-family: 'Fira Code', monospace;
    font-size: 0.65rem;
    font-weight: 500;
    color: #4ADE80;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 8px;
}

.evidence-text {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    line-height: 1.7;
    color: #9B8EA0;
}

/* Footer */
.footer-text {
    font-family: 'Libre Baskerville', serif;
    font-size: 1rem;
    color: #5A6070;
    text-align: center;
}

.footer-prompt {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: #4ADE80;
    text-align: center;
    margin-top: 16px;
    opacity: 0.5;
    animation: blink 1.5s step-end infinite;
}

/* Scroll Reveal */
.chapter-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 1s ease, transform 1s ease;
}

.chapter-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Animations */
@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

@keyframes fadeInSlow {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive */
@media (max-width: 600px) {
    .chapter {
        padding: 60px 16px;
    }

    .manuscript-card {
        padding: 24px 20px;
    }

    .evidence-fragment {
        transform: rotate(0);
    }
}
