/* =============================================================
   GLOBAL LAYOUT SETTINGS
   ============================================================= */
body {
    background-color: #ffffff; 
    font-family: "Courier New", Courier, monospace;
    color: #111111;
    
    /* OVERLAP FIX (DESKTOP): 
       padding-left is set to 90px to completely clear the 40px sticky house icon + breathing room */
    padding: 60px 20px 60px 90px;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* STICKY NAVIGATION HOME BUTTON
   WIDTH/HEIGHT: Fixed sizing locked to top left viewport corner */
.home-link {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #ffffff;
    border: 1px solid #111111;
    color: #111111;
    box-shadow: 2px 2px 0px rgba(0,0,0,0.1);
    transition: background-color 0.15s, color 0.15s;
}
.home-link:hover {
    background-color: #111111;
    color: #ffffff;
}
.home-link svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

/* GRID CONFIGURATION (WHITESPACE OPTIMIZATION)
   WIDTH: Spans nicely across the page, grouping items into 2 columns on desktop */
.archive-grid {
    width: 100%;
    max-width: 1250px; /* TOTAL CONTAINER WIDTH: Holds the card rows */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(550px, 1fr)); /* GRID COLUMN RULES */
    gap: 30px; /* SPACE BETWEEN CARDS: Pulls cards closer/further apart */
    justify-content: center;
    margin-top: 20px;
}

/* =============================================================
   J-CARD ASSEMBLY AND DIMENSIONS
   ============================================================= */
.j-card {
    width: 100%;
    max-width: 580px; /* INDIVIDUAL CARD WIDTH: Controls how wide a single case looks */
    background-color: #fbf9f3;
    border: 2px solid #111111;
    box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* INNER SECTION CELL PADDING
   PADDING: Adjust these values to compress/expand inner layout text space */
.j-section {
    padding: 16px 20px; /* Vertical / Horizontal inner padding values */
    box-sizing: border-box;
}

/* SECTION 1: BACK FLAP SPECIFICATIONS (Top) */
.section-flap {
    background-color: #f4efed;
    border-bottom: 2px dashed #999999; /* Horizontal fold line */
}

.flap-title {
    font-size: 0.7rem;
    font-weight: bold;
    color: #666666;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.icon-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.icon-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: bold;
}

.icon-tag svg {
    width: 14px;
    height: 14px;
    stroke: #111111;
}

/* SECTION 2: CASSETTE SPINE SPECIFICATIONS (Middle)
   HEIGHT: Controlled by the top and bottom padding sizes below */
.section-spine {
    background-color: #fbf9f3;
    border-bottom: 2px dashed #999999; /* Horizontal fold line */
    padding-top: 20px;    /* Top spacing inside spine section */
    padding-bottom: 20px; /* Bottom spacing inside spine section */
}

.spine-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.spine-date {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: -1px;
}

.spine-venue {
    font-size: 0.85rem;
    line-height: 1.3;
    font-weight: bold;
    text-align: right;
    text-transform: uppercase;
    max-width: 65%;
}

.spine-catalog {
    font-size: 0.65rem;
    color: #888888;
    margin-top: 8px;
}

/* SECTION 3: INLAY CARD SPECIFICATIONS (Bottom)
   HEIGHT: Uses min-height to ensure a structural portrait block look */
.section-inlay {
    background-color: #ffffff;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 310px; /* Minimum height for the track list panel */
}

.tracklist-area {
    white-space: pre-wrap;
    font-size: 0.95rem;
    line-height: 1.4;
    margin: 0;
}

.inlay-footer {
    border-top: 1px dashed #111111;
    padding-top: 12px;
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.runtime-data {
    font-weight: bold;
    font-size: 0.85rem;
    background-color: #111111;
    color: #ffffff;
    padding: 3px 8px;
}

.dl-button {
    font-family: Arial, sans-serif;
    font-size: 0.8rem;
    font-weight: bold;
    color: #111111;
    background-color: transparent;
    text-decoration: none;
    border: 1px solid #111111;
    padding: 6px 14px;
    transition: background-color 0.15s, color 0.15s;
}
.dl-button:hover {
    background-color: #111111;
    color: #ffffff;
}

/* =============================================================
   MOBILE OVERLAP SAFEGUARD
   ============================================================= */
@media (max-width: 768px) {
    body {
        /* Drops heavy side padding so text isn't squished on phones */
        padding: 80px 15px 40px 15px;
    }
    .home-link {
        /* Changes from fixed floating layout to top left absolute static placement */
        position: absolute;
        top: 15px;
        left: 15px;
    }
    .archive-grid {
        grid-template-columns: 1fr; /* Collapses columns into single file stack */
    }
    .spine-main {
        flex-direction: column;
        gap: 5px;
    }
    .spine-venue {
        text-align: left;
        max-width: 100%;
    }
}