/* concurrent.day - High Contrast Duotone Brand */
/* Palette: #0f172a, #f8fafc, #6366f1, #e2e8f0, #1e293b */

:root {
    --dark: #0f172a;
    --light: #f8fafc;
    --indigo: #6366f1;
    --text-on-dark: #e2e8f0;
    --text-on-light: #1e293b;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--dark);
    color: var(--text-on-light);
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    line-height: 1.65;
    overflow-x: hidden;
}

/* ==========================================
   CENTRAL DASHED DIVIDER
   ========================================== */
.center-divider {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 100vh;
    background: repeating-linear-gradient(
        to bottom,
        var(--indigo) 0px,
        var(--indigo) 8px,
        transparent 8px,
        transparent 16px
    );
    z-index: 100;
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

.center-divider.hidden {
    opacity: 0;
}

/* ==========================================
   HERO SPLIT (0 - 100vh)
   ========================================== */
.hero-split {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
}

.split-pane {
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.split-dark {
    background: var(--dark);
    justify-content: flex-end;
}

.split-light {
    background: var(--light);
    justify-content: flex-start;
}

.hero-content {
    position: relative;
}

.hero-content-left {
    text-align: right;
    padding-right: 0;
}

.hero-content-right {
    text-align: left;
    padding-left: 0;
}

.brand-fragment {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 6.5rem);
    line-height: 1;
    display: block;
    letter-spacing: -0.02em;
}

.brand-on-dark {
    color: var(--text-on-dark);
}

.brand-on-light {
    color: var(--text-on-light);
}

.process-label {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hero-content-left .process-label {
    justify-content: flex-end;
}

.process-tag {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.5;
}

.split-dark .process-tag {
    color: var(--text-on-dark);
}

.split-light .process-tag {
    color: var(--text-on-light);
}

.process-status {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    padding: 0.15rem 0.5rem;
    border-radius: 2px;
}

.status-running {
    background: var(--indigo);
    color: #fff;
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Scroll indicator */
.hero-scroll-indicator {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 110;
    text-align: center;
    animation: scrollFloat 2.5s ease-in-out infinite;
}

.scroll-text {
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--indigo);
    display: block;
    margin-bottom: 0.5rem;
}

.scroll-arrow {
    width: 1px;
    height: 30px;
    background: var(--indigo);
    margin: 0 auto;
    position: relative;
}

.scroll-arrow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-right: 1px solid var(--indigo);
    border-bottom: 1px solid var(--indigo);
    transform: translateX(-50%) rotate(45deg);
}

@keyframes scrollFloat {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
    50% { transform: translateX(-50%) translateY(8px); opacity: 0.5; }
}

/* ==========================================
   PARALLEL SECTIONS
   ========================================== */
.parallel-section {
    padding: 4rem 0;
    position: relative;
}

/* Time Marker */
.time-marker {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 3rem;
    position: relative;
    z-index: 10;
}

.time-line {
    flex: 1;
    height: 1px;
    background: var(--indigo);
    opacity: 0.4;
}

.time-stamp {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: var(--indigo);
    letter-spacing: 0.15em;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Dual Grid */
.dual-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
}

.col-pane {
    padding: 3rem;
    position: relative;
}

.col-dark {
    background: var(--dark);
    color: var(--text-on-dark);
}

.col-light {
    background: var(--light);
    color: var(--text-on-light);
}

.col-inner {
    max-width: 420px;
}

.col-dark .col-inner {
    margin-left: auto;
}

.col-light .col-inner {
    margin-right: auto;
}

.col-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.col-text {
    font-size: 0.9rem;
    line-height: 1.75;
    opacity: 0.75;
    margin-bottom: 1rem;
}

.col-meta {
    display: flex;
    gap: 1.25rem;
    margin-top: 0.75rem;
}

.meta-item {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    opacity: 0.5;
    text-transform: uppercase;
}

/* Progress bars */
.progress-bar {
    width: 100%;
    height: 2px;
    background: rgba(99, 102, 241, 0.15);
    margin-top: 1rem;
    border-radius: 1px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--indigo);
    border-radius: 1px;
    transition: width 1.5s ease;
}

.progress-idle {
    width: 0%;
    animation: idlePulse 3s ease-in-out infinite;
}

@keyframes idlePulse {
    0% { width: 0%; opacity: 0.3; }
    50% { width: 15%; opacity: 0.7; }
    100% { width: 0%; opacity: 0.3; }
}

.progress-streaming {
    width: 70%;
    animation: streamPulse 2s ease-in-out infinite;
}

@keyframes streamPulse {
    0% { width: 65%; }
    50% { width: 80%; }
    100% { width: 65%; }
}

/* Lock indicator */
.lock-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.lock-icon {
    color: var(--indigo);
    font-size: 0.5rem;
    animation: lockBlink 1s ease-in-out infinite;
}

@keyframes lockBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}

.lock-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    color: var(--indigo);
    opacity: 0.7;
}

