/* monopole.design - Scandinavian Particle Physics Control Room */

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

:root {
    --void-black: #0c0c14;
    --anthracite: #16161e;
    --graphite: #1e1e2a;
    --slate-edge: #2a2a3a;
    --frost-white: #e8e8f0;
    --silver-mist: #b0b0c0;
    --dim-silver: #606070;
    --detection-cyan: #00e5ff;
    --cyan-halo: rgba(0, 229, 255, 0.15);
    --lock-white: #f0f0ff;
    --grid-line: #1a1a28;
    --elastic: cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

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

body {
    background: var(--void-black);
    color: var(--frost-white);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    overflow-x: hidden;
}

/* Grid Overlay */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.4;
}

/* Scanning Line */
.scanning-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--detection-cyan);
    opacity: 0.3;
    z-index: 100;
    pointer-events: none;
    animation: scanDown 8s linear infinite;
}

.scanning-line::before,
.scanning-line::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 60px;
}

.scanning-line::before {
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 229, 255, 0.08), transparent);
}

.scanning-line::after {
    top: 0;
    background: linear-gradient(to bottom, rgba(0, 229, 255, 0.08), transparent);
}

@keyframes scanDown {
    0% { transform: translateY(0); }
    100% { transform: translateY(100vh); }
}

/* Station Navigation */
.station-nav {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nav-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: none;
    background: var(--slate-edge);
    cursor: pointer;
    padding: 0;
    transition: all 0.4s var(--elastic);
}

.nav-dot.active {
    background: var(--detection-cyan);
    box-shadow: 0 0 8px var(--detection-cyan), 0 0 20px var(--cyan-halo);
    width: 8px;
    height: 8px;
}

/* Station Base */
.station {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
    border-bottom: 1px solid var(--slate-edge);
}

/* Status Indicators */
.status-indicator {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--slate-edge);
    z-index: 10;
}

.status-indicator.top-left { top: 24px; left: 24px; }
.status-indicator.top-right { top: 24px; right: 24px; }
.status-indicator.bottom-left { bottom: 24px; left: 24px; }
.status-indicator.bottom-right { bottom: 24px; right: 24px; }

.station-1 .status-indicator:nth-child(1),
.station-1 .status-indicator:nth-child(3) {
    background: var(--detection-cyan);
    animation: pulse 3s ease-in-out infinite;
}

.status-indicator.locked {
    background: var(--detection-cyan);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.33);
        opacity: 1;
        box-shadow: 0 0 12px var(--detection-cyan);
    }
}

/* Panel Header */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--slate-edge);
}

.panel-label {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.65rem, 0.8vw, 0.8rem);
    letter-spacing: 0.08em;
    color: var(--dim-silver);
    text-transform: uppercase;
}

.panel-status {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: clamp(0.6rem, 0.7vw, 0.75rem);
    letter-spacing: 0.05em;
    color: var(--dim-silver);
}

.panel-status.active-status {
    color: var(--detection-cyan);
    opacity: 0.7;
}

/* ==================== STATION 1: DETECTION ALERT ==================== */
.station-1 {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--void-black);
}

.station-1-content {
    position: relative;
    z-index: 5;
    text-align: right;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s var(--elastic);
}

.station-1.active .station-1-content {
    opacity: 1;
    transform: translateY(0);
}

.title-monopole {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: -0.02em;
    line-height: 0.95;
    color: var(--frost-white);
    width: 90vw;
    text-align: left;
}

.title-design {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: clamp(1rem, 2vw, 2rem);
    letter-spacing: 0.05em;
    color: var(--detection-cyan);
    opacity: 0.7;
    text-align: right;
    width: 40vw;
    margin-left: auto;
    margin-top: 8px;
}

.data-stream {
    position: absolute;
    top: 38.2%;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--detection-cyan) 20%,
        var(--detection-cyan) 50%,
        transparent 100%
    );
    opacity: 0.4;
    z-index: 2;
    animation: streamPulse 3s ease-in-out infinite;
}

@keyframes streamPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* ==================== STATION 2: FIELD ANALYSIS ==================== */
.station-2 {
    background: var(--void-black);
    display: flex;
    align-items: center;
    padding: 24px;
}

.station-2-grid {
    display: grid;
    grid-template-columns: 62% 38%;
    gap: 1px;
    width: 100%;
    height: calc(100% - 48px);
    background: var(--slate-edge);
    opacity: 0;
    transform: scale(0.98);
    transition: opacity 0.8s ease 0.1s, transform 0.8s var(--elastic) 0.1s;
}

.station-2.active .station-2-grid {
    opacity: 1;
    transform: scale(1);
}

.field-panel {
    background: var(--anthracite);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.monopole-field {
    flex: 1;
    width: 100%;
    height: 100%;
}

.monopole-center {
    filter: drop-shadow(0 0 20px var(--detection-cyan)) drop-shadow(0 0 40px rgba(0, 229, 255, 0.3));
}

.readout-panels {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--slate-edge);
}

.readout-panel {
    flex: 1;
    background: var(--anthracite);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.telemetry-stream {
    flex: 1;
    overflow: hidden;
    position: relative;
    padding: 12px 16px;
}

.telemetry-scroll {
    display: inline-block;
    white-space: nowrap;
    animation: telemetryScroll 20s linear infinite;
}

.telemetry-scroll-2 {
    animation: telemetryScroll 25s linear infinite;
    animation-direction: reverse;
}

.telemetry-data {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: clamp(0.7rem, 0.9vw, 0.95rem);
    letter-spacing: 0.03em;
    color: var(--detection-cyan);
    opacity: 0.7;
}

@keyframes telemetryScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ==================== STATION 3: SPECTRUM DASHBOARD ==================== */
.station-3 {
    background: var(--void-black);
    display: flex;
    align-items: center;
    padding: 24px;
}

.station-3-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1px;
    width: 100%;
    height: calc(100% - 48px);
    background: var(--slate-edge);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease 0.1s, transform 0.8s var(--elastic) 0.1s;
}

