/* ================================================================
   PPUZZL.WORKS - Bauhaus Timeline Design
   ================================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'IBM Plex Serif', serif;
    background-color: #F1FAEE;
    color: #1B2838;
    line-height: 1.6;
    letter-spacing: 0.3px;
}

/* ================================================================
   TIMELINE CONTAINER & AXIS
   ================================================================ */

.timeline-container {
    position: relative;
    width: 100%;
    min-height: 800vh;
    padding: 80px 20px;
}

.timeline-axis {
    position: fixed;
    left: 50%;
    top: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, #3A506B, #457B9D, #6B8299);
    transform: translateX(-50%);
    z-index: 1;
}

/* Draw animation for timeline axis */
@keyframes axisGrow {
    from {
        height: 0;
    }
    to {
        height: 100%;
    }
}

/* ================================================================
   ORIGIN NODE (Wordmark Circle)
   ================================================================ */

.timeline-origin {
    position: fixed;
    top: 15vh;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: 100%;
    height: 20vh;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.origin-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #457B9D, #3A506B);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(13, 27, 42, 0.2);
    border: 2px solid #F4D35E;
}

.wordmark {
    font-family: 'Archivo Black', sans-serif;
    font-size: clamp(0.6rem, 2vw, 1.2rem);
    color: #F1FAEE;
    text-align: center;
    font-weight: 400;
    letter-spacing: 1px;
    line-height: 1.2;
    text-transform: uppercase;
}

/* ================================================================
   TIMELINE CARDS
   ================================================================ */

.timeline-card {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin-bottom: 300px;
    opacity: 0;
    animation: fadeInCard 0.8s ease-out forwards;
}

@keyframes fadeInCard {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-card[data-node="1"] { animation-delay: 0.1s; }
.timeline-card[data-node="2"] { animation-delay: 0.15s; }
.timeline-card[data-node="3"] { animation-delay: 0.2s; }
.timeline-card[data-node="4"] { animation-delay: 0.25s; }
.timeline-card[data-node="5"] { animation-delay: 0.3s; }
.timeline-card[data-node="6"] { animation-delay: 0.35s; }
.timeline-card[data-node="7"] { animation-delay: 0.4s; }
.timeline-card[data-node="8"] { animation-delay: 0.45s; }

/* Left cards */
.card-left {
    margin-left: auto;
    margin-right: 52%;
    padding-right: 40px;
}

@media (max-width: 768px) {
    .card-left {
        margin-right: auto;
        margin-left: 0;
        padding-right: 20px;
        padding-left: 20px;
    }
}

/* Right cards */
.card-right {
    margin-left: 52%;
    margin-right: auto;
    padding-left: 40px;
}

@media (max-width: 768px) {
    .card-right {
        margin-left: auto;
        margin-right: 0;
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Card container */
.timeline-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.card-left {
    flex-direction: row;
}

.card-right {
    flex-direction: row-reverse;
}

@media (max-width: 768px) {
    .card-left,
    .card-right {
        flex-direction: column;
        max-width: 100%;
    }
}

/* ================================================================
   CARD GEOMETRIC (SVG Compositions)
   ================================================================ */

.card-geometric {
    flex-shrink: 0;
    width: 140px;
    height: 140px;
    border-radius: 8px;
    background: #FFFFFF;
    border: 2px solid #3A506B;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(13, 27, 42, 0.1);
    position: relative;
    overflow: hidden;
}

.geometric-composition {
    width: 100%;
    height: 100%;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ================================================================
   CARD CONTENT
   ================================================================ */

.card-content {
    flex: 1;
    padding: 24px;
    background: #FFFFFF;
    border-radius: 8px;
    position: relative;
}

.card-content::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid #3A506B;
    border-radius: 8px;
    clip-path: inset(0 100% 100% 0);
    transition: clip-path 800ms cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.timeline-card.in-view .card-content::before {
    clip-path: inset(0 0 0 0);
}

.card-content h2 {
    font-family: 'Archivo Black', sans-serif;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: #457B9D;
    margin-bottom: 12px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-content p {
    font-family: 'IBM Plex Serif', serif;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    color: #3A506B;
    line-height: 1.7;
    font-weight: 400;
}

/* ================================================================
   TIMELINE NODE CONNECTORS (dots on axis)
   ================================================================ */

.timeline-card::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 80px;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #E63946;
    border: 3px solid #F1FAEE;
    box-shadow: 0 0 0 2px #3A506B;
    z-index: 5;
}

@media (max-width: 768px) {
    .timeline-card::after {
        left: 20px;
        transform: none;
    }
}

/* ================================================================
   SCROLL INTERACTION - BORDER ANIMATION
   ================================================================ */

/* Intersection Observer triggers 'in-view' class */
.timeline-card.in-view {
    animation: cardReveal 0.6s ease-out forwards;
}

@keyframes cardReveal {
    from {
        opacity: 0.5;
    }
    to {
        opacity: 1;
    }
}

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

@media (max-width: 768px) {
    .timeline-container {
        min-height: auto;
        padding: 60px 15px;
    }

    .timeline-origin {
        position: static;
        transform: none;
        margin-bottom: 40px;
    }

    .origin-circle {
        width: 100px;
        height: 100px;
    }

    .wordmark {
        font-size: 0.8rem;
    }

    .timeline-axis {
        left: 20px;
    }

    .timeline-card {
        margin-bottom: 200px;
    }

    .card-left,
    .card-right {
        padding-left: 0;
        padding-right: 0;
        margin-left: 0;
        margin-right: 0;
    }

    .card-geometric {
        width: 120px;
        height: 120px;
    }

    .card-content {
        padding: 20px;
    }

    .card-content h2 {
        font-size: 1.3rem;
    }

    .card-content p {
        font-size: 1rem;
    }
}

/* ================================================================
   DARK MODE SUPPORT (Optional)
   ================================================================ */

@media (prefers-color-scheme: dark) {
    body {
        background-color: #0D1B2A;
        color: #F1FAEE;
    }

    .card-content {
        background: #1B2838;
        border-color: #457B9D;
    }

    .card-content h2 {
        color: #6B8299;
    }

    .card-content p {
        color: #B8C5D6;
    }

    .card-geometric {
        background: #0D1B2A;
        border-color: #457B9D;
    }
}

/* ================================================================
   UTILITY CLASSES
   ================================================================ */

.scroll-hidden {
    overflow: hidden;
}
