/* Timeline Component Styles */

/* --- Roadmap Header --- */
.roadmap-header {
    position: relative;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(180deg, #0a0015 0%, var(--color-bg-dark) 100%);
    border-bottom: 2px solid var(--color-accent);
}

.roadmap-header-scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 255, 0.03) 2px,
        rgba(0, 255, 255, 0.03) 4px
    );
    pointer-events: none;
    z-index: 1;
    animation: scanline-scroll 8s linear infinite;
}

.roadmap-header-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.roadmap-header-tag {
    display: block;
    font-family: 'Exo 2', monospace;
    font-size: 0.85rem;
    color: var(--color-accent);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

.roadmap-header-sub {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: var(--color-muted);
    letter-spacing: 6px;
    text-transform: uppercase;
    margin-top: 0.75rem;
}

/* --- Particle Background Wrapper --- */
.tl-wrapper {
    position: relative;
    background: linear-gradient(180deg, var(--color-bg-dark) 0%, #050a1a 40%, #0a0f2e 100%);
    overflow: hidden;
}

/* #particle-canvas styles in site.css */

/* --- Timeline Container --- */
.tl-container {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* ==============================
   TIMELINE LINE — energy flow
   ============================== */
.tl-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: rgba(251, 70, 228, 0.3);
    transform: translateX(-50%);
    overflow: hidden;
}

.tl-line-pulse {
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        transparent 0%,
        var(--color-primary) 30%,
        #fff 50%,
        var(--color-primary) 70%,
        transparent 100%
    );
    animation: line-energy 4s linear infinite;
}

@keyframes line-energy {
    0% { transform: translateY(0); }
    100% { transform: translateY(200%); }
}

/* ==============================
   TIMELINE ITEM
   ============================== */
.tl-item {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 100px;
    width: 100%;
}

.tl-item:last-child {
    margin-bottom: 0;
}

/* Left positioned items */
.tl-left {
    flex-direction: row;
    justify-content: flex-start;
}

.tl-left .tl-node {
    order: 2;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.tl-left .tl-card {
    order: 1;
    margin-right: 20%;
}

/* Right positioned items */
.tl-right {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

.tl-right .tl-node {
    order: 2;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.tl-right .tl-card {
    order: 1;
    margin-left: 20%;
}

/* ==============================
   TIMELINE NODE — rotating ring
   ============================== */
.tl-node {
    width: clamp(5em, 6vw, 8em);
    height: clamp(5em, 6vw, 8em);
    border-radius: 50%;
    background: rgba(0, 5, 15, 0.95);
    border: 2px solid var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    position: relative;
    box-shadow: 0 0 20px rgba(251, 70, 228, 0.4), inset 0 0 15px rgba(251, 70, 228, 0.15);
    transition: all 0.4s ease;
}

.tl-node i {
    font-size: clamp(2em, 3vw, 3.5em);
    color: var(--color-primary);
    filter: drop-shadow(0 0 5px var(--color-primary));
    transition: all 0.4s ease;
}

/* Rotating ring around node */
.tl-node-ring {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 1px dashed rgba(251, 70, 228, 0.25);
    animation: ring-rotate 20s linear infinite;
    pointer-events: none;
}

@keyframes ring-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Node state variants */
.tl-node.completed {
    border-color: #00ff88;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3), inset 0 0 15px rgba(0, 255, 136, 0.1);
}

.tl-node.completed i {
    color: #00ff88;
    filter: drop-shadow(0 0 5px rgba(0, 255, 136, 0.6));
}

.tl-node.completed .tl-node-ring {
    border-color: rgba(0, 255, 136, 0.2);
}

.tl-node.active {
    border-color: var(--color-accent);
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.5), 0 0 50px rgba(0, 255, 255, 0.2), inset 0 0 20px rgba(0, 255, 255, 0.15);
    animation: node-breathe 2s ease-in-out infinite;
}

.tl-node.active i {
    color: var(--color-accent);
    filter: drop-shadow(0 0 8px rgba(0, 255, 255, 0.8));
}

.tl-node.active .tl-node-ring {
    border-color: rgba(0, 255, 255, 0.4);
    border-style: solid;
    animation: ring-rotate 8s linear infinite;
}

@keyframes node-breathe {
    0%, 100% { box-shadow: 0 0 25px rgba(0, 255, 255, 0.5), 0 0 50px rgba(0, 255, 255, 0.2), inset 0 0 20px rgba(0, 255, 255, 0.15); }
    50% { box-shadow: 0 0 35px rgba(0, 255, 255, 0.7), 0 0 70px rgba(0, 255, 255, 0.3), inset 0 0 25px rgba(0, 255, 255, 0.2); }
}

.tl-node.upcoming {
    border-color: var(--color-muted);
    box-shadow: 0 0 10px rgba(176, 153, 255, 0.2);
}

.tl-node.upcoming i {
    color: var(--color-muted);
    filter: none;
}

.tl-node.upcoming .tl-node-ring {
    border-color: rgba(176, 153, 255, 0.15);
    animation-duration: 30s;
}

.tl-node.future {
    border-color: #8080ff;
    box-shadow: 0 0 10px rgba(128, 128, 255, 0.15);
}

.tl-node.future i {
    color: #8080ff;
    filter: none;
}

.tl-node.future .tl-node-ring {
    border-color: rgba(128, 128, 255, 0.1);
    animation: none;
}

/* ==============================
   TIMELINE CARD CONTENT
   ============================== */
.tl-tag {
    display: block;
    font-family: 'Exo 2', monospace;
    font-size: 0.65rem;
    letter-spacing: 3px;
    color: var(--color-accent);
    margin-bottom: 0.4rem;
    opacity: 0.5;
}

.tl-card h3 {
    font-family: 'Russo One', sans-serif;
    font-size: 1.4rem;
    color: #fff;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
    letter-spacing: 3px;
}

/* Blinking cursor for active phase */
.tl-cursor {
    animation: cursor-blink 1s step-end infinite;
    color: var(--color-accent);
}

@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* --- Status Badge --- */
.tl-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Exo 2', monospace;
    font-size: 0.7rem;
    letter-spacing: 2px;
    padding: 0.3rem 0.8rem;
    border-radius: 2px;
    border: 1px solid;
    margin-bottom: 0.75rem;
}

.tl-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tl-status-badge.completed {
    color: #00ff88;
    border-color: rgba(0, 255, 136, 0.3);
    background: rgba(0, 255, 136, 0.05);
}

.tl-status-badge.completed .tl-status-dot {
    background: #00ff88;
    box-shadow: 0 0 6px #00ff88;
}

.tl-status-badge.active {
    color: var(--color-accent);
    border-color: rgba(0, 255, 255, 0.4);
    background: rgba(0, 255, 255, 0.08);
}

.tl-status-badge.active .tl-status-dot {
    background: var(--color-accent);
    box-shadow: 0 0 6px var(--color-accent);
    animation: dot-pulse 1.5s ease-in-out infinite;
}

@keyframes dot-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.tl-status-badge.upcoming {
    color: var(--color-muted);
    border-color: rgba(176, 153, 255, 0.2);
    background: rgba(176, 153, 255, 0.03);
}

.tl-status-badge.upcoming .tl-status-dot {
    background: var(--color-muted);
    opacity: 0.5;
}

.tl-status-badge.future {
    color: #8080ff;
    border-color: rgba(128, 128, 255, 0.15);
    background: rgba(128, 128, 255, 0.03);
}

.tl-status-badge.future .tl-status-dot {
    background: #8080ff;
    opacity: 0.4;
}

/* --- Feature List --- */
.tl-features {
    list-style: none;
    padding: 0;
    margin: 0 0 0.75rem 0;
}

.tl-features li {
    font-family: 'Exo 2', sans-serif;
    font-size: 0.85rem;
    color: var(--color-muted);
    line-height: 1.6;
    padding-left: 1.2rem;
    position: relative;
}

.tl-features li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-family: 'Exo 2', monospace;
    opacity: 0.4;
}

/* --- Flavor text --- */
.tl-flavor {
    font-family: 'Exo 2', sans-serif;
    font-size: 0.8rem;
    color: var(--color-primary);
    font-style: italic;
    margin: 0;
    opacity: 0.7;
}

/* --- Card scanlines (completed phases) --- */
.tl-card-scanlines {
    position: absolute;
    inset: 5px;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(0, 255, 136, 0.02) 3px,
        rgba(0, 255, 136, 0.02) 6px
    );
    pointer-events: none;
    z-index: 1;
    border-radius: 8px;
}

