/* css/founder.css */

:root {
    --grid-color: rgba(0, 0, 0, 0.08);
}

/* --- SECTION CONTAINER --- */
.founder-section {
    position: relative;
    /* Large height to accommodate the long horizontal scroll */
    height: 500vh; 
    z-index: 80;
    
    /* Pull the section up to overlap the previous Quote section completely */
    margin-top: -100vh;
    
    /* Ensure clicks pass through to the quote section until this becomes opaque */
    pointer-events: none; 
}

/* --- STICKY VIEWPORT --- */
.founder-sticky-wrapper {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    
    /* CHANGED: Align from top so we can position title/timeline precisely */
    justify-content: flex-start;
    padding-top: 15vh;
    
    /* Start transparent */
    background-color: var(--bg-bone);
    opacity: 0; 
    
    /* Improve performance */
    will-change: opacity, transform;
}

/* --- ACTIVE STATE (Applied by JS) --- */
.founder-section.is-active {
    pointer-events: auto; /* Re-enable clicks once visible */
}

/* --- STATIC GRID BACKGROUND --- */
.founder-grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 1;
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

/* --- TITLE & SUBTITLE --- */
.founder-title-wrapper {
    position: absolute;
    /* Fixed near top */
    top: 10%;
    left: 5%;
    z-index: 10;
}

.founder-title {
    font-family: 'Syncopate', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 5rem);
    text-transform: uppercase;
    color: var(--text-dark);
    margin: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.founder-title.visible {
    opacity: 1;
    transform: translateY(0);
}

/* NEW: Subtitle Styling */
.founder-subtitle {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
    letter-spacing: 0.1em;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.founder-subtitle.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- HORIZONTAL TIMELINE TRACK --- */
.timeline-track-container {
    position: absolute;
    top: 80%; 
    left: 0;
    width: 100%;
    height: 2px;
    display: flex;
    align-items: center;
    z-index: 5;
    
    /* CHANGED: Start off-screen to the RIGHT (100vw) */
    transform: translateX(100vw); 
    will-change: transform;
}

/* The Continuous Line */
.timeline-line {
    position: absolute;
    top: 0;
    left: 0;
    height: 2px;
    background-color: var(--text-dark);
    /* Extra long width to cover all scrolling */
    width: 10000vw; 
    z-index: 4;
}

.timeline-items-wrapper {
    display: flex;
    align-items: center;
    /* Padding prevents first item from sticking to the very start of the line */
    padding-left: 5vw; 
    gap: 30vw; 
    
    /* Important: allows JS to calculate true width */
    width: max-content; 
}

/* --- EVENT CARD --- */
.t-event {
    position: relative;
    width: 400px;
    flex-shrink: 0;
    z-index: 10;
}

.t-dot {
    position: absolute;
    top: 50%; 
    left: -20px;
    width: 12px;
    height: 12px;
    background-color: var(--text-dark);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 15;
}

.t-connector {
    position: absolute;
    top: -50px; 
    left: -20px;
    width: 2px;
    height: 50px;
    background-color: var(--text-dark);
}

.t-card {
    position: relative;
    /* CHANGED: Moves the card UP relative to the track line */
    /* Since track is at 60%, this puts the card in the visual center */
    top: -280px; 
    
    background: #fff;
    border: 1px solid rgba(0,0,0,0.1);
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.t-card:hover {
    transform: translateY(-5px);
}

.t-image-container {
    width: 100%;
    height: 200px;
    background-color: #e0e0e0;
    margin-bottom: 1rem;
    overflow: hidden;
    position: relative;
}

.t-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.t-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0.5rem;
    display: block;
}

.t-title {
    font-family: 'Syncopate', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.t-desc {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.t-link {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text-dark);
    border-bottom: 1px solid var(--text-dark);
    padding-bottom: 2px;
    transition: all 0.2s;
}

.t-link:hover {
    opacity: 0.6;
}

/* --- STEALTH STARTUP STYLING --- */
.t-event.stealth .t-card {
    background: #111;
    border: 1px solid #333;
    color: #fff;
}

.t-event.stealth .t-title {
    color: var(--accent-lime);
    text-shadow: 0 0 10px rgba(212, 255, 0, 0.5);
}

.t-event.stealth .t-desc {
    color: var(--text-light);
    background: repeating-linear-gradient(
        45deg,
        rgba(255,255,255,0.05),
        rgba(255,255,255,0.05) 10px,
        rgba(255,255,255,0) 10px,
        rgba(255,255,255,0) 20px
    );
}

.t-event.stealth .t-link {
    color: var(--text-light);
    border-bottom: 1px solid var(--text-light);
}

.t-event.stealth .t-image-container {
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stealth-blur {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.2), transparent);
    filter: blur(15px);
    opacity: 0.5;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.3; }
    50% { opacity: 0.6; }
    100% { opacity: 0.3; }
}

@media (max-width: 768px) {
    .t-card {
        width: 300px;
        top: -240px;
    }
    .timeline-items-wrapper {
        gap: 20vw;
    }
}