/* sim-ai.com - Oscilloscope-inspired simulation platform */

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

:root {
    --green: #39ff85;
    --bg-dark: #0a0a0a;
    --bg-zone: #161618;
    --text-primary: #f5f5f3;
    --text-secondary: #e2e2e0;
    --text-muted: #8a8a8e;
    --dark-accent: #1a1a1e;
    --dark-text: #3a3a3a;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    overflow-x: hidden;
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 60vh;
    background: var(--dark-text);
    z-index: 1000;
    border-radius: 1px;
}

.progress-fill {
    width: 100%;
    height: 0%;
    background: var(--green);
    border-radius: 1px;
    transition: height 0.1s linear;
    box-shadow: 0 0 6px var(--green);
}

/* Zones */
.zone {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--bg-dark);
}

/* Scanline Overlay */
.scanline-overlay {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.08) 2px,
        rgba(0, 0, 0, 0.08) 3px
    );
    pointer-events: none;
    z-index: 2;
}

/* Dot Grid */
.dot-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, var(--dark-text) 1px, transparent 1px);
    background-size: 32px 32px;
    opacity: 0.3;
    pointer-events: none;
    z-index: 1;
}

/* Zone Content */
.zone-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    width: 90%;
    padding: 4rem 0;
}

/* Boot Zone */
.boot-content {
    position: relative;
    z-index: 3;
    text-align: center;
}

.boot-text {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeIn 1s 0.5s forwards;
}

.boot-line {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    opacity: 0;
    animation: bootLineReveal 0.4s forwards;
}

.boot-line:nth-child(1) { animation-delay: 0.3s; }
.boot-line:nth-child(2) { animation-delay: 0.8s; }
.boot-line:nth-child(3) { animation-delay: 1.3s; }
.boot-line:nth-child(4) { animation-delay: 1.8s; }

@keyframes bootLineReveal {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    font-size: clamp(2.5rem, 5.5vw, 5rem);
    letter-spacing: 0.04em;
    color: var(--text-primary);
    opacity: 0;
    animation: fadeIn 1s 2.2s forwards;
}

.hero-title .accent {
    color: var(--green);
}

.hero-sub {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--text-muted);
    margin-top: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeIn 1s 2.6s forwards;
}

.waveform-canvas {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    z-index: 2;
}

/* Graticule Divider */
.graticule-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--dark-text), var(--green), var(--dark-text), transparent);
    margin-bottom: 3rem;
    opacity: 0.6;
}

/* Zone Titles */
.zone-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: 0.04em;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.zone-description {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

/* Signal Visualizer */
.signal-visualizer {
    width: 100%;
    height: 200px;
    border: 1px solid var(--dark-text);
    border-radius: 2px;
    margin-bottom: 2rem;
    position: relative;
    background: var(--bg-dark);
}

.signal-visualizer canvas {
    width: 100%;
    height: 100%;
}

/* Data Readout */
.data-readout {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.readout-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.readout-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.readout-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--green);
}

/* Process Grid */
.process-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.process-node {
    border: 1px solid var(--dark-text);
    padding: 1.25rem;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    transition: border-color 0.3s, color 0.3s, box-shadow 0.3s;
    background: var(--bg-dark);
}

.process-node.active {
    border-color: var(--green);
    color: var(--green);
    box-shadow: 0 0 12px rgba(57, 255, 133, 0.15);
}

/* Code Block */
.code-block {
    background: var(--dark-accent);
    border: 1px solid var(--dark-text);
    border-radius: 2px;
    padding: 1.5rem;
    overflow-x: auto;
}

.code-block code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    line-height: 1.8;
    white-space: pre;
    color: var(--text-secondary);
}

.code-comment { color: var(--text-muted); }
.code-keyword { color: var(--green); }
.code-number { color: #39ff85; font-style: italic; }

/* Lissajous */
.lissajous-container {
    width: 100%;
    height: 300px;
    border: 1px solid var(--dark-text);
    border-radius: 2px;
    margin-bottom: 2.5rem;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lissajous-container canvas {
    width: 100%;
    height: 100%;
}

/* Output Stats */
.output-stats {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 300;
    color: var(--text-primary);
}

.stat-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

/* Terminal */
.terminal-block {
    background: var(--dark-accent);
    border: 1px solid var(--dark-text);
    border-radius: 2px;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
}

.terminal-line {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    line-height: 2;
    color: var(--text-secondary);
}

.terminal-prompt {
    color: var(--green);
}

.terminal-cmd {
    color: var(--text-primary);
}

.terminal-output {
    color: var(--text-muted);
}

.terminal-output .accent {
    color: var(--green);
}

.terminal-cursor {
    color: var(--green);
    animation: blink 1s step-end infinite;
}

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

/* CTA Button */
.cta-button {
    display: inline-block;
    position: relative;
    padding: 1rem 2.5rem;
    border: 1px solid var(--green);
    color: var(--green);
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    transition: background 0.3s, color 0.3s, box-shadow 0.3s;
    margin-bottom: 2rem;
}

.cta-button:hover {
    background: var(--green);
    color: var(--bg-dark);
    box-shadow: 0 0 24px rgba(57, 255, 133, 0.3);
}

.cta-glow {
    display: none;
}

/* Footer */
.footer-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.footer-text .mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--dark-text);
}

/* Scroll reveal */
.zone-content {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Responsive */
@media (max-width: 600px) {
    .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .output-stats {
        gap: 1.5rem;
    }
    .data-readout {
        gap: 1.5rem;
    }
}