/* ==============================
   BORDER CARD — clip-path panels
   ============================== */
.border-card {
    --border-gradient: linear-gradient(135deg, #FB46E4 0%, #9d00ff 50%, #00ffff 100%);
    --backgound-color: rgba(0, 5, 15, 0.95);
    position: relative;
    display: grid;
    padding: 2em;
    background: var(--border-gradient);
    isolation: isolate;
    border-radius: 10px;
    width: 50%;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.border-card:hover {
    transform: translateY(-4px);
}

/* Active card glow */
.border-card.active {
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.2), 0 0 60px rgba(0, 255, 255, 0.1);
}


.tl-left .border-card {
    margin-right: 50%;
    clip-path: polygon(80% 0, 100% 30%, 100% 60%, 80% 100%, 0 100%, 0 0);
}

.tl-right .border-card {
    margin-left: 50%;
    clip-path: polygon(0 30%, 20% 0%, 100% 0%, 100% 100%, 20% 100%, 0 60%);
}

.border-card::before,
.border-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
}

.border-card::before {
    background: var(--border-gradient);
    z-index: -2;
}

.border-card::after {
    inset: 4px;
    background: var(--backgound-color);
    z-index: -1;
    border-radius: 8px;
}

.tl-left .border-card::after {
    clip-path: polygon(80% 0, 100% 30%, 100% 60%, 80% 100%, 0 100%, 0 0);
}

