/* continua.st -- Luxury Terminal Interface */
/* Palette: Navy-Metallic */
/* Font: Recursive (variable) */
/* Interactive Labels (MONO: 0.5, CASL: 0) -- borders on hover, IntersectionObserver triggers bounce-enter */

:root {
    --midnight-hull: #0A0E1A;
    --dark-instrument: #111827;
    --tarnished-silver: #4A5568;
    --phosphor-blue: #C8D4E8;
    --bright-phosphor: #E8ECF4;
    --dim-metallic: #6B7A96;
    --burnished-brass: #C9A84C;
    --oxidized-chrome: #7B8DA8;
    --champagne-mist: #D4C49A;
    --steel-vapor: #8896B0;
    --muted-silver: #A8B4C8;
    --register-faint: #3D4A5C;
}

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

html {
    scroll-snap-type: y proximity;
    scroll-behavior: smooth;
}

body {
    background-color: var(--midnight-hull);
    color: var(--phosphor-blue);
    font-family: 'Recursive', monospace;
    font-variation-settings: 'MONO' 1, 'CASL' 0, 'wght' 400, 'slnt' 0, 'CRSV' 0;
    font-size: clamp(14px, 1.2vw + 8px, 18px);
    line-height: 1.7;
    letter-spacing: 0.03em;
    overflow-x: hidden;
}

/* Bokeh SVG Container */
#bokeh-svg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 0;
    transition: opacity 2000ms ease;
}

#bokeh-svg.visible {
    opacity: 1;
}

/* Page Container */
#page-container {
    position: relative;
    z-index: 2;
}

/* Section Base */
.section {
    position: relative;
    min-height: 90vh;
    padding: 12vh 0;
    scroll-snap-align: start;
}

.section-boot {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-manifest {
    min-height: 100vh;
    background-color: var(--dark-instrument);
}

.section-index {
    min-height: 90vh;
}

.section-archive {
    min-height: 120vh;
    background-color: var(--dark-instrument);
}

.section-terminus {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

/* Section Content */
.section-content {
    padding-left: 15%;
    padding-right: 15%;
}

/* Section Timestamps */
.section-timestamp {
    position: absolute;
    top: 2vh;
    right: 4%;
    font-variation-settings: 'MONO' 1, 'CASL' 0.7, 'wght' 300, 'slnt' -8, 'CRSV' 0;
    font-size: clamp(10px, 0.8vw + 6px, 13px);
    color: var(--dim-metallic);
    letter-spacing: 0.05em;
}

/* Section Rules (Perforated -- tractor-feed paper) */
.section-rule {
    border: none;
    border-top: 1px dashed var(--tarnished-silver);
    margin: 0;
}

/* Display Headlines */
.display-headline {
    font-variation-settings: 'MONO' 0, 'CASL' 0.3, 'wght' 800, 'slnt' 0, 'CRSV' 0;
    font-size: clamp(36px, 5vw + 12px, 84px);
    line-height: 0.95;
    letter-spacing: -0.02em;
    color: var(--bright-phosphor);
    text-transform: uppercase;
    text-shadow: 0 0 30px rgba(168, 180, 216, 0.15);
    margin-bottom: 6vh;
}

/* Boot Section */
.boot-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 60vh;
}

#boot-text {
    font-variation-settings: 'MONO' 1, 'CASL' 0, 'wght' 400, 'slnt' 0, 'CRSV' 0;
    font-size: 16px;
    color: var(--phosphor-blue);
    line-height: 1.8;
    margin-bottom: 4vh;
    min-height: 5em;
}

#boot-text .boot-line {
    display: block;
}

#boot-title {
    opacity: 0;
    font-size: clamp(48px, 6vw + 16px, 96px);
    transition: opacity 0.6s ease;
    margin-bottom: 0;
}

#boot-title.visible {
    opacity: 1;
}

/* Blinking Cursor */
.blinking-cursor {
    display: inline-block;
    width: 10px;
    height: 1.2em;
    background-color: var(--burnished-brass);
    vertical-align: text-bottom;
    animation: cursor-blink 1.06s step-end infinite;
}

@keyframes cursor-blink {
    0%, 50% { opacity: 1; }
    50.01%, 100% { opacity: 0; }
}

#boot-text .typing-cursor {
    display: inline-block;
    width: 10px;
    height: 1.2em;
    background-color: var(--burnished-brass);
    vertical-align: text-bottom;
    animation: cursor-blink 1.06s step-end infinite;
}

/* Manifest Section */
.manifest-content {
    display: flex;
    gap: 2%;
}

.manifest-text-area {
    flex: 1;
    max-width: 72ch;
}

.terminal-block {
    margin-bottom: 2em;
    font-variation-settings: 'MONO' 1, 'CASL' 0, 'wght' 400, 'slnt' 0, 'CRSV' 0;
}

.terminal-block p {
    line-height: 1.7;
}

/* Register Strip */
.register-strip {
    width: 40px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    padding-top: 1em;
    border-left: 1px solid var(--tarnished-silver);
    padding-left: 8px;
}

