/*
 * Motif — páginas de artista (/artists e /artists/{slug}) e os links de artista nas issues.
 * Vem depois de newsletter.css (sessões, player, faixa de inscrição) e usa os tokens de style.css:
 * preto, cinza, branco e o vermelho como única cor.
 *
 * Linguagem de cartaz de show: na página do artista, o nome ocupa a largura do "palco" preto e
 * as aparições são datas de turnê; em /artists, a lista inteira é o lineup de um festival, com
 * quem apareceu mais vezes em letra maior.
 */

/* ---------- Links de artista (nome no cartão da issue e na Song of the Week) ---------- */

.artist-link { color: inherit; text-decoration: none; transition: color .15s ease; }
.artist-link:hover,
.artist-link:focus-visible { color: var(--accent); text-decoration: underline; text-underline-offset: .12em; text-decoration-thickness: 2px; }

/* Capas em preto e branco que "acendem" ao passar o mouse (como as miniaturas de /issues). */
.stage-media img,
.date-media img,
.fresh-card img { filter: grayscale(1); transition: filter .25s ease, transform .4s ease; }
.stage-media:hover img,
.date-row:hover .date-media img,
.fresh-card:hover img,
.fresh-card:focus-visible img { filter: none; }

/* ---------- Página do artista: o palco ---------- */

.stage {
    background: var(--ink);
    color: var(--sheet);
    padding: 28px var(--gutter) 56px;
}
.stage-inner { max-width: calc(var(--wide) - 2 * var(--gutter)); margin: 0 auto; }

.stage-crumbs {
    margin: 0 0 20px;
    font: 500 12px/1.3 var(--mono);
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #a8adb2;
}
.stage-crumbs a { color: var(--sheet); text-decoration: none; }
.stage-crumbs a:hover { color: var(--accent); }

/* O nome do artista como headliner: a letra cresce até o nome ocupar a largura (--len = nº de caracteres). */
.stage-name {
    --largura: calc(min(100vw, var(--wide)) - 2 * var(--gutter));
    margin: 0;
    font-size: clamp(44px, calc(var(--largura) / (var(--len) * .6)), 210px);
    font-weight: 800;
    line-height: .9;
    letter-spacing: -.055em;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

.stage-credits {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 0;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
    font: 500 12px/1.4 var(--mono);
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #a8adb2;
}
.stage-credits li + li::before { content: "·"; margin: 0 10px; color: var(--accent); }
.stage-credits .flag { font-size: 15px; vertical-align: -1px; }
.stage-credits a { color: var(--sheet); text-underline-offset: 3px; }
.stage-credits a:hover,
.stage-credits a:focus-visible { color: var(--accent); }

.stage-show {
    display: grid;
    gap: 22px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, .16);
}
.stage-media { border-radius: 4px; }
.stage-media .play-icon { width: 64px; height: 64px; left: 18px; bottom: 18px; }
.stage-media .play-icon::after { left: 26px; top: 20px; border-width: 12px 0 12px 18px; }
.stage-cover img { width: 100%; max-width: 300px; aspect-ratio: 1; object-fit: cover; border-radius: 4px; }

.stage-label {
    margin: 0 0 10px;
    font: 500 12px/1.3 var(--mono);
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--accent);
}
.stage-label a { color: inherit; }
.stage-program { margin: 0; font-size: clamp(24px, 3vw, 34px); font-weight: 800; line-height: 1.05; letter-spacing: -.035em; }
.stage-meta { margin: 8px 0 0; font: 400 13px/1.5 var(--mono); color: #a8adb2; }
.stage-meta a { color: var(--sheet); }
.stage-meta a:hover { color: var(--accent); }

.stage-listen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 26px 0 0; }
.stage-listen span { width: 100%; font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #a8adb2; }
.stage-listen a {
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: var(--sheet);
    transition: background-color .15s ease, border-color .15s ease;
}
.stage-listen a:hover,
.stage-listen a:focus-visible { background: var(--accent); border-color: var(--accent); }

/* ---------- Página do artista: as aparições como datas de turnê ---------- */

.artist-bio {
    max-width: var(--wide);
    margin: 0 auto;
    padding: 56px var(--gutter);
}
.artist-bio p { max-width: 68ch; margin: 16px 0 0; font-size: 18px; line-height: 1.6; }
.artist-bio + .dates { padding-top: 0; }

.dates {
    width: 100%;
    max-width: var(--wide);
    margin: 0 auto;
    padding: 64px var(--gutter) 72px;
}
.dates-head { padding-bottom: 24px; }
.dates-head p { margin: 12px 0 0; color: var(--muted); }

.dates-list { margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--ink); }

.date-row {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
        "when  issue"
        "media media"
        "what  what";
    gap: 14px 20px;
    align-items: start;
    padding: 22px 0;
    border-bottom: 1px solid var(--line);
}
.date-when { grid-area: when; display: flex; flex-direction: column; }
.date-day { font-size: 26px; font-weight: 800; line-height: 1; letter-spacing: -.04em; white-space: nowrap; }
.date-year { margin-top: 4px; font: 500 12px/1 var(--mono); color: var(--muted); }

.date-media { grid-area: media; border-radius: 4px; }
.date-media--cover { background: none; }
.date-media--cover img { width: 120px; height: 120px; object-fit: cover; border-radius: 4px; }

.date-what { grid-area: what; min-width: 0; }
.date-tag {
    display: inline-block;
    margin: 0 0 8px;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--sheet);
    font: 500 11px/1.3 var(--mono);
    letter-spacing: .05em;
    text-transform: uppercase;
}
.date-title { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.1; letter-spacing: -.03em; overflow-wrap: anywhere; }
.date-meta { margin: 6px 0 0; font: 400 13px/1.4 var(--mono); color: var(--muted); }
.date-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 12px 0 0; font-size: 14px; font-weight: 600; }
.date-links a { color: var(--ink); }
.date-links a:hover { color: var(--accent); }

