/* polytical.club - Mid-Century Lounge Timeline */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #1a1014;
    color: #e8dfd0;
    font-family: 'Source Serif 4', serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

/* Atomic Dots Background */
.atomic-dots {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, #2c1f24 3px, transparent 3px);
    background-size: 60px 60px;
}

/* Boomerang Scatter */
.boomerang-scatter {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.boomerang {
    position: absolute;
    width: 30px;
    height: 16px;
}

.b1 { top: 12%; left: 8%; transform: rotate(25deg); }
.b2 { top: 28%; right: 12%; transform: rotate(-40deg); }
.b3 { top: 45%; left: 15%; transform: rotate(70deg); }
.b4 { top: 62%; right: 8%; transform: rotate(-15deg); }
.b5 { top: 78%; left: 6%; transform: rotate(50deg); }
.b6 { top: 90%; right: 18%; transform: rotate(-65deg); }

/* Lounge Header */
.lounge-header {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    overflow: hidden;
}

.velvet-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #8b1a2b 0%, #1a1014 60%, #1a1014 100%);
    opacity: 0.6;
    z-index: 0;
}

.header-rule {
    width: 0;
    height: 2px;
    background: #d4a853;
    position: relative;
    z-index: 1;
    transition: width 1.2s ease;
}

.header-rule.animate {
    width: min(700px, 80vw);
}

.top-rule {
    margin-bottom: 24px;
}

.bottom-rule {
    margin-top: 24px;
}

.lounge-title {
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #e8dfd0;
    position: relative;
    z-index: 1;
    overflow: hidden;
    white-space: nowrap;
}

.lounge-title .char {
    display: inline-block;
    opacity: 0;
    transition: opacity 0.1s ease;
}

.lounge-title .char.visible {
    opacity: 1;
}

.lounge-title .cursor {
    display: inline-block;
    width: 2px;
    height: 0.8em;
    background: #d4a853;
    margin-left: 4px;
    vertical-align: middle;
    animation: blink-cursor 0.6s step-end infinite;
}

@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

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

/* Timeline Spine */
.timeline-spine {
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 0;
    background: #8b1a2b;
    transform: translateX(-50%);
    transition: height 0.05s linear;
    z-index: 1;
}

/* Timeline Entry */
.timeline-entry {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin-bottom: 120px;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.entry-left {
    flex-direction: row-reverse;
    transform: translateX(-40px);
}

.entry-right {
    transform: translateX(40px);
}

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

/* Timeline Node */
.timeline-node {
    position: absolute;
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.timeline-entry.visible .timeline-node {
    transform: translateX(-50%) scale(1);
}

.neon-shape {
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 0 12px #ff4f7b) drop-shadow(0 0 24px rgba(255, 79, 123, 0.4));
    animation: neon-pulse 3s ease-in-out infinite;
}

.timeline-entry:nth-child(2) .neon-shape { animation-delay: 0s; }
.timeline-entry:nth-child(3) .neon-shape { animation-delay: 0.6s; }
.timeline-entry:nth-child(4) .neon-shape { animation-delay: 1.2s; }
.timeline-entry:nth-child(5) .neon-shape { animation-delay: 1.8s; }
.timeline-entry:nth-child(6) .neon-shape { animation-delay: 2.4s; }

@keyframes neon-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Timeline Connector */
.timeline-connector {
    position: absolute;
    top: 18px;
    height: 2px;
    width: calc(50% - 40px);
    background: #8b1a2b;
    opacity: 0;
    transition: opacity 0.5s ease 0.2s;
    z-index: 1;
}

.connector-left {
    right: 50%;
    margin-right: 20px;
}

.connector-right {
    left: 50%;
    margin-left: 20px;
}

.timeline-entry.visible .timeline-connector {
    opacity: 1;
}

/* Timeline Panel */
.timeline-panel {
    width: calc(50% - 60px);
    background: #f5f0e6;
    border-radius: 8px;
    padding: 32px 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 2;
}

.panel-left {
    margin-right: auto;
    margin-left: 20px;
}

.panel-right {
    margin-left: auto;
    margin-right: 20px;
}

/* Crosshatch overlay for alternating panels */
.timeline-entry:nth-child(odd) .timeline-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(232, 223, 208, 0.08) 10px,
        rgba(232, 223, 208, 0.08) 11px
    );
    pointer-events: none;
}

.panel-date {
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-style: italic;
    font-size: 13px;
    color: #8b1a2b;
    display: block;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.panel-title {
    font-family: 'Commissioner', sans-serif;
    font-weight: 500;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    letter-spacing: 0.08em;
    color: #2c1f24;
    margin-bottom: 14px;
    overflow: hidden;
    white-space: nowrap;
}

.panel-title .char {
    display: inline-block;
    opacity: 0;
    transition: opacity 0.05s ease;
}

.panel-title .char.visible {
    opacity: 1;
}

.panel-title .cursor {
    display: inline-block;
    width: 2px;
    height: 0.8em;
    background: #d4a853;
    margin-left: 2px;
    vertical-align: middle;
    animation: blink-cursor 0.6s step-end infinite;
}

.panel-body {
    font-family: 'Source Serif 4', serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    color: #2c1f24;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.panel-body.visible {
    opacity: 1;
}

/* Timeline Terminus */
.timeline-terminus {
    position: relative;
    display: flex;
    justify-content: center;
    padding: 80px 0 40px;
}

.terminus-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #8b1a2b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 1.5s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.terminus-circle.expanded {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    background: linear-gradient(180deg, #8b1a2b 0%, #1a1014 100%);
}

.terminus-title {
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #d4a853;
    opacity: 0;
    transition: opacity 0.8s ease 1s;
    white-space: nowrap;
}

.terminus-circle.expanded .terminus-title {
    opacity: 1;
}

/* Hover States - Muted Plum */
.timeline-panel:hover {
    box-shadow: 0 6px 28px rgba(74, 48, 64, 0.25);
    border: 1px solid #4a3040;
}

/* Responsive */
@media (max-width: 700px) {
    .timeline-entry {
        flex-direction: column;
        align-items: center;
    }

    .entry-left,
    .entry-right {
        transform: translateY(20px);
    }

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

    .timeline-panel {
        width: 90%;
        margin: 30px auto 0;
    }

    .panel-left,
    .panel-right {
        margin-left: auto;
        margin-right: auto;
    }

    .timeline-connector {
        display: none;
    }

    .timeline-node {
        position: relative;
        left: auto;
        transform: scale(0);
    }

    .timeline-entry.visible .timeline-node {
        transform: scale(1);
    }

    .timeline-spine {
        left: 20px;
    }
}
