.eyebrow {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary);
    font-size: 0.85rem;
    margin: 0 0 var(--space-1);
}

.release-date {
    color: var(--color-muted);
    font-weight: 600;
    margin: 0 0 var(--space-2);
}

/* Ambient glow — a soft, blurred wash of the release's own accent color
   bleeding in behind the hero, instead of a hard-edged block or border.
   This is the "reflect the cover's tonality" piece: --accent is set inline
   per-page from the extracted (or manually overridden) cover color. */
.release-hero,
.release-page {
    position: relative;
}

.release-hero::before,
.release-page__hero::before {
    content: "";
    position: absolute;
    inset: -15% -10% 40% -10%;
    background: radial-gradient(ellipse at 30% 20%, color-mix(in srgb, var(--accent, var(--color-primary)) 45%, transparent), transparent 70%);
    filter: blur(50px);
    z-index: -1;
    pointer-events: none;
}

/* Hero (music index page) */
.release-hero {
    display: grid;
    gap: var(--space-3);
    align-items: center;
    margin: var(--space-3) 0 var(--space-4);
    padding: var(--space-3);
    background: var(--color-surface);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}

.release-hero__cover {
    width: 100%;
    border-radius: var(--radius-sm);
    box-shadow: 0 25px 60px -15px color-mix(in srgb, var(--accent, var(--color-primary)) 70%, black);
}

.release-hero .release-date {
    color: var(--color-muted);
}

@media (min-width: 768px) {
    .release-hero {
        grid-template-columns: 320px 1fr;
        padding: var(--space-4);
    }
}

/* Release grid */
.release-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

@media (min-width: 640px) {
    .release-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 960px) {
    .release-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.release-card {
    display: block;
    color: var(--color-ink);
    text-decoration: none;
}

.release-card__cover {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius-sm);
    box-shadow: 0 0 0 1px var(--color-border);
    margin-bottom: var(--space-1);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.release-card:hover .release-card__cover,
.release-card:focus-visible .release-card__cover {
    box-shadow: 0 15px 40px -10px color-mix(in srgb, var(--accent, var(--color-primary)) 65%, black), 0 0 0 1px color-mix(in srgb, var(--accent, var(--color-primary)) 50%, transparent);
    transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
    .release-card:hover .release-card__cover,
    .release-card:focus-visible .release-card__cover,
    .embed-facade:hover .embed-facade__play {
        transform: none;
    }
}

.release-card__title {
    font-size: 1rem;
    margin: 0 0 0.15rem;
}

/* Videos */
.video-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3);
}

@media (min-width: 640px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.embed-facade {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--color-surface);
    cursor: pointer;
    overflow: hidden;
    border-radius: var(--radius);
}

.embed-facade__thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.75;
}

.embed-facade__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    /* --color-ink is near-black in the default light theme, so the play
       icon needs the accent variant kept safe for dark text/icons. */
    background: var(--accent-dark, var(--accent, var(--color-primary)));
    color: var(--color-ink);
    border: none;
    font-size: 1.25rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 40px -4px var(--accent-dark, var(--accent, var(--color-primary)));
    transition: transform 0.2s ease;
}

.embed-facade:hover .embed-facade__play {
    transform: translate(-50%, -50%) scale(1.06);
}

.embed-facade__title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: var(--space-1) var(--space-2);
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    /* Always white, not var(--color-ink): the scrim behind this label is a
       fixed dark gradient over a photo thumbnail regardless of theme, so the
       text needs to stay light even in the light theme, where --color-ink
       is near-black and would be unreadable here. */
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
}

.embed-facade__iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Release detail page */
.release-page__hero {
    position: relative;
    display: grid;
    gap: var(--space-3);
    margin: var(--space-3) 0 var(--space-4);
}

@media (min-width: 768px) {
    .release-page__hero {
        grid-template-columns: 380px 1fr;
        align-items: start;
    }
}

.release-page__cover {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: 0 30px 70px -15px color-mix(in srgb, var(--accent, var(--color-primary)) 75%, black);
}

.release-page__player {
    aspect-ratio: 1 / 1;
    max-height: 380px;
    border-radius: var(--radius);
    box-shadow: 0 30px 70px -15px color-mix(in srgb, var(--accent, var(--color-primary)) 75%, black);
}

.platform-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: var(--space-3) 0;
    padding: 0;
    list-style: none;
}

.platform-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    color: var(--color-ink);
    text-decoration: none;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.platform-button svg {
    width: 1.25rem;
    height: 1.25rem;
}

.platform-button:hover,
.platform-button:focus-visible {
    border-color: color-mix(in srgb, var(--accent, var(--color-primary)) 60%, transparent);
    box-shadow: 0 0 24px -6px var(--accent, var(--color-primary));
    color: var(--color-ink);
}

.platform-button--bandcamp {
    border-color: transparent;
    /* --color-paper is near-white in the default light theme, so the
       button's text needs the accent variant kept safe for light text. */
    background: var(--accent-light, var(--accent, var(--color-primary)));
    color: var(--color-paper);
}

.platform-button--bandcamp:hover,
.platform-button--bandcamp:focus-visible {
    box-shadow: 0 0 32px -4px var(--accent-light, var(--accent, var(--color-primary)));
    color: var(--color-paper);
}

/* Tracklist — many rows, each with several platform links, so every row
   stays compact: icon-only link buttons instead of labelled ones. */
