/* The SVG Thread Motif */

.thread-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.thread-path {
    fill: none;
    stroke: var(--color-gold);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.7;
    
    /* Animation base - will be controlled by JS for scroll */
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 0.1s ease-out;
}

/* For simple CSS-only animation if JS is off */
@keyframes drawThread {
    to {
        stroke-dashoffset: 0;
    }
}

.animate-draw {
    animation: drawThread 3s ease-out forwards;
}

/* Page transitions */
.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--color-ink);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.page-transition-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.transition-thread {
    width: 100%;
    height: 2px;
    background: var(--color-gold);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform var(--transition-slow);
}

.page-transition-overlay.active .transition-thread {
    transform: scaleX(1);
}
