/* =========================
   GLOBAL BASE
   ========================= */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;

    background: #aebdcd;
    color: #1a1a1a;

    overflow-x: hidden;
}

a:hover {
    opacity: 0.6;
}

/* =========================
   FRONT PAGE (ARCHIVE COVER)
   ========================= */

body.front-page {
    font-family: 'Courier Prime', monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;

    overflow-x: hidden;
}
/* paper grain overlay */
body.front-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("https://www.transparenttextures.com/patterns/paper-fibers.png");
    opacity: 0.15;
    pointer-events: none;
}

/* MAIN ARCHIVE CONTAINER */

.archive {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 700px;

    padding: 20px;
    box-sizing: border-box;

    display: flex;
    flex-direction: column;
    align-items: center;
}
/* FRONT PAGE LABEL */
.label-top {
    font-size: 0.6rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

/* IMAGE FRAME */
.artifact-frame {
    padding: 12px;
    border: 2px solid black;
    background-color: #f8f3ea;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* FRONT IMAGE */
.artifact-image {
    width: min(500px, 80vw);
    height: auto;
}

/* TITLE */
.artifact-title {
    margin-top: 18px;
    font-size: 5rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* SUBTITLE */
.artifact-subtitle {
    margin-top: 8px;
    font-size: 1.2rem;
}

/* ENTER BUTTON */
.enter {
    margin-top: 40px;
    display: inline-block;
    font-size: 1.5rem;
    letter-spacing: 0.25em;
    padding: 10px 18px;

    border: 1px solid black;

    transition: 0.2s ease;
    color: black;
    text-decoration: none;
}

.enter:hover {
    background: black;
    color: white;
}

.arrow {
    display: block;
    margin-top: 6px;
    font-size: 1.2rem;
}

.image-area {
    position: relative;
    display: inline-block;

    margin-top: 10px;
    margin-bottom: 20px;
}
/* PLACES BOX */
.archive-links {
    position: absolute;
    top: 50%;
    left: 100%;
    margin-left: 20px;

    transform: translateY(-50%);

    display: flex;
    flex-direction: column;
    gap: 12px;
}

.archive-links a {
    width: 140px;

    padding: 12px 20px;

    border: 2px solid black;
    background: #f8f3ea;

    text-align: center;
    text-decoration: none;

    font-family: 'Courier Prime', monospace;
    font-size: 1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;

    color: black;

    transition: all 0.2s ease;
}
.archive-links a:hover {
    background: black;
    color: white;
}

/* =========================
   SONG PAGE (ARCHIVE SIDEBARS)
   ========================= */

.wrapper {
    max-width: 700px;
    margin: 0 auto;
    padding: 60px 20px;
    text-align: center;
}

/* TITLE */
h1 {
    margin: 0;
    font-size: 2rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* SUBTITLE */
.subtitle {
    font-size: 1rem;
    letter-spacing: 0.15em;
    margin-bottom: 40px;
    font-style: italic;
}

/* TRACKLIST */
.tracklist {
    list-style: none;
    padding: 0;
    margin: 40px 0;
    font-size: 0.9rem;
}

.tracklist li {
    margin: 15px 0;
    letter-spacing: 0.05em;
}

/* DIVIDER */
.divider {
    margin: 40px auto;
    width: 60%;
    border-top: 1px solid #333;
    opacity: 0.3;
}

/* =========================
   SIDE ARCHIVE IMAGES
   ========================= */

.side-left,
.side-right {
    position: fixed;
    top: 42%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 10;
}

.side-left {
    left: 200px;
    transform: translate(-8px, -50%);
}

.side-right {
    right: 180px;
    transform: translate(8px, -50%);
}

.side-left img
{
    width: 300px;
    height: auto;
    border: 1px solid #333;
    opacity: 0.92;
}
.side-right img {
    width: 300px;
    height: auto;
    border: 1px solid #333;
    opacity: 0.92;
}

/* captions */
.archive-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.caption {
    margin-top: 8px;
    font-size: 0.60rem;
    letter-spacing: 0.1em;
    font-style: italic;
    opacity: 1.0;
    text-align: center;
}

/* =========================
   LIGHTBOX
   ========================= */

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 999;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90vw;
    max-height: 80vh;
    border: 2px solid #f8f3ea;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: 1px solid #f8f3ea;
    color: #f8f3ea;
    padding: 6px 12px;
    font-family: 'Courier Prime', monospace;
    cursor: pointer;
}

/* =========================
   MOBILE
   ========================= */
@media (max-width: 768px) {
    body.front-page {
        height: 100vh;
        padding: 0;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .archive {
        padding: 2vw;
        transform: scale(0.62);
        transform-origin: center center;
    }

    .side-left,
    .side-right {
        position: fixed;
        top: auto;
        bottom: 16px;
        transform: none;
        z-index: 50;
    }

    .side-left {
        left: 12px;
    }

    .side-right {
        right: 12px;
    }

    .side-left img,
    .side-right img {
        width: 56px;
        height: 56px;
        object-fit: cover;
        cursor: pointer;
    }

    .side-left .caption,
    .side-right .caption {
        display: none;
    }
}

/* =========================
   SONG MODAL
   ========================= */

.modal {
    display: none;

    position: fixed;
    inset: 0;

    background: rgba(0,0,0,0.7);

    justify-content: center;
    align-items: center;

    z-index: 9999;
}

/* =========================
   FLIP CARD
   ========================= */

.flip-card {
    width: min(90vw, 550px);
    height: min(85vh, 700px);

    perspective: 1000px;
}

.flip-inner {
    position: relative;

    width: 100%;
    height: 100%;

    transform-style: preserve-3d;

    transition: transform 0.8s ease;
}

.modal.active .flip-inner {
    transform: rotateY(180deg);
}

.flip-front,
.flip-back {

    position: absolute;

    width: 100%;
    height: 100%;

    backface-visibility: hidden;

    background: #f8f3ea;

    border: 2px solid #333;

    box-sizing: border-box;
}

/* FRONT */

.flip-front {

    display: flex;

    align-items: center;
    justify-content: center;

    text-align: center;

    letter-spacing: 0.1em;
}

/* BACK */

.flip-back {

    transform: rotateY(180deg);

    overflow-y: auto;

    padding: 20px;
}

/* =========================
   CLOSE BUTTON
   ========================= */

.close-btn {

    float: right;

    background: none;

    border: 1px solid #333;

    cursor: pointer;

    padding: 5px 10px;

    margin-bottom: 10px;
}

/* =========================
   ARCHIVE RECORD
   ========================= */

.archive-record {

    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 15px;
}

.song-image {

    width: 100%;

    max-width: 260px;

    height: auto;

    border: 1px solid #333;
}

.song-meta {

    font-size: 0.75rem;

    letter-spacing: 0.1em;

    text-align: center;

    line-height: 1.5;
}

audio {

    width: 100%;

    max-width: 320px;
}

/* =========================
   LYRICS
   ========================= */

.lyrics {

    width: 100%;

    border-top: 1px solid #333;

    padding-top: 15px;
}

.lyrics pre {

    margin: 0;

    white-space: pre-wrap;

    font-family: inherit;

    line-height: 1.6;

    text-align: left;
}
