/* === concurrent.day styles === */
/* Colors: #1E2028 bg, #2E3038 grid, #3E4048 major grid, #7A9E8A primary, #C87A4A secondary, #5A8AB0 tertiary, #E8E4DA text, #8A8890 meta, #B85A5A alert */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #1E2028;
    color: #E8E4DA;
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
    line-height: 1.8;
    overflow-x: hidden;
    position: relative;
}

/* Grid-Line Background - 96px engineering graph paper */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background:
        repeating-linear-gradient(
            to right,
            transparent,
            transparent 95px,
            rgba(46, 48, 56, 0.6) 95px,
            rgba(46, 48, 56, 0.6) 96px
        ),
        repeating-linear-gradient(
            to bottom,
            transparent,
            transparent 95px,
            rgba(46, 48, 56, 0.6) 95px,
            rgba(46, 48, 56, 0.6) 96px
        ),
        repeating-linear-gradient(
            to right,
            transparent,
            transparent 383px,
            rgba(62, 64, 72, 0.8) 383px,
            rgba(62, 64, 72, 0.8) 384px
        ),
        repeating-linear-gradient(
            to bottom,
            transparent,
            transparent 383px,
            rgba(62, 64, 72, 0.8) 383px,
            rgba(62, 64, 72, 0.8) 384px
        );
}

body > * {
    position: relative;
    z-index: 1;
}

/* === Status Bar === */
#status-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 36px;
    background: #1E2028;
    border-bottom: 1px solid #2E3038;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px 0 48px;
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: #7A9E8A;
    letter-spacing: 0.04em;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#status-bar.visible {
    opacity: 1;
}

#status-init {
    color: #C87A4A;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

#status-init.hidden {
    display: none;
}

/* === Diamond Navigation === */
#diamond-nav {
    position: fixed;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 24px;
    z-index: 90;
}

.diamond {
    display: block;
    width: 8px;
    height: 8px;
    border: 1px solid #7A9E8A;
    transform: rotate(45deg);
    transition: background-color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}

.diamond.active {
    background-color: #C87A4A;
    border-color: #C87A4A;
}

/* === Boot Sequence === */
#boot-threads {
    position: fixed;
    top: 40px;
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 50;
    pointer-events: none;
}

.boot-bar {
    position: absolute;
    left: 0;
    height: 4px;
    width: 0;
    opacity: 0;
    border-radius: 2px;
}

#boot-bar-green {
    top: 10px;
    background: #7A9E8A;
}

#boot-bar-orange {
    top: 28px;
    background: #C87A4A;
}

#boot-bar-blue {
    top: 46px;
    background: #5A8AB0;
}

.boot-bar.animating {
    opacity: 1;
    animation: bootExtend 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.boot-bar.faded {
    opacity: 0.1;
    transition: opacity 0.6s ease;
}

@keyframes bootExtend {
    0% { width: 0; }
    100% { width: 100%; }
}

/* === Hero === */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 36px 48px 48px 48px;
    opacity: 0;
}

#hero.visible {
    opacity: 1;
    transition: opacity 0.5s ease;
}

.hero-title {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 700;
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    letter-spacing: 0.02em;
    line-height: 1.2;
    color: #E8E4DA;
}

.hero-word {
    display: block;
    transform: scaleX(0.8);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

.hero-word.animate {
    transform: scaleX(1);
    opacity: 1;
}

.hero-dot {
    color: #7A9E8A;
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 0.4;
}

.hero-sub {
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    color: #8A8890;
    letter-spacing: 0.04em;
    margin-top: 24px;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-sub.visible {
    opacity: 1;
}

/* === Main Content === */
#content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 48px 96px 48px;
    position: relative;
}

/* === Z-Pattern Sections === */
.z-section {
    padding: 96px 0;
    position: relative;
}

.z-left .section-inner {
    max-width: 58.33%;
    margin-left: 0;
    margin-right: auto;
}

.z-right .section-inner {
    max-width: 58.33%;
    margin-left: auto;
    margin-right: 0;
}

.section-inner {
    opacity: 0;
    transform: scaleX(0.85);
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease;
}

.section-inner.animate {
    opacity: 1;
    transform: scaleX(1);
}

.section-icon {
    margin-bottom: 16px;
    opacity: 0.7;
}

.z-section h2 {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    letter-spacing: 0.02em;
    color: #E8E4DA;
    margin-bottom: 24px;
}

.z-section p {
    margin-bottom: 16px;
    color: #E8E4DA;
}

.z-section p:last-child {
    margin-bottom: 0;
}

/* === Sync Overlays === */
.sync-overlay {
    position: absolute;
    width: 1px;
    background: rgba(122, 158, 138, 0.3);
    top: 0;
    height: 100%;
    pointer-events: none;
}

#sync-overlay-1 {
    left: 58.33%;
}

#sync-overlay-2 {
    left: 41.66%;
}

/* === Timeline Bars === */
.timeline-bar {
    position: relative;
    width: 100%;
    padding: 32px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.timeline-dots {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.timeline-dots::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #7A9E8A;
    transform: translateY(-50%);
}

.timeline-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid #7A9E8A;
    position: relative;
    z-index: 1;
    transition: background-color 0.15s ease;
}

.timeline-dot.filled {
    background: #7A9E8A;
}

/* === Petri Net === */
.petri-net {
    opacity: 0.8;
}

.petri-token {
    opacity: 0;
}

.petri-token.animate {
    opacity: 1;
}

/* === Thread Diagrams === */
.thread-diagram {
    width: 100%;
    padding: 24px 0;
    overflow: hidden;
}

.thread-diagram svg {
    width: 100%;
    height: 120px;
}

.thread-bar {
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.t-green {
    fill: #7A9E8A;
    opacity: 0.8;
}

.t-orange {
    fill: #C87A4A;
    opacity: 0.8;
}

.t-blue {
    fill: #5A8AB0;
    opacity: 0.8;
}

/* === Footer === */
#footer {
    padding: 48px;
    border-top: 1px solid #2E3038;
}

.footer-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mono-text {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: #8A8890;
    letter-spacing: 0.04em;
}

/* === Responsive === */
@media (max-width: 768px) {
    .z-left .section-inner,
    .z-right .section-inner {
        max-width: 100%;
    }

    #content {
        padding: 0 24px 64px 24px;
    }

    #hero {
        padding: 36px 24px;
    }

    #diamond-nav {
        display: none;
    }

    #status-bar {
        padding: 0 12px;
        font-size: 9px;
    }

    .footer-status {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .sync-overlay {
        display: none;
    }
}
