/* ============================================
   monopole.tech - Futuristic Split-Screen Design
   ============================================ */

/* CSS Custom Properties */
:root {
    --deep-teal: #0A3040;
    --violet-depth: #2A1050;
    --dark-blue: #0A1040;
    --mesh-cyan: #20C0D0;
    --mesh-magenta: #C020C0;
    --holo-yellow: #D0C020;
    --clean-white: #E8ECF0;
    --holo-angle: 135deg;

    --font-headline: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Fira Code', monospace;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(14px, 1vw, 17px);
    line-height: 1.7;
    color: var(--clean-white);
    background: var(--dark-blue);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Gradient Mesh Background (Fixed Parallax)
   ============================================ */
#gradient-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(10,48,64,0.8), transparent 60%),
        radial-gradient(ellipse at 80% 70%, rgba(42,16,80,0.6), transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(10,16,64,0.9), transparent 70%);
    background-color: var(--dark-blue);
    animation: meshShift 20s ease-in-out infinite alternate;
}

@keyframes meshShift {
    0% {
        background:
            radial-gradient(ellipse at 20% 30%, rgba(10,48,64,0.8), transparent 60%),
            radial-gradient(ellipse at 80% 70%, rgba(42,16,80,0.6), transparent 50%),
            radial-gradient(ellipse at 50% 50%, rgba(10,16,64,0.9), transparent 70%);
        background-color: var(--dark-blue);
    }
    33% {
        background:
            radial-gradient(ellipse at 35% 60%, rgba(10,48,64,0.8), transparent 60%),
            radial-gradient(ellipse at 65% 40%, rgba(42,16,80,0.6), transparent 50%),
            radial-gradient(ellipse at 45% 55%, rgba(10,16,64,0.9), transparent 70%);
        background-color: var(--dark-blue);
    }
    66% {
        background:
            radial-gradient(ellipse at 25% 45%, rgba(10,48,64,0.8), transparent 60%),
            radial-gradient(ellipse at 75% 55%, rgba(42,16,80,0.6), transparent 50%),
            radial-gradient(ellipse at 55% 40%, rgba(10,16,64,0.9), transparent 70%);
        background-color: var(--dark-blue);
    }
    100% {
        background:
            radial-gradient(ellipse at 40% 25%, rgba(10,48,64,0.8), transparent 60%),
            radial-gradient(ellipse at 60% 75%, rgba(42,16,80,0.6), transparent 50%),
            radial-gradient(ellipse at 50% 45%, rgba(10,16,64,0.9), transparent 70%);
        background-color: var(--dark-blue);
    }
}

/* ============================================
   Tech Pattern Layer (Midground Parallax)
   ============================================ */
#tech-pattern-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.4;
}

#hex-grid-svg {
    width: 100%;
    height: 100%;
}

/* ============================================
   Hero Section
   ============================================ */
#hero {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.hero-content {
    text-align: center;
    margin-bottom: 4rem;
    opacity: 0;
    animation: fadeInUp 800ms ease-out 200ms forwards;
}

#logotype {
    font-family: var(--font-headline);
    font-weight: 700;
    font-size: clamp(36px, 6vw, 80px);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.hero-tagline {
    font-family: var(--font-mono);
    font-size: 13px;
    color: rgba(232, 236, 240, 0.5);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: 1rem;
}

/* Holographic Text Effect */
.holographic-text {
    background: linear-gradient(
        var(--holo-angle),
        var(--mesh-cyan),
        var(--mesh-magenta),
        var(--holo-yellow),
        var(--mesh-cyan)
    );
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: holoShimmer 6s ease-in-out infinite;
}

@keyframes holoShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

/* ============================================
   Hero Split Layout
   ============================================ */
.hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    opacity: 0;
    animation: fadeInUp 1000ms ease-out 600ms forwards;
}

.hero-left,
.hero-right {
    min-height: 300px;
}

/* Data Readout */
.data-readout {
    background: rgba(10, 16, 64, 0.6);
    border: 1px solid rgba(32, 192, 208, 0.2);
    border-radius: 4px;
    padding: 1.5rem;
    height: 100%;
    backdrop-filter: blur(10px);
}

.readout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(32, 192, 208, 0.15);
    margin-bottom: 1rem;
}

.readout-label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--mesh-cyan);
    text-transform: uppercase;
}

.readout-status {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #40E080;
    letter-spacing: 0.1em;
    position: relative;
    padding-left: 12px;
}

.readout-status::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #40E080;
    animation: pulse 2s ease-in-out infinite;
}

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

.readout-lines {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.readout-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(32, 192, 208, 0.06);
    opacity: 0;
}

.readout-line.visible {
    opacity: 1;
}

.data-key {
    color: rgba(232, 236, 240, 0.5);
}

.data-val {
    color: var(--mesh-cyan);
}

.data-val.val-green {
    color: #40E080;
}

