/* ========================================
   BOOT SEQUENCE COMPONENT
   Springs AI Solutions, LLC
   Programming History Boot Animation
   ======================================== */

/* Full-screen Overlay */
.boot-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.boot-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease-out;  /* Slower fade to main site */
}

/* CRT Scanline Effect */
.boot-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.15) 2px,
        rgba(0, 0, 0, 0.15) 4px
    );
    pointer-events: none;
    z-index: 10;
}

/* Boot Terminal Container */
.boot-terminal {
    width: 90%;
    max-width: 800px;
    padding: var(--spacing-8, 2rem);
    position: relative;
    z-index: 5;
}

/* Terminal Prompt - appears first */
.boot-prompt {
    font-family: var(--font-terminal, 'Courier New', monospace);
    font-size: 1.75rem;  /* Even bigger font for visibility */
    color: #00cccc;  /* Clean cyan - no neon */
    margin-bottom: var(--spacing-6, 1.5rem);
    transition: opacity 0.4s ease;
}

.boot-prompt.fade-out {
    opacity: 0;
}

.launch-command {
    color: #00cc66;  /* Clean green for the command - no neon */
}

.exec-feedback {
    font-size: 1.1rem;
    color: #aaaaaa;
    margin-top: var(--spacing-2, 0.5rem);
    opacity: 0;
    animation: fadeIn 0.3s ease-out forwards;
}