.date-issue {
    grid-area: issue;
    justify-self: end;
    font: 500 12px/1.3 var(--mono);
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--ink);
    text-decoration: none;
}
.date-issue:hover,
.date-issue:focus-visible { color: var(--accent); }

/* ---------- /artists: a edição mais recente ---------- */

.fresh {
    width: 100%;
    max-width: var(--wide);
    margin: 0 auto;
    padding: 0 var(--gutter) 56px;
}
.fresh-head .section-label a { color: var(--ink); }
.fresh-head .section-label a:hover { color: var(--accent); }

.fresh-list {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(200px, 62%);
    gap: 16px;
    margin: 0 calc(-1 * var(--gutter));
    padding: 0 var(--gutter) 6px;
    list-style: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}
.fresh-list li { scroll-snap-align: start; }
.fresh-card { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; }
.fresh-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; background: var(--ink); }
.fresh-name { margin-top: 10px; font-size: 18px; font-weight: 800; line-height: 1.15; letter-spacing: -.025em; overflow-wrap: anywhere; transition: color .15s ease; }
.fresh-card:hover .fresh-name,
.fresh-card:focus-visible .fresh-name { color: var(--accent); }
.fresh-meta { margin-top: 4px; font: 400 12px/1.4 var(--mono); color: var(--muted); }
.fresh-meta .flag { font-size: 14px; }

/* ---------- Gêneros e artistas parecidos ---------- */

.artist-related,
.genre-page,
.genre-index {
    width: 100%;
    max-width: var(--wide);
    margin: 0 auto;
    padding: 0 var(--gutter) 64px;
}
.genre-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 16px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}
.genre-page .genre-grid { margin-top: 0; }
.artist-card-empty { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 4px; background: var(--ink); }
.genre-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.genre-list a {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid var(--ink);
    border-radius: 999px;
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
}
.genre-list a span { font: 400 12px/1 var(--mono); color: var(--muted); }
.genre-list a:hover,
.genre-list a:focus-visible { background: var(--ink); color: var(--sheet); }
.genre-list a:hover span,
.genre-list a:focus-visible span { color: var(--sheet); }

/* ---------- /artists: o lineup ---------- */

.lineup { background: var(--ink); color: var(--sheet); padding: 56px var(--gutter) 72px; }
.lineup-inner { max-width: calc(var(--wide) - 2 * var(--gutter)); margin: 0 auto; }
.lineup-title { margin: 0; font-size: clamp(34px, 5vw, 56px); font-weight: 800; line-height: 1; letter-spacing: -.045em; }
.lineup-head p { margin: 12px 0 0; color: #a8adb2; }

.lineup-letters {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin: 28px 0 0;
    padding: 10px 0;
    background: var(--ink);
    border-bottom: 1px solid rgba(255, 255, 255, .16);
}
.lineup-letters a {
    min-width: 30px;
    padding: 6px 4px;
    border-radius: 6px;
    font: 500 13px/1 var(--mono);
    text-align: center;
    text-decoration: none;
    color: var(--sheet);
}
.lineup-letters a:hover,
.lineup-letters a:focus-visible { background: var(--accent); }

/* Um texto corrido, como num cartaz: cada letra é só um marcador dentro do fluxo. */
.lineup-poster { margin-top: 32px; line-height: 1.25; text-wrap: pretty; }
.lineup-group { display: inline; margin: 0; scroll-margin-top: 72px; }
.lineup-letter {
    margin: 0 8px 0 4px;
    font: 500 13px/1 var(--mono);
    color: var(--accent);
    vertical-align: .55em;
}
.lineup-name {
    color: var(--sheet);
    text-decoration: none;
    font-weight: 800;
    letter-spacing: -.035em;
    transition: color .15s ease;
}
.lineup-name::after { content: "·"; margin: 0 .35em; color: #5c6166; font-weight: 400; }
.lineup-name:hover,
.lineup-name:focus-visible { color: var(--accent); }
.lineup-lead { white-space: nowrap; }
.lineup-group:last-child .lineup-name:last-child::after { content: none; }
.lineup-name--1 { font-size: clamp(19px, 2.3vw, 27px); color: #d6d9db; }
.lineup-name--2 { font-size: clamp(26px, 3.6vw, 44px); }
.lineup-name--3 { font-size: clamp(34px, 5.2vw, 66px); }

/* ---------- Telas maiores ---------- */

@media (min-width: 640px) {
    /* Como num cartaz, um nome nunca quebra no meio (no celular, os longos precisam quebrar). */
    .lineup-name { white-space: nowrap; }
    .genre-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .fresh-list { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 0; overflow: visible; }
    .date-row {
        grid-template-columns: 96px minmax(0, 220px) 1fr auto;
        grid-template-areas: "when media what issue";
        gap: 24px;
    }
    .date-media--cover img { width: 124px; height: 124px; }
    /* Tocando: o vídeo desce para uma linha própria, na largura toda. */
    .date-row:has(iframe) {
        grid-template-areas:
            "when  what  what  issue"
            "media media media media";
    }
}

@media (min-width: 900px) {
    .stage { padding-top: 36px; padding-bottom: 72px; }
    .stage-show { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 40px; align-items: end; }
    .stage-show:has(.stage-cover) { grid-template-columns: 300px minmax(0, 1fr); }
    .fresh-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .date-row { grid-template-columns: 120px minmax(0, 280px) 1fr auto; gap: 32px; }
    .date-day { font-size: 32px; }
    .date-title { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
    .stage-media img, .date-media img, .fresh-card img { transition: none; }
}