/* Tech Visualization */
.tech-visualization {
    background: rgba(10, 16, 64, 0.4);
    border: 1px solid rgba(192, 32, 192, 0.2);
    border-radius: 4px;
    height: 100%;
    min-height: 300px;
    overflow: hidden;
    position: relative;
}

#viz-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* ============================================
   Split Sections
   ============================================ */
.split-section {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 80vh;
    border-top: 1px solid rgba(32, 192, 208, 0.08);
}

.split-section.reversed .split-left {
    order: 1;
}

.split-section.reversed .split-right {
    order: 2;
}

.split-left,
.split-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 3rem;
}

.section-content {
    max-width: 500px;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

.section-title {
    font-family: var(--font-headline);
    font-weight: 600;
    font-size: clamp(28px, 3.5vw, 52px);
    margin-bottom: 1.5rem;
    line-height: 1.15;
}

.section-body {
    color: rgba(232, 236, 240, 0.75);
    margin-bottom: 2rem;
}

/* Spec Block */
.spec-block {
    background: rgba(10, 16, 64, 0.5);
    border: 1px solid rgba(32, 192, 208, 0.15);
    border-radius: 4px;
    padding: 1.25rem;
    backdrop-filter: blur(8px);
}

.spec-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(32, 192, 208, 0.06);
    font-family: var(--font-mono);
    font-size: 13px;
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-label {
    color: rgba(232, 236, 240, 0.5);
}

.spec-value {
    color: var(--mesh-cyan);
}

/* Code Block */
.code-block {
    background: rgba(10, 16, 64, 0.7);
    border: 1px solid rgba(32, 192, 208, 0.15);
    border-radius: 4px;
    padding: 1.5rem;
    overflow-x: auto;
    backdrop-filter: blur(8px);
}

.code-block pre {
    margin: 0;
}

.code-block code {
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.8;
    color: var(--clean-white);
}

/* Stat Grid */
.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-card {
    background: rgba(10, 16, 64, 0.5);
    border: 1px solid rgba(32, 192, 208, 0.15);
    border-radius: 4px;
    padding: 1.25rem;
    text-align: center;
    backdrop-filter: blur(8px);
    transition: border-color 0.3s ease;
}

.stat-card:hover {
    border-color: rgba(32, 192, 208, 0.4);
}

.stat-number {
    display: block;
    font-family: var(--font-headline);
    font-weight: 600;
    font-size: clamp(20px, 2vw, 32px);
    color: var(--mesh-cyan);
    margin-bottom: 0.25rem;
}

.stat-number sup {
    font-size: 0.6em;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    color: rgba(232, 236, 240, 0.4);
    text-transform: uppercase;
}

/* Visualization Panels */
.viz-panel {
    width: 100%;
    height: 100%;
    min-height: 400px;
    position: relative;
    overflow: hidden;
}

.viz-panel canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* ============================================
   Holographic Border on interactive elements
   ============================================ */
.holographic-border {
    position: relative;
}

.holographic-border::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid transparent;
    border-image: linear-gradient(var(--holo-angle), var(--mesh-cyan), var(--mesh-magenta), var(--holo-yellow)) 1;
    pointer-events: none;
    transition: opacity 0.3s ease;
    opacity: 0.6;
}

.holographic-border:hover::after {
    opacity: 1;
}

/* ============================================
   Footer
   ============================================ */
#site-footer {
    position: relative;
    z-index: 2;
    padding: 3rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(32, 192, 208, 0.08);
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-logo {
    font-family: var(--font-headline);
    font-weight: 600;
    font-size: clamp(20px, 2vw, 28px);
    margin-bottom: 0.75rem;
}

.footer-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
}

.footer-text {
    font-family: var(--font-mono);
    font-size: 12px;
    color: rgba(232, 236, 240, 0.35);
    letter-spacing: 0.1em;
}

.footer-divider {
    color: rgba(232, 236, 240, 0.2);
}

/* ============================================
   Responsive: Mobile (< 768px)
   ============================================ */
@media (max-width: 768px) {
    .hero-split {
        grid-template-columns: 1fr;
    }

    .split-section {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .split-section.reversed .split-left {
        order: 2;
    }

    .split-section.reversed .split-right {
        order: 1;
    }

    .split-left,
    .split-right {
        padding: 2rem 1.5rem;
    }

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

    .viz-panel {
        min-height: 250px;
    }

    #hero {
        padding: 1.5rem;
    }

    .hero-content {
        margin-bottom: 2rem;
    }

    .footer-info {
        flex-direction: column;
        gap: 0.25rem;
    }

    .footer-divider {
        display: none;
    }
}

/* ============================================
   Scrollbar Styling
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--dark-blue);
}

::-webkit-scrollbar-thumb {
    background: rgba(32, 192, 208, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(32, 192, 208, 0.5);
}
