/* ==========================================================================
   Life (dark album)
   ========================================================================== */
.section-title.section-title--on-dark {
    color: #fff;
}
.section-title.section-title--on-dark span{
color:var(--color-brand);
}
.life {
    position: relative;
    /* keeps the ::after vignette and .life__inner layered against each other
       and nothing outside the section */
    isolation: isolate;
    overflow: hidden;
    background: var(--color-darker);
    margin: 64px 0 0;
    padding: 72px 0 64px;
}

/* Edge vignette — decoration only, so it stays out of the markup. Sits above
   the glow (tree order) and below .life__inner (z-index). */
.life::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: radial-gradient(ellipse at center, transparent 52%, rgba(0, 0, 0, 0.5) 100%);
    pointer-events: none;
}

.life.is-cinema {
    position: fixed !important;
    inset: 0 !important;
    z-index: 999 !important;
    margin: 0 !important;
    overflow: auto !important;
    padding: 48px 0 !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.life__glow {
    position: absolute;
    left: 0;
    top: 0;
    width: 640px;
    height: 640px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(247, 72, 47, 0.32), transparent 65%);
    pointer-events: none;
    transform: translate(-9999px, -9999px);
    filter: blur(30px);
}

.life__inner {
    position: relative;
    z-index: 1;
    max-width: var(--page-max-width);
    margin: 0 auto;
    padding: 0 var(--page-gutter);
}

.life__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 38px;
}

.life__cinema-btn {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: var(--color-dark-surface);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.life__cinema-btn:hover {
    background: var(--color-dark-surface-hover);
}

.life__layout {
    display: flex;
    align-items: stretch;
    gap: 40px;
    flex-wrap: wrap;
}

.life__stage-col {
    flex: 1.4;
    min-width: 560px;
}

.life__stage {
    position: relative;
    height: 470px;
}

.life-card {
    position: absolute;
    left: 58%;
    top: 50%;
    z-index: 1;
    transition: transform 0.65s var(--ease-deck), opacity 0.5s;
    cursor: pointer;
    border: none;
    padding: 0;
    background: none;
}

/* Each card has its own hand-picked size, and starts fanned out to the left
   exactly as lifeCardTransform() in scripts/life.js would place it. From
   DOMContentLoaded on, positionLifeStage() writes z-index/transform inline
   as the album is browsed, so the transforms here only hold the pre-script
   layout — the sizes stay CSS-only. Adding a sixth card means adding a
   sixth block below. */
.life-card:nth-child(1) {
    width: 320px;
    height: 400px;
    z-index: 40;
    transform: translate(-50%, -50%);
}

.life-card:nth-child(2) {
    width: 300px;
    height: 350px;
    z-index: 39;
    transform: translate(calc(-50% - 180px), calc(-50% + 4px)) rotate(-6deg) scale(0.94);
}

.life-card:nth-child(3) {
    width: 335px;
    height: 380px;
    z-index: 38;
    transform: translate(calc(-50% - 360px), calc(-50% + 8px)) rotate(-12deg) scale(0.88);
}

.life-card:nth-child(4) {
    width: 295px;
    height: 335px;
    z-index: 37;
    transform: translate(calc(-50% - 540px), calc(-50% + 12px)) rotate(-18deg) scale(0.82);
}

.life-card:nth-child(5) {
    width: 325px;
    height: 405px;
    z-index: 36;
    transform: translate(calc(-50% - 720px), calc(-50% + 16px)) rotate(-24deg) scale(0.76);
}

.life-card__frame {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: #1C1D26;
    box-shadow: var(--shadow-life);
    transition: transform 0.35s;
}

.life-card:hover .life-card__frame {
    transform: scale(1.04) rotate(-1deg);
}

.life-card__media {
    position: absolute;
    inset: 0;
}

.life-card__media img,
.life-card__media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* The photo itself opens the event modal, the rest of the card just selects it. */
.life-card__image {
    cursor: zoom-in;
}

.life-card__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 36px 12px 10px;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    pointer-events: none;
}

.life-card__date {
    font-weight: 700;
    font-size: 11.5px;
    color: #fff;
}

.life-card__type {
    font-weight: 600;
    font-size: 10.5px;
    color: rgba(255, 255, 255, 0.78);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.life__controls {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 26px;
}

.life__nav-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 17px;
    cursor: pointer;
    transition: all 0.2s;
}

.life__nav-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.life__nav-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.life__counter {
    font-weight: 700;
    font-size: 13px;
    color: var(--color-text-on-dark-muted);
    letter-spacing: 2px;
    margin-left: 6px;
}

.life__detail {
    flex: 1;
    min-width: 300px;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.life__detail-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.tag {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.08);
    color: #D8D8DC;
    font-weight: 700;
    font-size: 11.5px;
}

.tag--accent {
    background: rgba(247, 72, 47, 0.16);
    color: var(--color-brand);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.life__detail-title {
    margin: 0;
    font-weight: 800;
    font-size: 28px;
    line-height: 1.12;
    letter-spacing: -0.5px;
    color: #fff;
}

.life__detail-text {
    margin: 14px 0 0;
    font-weight: 500;
    font-size: 15px;
    line-height: 1.55;
    color: var(--color-text-on-dark-secondary);
}

.life__detail-cta {
    margin-top: 24px;
}

/* ---- Responsive ------------------------------------------------------------ */

@media (max-width: 900px) {
    .life__stage-col {
        min-width: 100%;
    }
}

/* Cinema mode pins .life at z-index 999, so the event modal (.modal is 200)
   has to outrank it or it opens underneath. Doubled class beats plain .modal
   regardless of which component stylesheet loads last. */
.modal.modal--event {
    z-index: 1000;
}

.event-detail__media .event-detail__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.event-detail__media .event-detail__image[hidden],
.event-detail__media .media-placeholder[hidden] {
    display: none;
}
