/* Explain: Additional styles for hero section elements like turntable, marquee, and nameplate. */
/* Explains: estilos del tocadiscos de la portada y de la banda de mensajes rotativos del coro. */
.turntable {
    position: absolute;
    right: clamp(0.5rem, 3vw, 1.5rem);
    bottom: clamp(0.5rem, 3vw, 1.5rem);
    z-index: 20;
    display: inline-flex;
    align-items: center;
    gap: 0;
    max-width: calc(100% - 1rem);
    border: 0;
    border-radius: 999px;
    background: transparent;
    padding: 0;
    text-align: left;
    box-shadow: none;
    backdrop-filter: none;
    transition: transform 300ms ease;
}

.turntable:hover,
.turntable:focus-visible {
    transform: translateY(-3px);
}

@media (min-width: 640px) {
    .turntable {
        left: auto;
        right: 16%;
        bottom: 18%;
    }
}

/* Móvil: el botón se reduce al disco, con el mismo tamaño que el escudo del coro,
   para que apenas ocupe espacio sobre el cartel y no tape la ilustración. */
@media (max-width: 639px) {
    .turntable {
        left: 0.75rem;
        right: auto;
        bottom: 0.75rem;
        translate: 0 0;
        gap: 0;
        border: 0;
        background: transparent;
        padding: 0;
        box-shadow: none;
        backdrop-filter: none;
    }

    .turntable-meta {
        display: none;
    }

    .turntable-base {
        height: 3rem;
        width: 3rem;
        padding: 0.3rem;
        box-shadow: 0 8px 22px rgba(0, 0, 0, 0.42), inset 0 0 0 2px rgba(251, 243, 224, 0.28);
    }

    .turntable:hover,
    .turntable:focus-visible {
        transform: none;
    }

    .turntable:hover .turntable-base,
    .turntable:focus-visible .turntable-base {
        transform: none;
    }
}

.turntable-base {
    position: relative;
    display: block;
    flex-shrink: 0;
    height: clamp(3.1rem, 12vw, 4.35rem);
    width: clamp(3.1rem, 12vw, 4.35rem);
    padding: 0.4rem;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 25%, #33506c, var(--poster-navy));
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4), inset 0 0 0 2px rgba(251, 243, 224, 0.22);
    transition: transform 300ms ease, box-shadow 300ms ease;
}

.turntable:hover .turntable-base,
.turntable:focus-visible .turntable-base {
    transform: scale(1.05);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), inset 0 0 0 2px rgba(251, 243, 224, 0.32);
}

.turntable-vinyl {
    position: absolute;
    inset: 0.5rem;
    overflow: hidden;
    border-radius: 999px;
    background:
        repeating-radial-gradient(circle at center, #171717 0 2px, #232323 2px 4px),
        #101010;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.07);
}

.turntable-vinyl::after {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: linear-gradient(118deg, transparent 32%, rgba(255, 255, 255, 0.18) 50%, transparent 68%);
    content: "";
}

.turntable.is-spinning .turntable-vinyl {
    animation: turntable-spin 3.2s linear infinite;
}

.turntable-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    display: inline-flex;
    height: 44%;
    width: 44%;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--poster-gold);
    color: var(--poster-navy);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    transform: translate(-50%, -50%);
}

/* Invita a pulsar mientras la canción está parada; se detiene al pasar el cursor o al enfocar. */
.turntable:not(.is-spinning) .turntable-icon {
    animation: turntable-icon-pulse 2400ms ease-in-out infinite;
}

.turntable:hover:not(.is-spinning) .turntable-icon,
.turntable:focus-visible:not(.is-spinning) .turntable-icon {
    animation: none;
    transform: translate(-50%, -50%) scale(1.06);
}

@keyframes turntable-icon-pulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.13);
    }
}