.tracklist {
    margin: var(--space-4) 0;
}

.tracklist__list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--color-border);
}

.track-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--color-border);
}

.track-row__index {
    flex: 0 0 auto;
    width: 2ch;
    color: var(--color-muted);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.track-row__title {
    flex: 1 1 auto;
    font-weight: 700;
    font-size: 0.9rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.track-row__links {
    flex: 0 0 auto;
    display: flex;
    gap: 0.25rem;
}

.track-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    color: var(--color-muted);
    flex-shrink: 0;
    transition: color 0.2s ease, box-shadow 0.2s ease;
}

.track-link svg {
    width: 1rem;
    height: 1rem;
}

.track-link:hover,
.track-link:focus-visible {
    color: var(--color-ink);
    box-shadow: 0 0 16px -4px var(--accent, var(--color-primary));
}

@media (min-width: 480px) {
    .track-row__title {
        font-size: 1rem;
    }

    .track-row__links {
        gap: 0.4rem;
    }

    .track-link {
        width: 1.75rem;
        height: 1.75rem;
    }
}

/* "Don't see your music platform?" — a <details> disclosure so the widget is
   quiet until wanted, and works with zero JavaScript. */
.platform-suggest {
    margin: var(--space-4) 0 0;
    padding-top: var(--space-3);
    border-top: 1px solid var(--color-border);
}

.platform-suggest__feedback {
    list-style: none;
    margin: 0 0 var(--space-2);
    padding: 0;
}

.platform-suggest__feedback-item {
    padding: 0.75rem var(--space-2);
    border-radius: var(--radius-sm);
    font-weight: 700;
    background: var(--color-surface);
    border-left: 3px solid var(--color-muted);
}

.platform-suggest__feedback-item--success {
    border-left-color: var(--color-primary);
}

.platform-suggest__feedback-item--error {
    border-left-color: var(--color-primary);
    color: var(--color-primary-glow);
}

.platform-suggest__summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--color-muted);
    padding: var(--space-1) 0;
}

.platform-suggest__summary:hover,
.platform-suggest__summary:focus-visible {
    color: var(--color-ink);
}

.platform-suggest__form {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-top: var(--space-2);
    max-width: 34rem;
}

.platform-suggest__field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.platform-suggest__label {
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-muted);
}

.platform-suggest__select,
.platform-suggest__input {
    font-family: inherit;
    font-size: 1rem;
    padding: 0.7rem 0.85rem;
    background: var(--color-surface);
    color: var(--color-ink);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
}

.platform-suggest__select:focus-visible,
.platform-suggest__input:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 1px;
}

.platform-suggest__hint {
    font-size: 0.8rem;
    color: var(--color-muted);
}

/* Honeypot. Clipped rather than display:none — some bots skip fields hidden
   that way, and skipping is exactly what we don't want them to do. */
.platform-suggest__hp {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.platform-suggest__form .btn {
    align-self: flex-start;
}

/* Music video at the foot of a release page. The 16:9 box, thumbnail, play
   button and iframe all come from .embed-facade above — only the wrapper and
   the lead line are new here. */
.release-videos {
    margin: var(--space-4) 0 var(--space-3);
}

/* An h2 for the document outline and the section's accessible name, but not
   dressed as one: the global heading rule uppercases everything, which suits
   one-word labels like TRACKS and turns a whole sentence into shouting. */
.release-videos__lead {
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.3;
    margin: 0 0 var(--space-2);
}

/* Its own grid rather than .video-grid: that one is hard-wired to two columns
   above 640px, which would leave a single video in a half-width column with a
   hole beside it. auto-fit gives one video the full (capped) width and two
   videos a column each; the cap stops one 16:9 box from stretching across the
   whole page width on a desktop. */
.release-videos__grid {
    display: grid;
    gap: var(--space-3);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    max-width: 640px;
}

/* Theme awareness for the per-release --accent color.
   --accent-dark/--accent-light (music/models.py) are named for what
   they're safe *under* (dark text / light text), not for which theme
   they belong to — and --color-ink flips between near-black (light theme,
   the default) and near-white (dark theme), so which precomputed variant
   is correct for a given component inverts along with it. */
:root[data-theme="dark"] .embed-facade__play {
    background: var(--accent-light, var(--accent, var(--color-primary)));
    box-shadow: 0 0 40px -4px var(--accent-light, var(--accent, var(--color-primary)));
}

:root[data-theme="dark"] .platform-button--bandcamp {
    background: var(--accent-dark, var(--accent, var(--color-primary)));
}

:root[data-theme="dark"] .platform-button--bandcamp:hover,
:root[data-theme="dark"] .platform-button--bandcamp:focus-visible {
    box-shadow: 0 0 32px -4px var(--accent-dark, var(--accent, var(--color-primary)));
}

/* High contrast: skip the per-cover-art accent entirely in favor of the
   fixed, guaranteed-legible brand red — variable cover colors don't fit
   the "predictable maximum contrast" promise of this mode. */
:root[data-theme="high-contrast"] .embed-facade__play,
:root[data-theme="high-contrast"] .platform-button--bandcamp {
    background: var(--color-primary);
    box-shadow: none;
}

:root[data-theme="high-contrast"] .release-hero::before,
:root[data-theme="high-contrast"] .release-page__hero::before {
    display: none;
}
