/* monopole.ai - Bauhaus precision meets particle physics */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    color: #e8e6f0;
    background: #1a1a2e;
    overflow-x: hidden;
    line-height: 1.7;
    font-size: 16px;
}

/* Grid underlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(232,230,240,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(232,230,240,0.04) 1px, transparent 1px);
    background-size: 8px 8px;
    pointer-events: none;
    z-index: 0;
}

/* Navigation */
#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background-color: #1a1a2e;
    transition: background-color 600ms ease;
    z-index: 100;
}

.nav-domain {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #e8e6f0;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    color: #e8e6f0;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.7;
    transition: opacity 300ms ease;
}

.nav-link:hover {
    opacity: 1;
}

.nav-dot {
    width: 6px;
    height: 6px;
    background: #e63946;
    border-radius: 50%;
    display: block;
}

/* Sections */
.section {
    position: relative;
    z-index: 1;
}

/* Section 1: The Pole */
.section-pole {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #1a1a2e;
    padding-top: 48px;
}

.pole-container {
    position: relative;
    width: 50vh;
    height: 50vh;
    max-width: 500px;
    max-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pole-rings {
    position: absolute;
    width: 100%;
    height: 100%;
}

.ring {
    stroke-dasharray: 1600;
    stroke-dashoffset: 1600;
    animation: drawRing 0.5s ease forwards;
}

.ring:nth-child(1) { animation-delay: 0s; }
.ring:nth-child(2) { animation-delay: 0.4s; }
.ring:nth-child(3) { animation-delay: 0.8s; }
.ring:nth-child(4) { animation-delay: 1.2s; }
.ring:nth-child(5) { animation-delay: 1.6s; }
.ring:nth-child(6) { animation-delay: 2.0s; }
.ring:nth-child(7) { animation-delay: 2.4s; }

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

.monopole-core {
    opacity: 0;
    animation: coreAppear 0.5s ease 2.8s forwards;
}

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

.pole-text {
    position: relative;
    z-index: 2;
    text-align: center;
}

.pole-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 36px;
    color: #e8e6f0;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.pole-subtitle {
    margin-top: 40px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: #e8e6f0;
    opacity: 0.6;
    letter-spacing: 0.03em;
    text-align: center;
}

/* Section 2 & 4: Bento Grids */
.section-field-map {
    min-height: 200vh;
    background: #f1faee;
    padding: 80px 24px;
}

.section-proof {
    min-height: 100vh;
    background: #1a1a2e;
    padding: 80px 24px;
}

.bento-grid {
    display: grid;
    gap: 8px;
    max-width: 1200px;
    margin: 0 auto;
}

.bento-grid-1 {
    grid-template-columns: 1fr 2fr 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
        "a b c"
        "d e f";
}

.bento-grid-2 {
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
        "g h i"
        "j k l";
}

.mod-a { grid-area: a; }
.mod-b { grid-area: b; }
.mod-c { grid-area: c; }
.mod-d { grid-area: d; }
.mod-e { grid-area: e; }
.mod-f { grid-area: f; }
.mod-g { grid-area: g; }
.mod-h { grid-area: h; }
.mod-i { grid-area: i; }
.mod-j { grid-area: j; }
.mod-k { grid-area: k; }
.mod-l { grid-area: l; }

.bento-module {
    padding: 32px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 300ms ease, box-shadow 300ms ease;
    opacity: 0;
    transform: scale(0.95);
}

.bento-module.visible {
    opacity: 1;
    transform: scale(1);
    transition: opacity 500ms ease, transform 500ms ease, box-shadow 300ms ease;
}

.bento-module:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.mod-dark {
    background: #1a1a2e;
    color: #e8e6f0;
}

.mod-red {
    background: #e63946;
    color: #f1faee;
}

.mod-light {
    background: #f1faee;
    color: #1a1a2e;
}

.mod-blue {
    background: #457b9d;
    color: #e8e6f0;
}

.mod-cyan {
    background: #a8dadc;
    color: #1a1a2e;
}

.mod-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 12px;
}

.mod-label-dark {
    color: #1a1a2e;
}

.mod-number {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 64px;
    line-height: 1;
    letter-spacing: -0.02em;
}

.mod-unit {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    opacity: 0.6;
    margin-top: 8px;
    letter-spacing: 0.03em;
}

.mod-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 28px;
    margin-bottom: 12px;
    letter-spacing: 0.02em;
}

.mod-heading-dark {
    color: #1a1a2e;
}

.mod-body {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 15px;
    line-height: 1.7;
    opacity: 0.85;
}

.mod-body-dark {
    color: #1a1a2e;
}

.mod-viz {
    display: block;
    margin: 0 auto 12px;
}

.node-graph-node {
    animation: nodeDrift 6s ease-in-out infinite alternate;
}

.node-graph-node:nth-child(2n) {
    animation-duration: 8s;
    animation-direction: alternate-reverse;
}

@keyframes nodeDrift {
    0% { transform: translate(0, 0); }
    50% { transform: translate(2px, -2px); }
    100% { transform: translate(-1px, 1px); }
}

/* Bar charts */
.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 100px;
    margin-top: 16px;
}

.bar {
    flex: 1;
    background: #e63946;
    border-radius: 2px 2px 0 0;
    height: 0;
    transition: height 1.5s ease-out;
}

/* Section 3: Convergence */
.section-convergence {
    min-height: 100vh;
    background: #1a1a2e;
    padding: 120px 24px;
}

.convergence-content {
    max-width: 700px;
    margin: 0 auto;
}

.conv-headline {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 36px;
    color: #e8e6f0;
    margin-bottom: 24px;
    letter-spacing: 0.02em;
}

.conv-body {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: #e8e6f0;
    opacity: 0.75;
    line-height: 1.9;
    margin-bottom: 48px;
    letter-spacing: 0.03em;
}

.conv-inline-diagram {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 48px;
}

/* Section 5: Singularity */
.section-singularity {
    height: 50vh;
    background: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
}

.singularity-circle {
    width: 20vh;
    height: 20vh;
    border-radius: 50%;
    background: #1a1a2e;
    border: 2px solid #e63946;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.4); }
    70% { box-shadow: 0 0 0 30px rgba(230, 57, 70, 0); }
    100% { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0); }
}

.singularity-text-top {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #e8e6f0;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.singularity-text-bottom {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #e63946;
    letter-spacing: 0.15em;
}

/* Mobile */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .bento-grid-1,
    .bento-grid-2 {
        grid-template-columns: 1fr;
        grid-template-areas:
            "a" "b" "c" "d" "e" "f";
    }

    .bento-grid-2 {
        grid-template-areas:
            "g" "h" "i" "j" "k" "l";
    }

    .pole-title {
        font-size: 28px;
    }

    .mod-number {
        font-size: 48px;
    }

    .conv-headline {
        font-size: 28px;
    }

    .pole-container {
        width: 70vw;
        height: 70vw;
    }
}