.turntable-arm {
    position: absolute;
    top: 9%;
    right: 12%;
    z-index: 3;
    width: 0.3rem;
    height: 44%;
    border-radius: 999px;
    background: linear-gradient(180deg, #f2ecdb, #b6bea2);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transform: rotate(6deg);
    transform-origin: top center;
    transition: transform 500ms ease;
}

.turntable.is-spinning .turntable-arm {
    transform: rotate(32deg);
}

.turntable-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.turntable-label {
    display: block;
    color: var(--poster-cream);
    font-family: var(--font-heading);
    font-size: clamp(0.98rem, 3.4vw, 1.15rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.turntable-state {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--poster-gold);
    font-size: clamp(0.66rem, 2.4vw, 0.76rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.2;
}

.turntable-eq {
    display: none;
    align-items: flex-end;
    gap: 2px;
    height: 0.72rem;
}

.turntable-state.is-playing .turntable-eq {
    display: inline-flex;
}

.turntable-eq span {
    width: 2px;
    height: 35%;
    border-radius: 999px;
    background: currentColor;
    animation: turntable-eq-bounce 900ms ease-in-out infinite;
}

.turntable-eq span:nth-child(2) {
    animation-delay: 150ms;
}

.turntable-eq span:nth-child(3) {
    animation-delay: 300ms;
}

@keyframes turntable-eq-bounce {

    0%,
    100% {
        height: 35%;
    }

    50% {
        height: 100%;
    }
}

@keyframes turntable-spin {
    to {
        transform: rotate(360deg);
    }
}

.hero-marquee {
    position: relative;
    display: flex;
    align-items: center;
    gap: clamp(0.9rem, 3vw, 1.5rem);
    overflow: hidden;
    border: 1px solid rgba(243, 201, 105, 0.32);
    border-radius: 1.75rem;
    background: linear-gradient(135deg, var(--sage-dark) 0%, var(--primary-color) 52%, var(--sage-dark) 100%);
    padding: clamp(1rem, 2.6vw, 1.5rem) clamp(1.2rem, 4vw, 2.25rem);
    box-shadow: 0 24px 65px rgba(31, 46, 35, 0.26), inset 0 1px 0 rgba(251, 243, 224, 0.14);
}

.hero-marquee::before {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 10% -20%, rgba(243, 201, 105, 0.2), transparent 42%);
    content: "";
    pointer-events: none;
}

.hero-marquee-badge {
    position: relative;
    z-index: 1;
    display: inline-flex;
    flex-shrink: 0;
    height: clamp(2.5rem, 7vw, 3.25rem);
    width: clamp(2.5rem, 7vw, 3.25rem);
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--poster-gold);
    color: var(--poster-navy);
    font-size: clamp(1rem, 3vw, 1.25rem);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28), inset 0 0 0 3px rgba(251, 243, 224, 0.4);
}

.hero-marquee-body {
    position: relative;
    z-index: 1;
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 0.6rem;
}

.hero-marquee-slides {
    display: grid;
    place-items: center start;
}

.hero-marquee-slide {
    grid-area: 1 / 1;
    display: block;
    color: var(--poster-cream);
    font-family: var(--font-heading);
    font-size: clamp(0.95rem, 2.4vw, 1.15rem);
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: 0.004em;
    text-wrap: balance;
    opacity: 0;
    transform: translateY(0.8rem);
    transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1), transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
    will-change: opacity, transform;
}

.hero-marquee-slide.is-active {
    opacity: 1;
    transform: translateY(0);
}

