/* =====================================================
   DDAZZL.com - Terminal Transcendence
   ===================================================== */

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #0a0a0f;
    color: #c8f7dc;
    font-family: 'Space Mono', monospace;
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* =====================================================
   Scan Lines Overlay (CRT effect)
   ===================================================== */
#scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    background: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 2px,
        rgba(61, 255, 160, 0.04) 2px,
        rgba(61, 255, 160, 0.04) 3px
    );
}

/* =====================================================
   Aurora Glow Background
   ===================================================== */
#aurora-glow {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 700px;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    opacity: 0.15;
    filter: blur(80px);
    background: linear-gradient(
        180deg,
        #1aff8c 0%,
        #3dffa0 20%,
        #00e5c3 40%,
        #7b2fff 60%,
        #ff2fae 80%,
        #1aff8c 100%
    );
    background-size: 100% 400%;
    animation: aurora-bg-shift 12s ease-in-out infinite;
    transition: opacity 0.5s ease, filter 0.5s ease;
}

@keyframes aurora-bg-shift {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 0% 100%; }
}

/* =====================================================
   Dot Matrix Overlay (hover-revealed)
   ===================================================== */
#dot-matrix {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
    background-image: radial-gradient(circle, #1a3a2a 1px, transparent 1px);
    background-size: 8px 8px;
}

#terminal-column:hover ~ #dot-matrix,
#terminal-column:hover + #dot-matrix {
    opacity: 0.05;
}

body:hover #dot-matrix {
    opacity: 0.05;
}

/* =====================================================
   Navigation Breadcrumb
   ===================================================== */
#nav-breadcrumb {
    position: fixed;
    top: 20px;
    left: 24px;
    z-index: 100;
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    color: #3dffa0;
    letter-spacing: 0.05em;
}

.nav-path {
    opacity: 0.8;
}

/* =====================================================
   Main Terminal Column
   ===================================================== */
#terminal-column {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 10;
}

/* =====================================================
   Terminal Sections
   ===================================================== */
.terminal-section {
    padding: 60px 0;
    position: relative;
}

#boot-sequence {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0;
    transition: opacity 1s ease;
}

#hero.visible {
    opacity: 1;
}

/* =====================================================
   Cursor Blink
   ===================================================== */
.cursor-blink {
    color: #3dffa0;
    font-family: 'Space Mono', monospace;
    font-size: 24px;
    animation: blink-cursor 1.06s step-end infinite;
}

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

#boot-cursor {
    font-size: 28px;
    margin-bottom: 20px;
}

#bottom-cursor {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    font-size: 18px;
}

/* =====================================================
   Boot Text
   ===================================================== */
#boot-text {
    text-align: center;
}

.boot-line {
    color: #3dffa0;
    font-family: 'Space Mono', monospace;
    font-size: 16px;
    margin-bottom: 8px;
    min-height: 1.7em;
    overflow: hidden;
    white-space: nowrap;
}

/* =====================================================
   Hero Title - Aurora Text
   ===================================================== */
#hero-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 72px;
    font-weight: 700;
    letter-spacing: 0.15em;
    margin-bottom: 40px;
    background: linear-gradient(90deg, #3dffa0, #00e5c3, #7b2fff, #ff2fae, #3dffa0);
    background-size: 400% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: aurora-shift 8s linear infinite;
    opacity: 0;
    transition: opacity 0.8s ease;
}

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

.aurora-text-letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.aurora-text-letter.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes aurora-shift {
    0% { background-position: 0% 50%; }
    100% { background-position: 400% 50%; }
}

/* =====================================================
   Prism Canvas
   ===================================================== */
#prism-container {
    width: 300px;
    height: 300px;
    margin: 0 auto 40px;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 1.5s ease, transform 1.5s ease;
}

#prism-container.visible {
    opacity: 1;
    transform: scale(1);
}

#prism-canvas {
    width: 100%;
    height: 100%;
}

/* =====================================================
   Sphere Canvas
   ===================================================== */
#sphere-container {
    width: 250px;
    height: 250px;
    margin: 40px auto;
    animation: sphere-pulse 4s ease-in-out infinite;
}

#sphere-canvas {
    width: 100%;
    height: 100%;
}

@keyframes sphere-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* =====================================================
   Cube Canvas
   ===================================================== */
#cube-container {
    width: 280px;
    height: 280px;
    margin: 40px auto;
}

#cube-canvas {
    width: 100%;
    height: 100%;
}

/* =====================================================
   Output Blocks
   ===================================================== */
