/* npc.quest - Corporate RPG Timeline */
/* Colors: #1A1A30, #7A3A90, #1C1C34, #7A7890, #2AB87A, #3A7A90, #3A6AD4, #141428 */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Rubik', sans-serif;
    color: #E0E0F0;
    background-color: #141428;
    overflow-x: hidden;
}

/* City Background */
.city-bg {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 250px;
    z-index: 0;
    pointer-events: none;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    padding: 0 5%;
}

.building {
    background: rgba(26, 26, 48, 0.5);
    border-top: 1px solid rgba(122, 120, 144, 0.08);
}

.b1 { width: 40px; height: 120px; }
.b2 { width: 55px; height: 180px; }
.b3 { width: 35px; height: 90px; }
.b4 { width: 60px; height: 200px; }
.b5 { width: 45px; height: 140px; }
.b6 { width: 50px; height: 160px; }
.b7 { width: 38px; height: 100px; }
.b8 { width: 58px; height: 190px; }

/* Hero */
.hero {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    padding: 40px 20px;
}

.hero-title {
    font-family: 'Bungee', cursive;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 400;
    letter-spacing: 0.05em;
    text-align: center;
    line-height: 1.2;
}

.hero-title span {
    display: inline-block;
    transition: color 0.3s ease;
}

.hero-subtitle {
    font-family: 'VT323', monospace;
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: #7A7890;
    margin-top: 16px;
    min-height: 1.5em;
}

/* Timeline Container */
.timeline-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px 100px;
    z-index: 1;
}

/* Timeline Spine */
.timeline-spine {
    position: absolute;
    left: 50%;
    top: 0;
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, #7A3A90, #2AB87A, #3A6AD4, #3A7A90, #7A3A90);
    transform: translateX(-50%);
    transition: height 2s ease;
    z-index: 0;
}

.timeline-spine.drawn {
    height: 100%;
}

/* Timeline Entry */
.timeline-entry {
    position: relative;
    width: 45%;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-entry.visible {
    opacity: 1;
    transform: translateY(0);
}

.entry-left {
    margin-right: auto;
    padding-right: 40px;
}

.entry-right {
    margin-left: auto;
    padding-left: 40px;
}

/* Timeline Node */
.timeline-node {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    top: 24px;
    z-index: 2;
    border: 2px solid #141428;
}

.entry-left .timeline-node {
    right: -47px;
}

.entry-right .timeline-node {
    left: -47px;
}

/* NPC Card */
.npc-card {
    background: rgba(28, 28, 52, 0.9);
    border: 2px solid rgba(122, 120, 144, 0.15);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    gap: 16px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* NPC Portrait */
.npc-portrait {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.portrait-initial {
    font-family: 'Bungee', cursive;
    font-size: 28px;
    color: rgba(255, 255, 255, 0.9);
}

/* NPC Info */
.npc-info {
    flex: 1;
    min-width: 0;
}

.npc-name {
    font-family: 'Bungee', cursive;
    font-size: 1.1rem;
    font-weight: 400;
    color: #E0E0F0;
    margin-bottom: 4px;
}

.npc-class {
    font-family: 'VT323', monospace;
    font-size: 14px;
    color: #7A7890;
    display: block;
    margin-bottom: 8px;
}

.npc-bio {
    font-family: 'Rubik', sans-serif;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #7A7890;
    margin-bottom: 12px;
}

/* Quest Status */
.quest-status {
    padding-top: 8px;
    border-top: 1px solid rgba(122, 120, 144, 0.1);
}

.quest-label {
    font-family: 'VT323', monospace;
    font-size: 13px;
    color: #E0E0F0;
    display: block;
    margin-bottom: 6px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(122, 120, 144, 0.15);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1.5s ease;
    width: 0 !important;
}

.timeline-entry.visible .progress-fill {
    width: attr(style width) !important;
}

.progress-text {
    font-family: 'VT323', monospace;
    font-size: 12px;
    color: #3A7A90;
}

/* Responsive */
@media (max-width: 768px) {
    .timeline-entry {
        width: 85%;
        margin-left: 15% !important;
        margin-right: 0 !important;
        padding-left: 30px !important;
        padding-right: 0 !important;
    }

    .timeline-spine {
        left: 10%;
    }

    .timeline-node {
        left: -37px !important;
        right: auto !important;
    }

    .npc-card {
        flex-direction: column;
    }
}
