/* Explain: Styles for the Souls-like genre section with fire and ember effects. */
.souls-section {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-top: 1px solid var(--border-color);
    background:
        radial-gradient(circle at 78% -14%, rgba(224, 158, 74, 0.16), transparent 56%),
        radial-gradient(circle at 50% 122%, rgba(150, 58, 18, 0.3), transparent 60%),
        #0a0705;
}

.souls-sun {
    position: absolute;
    top: -22%;
    right: -8%;
    z-index: 1;
    width: clamp(240px, 58vw, 760px);
    aspect-ratio: 1;
    pointer-events: none;
    background: radial-gradient(circle, rgba(255, 214, 142, 0.24), rgba(255, 158, 68, 0.1) 40%, transparent 68%);
    animation: souls-sun 11s ease-in-out infinite;
}

@keyframes souls-sun {
    0%,
    100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.06);
    }
}

.souls-fire {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    height: 46%;
    pointer-events: none;
    background: linear-gradient(180deg, transparent, rgba(160, 62, 20, 0.2) 58%, rgba(206, 96, 30, 0.36));
    mix-blend-mode: screen;
    animation: souls-flicker 6s ease-in-out infinite;
}

.souls-fire::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(34% 72% at 20% 104%, rgba(255, 158, 56, 0.5), transparent 72%),
        radial-gradient(28% 62% at 50% 106%, rgba(255, 196, 104, 0.44), transparent 74%),
        radial-gradient(32% 68% at 80% 104%, rgba(255, 138, 44, 0.46), transparent 72%);
    animation: souls-flame 8s ease-in-out infinite;
}

@keyframes souls-flicker {
    0%,
    100% {
        opacity: 0.78;
    }
    22% {
        opacity: 1;
    }
    46% {
        opacity: 0.84;
    }
    70% {
        opacity: 0.96;
    }
}

@keyframes souls-flame {
    0%,
    100% {
        transform: translate3d(-2%, 1%, 0) scaleY(1);
    }
    50% {
        transform: translate3d(2%, -1.5%, 0) scaleY(1.08);
    }
}

.souls-embers {
    position: absolute;
    inset: 0;
    z-index: 3;
    overflow: hidden;
    pointer-events: none;
}

.souls-embers::before,
.souls-embers::after {
    content: "";
    position: absolute;
    right: -10%;
    bottom: -12%;
    left: -10%;
    height: 70%;
    background-repeat: repeat;
    background-size: 260px 340px;
    animation: souls-rise 13s linear infinite;
}

.souls-embers::before {
    background-image:
        radial-gradient(2.4px 2.4px at 16% 92%, rgba(255, 190, 104, 0.95), transparent 70%),
        radial-gradient(2px 2px at 44% 80%, rgba(255, 146, 62, 0.85), transparent 70%),
        radial-gradient(3px 3px at 70% 90%, rgba(255, 214, 148, 0.9), transparent 70%),
        radial-gradient(2px 2px at 86% 72%, rgba(255, 166, 78, 0.8), transparent 70%),
        radial-gradient(2.6px 2.6px at 30% 62%, rgba(255, 202, 128, 0.7), transparent 70%);
}

.souls-embers::after {
    background-size: 340px 420px;
    animation-duration: 19s;
    animation-delay: -6s;
    opacity: 0.75;
    background-image:
        radial-gradient(2px 2px at 22% 88%, rgba(255, 176, 92, 0.8), transparent 70%),
        radial-gradient(2.6px 2.6px at 58% 74%, rgba(255, 206, 132, 0.72), transparent 70%),
        radial-gradient(1.8px 1.8px at 78% 92%, rgba(255, 150, 64, 0.75), transparent 70%),
        radial-gradient(2.2px 2.2px at 12% 66%, rgba(255, 196, 116, 0.66), transparent 70%);
}

@keyframes souls-rise {
    0% {
        transform: translate3d(0, 16%, 0);
        opacity: 0;
    }
    12% {
        opacity: 1;
    }
    80% {
        opacity: 0.8;
    }
    100% {
        transform: translate3d(0, -112%, 0);
        opacity: 0;
    }
}

.souls-section > .shell {
    position: relative;
    z-index: 5;
}

.souls-lead {
    margin-top: 1.25rem;
    padding-left: 1rem;
    border-left: 2px solid rgba(224, 148, 66, 0.7);
    color: var(--bone-color);
    font-family: var(--font-heading);
    font-size: 1.08rem;
    line-height: 1.6;
}

.souls-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
    border: 1px solid var(--border-color);
    background: var(--border-color);
}

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

.souls-shot {
    position: relative;
    overflow: hidden;
    background: #0b0806;
}

.souls-shot img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center;
    filter: saturate(0.82) contrast(1.06) brightness(0.92);
    transition: transform 0.7s ease, filter 0.7s ease;
}

.souls-shot:hover img {
    transform: scale(1.04);
    filter: saturate(1) contrast(1.06) brightness(1.02);
}

.souls-shot figcaption {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 1.6rem 1rem 0.85rem;
    background: linear-gradient(180deg, transparent, rgba(6, 4, 3, 0.92));
    color: var(--primary-color);
    font-size: 0.6rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.souls-library {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (min-width: 768px) {
    .souls-library {
        grid-template-columns: minmax(0, 190px) 1fr;
        align-items: center;
        gap: 2rem;
    }
}

.souls-library__frame {
    width: min(100%, 200px);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #0b0806;
    box-shadow: 0 24px 50px -34px #000;
}

.souls-library__frame img {
    display: block;
    width: 100%;
    height: auto;
}

.souls-sound {
    display: grid;
    gap: 1.25rem;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    background: linear-gradient(180deg, var(--surface-raised), var(--surface-color));
}

@media (min-width: 768px) {
    .souls-sound {
        grid-template-columns: 1.15fr 0.85fr;
        align-items: center;
        gap: 1.75rem;
        padding: 1.5rem;
    }
}

.souls-sound__frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border: 1px solid var(--border-color);
    background: #05060a;
}

.souls-sound__frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.souls-cover {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: #05060a;
    cursor: pointer;
    overflow: hidden;
}

.souls-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.9) brightness(0.82) contrast(1.05);
    transition: transform 0.6s ease, filter 0.6s ease;
}

.souls-cover:hover img {
    transform: scale(1.03);
    filter: saturate(1) brightness(0.98) contrast(1.05);
}

.souls-cover__play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.souls-cover__play i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.4rem;
    height: 3.4rem;
    padding-left: 0.18rem;
    border: 1px solid var(--bone-color);
    border-radius: 50%;
    background: rgba(6, 6, 8, 0.62);
    color: var(--bone-color);
    font-size: 1rem;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

.souls-cover:hover .souls-cover__play i {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #0a0a0b;
    transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
    .souls-sun,
    .souls-fire,
    .souls-fire::before,
    .souls-embers::before,
    .souls-embers::after {
        animation: none;
    }

    .souls-embers::before,
    .souls-embers::after {
        opacity: 0.35;
    }

    .souls-shot:hover img {
        transform: none;
    }
}