/* mysterious.quest - Detective's Field Notebook */

:root {
    --notebook-cream: #f5ecc8;
    --page-warm: #f8f4ee;
    --page-aged: #f2ebe0;
    --ink-dark: #1e1a14;
    --pencil-gray: #5c5248;
    --stone-gray: #9a9286;
    --moss-olive: #8a8a6e;
    --stamp-red: #b83a2a;
    --steel-blue: #3A5C8A;
    --font-display: 'Zilla Slab', serif;
    --font-body: 'Lora', serif;
    --font-hand: 'Kalam', cursive;
    --font-mono: 'Space Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--notebook-cream);
    color: var(--ink-dark);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.7;
}

/* Ruled Lines Background */
.ruled-lines-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 27px,
        rgba(154, 146, 134, 0.12) 27px,
        rgba(154, 146, 134, 0.12) 28px
    );
}

.handwriting {
    font-family: var(--font-hand);
}

/* ============================================
   Section 1: Case File Cover
   ============================================ */

.section-cover {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    z-index: 1;
}

.manila-folder {
    position: relative;
    width: 90vw;
    max-width: 800px;
    background: var(--page-warm);
    border: 1px solid rgba(154, 146, 134, 0.3);
    border-radius: 2px;
    padding: 60px 50px;
    box-shadow: 0 4px 20px rgba(30, 26, 20, 0.06);
    opacity: 0;
    animation: folderFade 0.8s ease-out 0.3s forwards;
}

@keyframes folderFade {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

.classified-stamp {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 140px;
    height: auto;
    transform: rotate(8deg);
    opacity: 0.85;
}

.case-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
    color: var(--ink-dark);
    margin-bottom: 12px;
}

.case-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.file-number {
    font-size: 15px;
    color: var(--pencil-gray);
}

.case-divider {
    color: var(--stone-gray);
}

.file-status {
    font-size: 15px;
    color: var(--stamp-red);
}

.folder-rule {
    width: 100%;
    height: 1px;
    background: var(--stone-gray);
    opacity: 0.25;
    margin: 16px 0 20px;
}

.case-brief {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--pencil-gray);
    line-height: 1.8;
    max-width: 600px;
}

/* ============================================
   Section 2: Evidence Board
   ============================================ */

.section-evidence {
    padding: 80px 5%;
    position: relative;
    z-index: 1;
}

.section-heading {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    font-weight: 600;
    color: var(--ink-dark);
    text-align: center;
    margin-bottom: 50px;
}

.evidence-grid {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.evidence-card {
    position: relative;
    background: var(--page-warm);
    border: 1px solid rgba(154, 146, 134, 0.2);
    border-radius: 2px;
    padding: 28px 24px;
    box-shadow: 0 2px 10px rgba(30, 26, 20, 0.04);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.evidence-card.callout-left {
    border-left: 3px solid var(--stamp-red);
}

.evidence-card.callout-right {
    border-right: 3px solid var(--moss-olive);
}

.red-pin {
    position: absolute;
    top: -6px;
    left: 24px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--stamp-red);
    box-shadow: 0 2px 4px rgba(184, 58, 42, 0.3);
}

.callout-right .red-pin {
    left: auto;
    right: 24px;
    background: var(--moss-olive);
    box-shadow: 0 2px 4px rgba(138, 138, 110, 0.3);
}

.evidence-tag {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--stamp-red);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 8px;
}

.callout-right .evidence-tag {
    color: var(--moss-olive);
}

.evidence-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--ink-dark);
    margin-bottom: 8px;
}

.evidence-text {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--pencil-gray);
    line-height: 1.7;
    margin-bottom: 10px;
}

.evidence-note {
    font-size: 13px;
    color: var(--moss-olive);
    display: block;
    margin-bottom: 12px;
}

.sketch-diagram {
    width: 100%;
    max-width: 200px;
    height: auto;
    display: block;
    margin-top: 8px;
    opacity: 0.7;
}

/* ============================================
   Section 3: Investigator's Notes
   ============================================ */

.section-notes {
    padding: 60px 5% 80px;
    position: relative;
    z-index: 1;
}

.notebook-page {
    max-width: 700px;
    margin: 0 auto;
    background: var(--page-aged);
    border: 1px solid rgba(154, 146, 134, 0.2);
    border-radius: 2px;
    padding: 40px 36px;
    box-shadow: 0 2px 12px rgba(30, 26, 20, 0.04);
}

.note-entry {
    margin-bottom: 28px;
}

.note-date {
    font-size: 14px;
    color: var(--moss-olive);
    display: block;
    margin-bottom: 6px;
}

.note-body {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--ink-dark);
    line-height: 1.8;
}

.note-divider {
    width: 60px;
    height: 1px;
    background: var(--stone-gray);
    opacity: 0.3;
    margin: 24px auto;
}

/* ============================================
   Footer
   ============================================ */

.section-footer {
    padding: 50px 5%;
    text-align: center;
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(154, 146, 134, 0.15);
}

.footer-case-stamp {
    margin-bottom: 20px;
}

.footer-case-stamp svg {
    width: 160px;
    height: auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    color: var(--steel-blue);
}

.footer-tagline {
    font-size: 15px;
    color: var(--moss-olive);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
    .manila-folder {
        width: 95vw;
        padding: 40px 28px;
    }

    .classified-stamp {
        width: 100px;
        top: 12px;
        right: 12px;
    }

    .section-evidence {
        padding: 60px 4%;
    }

    .notebook-page {
        padding: 28px 24px;
    }
}

@media (max-width: 480px) {
    .manila-folder {
        padding: 30px 20px;
    }

    .case-meta {
        flex-direction: column;
        gap: 4px;
    }

    .case-divider {
        display: none;
    }

    .classified-stamp {
        width: 80px;
    }
}