.register-line {
    font-variation-settings: 'MONO' 1, 'CASL' 0.7, 'wght' 300, 'slnt' -8, 'CRSV' 0;
    font-size: 10px;
    color: var(--register-faint);
    line-height: 1.7;
}

/* Index Section */
.index-content {
    max-width: 72ch;
}

.index-listing {
    display: flex;
    flex-direction: column;
    gap: 0.6em;
}

.index-item {
    display: flex;
    align-items: baseline;
    font-variation-settings: 'MONO' 1, 'CASL' 0, 'wght' 400, 'slnt' 0, 'CRSV' 0;
    cursor: default;
    position: relative;
    padding-right: 1.5ch;
}

.index-label {
    white-space: pre;
    flex-shrink: 0;
    transition: color 200ms ease;
}

.dot-leader {
    flex: 1;
    overflow: hidden;
    margin: 0 0.5ch;
    color: var(--dim-metallic);
}

.dot-leader::before {
    content: '....................................................................................................................';
    letter-spacing: 0.5ch;
}

.index-value {
    flex-shrink: 0;
    color: var(--dim-metallic);
    transition: color 200ms ease;
}

/* Interactive hover -- cursor appears */
.index-item:hover .index-label,
.index-item:hover .index-value {
    color: var(--bright-phosphor);
}

.index-item:hover::after {
    content: '';
    display: inline-block;
    width: 10px;
    height: 1.2em;
    background-color: var(--burnished-brass);
    vertical-align: text-bottom;
    margin-left: 0.5ch;
    animation: cursor-blink 1.06s step-end infinite;
    position: absolute;
    right: 0;
    bottom: 0.15em;
}

/* Archive Section */
.archive-content {
    max-width: 72ch;
}

.archive-text p {
    margin-bottom: 2em;
    font-variation-settings: 'MONO' 1, 'CASL' 0, 'wght' 400, 'slnt' 0, 'CRSV' 0;
    line-height: 1.7;
}

/* Terminus Section */
.terminus-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
    padding-left: 5%;
    padding-right: 5%;
}

.terminus-text {
    font-variation-settings: 'MONO' 1, 'CASL' 0, 'wght' 400, 'slnt' 0, 'CRSV' 0;
    font-size: clamp(16px, 1.4vw + 8px, 22px);
    color: var(--phosphor-blue);
    margin-bottom: 4vh;
}

.terminus-line {
    margin-right: 0.5ch;
}

.terminus-rule {
    border: none;
    border-top: 1px solid var(--tarnished-silver);
    width: 30%;
    margin-bottom: 2vh;
}

.terminus-session {
    font-variation-settings: 'MONO' 1, 'CASL' 0.7, 'wght' 300, 'slnt' -8, 'CRSV' 0;
    font-size: clamp(10px, 0.8vw + 6px, 13px);
    color: var(--dim-metallic);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

/* Bounce-Enter Animation */
@keyframes bounce-enter {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.bounce-element {
    opacity: 0;
    transform: translateY(30px);
}

.bounce-element.is-visible {
    animation: bounce-enter 600ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Staggered delays */
.bounce-element.is-visible:nth-child(1) { animation-delay: 0ms; }
.bounce-element.is-visible:nth-child(2) { animation-delay: 80ms; }
.bounce-element.is-visible:nth-child(3) { animation-delay: 160ms; }
.bounce-element.is-visible:nth-child(4) { animation-delay: 240ms; }
.bounce-element.is-visible:nth-child(5) { animation-delay: 320ms; }
.bounce-element.is-visible:nth-child(6) { animation-delay: 400ms; }
.bounce-element.is-visible:nth-child(7) { animation-delay: 480ms; }
.bounce-element.is-visible:nth-child(8) { animation-delay: 560ms; }
.bounce-element.is-visible:nth-child(9) { animation-delay: 640ms; }
.bounce-element.is-visible:nth-child(10) { animation-delay: 720ms; }
.bounce-element.is-visible:nth-child(11) { animation-delay: 800ms; }

/* Interactive Labels font style for hover-able elements */
.interactive-label {
    font-variation-settings: 'MONO' 0.5, 'CASL' 0, 'wght' 600, 'slnt' 0, 'CRSV' 0;
    font-size: clamp(12px, 1vw + 6px, 16px);
    letter-spacing: 0.12em;
    color: var(--muted-silver);
    transition: color 200ms ease;
}

.interactive-label:hover {
    color: var(--bright-phosphor);
}

/* Responsive -- Tablet */
@media (max-width: 1024px) {
    .section-content {
        padding-left: 8%;
        padding-right: 8%;
    }

    .register-strip {
        display: none;
    }

    .archive-content,
    .index-content {
        max-width: 60ch;
    }
}

/* Responsive -- Mobile */
@media (max-width: 600px) {
    .section-content {
        padding-left: 5%;
        padding-right: 5%;
    }

    .archive-content,
    .index-content,
    .manifest-text-area {
        max-width: 100%;
    }

    .register-strip {
        display: none;
    }

    .display-headline {
        font-size: clamp(36px, 5vw + 12px, 48px);
    }

    .terminus-rule {
        width: 60%;
    }
}
