/* =============================================
   CREDITS PAGE — Cinematic Film Credits
   ============================================= */

/* --- Hero Header (kept) --- */
.credits-hero {
    position: relative;
    min-height: 40vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 20px 60px;
    background: linear-gradient(180deg, #000 0%, #0a0a0a 60%, #0a0a0a 100%);
}

.credits-hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(179, 15, 15, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.credits-hero h1 {
    font-family: 'Cinzel Decorative', 'Cinzel', serif;
    font-size: 4.5rem;
    font-weight: 700;
    margin: 0 0 20px;
    background: linear-gradient(135deg, #ffffff 0%, #ff3333 60%, #b30f0f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.1em;
    position: relative;
    z-index: 1;
}

.credits-hero p {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-size: 1.35rem;
    color: #888;
    max-width: 600px;
    line-height: 1.6;
    position: relative;
    z-index: 1;
    font-style: italic;
}

/* Hero bg always visible — only children animate */
.credits-hero.fade-in {
    opacity: 1;
    transform: none;
}

.credits-hero.fade-in>* {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s ease;
}

.credits-hero.fade-in.visible>* {
    opacity: 1;
    transform: translateY(0);
}

.credits-divider {
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #b30f0f, transparent);
    margin: 30px auto 0;
    position: relative;
    z-index: 1;
}

/* --- Cinematic Credits Section --- */
.credits-section {
    background: linear-gradient(180deg, #0a0a0a 0%, #0a0a0a 85%, #111 100%);
    padding: 60px 0 100px;
}

/* --- Central timeline spine --- */
.credits-timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 40px;
}

.credits-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: linear-gradient(180deg, transparent 0%, rgba(179, 15, 15, 0.3) 10%, rgba(179, 15, 15, 0.3) 90%, transparent 100%);
    transform: translateX(-50%);
}

/* --- Individual Credit Block --- */
.credit-block {
    display: flex;
    align-items: flex-start;
    margin-bottom: 70px;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
}

.credit-block.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Timeline dot --- */
.credit-block::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 8px;
    width: 10px;
    height: 10px;
    background: #b30f0f;
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 12px rgba(179, 15, 15, 0.5);
    z-index: 2;
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.credit-block:hover::before {
    box-shadow: 0 0 25px rgba(255, 50, 50, 0.8);
    transform: translateX(-50%) scale(1.4);
}

/* --- Even blocks: content LEFT --- */
.credit-block:nth-child(even) {
    justify-content: flex-start;
}

.credit-block:nth-child(even) .credit-content {
    width: 44%;
    text-align: right;
    padding-right: 50px;
}

/* --- Odd blocks: content RIGHT --- */
.credit-block:nth-child(odd) {
    justify-content: flex-end;
}

.credit-block:nth-child(odd) .credit-content {
    width: 44%;
    text-align: left;
    padding-left: 50px;
}

/* --- Content container --- */
.credit-content {
    position: relative;
    transition: transform 0.4s ease;
}

.credit-block:hover .credit-content {
    transform: translateY(-4px);
}

/* --- Section Title --- */
.credit-title {
    font-family: 'Bebas Neue', 'Oswald', sans-serif;
    font-size: 1.8rem;
    color: #b30f0f;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin: 0 0 16px;
    position: relative;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.credit-block:hover .credit-title {
    color: #e84040;
    text-shadow: 0 0 20px rgba(255, 50, 50, 0.3);
}

/* --- Thin line under title --- */
.credit-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: rgba(179, 15, 15, 0.5);
    margin-top: 10px;
    transition: width 0.4s ease;
}

.credit-block:nth-child(even) .credit-title::after {
    margin-left: auto;
}

.credit-block:hover .credit-title::after {
    width: 70px;
    background: rgba(255, 50, 50, 0.7);
}

/* --- People List --- */
.credit-people {
    list-style: none;
    padding: 0;
    margin: 0;
}

.credit-people li {
    margin-bottom: 14px;
}

.credit-people li:last-child {
    margin-bottom: 0;
}

/* --- Person Name --- */
.credit-name {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #f0f0f0;
    display: block;
    letter-spacing: 0.03em;
    transition: color 0.3s ease;
}

.credit-block:hover .credit-name {
    color: #fff;
}

/* --- Role Description --- */
.credit-role {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-size: 1rem;
    color: #666;
    font-style: italic;
    display: block;
    margin-top: 2px;
    transition: color 0.3s ease;
}

.credit-block:hover .credit-role {
    color: #888;
}

/* --- Plain text items (no name/role pair) --- */
.credit-people li.credit-text-item {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-size: 1rem;
    color: #888;
    line-height: 1.55;
    font-style: italic;
}

/* --- Role Tags (for the lead developer card) --- */
.credit-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.credit-block:nth-child(even) .credit-tags {
    justify-content: flex-end;
}

.credit-tag {
    display: inline-block;
    font-family: 'Bebas Neue', 'Oswald', sans-serif;
    font-size: 0.7rem;
    color: #999;
    background: rgba(179, 15, 15, 0.1);
    border: 1px solid rgba(179, 15, 15, 0.2);
    padding: 3px 10px;
    border-radius: 3px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.credit-block:hover .credit-tag {
    background: rgba(179, 15, 15, 0.2);
    border-color: rgba(255, 50, 50, 0.35);
    color: #ccc;
}

.credits-timeline hr,
.credit-block hr {
    border: 1px solid rgba(179, 15, 15, 0.2);
    margin: 10px 0;
    width: 100%;
    opacity: 0.5;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
    .credits-hero {
        min-height: 30vh;
        padding: 100px 20px 40px;
    }

    .credits-hero h1 {
        font-size: 2.5rem;
        letter-spacing: 0.05em;
    }

    .credits-hero p {
        font-size: 1.1rem;
    }

    /* Stack vertically on mobile, no timeline */
    .credits-timeline::before {
        left: 20px;
    }

    .credit-block::before {
        left: 20px;
    }

    .credit-block:nth-child(even),
    .credit-block:nth-child(odd) {
        justify-content: flex-start;
    }

    .credit-block:nth-child(even) .credit-content,
    .credit-block:nth-child(odd) .credit-content {
        width: calc(100% - 50px);
        text-align: left;
        padding-left: 40px;
        padding-right: 0;
    }

    .credit-block:nth-child(even) .credit-title::after {
        margin-left: 0;
    }

    .credit-block:nth-child(even) .credit-tags {
        justify-content: flex-start;
    }

    .credit-block {
        margin-bottom: 50px;
    }

    .credits-timeline {
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .credits-hero h1 {
        font-size: 2rem;
    }

    .credits-hero p {
        font-size: 1rem;
    }

    .credit-title {
        font-size: 1.4rem;
    }

    .credit-name {
        font-size: 1.15rem;
    }
}