/* Archive grimoire volumes — year index pages styled as a book's contents page */

@import url('https://fonts.googleapis.com/css2?family=IM+Fell+English:ital@0;1&display=swap');

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(ellipse at 50% -10%, #16100d 0%, #0b0806 45%, #050403 100%);
    color: #cfc4b0;
    font-family: Georgia, 'Times New Roman', serif;
}

.volume {
    max-width: 720px;
    margin: 40px auto 80px;
    padding: 56px 58px 64px;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(216, 205, 184, 0.045), transparent 55%),
        linear-gradient(170deg, #1b1410 0%, #140e0a 55%, #0e0906 100%);
    border: 1px solid rgba(138, 125, 104, 0.22);
    box-shadow:
        inset 0 0 70px rgba(0, 0, 0, 0.55),
        0 24px 60px rgba(0, 0, 0, 0.65);
    animation: page-in 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) both;
    transform-origin: left center;
}

@keyframes page-in {
    from { opacity: 0; transform: perspective(1400px) rotateY(-7deg) translateY(10px); }
    to { opacity: 1; transform: perspective(1400px) rotateY(0deg) translateY(0); }
}

.back-link {
    display: inline-block;
    color: #6f6353;
    text-decoration: none;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 34px;
}

.back-link:hover { color: #cfc4b0; }

.volume-header {
    text-align: center;
    margin-bottom: 14px;
}

.volume-eyebrow {
    font-size: 0.75rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #6f6353;
}

.volume-header h1 {
    font-family: 'IM Fell English', Georgia, serif;
    font-weight: 400;
    font-size: clamp(2rem, 6vw, 2.8rem);
    letter-spacing: 3px;
    margin: 8px 0 0;
    color: #d8cdb8;
    text-shadow: 0 0 22px rgba(216, 205, 184, 0.1);
}

.volume-lore {
    text-align: center;
    font-style: italic;
    color: #8a7d68;
    max-width: 480px;
    margin: 14px auto 40px;
    line-height: 1.7;
    font-size: 0.95rem;
}

.contents-heading {
    text-align: center;
    font-family: 'IM Fell English', Georgia, serif;
    font-size: 1.15rem;
    letter-spacing: 4px;
    color: #b3a68e;
    margin-bottom: 6px;
}

.contents-rule {
    width: 90px;
    height: 1px;
    margin: 0 auto 26px;
    background: linear-gradient(90deg, transparent, rgba(138, 125, 104, 0.5), transparent);
}

/* The contents list (keeps .file-item structure for the unlock script) */
.file-list { padding: 0; }

.file-item {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 9px 6px;
    cursor: pointer;
    color: #b3a68e;
    transition: color 0.3s ease, background 0.3s ease;
}

.file-item:hover {
    color: #e8dfca;
    background: rgba(216, 205, 184, 0.04);
}

.file-item .file-icon { display: none; }

.file-item .file-name {
    font-size: 1rem;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-item::after {
    content: "";
    flex: 1;
    order: 2;
    border-bottom: 1px dotted rgba(138, 125, 104, 0.35);
    transform: translateY(-4px);
    min-width: 24px;
}

.file-item .file-name { order: 1; }

.file-item .file-date {
    order: 3;
    font-size: 0.8rem;
    font-style: italic;
    color: #6f6353;
    white-space: nowrap;
}

.volume-nav {
    margin-top: 44px;
    padding-top: 22px;
    border-top: 1px solid rgba(138, 125, 104, 0.2);
    text-align: center;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #6f6353;
}

.volume-nav a {
    color: #8a7d68;
    text-decoration: none;
    margin: 0 10px;
}

.volume-nav a:hover { color: #cfc4b0; }

/* Page-turn overlay: a sheet closing over the screen before navigation */
.page-turn {
    position: fixed;
    inset: 0;
    z-index: 50;
    pointer-events: none;
    background:
        linear-gradient(100deg, rgba(216, 205, 184, 0.06), transparent 40%),
        linear-gradient(170deg, #1b1410 0%, #120d0a 60%, #0b0806 100%);
    box-shadow: -30px 0 80px rgba(0, 0, 0, 0.8);
    transform: perspective(1400px) rotateY(-100deg);
    transform-origin: right center;
    opacity: 0;
}

.page-turn.turning {
    animation: turn 0.45s cubic-bezier(0.3, 0.6, 0.3, 1) forwards;
}

@keyframes turn {
    0% { opacity: 0; transform: perspective(1400px) rotateY(-100deg); }
    15% { opacity: 1; }
    100% { opacity: 1; transform: perspective(1400px) rotateY(0deg); }
}

@media (max-width: 600px) {
    .volume {
        margin: 16px 12px 48px;
        padding: 38px 24px 44px;
    }

    .file-item .file-name { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
    .volume, .page-turn { animation: none !important; }
}