.tl-right .border-card::after {
    clip-path: polygon(0 30%, 20% 0%, 100% 0%, 100% 100%, 20% 100%, 0 60%);
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 768px) {
    .tl-container {
        padding: 40px 15px;
        overflow-x: hidden;
    }

    .tl-line {
        left: 35px;
    }

    .tl-item {
        flex-direction: column !important;
        align-items: flex-start;
        padding-left: 80px;
        margin-bottom: 60px;
        max-width: 100%;
    }

    .tl-left .tl-node,
    .tl-right .tl-node {
        position: absolute;
        left: 35px;
        transform: translateX(-50%);
    }

    .tl-left .tl-card,
    .tl-right .tl-card {
        margin: 0;
        max-width: 100%;
    }

    .tl-left .border-card,
    .tl-right .border-card {
        width: calc(100% - 10px);
        max-width: 100%;
        margin: 0;
        clip-path: none;
        padding: 1.25em;
    }

    .tl-left .border-card::after,
    .tl-right .border-card::after {
        clip-path: none;
    }

    .tl-node {
        width: 55px;
        height: 55px;
    }

    .tl-node i {
        font-size: 1.4rem;
    }

    .tl-node-ring {
        inset: -5px;
    }

    .tl-features li {
        font-size: 0.8rem;
    }

    .tl-card h3 {
        font-size: 1.2rem;
        letter-spacing: 1px;
    }
}

@media (max-width: 480px) {
    .tl-container {
        padding: 30px 10px;
    }

    .tl-item {
        padding-left: 65px;
    }

    .tl-line {
        left: 25px;
    }

    .tl-left .tl-node,
    .tl-right .tl-node {
        left: 25px;
    }

    .tl-node {
        width: 45px;
        height: 45px;
    }

    .tl-node i {
        font-size: 1.1rem;
    }

    .tl-left .border-card,
    .tl-right .border-card {
        padding: 1em;
    }

    .tl-card h3 {
        font-size: 1rem;
    }

    .tl-features li {
        font-size: 0.75rem;
        padding-left: 1rem;
    }
}