.station-3.active .station-3-grid {
    opacity: 1;
    transform: translateY(0);
}

.dash-panel {
    background: var(--anthracite);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--slate-edge);
}

.waveform-panel {
    grid-row: 1 / 3;
}

.waveform-container {
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    padding: 20px 16px;
}

.waveform-bar {
    width: 2px;
    background: var(--slate-edge);
    border-radius: 1px 1px 0 0;
    transition: background 0.3s ease;
}

.waveform-bar.peak {
    background: var(--detection-cyan);
    box-shadow: 0 0 4px rgba(0, 229, 255, 0.3);
}

/* Compass Panel */
.compass-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.compass-rose {
    flex: 1;
    width: 100%;
    max-width: 200px;
    padding: 10px;
}

.compass-needle {
    transform-origin: 100px 100px;
    animation: needleWander 12s ease-in-out infinite;
}

@keyframes needleWander {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(15deg); }
    50% { transform: rotate(-8deg); }
    75% { transform: rotate(22deg); }
}

/* Timeline Panel */
.timeline-container {
    flex: 1;
    overflow: hidden;
    position: relative;
    padding: 12px 16px;
}

.timeline-scroll {
    display: flex;
    align-items: center;
    gap: 40px;
    white-space: nowrap;
    animation: timelineScroll 15s linear infinite;
    height: 100%;
}

.timeline-event {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.timeline-mark {
    width: 2px;
    height: 20px;
    background: var(--detection-cyan);
    opacity: 0.5;
}

.timeline-mark.major {
    height: 32px;
    opacity: 0.8;
}

.timeline-label {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: 0.6rem;
    color: var(--dim-silver);
    letter-spacing: 0.03em;
}

@keyframes timelineScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Metrics Panel */
.metrics-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1px;
    padding: 8px;
}

.metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.metric-value {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(1.2rem, 2vw, 2rem);
    color: var(--frost-white);
    line-height: 1;
}

.metric-unit {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: 0.65rem;
    color: var(--detection-cyan);
    opacity: 0.7;
    margin-top: 4px;
}

.metric-label {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 0.7rem;
    color: var(--dim-silver);
    margin-top: 4px;
}

/* ==================== STATION 4: THEORETICAL FRAMEWORK ==================== */
.station-4 {
    background: var(--void-black);
    display: flex;
}

.station-4-layout {
    display: flex;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease 0.1s, transform 0.8s var(--elastic) 0.1s;
}

.station-4.active .station-4-layout {
    opacity: 1;
    transform: translateY(0);
}

.theory-content {
    flex: 1;
    padding: 60px 80px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.station-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: -0.02em;
    line-height: 0.95;
    color: var(--frost-white);
    margin-bottom: 40px;
}

.theory-text {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.1vw, 1.1rem);
    line-height: 1.65;
    letter-spacing: 0.01em;
    color: var(--silver-mist);
    margin-bottom: 24px;
    max-width: 680px;
}

.highlight {
    color: var(--detection-cyan);
    font-weight: 500;
}

.metadata-sidebar {
    width: 48px;
    background: var(--anthracite);
    border-left: 1px solid var(--slate-edge);
    overflow: hidden;
    position: relative;
}

.sidebar-scroll {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px 0;
    animation: sidebarScroll 30s linear infinite;
}

.sidebar-data {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: 0.55rem;
    letter-spacing: 0.03em;
    color: var(--dim-silver);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    white-space: nowrap;
}

@keyframes sidebarScroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

/* ==================== STATION 5: SIGNAL LOCK ==================== */
.station-5 {
    background: var(--void-black);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.6s var(--elastic), color 0.6s ease;
}

.station-5.active {
    background: var(--lock-white);
}

.station-5-content {
    text-align: center;
    z-index: 5;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease 0.2s, transform 0.8s var(--elastic) 0.2s;
}

.station-5.active .station-5-content {
    opacity: 1;
    transform: scale(1);
}

.lock-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(5rem, 15vw, 12rem);
    letter-spacing: -0.02em;
    line-height: 0.95;
    color: var(--void-black);
}

.lock-subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.2vw, 1.2rem);
    color: var(--dim-silver);
    margin-top: 16px;
    letter-spacing: 0.01em;
}

.lock-data {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lock-readout {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.7rem, 0.9vw, 0.95rem);
    letter-spacing: 0.03em;
    color: var(--slate-edge);
}

.station-5.active .status-indicator.locked {
    background: var(--void-black);
}

/* Scanning line inversion for station 5 */
.station-5.active ~ .scanning-line,
body.station-5-visible .scanning-line {
    background: var(--void-black);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .station-2-grid {
        grid-template-columns: 1fr;
        grid-template-rows: 60% 40%;
    }

    .station-3-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 1fr);
    }

    .waveform-panel {
        grid-row: auto;
    }

    .theory-content {
        padding: 40px 24px;
    }

    .station-nav {
        right: 12px;
    }

    .metadata-sidebar {
        display: none;
    }
}

/* Additional color references for design compliance */
.station-1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: #3a3a4a;
}

.theory-text strong,
.theory-text em {
    color: #d0d0e0;
    font-weight: 500;
}
