/* monopoleai.com - Sci-Fi Research Station / Particle Detector HUD */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #060612;
    font-family: 'IBM Plex Sans', sans-serif;
    color: #d0d8e8;
    overflow-x: hidden;
}

/* Hero / Detection Canvas */
#hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #060612;
}

.detector-viewport {
    position: absolute;
    width: 70vmin;
    height: 70vmin;
    border-radius: 50%;
    border: 1px solid #1a3a5c;
    overflow: hidden;
    opacity: 0;
    transition: opacity 2s ease;
}

.detector-viewport.visible {
    opacity: 1;
}

#field-lines {
    width: 100%;
    height: 100%;
}

.field-line {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: drawLine 3s ease-out forwards;
}

.field-line:nth-child(2) { animation-delay: 1.4s; }
.field-line:nth-child(3) { animation-delay: 1.5s; }
.field-line:nth-child(4) { animation-delay: 1.6s; }
.field-line:nth-child(5) { animation-delay: 1.7s; }
.field-line:nth-child(6) { animation-delay: 1.8s; }
.field-line:nth-child(7) { animation-delay: 1.9s; }
.field-line:nth-child(8) { animation-delay: 2.0s; }
.field-line:nth-child(9) { animation-delay: 2.1s; }

@keyframes drawLine {
    to { stroke-dashoffset: 0; }
}

.monopole-dot {
    opacity: 0;
    animation: dotAppear 0.5s ease-out 1.2s forwards;
}

@keyframes dotAppear {
    0% { opacity: 0; r: 0; }
    100% { opacity: 1; r: 4; }
}

/* HUD Overlay */
.hud-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
}

.hud-top-left {
    position: absolute;
    top: 24px;
    left: 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hud-top-right {
    position: absolute;
    top: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.hud-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    font-weight: 400;
    color: #4a9eff;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hud-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6rem;
    font-weight: 400;
    color: #1a3a5c;
    letter-spacing: 0.08em;
}

.signal-pulse {
    color: #f0a830;
    animation: signalPulse 2s ease-in-out infinite;
}

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

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    color: #d0d8e8;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.ai-accent {
    color: #4a9eff;
}

.hero-subtitle {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    font-weight: 400;
    color: #1a3a5c;
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.5s ease 1s;
}

.hero-subtitle.visible {
    opacity: 1;
}

/* Content Sections */
.content-section {
    padding: 80px 40px;
    position: relative;
}

.dark-section {
    background: #0a0a1e;
}

/* Hex Grid */
.hex-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.hex-cell {
    background: #0a0a1e;
    border: 1px solid #1a3a5c;
    padding: 32px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    aspect-ratio: 1 / 1.15;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.hex-cell.visible {
    opacity: 1;
    transform: scale(1);
}

.hex-cell:nth-child(even) {
    margin-top: 60px;
}

.hex-content {
    text-align: center;
    padding: 20px 10px;
}

.hex-content h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    font-weight: 700;
    color: #4a9eff;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.hex-content p {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: clamp(0.75rem, 1.2vw, 0.85rem);
    font-weight: 400;
    color: #d0d8e8;
    line-height: 1.5;
}

/* Data Readout */
.data-readout {
    max-width: 800px;
    margin: 0 auto;
}

.section-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 700;
    color: #d0d8e8;
    letter-spacing: 0.04em;
    text-align: center;
    margin-bottom: 40px;
}

.data-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: #1a3a5c;
    border: 1px solid #1a3a5c;
}

.data-item {
    background: #060612;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.data-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    font-weight: 400;
    color: #1a3a5c;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.data-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #d0d8e8;
}

.data-value.alert {
    color: #e63946;
}

.data-value.warning {
    color: #f0a830;
}

.data-value.active {
    color: #00c9a7;
    animation: signalPulse 2s ease-in-out infinite;
}

/* Footer */
#footer {
    padding: 60px 40px;
    text-align: center;
    border-top: 1px solid #1a3a5c;
}

.footer-logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #d0d8e8;
    letter-spacing: 0.04em;
}

.footer-text {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.85rem;
    color: #6a7b8c;
    margin-top: 8px;
}

/* Scanline overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(6, 6, 18, 0.05) 3px,
        rgba(6, 6, 18, 0.05) 6px
    );
    pointer-events: none;
    z-index: 100;
}

/* Responsive */
@media (max-width: 768px) {
    .hex-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hex-cell:nth-child(even) {
        margin-top: 0;
    }

    .data-grid {
        grid-template-columns: 1fr;
    }

    .detector-viewport {
        width: 90vmin;
        height: 90vmin;
    }
}