/* Exit badges */
.exit-badge {
    display: inline-block;
    margin-top: 1.25rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    padding: 0.3rem 0.75rem;
    border-radius: 2px;
}

.exit-success {
    background: rgba(99, 102, 241, 0.2);
    color: var(--indigo);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.exit-pending {
    background: rgba(99, 102, 241, 0.08);
    color: var(--indigo);
    border: 1px solid rgba(99, 102, 241, 0.15);
    animation: pendingPulse 2s ease-in-out infinite;
}

@keyframes pendingPulse {
    0%, 100% { border-color: rgba(99, 102, 241, 0.15); }
    50% { border-color: rgba(99, 102, 241, 0.5); }
}

/* ==========================================
   MERGE SECTION (280-340vh)
   ========================================== */
.merge-section {
    background: var(--indigo);
    color: #fff;
    text-align: center;
    padding: 8rem 2rem;
    position: relative;
    overflow: hidden;
}

.merge-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    pointer-events: none;
    animation: mergeGlowPulse 4s ease-in-out infinite;
}

@keyframes mergeGlowPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.5; }
}

.merge-content {
    position: relative;
    z-index: 2;
}

.merge-pulse-line {
    width: 60px;
    height: 2px;
    background: rgba(255, 255, 255, 0.5);
    margin: 0 auto 2.5rem;
    animation: mergePulse 2.5s ease-in-out infinite;
}

@keyframes mergePulse {
    0%, 100% { width: 60px; opacity: 1; }
    50% { width: 140px; opacity: 0.3; }
}

.merge-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(1.75rem, 4vw, 3rem);
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.merge-text {
    font-family: 'Work Sans', sans-serif;
    font-weight: 300;
    font-size: 1.05rem;
    max-width: 540px;
    margin: 0 auto;
    opacity: 0.85;
    line-height: 1.75;
}

.merge-timestamp {
    margin-top: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.merge-time {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    opacity: 0.6;
}

.merge-status {
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.2rem 0.6rem;
    border-radius: 2px;
}

.merge-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
}

.merge-stat {
    text-align: center;
}

.stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    display: block;
    line-height: 1;
}

.stat-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.5;
    margin-top: 0.4rem;
    display: block;
}

/* ==========================================
   RESOLUTION SECTION (340vh+)
   ========================================== */
.resolution-section {
    position: relative;
    min-height: 80vh;
}

.resolution-grid {
    min-height: 80vh;
}

.resolution-pane {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

.resolution-dark {
    background: var(--dark);
    color: var(--text-on-dark);
}

.resolution-expanding {
    width: 100%;
}

.resolution-inner {
    text-align: center;
    max-width: 560px;
    padding: 4rem 2rem;
}

.resolution-timestamp {
    margin-bottom: 2rem;
}

.resolution-timestamp .time-stamp {
    font-size: 0.85rem;
}

.resolution-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.resolution-text {
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    max-width: 480px;
    margin: 0 auto;
    opacity: 0.7;
    line-height: 1.75;
}

.resolution-final {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-top: 2.5rem;
}

.final-process {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.final-pid {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    opacity: 0.5;
}

.final-status {
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    padding: 0.2rem 0.6rem;
    border-radius: 2px;
}

.final-done {
    background: rgba(99, 102, 241, 0.25);
    color: var(--indigo);
}

.final-term {
    background: rgba(99, 102, 241, 0.12);
    color: var(--indigo);
    opacity: 0.7;
}

.resolution-time-final {
    margin-top: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.resolution-time-final .merge-time {
    color: var(--indigo);
    opacity: 0.5;
}

.resolution-time-final .merge-status {
    background: rgba(99, 102, 241, 0.15);
    color: var(--indigo);
}

/* ==========================================
   FADE IN ANIMATIONS
   ========================================== */
.fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.dual-grid .col-pane.fade-in:nth-child(2) {
    transition-delay: 0.15s;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .hero-split {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .split-pane {
        min-height: 50vh;
        justify-content: center;
    }

    .hero-content-left,
    .hero-content-right {
        text-align: center;
        padding: 0 2rem;
    }

    .hero-content-left .process-label {
        justify-content: center;
    }

    .center-divider {
        left: 50%;
        width: 1px;
        opacity: 0.3;
    }

    .brand-fragment {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }

    .dual-grid {
        grid-template-columns: 1fr;
    }

    .col-inner {
        max-width: 100%;
        margin: 0;
    }

    .col-pane {
        padding: 2.5rem 2rem;
    }

    .time-marker {
        padding: 1.25rem 2rem;
    }

    .merge-stats {
        gap: 2rem;
    }

    .resolution-final {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .hero-scroll-indicator {
        display: none;
    }
}

@media (max-width: 480px) {
    .col-pane {
        padding: 2rem 1.5rem;
    }

    .time-marker {
        padding: 1rem 1.5rem;
    }

    .merge-section {
        padding: 5rem 1.5rem;
    }

    .resolution-inner {
        padding: 3rem 1.5rem;
    }
}
