/* ========================================
   ALBUM HERO
======================================== */

.album-hero {
    position: relative;
    isolation: isolate;

    display: grid;
    align-items: end;
    gap: 32px;

    grid-template-columns: 240px minmax(0, 1fr);

    padding: 34px;

    overflow: hidden;

    background:
        radial-gradient(
            circle at 82% 8%,
            rgba(35, 140, 255, 0.3),
            transparent 44%
        ),
        linear-gradient(
            120deg,
            #123c73,
            #0a2547 60%,
            #06182c
        );

    border: 1px solid rgba(130, 185, 255, 0.22);
    border-radius: var(--radius-large);

    box-shadow: var(--shadow);

    animation: riseIn 0.7s ease both;
}

.album-sleeve {
    display: grid;
    place-items: center;

    width: 240px;
    height: 240px;

    overflow: hidden;

    background:
        radial-gradient(
            circle at 74% 16%,
            rgba(255, 255, 255, 0.45),
            transparent 36%
        ),
        linear-gradient(
            150deg,
            var(--cover-one, #1d5c9e),
            var(--cover-two, #061628)
        );

    border-radius: 10px;

    box-shadow: 0 26px 52px rgba(0, 0, 0, 0.65);
}

.album-sleeve b {
    padding: 0 18px;

    color: #eaf3ff;

    text-align: center;

    font-size: 0.86rem;
    font-weight: 800;
    line-height: 1.7;
    letter-spacing: 0.22em;

    white-space: pre-line;

    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}


/* ========================================
   ALBUM HEADING
======================================== */

.album-heading .eyebrow {
    display: block;

    margin-bottom: 10px;

    color: var(--cyan);

    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.28em;
}

.album-heading h1 {
    margin-bottom: 10px;

    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(2rem, 3.6vw, 3.1rem);
    font-weight: 600;
    line-height: 1.04;
    letter-spacing: -0.02em;
}

.album-credit {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;

    margin-bottom: 12px;

    font-size: 0.92rem;
    font-weight: 600;
}

.credit-link {
    color: var(--milk);

    text-decoration: none;

    border-bottom: 1px solid transparent;

    transition: 0.2s ease;
}

.credit-link:hover {
    color: var(--cyan);

    border-bottom-color: var(--cyan);
}

.credit-dot {
    color: var(--muted-dark);
}

.album-about {
    max-width: 58ch;

    margin-bottom: 12px;

    color: #c3d7f0;

    font-size: 0.86rem;
    line-height: 1.7;
}

.album-meta {
    margin-bottom: 22px;

    color: var(--muted);

    font-size: 0.76rem;
    letter-spacing: 0.02em;
}


/* ========================================
   ALBUM ACTIONS
======================================== */

.album-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.save-button {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    padding: 14px 24px;

    color: var(--milk);
    background: rgba(6, 20, 40, 0.5);

    border: 1px solid var(--line);
    border-radius: 999px;

    font-size: 0.86rem;
    font-weight: 700;

    cursor: pointer;
    transition: 0.25s ease;
}

.save-button svg {
    width: 19px;
    height: 19px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.save-button:hover {
    color: var(--white);

    border-color: var(--line-bright);

    transform: translateY(-2px);
}

.save-button.saved {
    color: var(--green);

    border-color: rgba(36, 232, 120, 0.5);
    background: rgba(36, 232, 120, 0.1);
}

.save-button.saved svg {
    fill: var(--green);
    stroke: var(--green);
}


/* ========================================
   TRACKLIST — no cover column, the sleeve
   above is the artwork for every row
======================================== */

.album-header,
.album-tracks article {
    grid-template-columns:
        44px
        minmax(160px, 1fr)
        70px
        44px;
}


/* one-line rows: the artist is in the hero, not repeated on every track */

.album-tracks article div strong {
    font-size: 0.92rem;
}


/* ========================================
   SECTIONS THAT CAN BE EMPTY
======================================== */

#byArtistSection[hidden],
#inGenreSection[hidden] {
    display: none;
}


/* ========================================
   TABLET
======================================== */

@media (max-width: 1050px) {
    .album-hero {
        grid-template-columns: 170px minmax(0, 1fr);

        gap: 24px;

        padding: 26px;
    }

    .album-sleeve {
        width: 170px;
        height: 170px;
    }

    .album-sleeve b {
        font-size: 0.68rem;
        letter-spacing: 0.18em;
    }

    .album-grid {
        grid-template-columns: repeat(
            auto-fill,
            minmax(150px, 1fr)
        );
    }
}


/* ========================================
   MOBILE
======================================== */

@media (max-width: 650px) {
    .album-hero {
        grid-template-columns: minmax(0, 1fr);
        justify-items: start;

        gap: 20px;

        padding: 20px;
    }

    .album-sleeve {
        width: 160px;
        height: 160px;
    }

    .album-heading h1 {
        font-size: 1.85rem;
    }

    .album-about {
        font-size: 0.82rem;
    }

    .album-actions {
        width: 100%;
    }

    .album-actions .primary-button,
    .album-actions .ghost-button,
    .album-actions .save-button {
        flex: 1 1 auto;
        justify-content: center;
    }

    .album-header {
        display: none;
    }

    /* style.css already hides the index and the length on a phone,
       so a row is just the title and the heart */
    .album-tracks article {
        grid-template-columns:
            minmax(0, 1fr)
            44px;

        padding-inline: 14px;
    }

}
