/**
 * COMPOSITORES — Digital Wave Music
 * Estilos de /compositores y /compositores/:nombre
 *
 * Usa los colores y las tipografías de styles.css (las variables --ink,
 * --accent, --gold, Instrument Serif e Inter), así que se ve como parte
 * de la tienda. Todo vive con el prefijo dwc- para no chocar con nada.
 *
 * La idea: como los créditos de un disco. Nombres grandes en serif,
 * una pequeña pila de portadas a un lado, y nada más que distraiga.
 */

/* ============================================
   QUÉ SE VE EN CADA MODO
   ============================================ */
#compositoresView,
#compositorHero { display: none; }

body.dwc-lista   #compositoresView { display: block; }
body.dwc-detalle #compositorHero   { display: block; }

body.dwc-on    .collections-banner { display: none; }
body.dwc-lista main.main-content   { display: none; }

/* El botón de la cabecera se queda encendido mientras estás aquí */
.btn-compositores.active {
    border-color: var(--accent-line);
    background: var(--accent-dim);
    color: #fff;
}

/* ============================================
   LISTA DE COMPOSITORES
   ============================================ */
.dwc-view {
    padding: 48px 0 96px;
}

.dwc-head {
    max-width: 640px;
    margin-bottom: 36px;
}

.dwc-title {
    font-family: 'Instrument Serif', Georgia, serif;
    font-weight: 400;
    font-size: clamp(40px, 6vw, 64px);
    line-height: 1;
    letter-spacing: -0.01em;
    color: var(--text);
}

.dwc-lead {
    margin-top: 16px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--muted);
    max-width: 52ch;
}

.dwc-count {
    margin-top: 14px;
    font-size: 13px;
    color: var(--faint);
}

.dwc-list {
    list-style: none;
    border-top: 1px solid var(--line);
}

.dwc-list li { border-bottom: 1px solid var(--line); }

.dwc-row {
    display: grid;
    grid-template-columns: 92px 1fr auto;
    align-items: center;
    gap: 24px;
    padding: 22px 8px;
    color: inherit;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.dwc-row:hover { background: rgba(255, 255, 255, 0.025); }

.dwc-row:focus-visible,
.dwc-back:focus-visible,
.dwc-btn:focus-visible {
    outline: 2px solid var(--accent-hi);
    outline-offset: 3px;
}

.dwc-row-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.dwc-name {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: clamp(26px, 3.4vw, 38px);
    line-height: 1.05;
    color: var(--text);
    transition: color var(--transition);
}

.dwc-row:hover .dwc-name { color: #fff; }

.dwc-meta {
    font-size: 13.5px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dwc-row-cta {
    font-size: 13px;
    font-weight: 500;
    color: var(--accent-hi);
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 99px;
    transition: border-color var(--transition), background var(--transition);
}

.dwc-row:hover .dwc-row-cta {
    border-color: var(--accent-line);
    background: var(--accent-dim);
}

/* ── Pila de portadas: como discos apilados en la repisa ── */
.dwc-stack {
    position: relative;
    display: block;
    width: 92px;
    height: 72px;
}

.dwc-mono,
.dwc-stack img {
    position: absolute;
    top: 0;
    width: 72px;
    height: 72px;
    border-radius: 8px;
}

.dwc-mono {
    left: 0;
    display: grid;
    place-items: center;
    background: var(--surface-3);
    border: 1px solid var(--line-strong);
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 30px;
    color: var(--gold);
}

.dwc-stack img {
    /* la primera portada al frente, las otras asomando detrás */
    left: calc(var(--i) * 10px);
    z-index: calc(3 - var(--i));
    object-fit: cover;
    border: 1px solid var(--line-strong);
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.45);
    background: var(--surface-2);
    transition: left 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* al pasar el mouse los discos se abren un poquito */
@media (hover: hover) {
    .dwc-row:hover .dwc-stack img { left: calc(var(--i) * 14px); }
}

/* ── Instrumental ── */
.dwc-instr { margin-top: 64px; }

.dwc-subtitle {
    font-family: 'Instrument Serif', Georgia, serif;
    font-weight: 400;
    font-size: 30px;
    color: var(--text);
}

.dwc-instr-note {
    margin: 6px 0 20px;
    font-size: 14px;
    color: var(--muted);
}

/* ============================================
   CABECERA DEL COMPOSITOR (encima del grid)
   ============================================ */
.dwc-hero {
    padding: 8px 0 32px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--line);
}

.dwc-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--muted);
    text-decoration: none;
    margin-bottom: 28px;
    border-radius: 6px;
    transition: color var(--transition);
}

.dwc-back::before {
    content: '';
    width: 7px;
    height: 7px;
    border-left: 1.6px solid currentColor;
    border-bottom: 1.6px solid currentColor;
    transform: rotate(45deg);
    margin-right: 2px;
}

.dwc-back:hover { color: var(--text); }

.dwc-hero-row {
    display: flex;
    align-items: center;
    gap: 32px;
}

.dwc-stack-lg {
    width: 172px;
    height: 140px;
    flex-shrink: 0;
}

.dwc-stack-lg .dwc-mono,
.dwc-stack-lg img {
    width: 140px;
    height: 140px;
    border-radius: 12px;
}

.dwc-stack-lg .dwc-mono { font-size: 56px; }
.dwc-stack-lg img { left: calc(var(--i) * 16px); }

.dwc-hero-text { min-width: 0; }

.dwc-hero-label {
    font-size: 14px;
    color: var(--gold);
    margin-bottom: 6px;
}

.dwc-hero-name {
    font-family: 'Instrument Serif', Georgia, serif;
    font-weight: 400;
    font-size: clamp(38px, 6vw, 60px);
    line-height: 1;
    color: var(--text);
}

.dwc-hero-meta {
    margin-top: 12px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--muted);
    max-width: 56ch;
}

.dwc-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.dwc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 99px;
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--text);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.dwc-btn:hover {
    border-color: var(--accent-line);
    background: var(--accent-dim);
    color: #fff;
}

.dwc-btn svg { width: 15px; height: 15px; }

.dwc-btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.dwc-btn-primary:hover {
    background: var(--accent-hi);
    border-color: var(--accent-hi);
}

/* ============================================
   CELULAR
   ============================================ */
@media (max-width: 640px) {
    .dwc-view { padding: 32px 0 80px; }
    .dwc-head { margin-bottom: 28px; }
    .dwc-lead { font-size: 15px; }

    .dwc-row {
        grid-template-columns: 70px 1fr;
        gap: 16px;
        padding: 18px 4px;
    }

    .dwc-row-cta { display: none; }   /* toda la fila ya es el enlace */

    .dwc-stack { width: 70px; height: 56px; }
    .dwc-mono,
    .dwc-stack img { width: 56px; height: 56px; border-radius: 7px; }
    .dwc-mono { font-size: 24px; }
    .dwc-stack img { left: calc(var(--i) * 7px); }

    .dwc-name { font-size: 25px; }
    .dwc-meta { font-size: 13px; white-space: normal; }

    .dwc-hero-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .dwc-stack-lg { width: 128px; height: 100px; }
    .dwc-stack-lg .dwc-mono,
    .dwc-stack-lg img { width: 100px; height: 100px; border-radius: 10px; }
    .dwc-stack-lg .dwc-mono { font-size: 42px; }
    .dwc-stack-lg img { left: calc(var(--i) * 12px); }
}

@media (prefers-reduced-motion: reduce) {
    .dwc-row,
    .dwc-stack img,
    .dwc-btn { transition: none; }
}