.output-block {
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.output-block.visible {
    opacity: 1;
    transform: translateY(0);
}

.prompt {
    color: #3dffa0;
    font-weight: 700;
    margin-right: 8px;
    user-select: none;
}

.block-text {
    color: #c8f7dc;
}

.block-text em {
    color: #ffffff;
    font-style: normal;
    font-weight: 700;
}

/* =====================================================
   Section Headings
   ===================================================== */
.section-heading {
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 0.12em;
    margin-bottom: 32px;
    background: linear-gradient(90deg, #3dffa0, #00e5c3, #7b2fff, #ff2fae, #3dffa0);
    background-size: 400% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: aurora-shift 8s linear infinite;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.section-heading.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =====================================================
   Chevron Borders
   ===================================================== */
.chevron-border {
    color: #2a5a3a;
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.2em;
    margin: 16px 0;
    overflow: hidden;
    white-space: nowrap;
    opacity: 0.6;
}

/* =====================================================
   Timestamps / Labels
   ===================================================== */
.timestamp {
    margin-top: 16px;
    margin-bottom: 8px;
}

.label-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    color: #3dffa0;
    opacity: 0.6;
}

/* =====================================================
   Section Wipe
   ===================================================== */
.section-wipe {
    position: absolute;
    top: 0;
    left: -50vw;
    width: 200vw;
    height: 2px;
    background: linear-gradient(90deg, #3dffa0, #00e5c3, #7b2fff, #ff2fae);
    transform: translateY(-100%);
    opacity: 0;
    z-index: 5;
}

.section-wipe.animate {
    animation: scan-line-wipe 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes scan-line-wipe {
    0% {
        transform: translateY(-20px);
        opacity: 1;
    }
    100% {
        transform: translateY(calc(100% + 40px));
        opacity: 0;
    }
}

/* =====================================================
   Circuit SVGs
   ===================================================== */
.circuit-svg {
    position: absolute;
    width: 200px;
    height: 400px;
    z-index: 5;
    pointer-events: none;
}

.circuit-left {
    left: -220px;
    top: 200px;
}

.circuit-right {
    right: -220px;
    top: 400px;
}

.circuit-path {
    fill: none;
    stroke: #3dffa0;
    stroke-width: 1;
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    opacity: 0.6;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.circuit-path.drawn {
    stroke-dashoffset: 0;
}

/* =====================================================
   Aurora Wave SVG
   ===================================================== */
.aurora-wave-svg {
    display: block;
    width: 100%;
    height: 120px;
    margin: 40px 0;
    overflow: visible;
}

.wave-path {
    stroke-dasharray: 1800;
    stroke-dashoffset: 1800;
    transition: stroke-dashoffset 3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wave-path.drawn {
    stroke-dashoffset: 0;
}

/* =====================================================
   Constellation SVGs
   ===================================================== */
.constellation-svg {
    position: absolute;
    width: 300px;
    height: 300px;
    left: -320px;
    z-index: 5;
    pointer-events: none;
    overflow: visible;
}

.constellation-right {
    left: auto;
    right: -320px;
}

.const-dot {
    fill: #3dffa0;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.const-dot.visible {
    opacity: 0.7;
}

.const-line {
    stroke: #3dffa0;
    stroke-width: 0.5;
    opacity: 0;
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

.const-line.visible {
    opacity: 0.4;
    stroke-dashoffset: 0;
}

/* =====================================================
   Dazzle Effect on Words
   ===================================================== */
.dazzle-word {
    display: inline;
    transition: color 0.3s ease, transform 0.3s ease;
}

.dazzle-word.dazzling,
.dazzle-word.dazzling em {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: 0 0 20px rgba(61, 255, 160, 0.8), 0 0 40px rgba(123, 47, 255, 0.4);
    transform: scale(1.1);
    display: inline-block;
}

/* =====================================================
   Content Sections
   ===================================================== */
.content-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    background-color: #1a1a2a;
    border-radius: 4px;
    padding: 48px 32px;
    margin-bottom: 40px;
    border: 1px solid rgba(61, 255, 160, 0.05);
}

.content-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =====================================================
   Shutdown & Footer
   ===================================================== */
#shutdown {
    padding-top: 80px;
}

.shutdown-text {
    color: #2a5a3a;
}

#terminal-footer {
    text-align: center;
    padding: 80px 0 120px;
    opacity: 0;
    transition: opacity 2s ease;
}

#terminal-footer.visible {
    opacity: 1;
}

.footer-text {
    color: #2a5a3a;
    font-family: 'Space Mono', monospace;
    font-size: 14px;
}

/* =====================================================
   Aurora Flare (between major sections)
   ===================================================== */
.aurora-flare {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    background: linear-gradient(
        180deg,
        rgba(61, 255, 160, 0.08) 0%,
        rgba(0, 229, 195, 0.06) 25%,
        rgba(123, 47, 255, 0.08) 50%,
        rgba(255, 47, 174, 0.06) 75%,
        transparent 100%
    );
    transition: opacity 1.5s ease;
}

.aurora-flare.active {
    opacity: 1;
}

/* =====================================================
   Responsive
   ===================================================== */
@media (max-width: 768px) {
    #hero-title {
        font-size: 48px;
    }

    .section-heading {
        font-size: 22px;
    }

    .circuit-svg,
    .constellation-svg {
        display: none;
    }

    #terminal-column {
        padding: 0 16px;
    }

    #nav-breadcrumb {
        top: 12px;
        left: 16px;
    }

    #prism-container {
        width: 220px;
        height: 220px;
    }

    #sphere-container {
        width: 180px;
        height: 180px;
    }

    #cube-container {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 480px) {
    #hero-title {
        font-size: 36px;
        letter-spacing: 0.08em;
    }

    .section-heading {
        font-size: 18px;
    }

    body {
        font-size: 14px;
    }
}