.hero-marquee-dots {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.hero-marquee-dot {
    height: 0.3rem;
    width: 0.9rem;
    border-radius: 999px;
    background: rgba(251, 243, 224, 0.3);
    transition: width 450ms cubic-bezier(0.22, 1, 0.36, 1), background-color 450ms ease;
}

.hero-marquee-dot.is-active {
    width: 1.7rem;
    background: var(--poster-gold);
}

@media (max-width: 640px) {
    .hero-marquee {
        align-items: flex-start;
        border-radius: 1.35rem;
        padding: 1rem 1.1rem;
    }

    .hero-marquee-badge {
        margin-top: 0.15rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .turntable.is-spinning .turntable-vinyl {
        animation: none;
    }

    .turntable:not(.is-spinning) .turntable-icon {
        animation: none;
    }

    .turntable-eq span {
        animation: none;
        height: 70%;
    }

    .hero-marquee-slide,
    .hero-marquee-dot {
        transition: none;
    }

    .hero-nameplate-title {
        animation: none;
        background-position: 50% 50%;
    }
}

/* Cabecera de la portada: el nombre del coro y una frase de bienvenida se leen sobre el cartel,
   con un panel de cristal oscuro que asegura el contraste sin cubrir toda la ilustración. */
.hero-nameplate {
    position: absolute;
    top: clamp(0.7rem, 2.6vw, 1.6rem);
    left: clamp(0.7rem, 2.6vw, 1.6rem);
    right: clamp(0.7rem, 2.6vw, 1.6rem);
    z-index: 10;
    display: flex;
    justify-content: stretch;
    pointer-events: none;
}

.hero-nameplate-inner {
    pointer-events: auto;
    position: relative;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.35rem 0.85rem;
    width: 100%;
    max-width: 100%;
    border: 1px solid rgba(243, 201, 105, 0.65);
    border-radius: 1.4rem;
    background: linear-gradient(135deg, rgba(30, 58, 86, 0.48), rgba(30, 58, 86, 0.28));
    padding: clamp(0.65rem, 2vw, 0.95rem) clamp(1.15rem, 3.4vw, 1.7rem);
    box-shadow:
        0 0 0 3px rgba(30, 58, 86, 0.26),
        0 0 0 4px rgba(243, 201, 105, 0.42),
        inset 0 0 0 4px rgba(30, 58, 86, 0.2),
        inset 0 0 0 5px rgba(251, 243, 224, 0.26),
        0 16px 40px rgba(31, 46, 35, 0.22),
        inset 0 1px 0 rgba(251, 243, 224, 0.12);
    backdrop-filter: blur(10px);
}

/* Marco orlado de cartel antiguo: cuatro esquinas doradas floreadas sobre el doble filete. */
.hero-nameplate-inner::after {
    position: absolute;
    inset: -0.28rem;
    z-index: 1;
    border-radius: calc(1.4rem + 2px);
    background-image:
        radial-gradient(circle, rgba(243, 201, 105, 0.95) 0 2px, rgba(243, 201, 105, 0) 3px),
        radial-gradient(circle, rgba(243, 201, 105, 0.95) 0 2px, rgba(243, 201, 105, 0) 3px),
        radial-gradient(circle, rgba(243, 201, 105, 0.95) 0 2px, rgba(243, 201, 105, 0) 3px),
        radial-gradient(circle, rgba(243, 201, 105, 0.95) 0 2px, rgba(243, 201, 105, 0) 3px);
    background-size: 7px 7px;
    background-repeat: no-repeat;
    background-position: left 0 top 0, right 0 top 0, left 0 bottom 0, right 0 bottom 0;
    content: "";
    pointer-events: none;
}

.hero-nameplate-kicker {
    margin: 0;
    color: var(--poster-gold);
    font-size: clamp(0.62rem, 2.4vw, 0.7rem);
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.hero-nameplate-title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(1.25rem, 3.8vw, 2.05rem);
    font-weight: 700;
    line-height: 1.16;
    letter-spacing: -0.02em;
    white-space: nowrap;
    background-image: linear-gradient(100deg, #C99B3F 0%, #F3C969 20%, #FBF3E0 38%, #F3C969 54%, #CB9E42 74%, #F3C969 100%);
    background-size: 220% 100%;
    background-position: 0% 50%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    filter: drop-shadow(0 1px 1px rgba(30, 58, 86, 0.65)) drop-shadow(0 3px 6px rgba(31, 46, 35, 0.4));
    animation: hero-title-shine 10s ease-in-out infinite;
}

/* El brillo dorado recorre el nombre despacio, como una medalla que gira bajo la luz. */
@keyframes hero-title-shine {
    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.hero-nameplate-lead {
    margin: 0;
    color: rgba(251, 243, 224, 0.9);
    font-family: var(--font-body);
    font-size: clamp(0.82rem, 2.5vw, 0.95rem);
    font-weight: 600;
    line-height: 1.5;
}

/* Móvil: el titular se queda dentro del cartel, en la franja de cielo de arriba,
   para no tapar a los cantantes, el escudo ni el tocadiscos. */
@media (max-width: 639px) {
    .hero-nameplate {
        position: absolute;
        top: clamp(0.6rem, 2.4vw, 1rem);
        left: clamp(0.6rem, 3vw, 1rem);
        right: clamp(0.6rem, 3vw, 1rem);
        width: auto;
        margin-top: 0;
        justify-content: stretch;
    }

    .hero-nameplate-inner {
        flex-wrap: nowrap;
        justify-content: center;
        width: 100%;
        border-radius: 1.1rem;
        padding: 0.7rem 0.9rem;
    }

    .hero-nameplate-kicker {
        font-size: clamp(0.56rem, 2.2vw, 0.66rem);
        letter-spacing: 0.16em;
    }

    .hero-nameplate-title {
        margin-top: 0;
        font-size: clamp(0.95rem, 4.4vw, 1.3rem);
        white-space: nowrap;
    }

    .hero-nameplate-lead {
        margin-top: 0;
        font-size: clamp(0.72rem, 3vw, 0.85rem);
    }
}