/* Header - starts hidden, reveals after code sequence */
.boot-header {
    text-align: center;
    margin-bottom: var(--spacing-10, 2.5rem);
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.boot-header.hidden {
    opacity: 0;
    transform: scale(0.1);
    pointer-events: none;
}

/* Cinematic zoom-in animation - logo appears small (far away) and zooms toward user */
.boot-header.reveal {
    animation: cinematicZoom 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes cinematicZoom {
    0% {
        opacity: 0;
        transform: scale(0.15) translateZ(-500px);
        filter: blur(4px);
    }
    20% {
        opacity: 0.5;
        filter: blur(2px);
    }
    60% {
        opacity: 1;
        transform: scale(0.9) translateZ(-50px);
        filter: blur(0);
    }
    80% {
        transform: scale(1.05) translateZ(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateZ(0);
        filter: blur(0);
    }
}

/* Status - also starts hidden */
.boot-status.hidden {
    opacity: 0;
}

.boot-status.reveal {
    animation: fadeIn 0.5s ease-out forwards;
}

.boot-logo {
    display: block;
    font-family: var(--font-terminal, 'Courier New', monospace);
    font-size: 1.25rem;  /* Bigger for t-shirt worthy logo */
    color: #00cccc;  /* Clean cyan - no neon */
    letter-spacing: 0.3em;
    margin-bottom: var(--spacing-3, 0.75rem);
    opacity: 0.9;
}

.boot-title {
    display: block;
    font-family: var(--font-display, 'JetBrains Mono', monospace);
    font-size: 2rem;  /* Much bigger for cinematic effect */
    color: #00cccc;  /* Clean cyan - no neon */
    letter-spacing: 0.15em;
    margin-bottom: var(--spacing-3, 0.75rem);
}

.boot-subtitle {
    display: block;
    font-family: var(--font-terminal, 'Courier New', monospace);
    font-size: 1rem;  /* Bigger subtitle */
    color: #77bbbb;  /* Softer cyan */
    letter-spacing: 0.2em;
}

/* Boot Content - Code Display */
.boot-content {
    min-height: 200px;
    font-family: var(--font-terminal, 'Courier New', monospace);
    font-size: 1.5rem;  /* Even bigger font - 2-4 points larger */
    line-height: 1.8;
    transition: opacity 0.2s ease;
}

.boot-content.fade-out {
    opacity: 0;
}

/* Era Header */
.era-header {
    color: var(--color-text-muted, #718096);
    font-size: 1rem;  /* Bigger era labels */
    letter-spacing: 0.15em;
    margin-top: var(--spacing-4, 1rem);
    margin-bottom: var(--spacing-2, 0.5rem);
    padding-bottom: var(--spacing-1, 0.25rem);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    opacity: 0;
    animation: fadeIn 0.3s ease-out forwards;
}

/* Code Line Base */
.code-line {
    margin: var(--spacing-2, 0.5rem) 0;
    padding-left: var(--spacing-4, 1rem);
    opacity: 0;
    animation: fadeIn 0.2s ease-out forwards;
    white-space: nowrap;
    overflow: hidden;
}

/* Typing Cursor - visible blinking block cursor */
.typing-cursor {
    display: inline-block;
    animation: cursorBlink 0.7s step-end infinite;
    margin-left: 2px;
}

@keyframes cursorBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Era-Specific Styles - Clean colors, no neon glow */

/* Punch Card Era - Green */
.era-header.punch-card,
.code-line.punch-card {
    color: #33cc33;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.1em;
    font-weight: 600;
}

/* COBOL Era - Amber */
.era-header.cobol,
.code-line.cobol {
    color: #ccaa33;
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

/* BASIC Era - White */
.era-header.basic,
.code-line.basic {
    color: #eeeeee;
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

/* C/C++ Era - Blue */
.era-header.c-cpp,
.code-line.c-cpp {
    color: #44aadd;
    font-family: var(--font-display, 'JetBrains Mono', monospace);
    font-weight: 600;
}

/* Python Era - Green */
.era-header.python,
.code-line.python {
    color: #44cc88;
    font-family: var(--font-display, 'JetBrains Mono', monospace);
    font-weight: 600;
}

/* Modern AI Era - Cyan */
.era-header.modern,
.code-line.modern {
    color: #00cccc;
    font-family: var(--font-display, 'JetBrains Mono', monospace);
    font-weight: 700;
}

/* Boot Status */
.boot-status {
    margin-top: var(--spacing-10, 2.5rem);
    text-align: center;
    font-family: var(--font-terminal, 'Courier New', monospace);
    font-size: var(--text-xs, 0.75rem);
    color: var(--color-text-muted, #718096);
    letter-spacing: 0.1em;
}

.status-bar {
    display: block;
    width: 200px;
    height: 2px;
    margin: 0 auto var(--spacing-3, 0.75rem);
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.status-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 30%;
    background: linear-gradient(90deg, transparent, var(--color-primary-400, #00ffff), transparent);
    animation: statusSweep 1.5s ease-in-out infinite;
}

@keyframes statusSweep {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}

.status-dots {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ========================================
   LINES TRANSITION ANIMATION
   The "little lines" effect user loves
   ======================================== */

.boot-lines-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 20;
}

.boot-lines-container.active {
    opacity: 1;
}

.transition-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--color-primary-400, #00ffff) 15%,
        var(--color-primary-400, #00ffff) 85%,
        transparent 100%
    );
    box-shadow:
        0 0 10px var(--color-primary-400, #00ffff),
        0 0 20px rgba(0, 255, 255, 0.5);
    transform: scaleX(0);
    animation: lineSweep 0.5s ease-out forwards;
}

@keyframes lineSweep {
    0% {
        transform: scaleX(0);
        opacity: 0;
    }
    50% {
        transform: scaleX(1);
        opacity: 1;
    }
    100% {
        transform: scaleX(1);
        opacity: 0.4;
    }
}

.boot-lines-container.converge .transition-line {
    animation: lineConverge 0.4s ease-in forwards;
}

@keyframes lineConverge {
    to {
        top: 50% !important;
        opacity: 0;
        height: 4px;
    }
}

/* Fade In Animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Fade Up - for scrolling old lines off */
.code-line.fade-up {
    animation: fadeUp 0.3s ease-out forwards;
}

@keyframes fadeUp {
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
    .boot-terminal {
        padding: var(--spacing-4, 1rem);
    }

    .boot-prompt {
        font-size: 1.1rem;
    }

    .boot-title {
        font-size: var(--text-lg, 1.125rem);
        letter-spacing: 0.1em;
    }

    .boot-content {
        font-size: 1.1rem;
        min-height: 150px;
    }

    .code-line {
        padding-left: var(--spacing-2, 0.5rem);
        font-size: 1.1rem;
    }

    .era-header {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .boot-prompt {
        font-size: 0.9rem;
    }

    .boot-title {
        font-size: var(--text-base, 1rem);
    }

    .boot-content {
        font-size: 0.95rem;
    }

    .code-line {
        font-size: 0.95rem;
        letter-spacing: 0;
    }

    .era-header {
        font-size: 0.75rem;
    }
}
