/* monopole.systems — Vaporwave Systems Dashboard */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.72;
    letter-spacing: 0.01em;
    color: #2d2640;
    background-color: #e8dff5;
    overflow-x: hidden;
    /* Palette reference: #D5F0E8 #D8ECF8 #8FE6C8 #F2A5B5 #F7E29C */
}

.panel-2 { background-color: #D5F0E8; }
.panel-3 { background-color: #FCE4D8; }
.panel-4 { background-color: #D8ECF8; }
.panel-5 { background-color: #E8DFF5; }

.accent-pink { color: #F2A5B5; }
.accent-mint { color: #8FE6C8; }
.accent-butter { color: #F7E29C; }

/* Boot Overlay */
#boot-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #e8dff5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

#boot-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.boot-line {
    stroke: #6b5f80;
    stroke-width: 1.5;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: draw-line 1.5s ease forwards 1.2s;
}

.end-dot {
    opacity: 0;
    animation: dot-appear 0.4s ease forwards 2.5s;
}

@keyframes draw-line {
    to { stroke-dashoffset: 0; }
}

@keyframes dot-appear {
    to { opacity: 1; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.4); }
}

.pulse-dot {
    animation: pulse 3s ease-in-out infinite;
}

/* Panels */
.panel {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.panel-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1100px;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Background Shapes */
.bg-shapes {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.geo-shape {
    fill: none;
    stroke: #6b5f80;
    stroke-width: 1.5;
    stroke-dasharray: 4 8;
    opacity: 0.2;
}

.node-indicator {
    opacity: 0.6;
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(3deg); }
}

@keyframes float-medium {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(-2deg); }
}

.float-slow {
    animation: float-slow 12s ease-in-out infinite;
}

.float-medium {
    animation: float-medium 8s ease-in-out infinite;
}

/* Gradient Orbs */
.gradient-orb {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.orb-1 {
    top: 20%;
    right: 10%;
    background: radial-gradient(circle, rgba(242,165,181,0.2), transparent 70%);
}

.orb-2 {
    bottom: 15%;
    left: 5%;
    background: radial-gradient(circle, rgba(143,230,200,0.2), transparent 70%);
}

.orb-3 {
    top: 30%;
    left: 15%;
    background: radial-gradient(circle, rgba(247,226,156,0.2), transparent 70%);
}

.orb-4 {
    top: 10%;
    right: 15%;
    background: radial-gradient(circle, rgba(232,223,245,0.3), transparent 70%);
}

.orb-5 {
    bottom: 20%;
    right: 20%;
    background: radial-gradient(circle, rgba(242,165,181,0.15), transparent 70%);
}

/* Typography */
.display-title {
    font-family: 'Jost', sans-serif;
    font-weight: 600;
    font-size: clamp(2.2rem, 5vw, 4.4rem);
    line-height: 1.08;
    letter-spacing: 0.02em;
    color: #2d2640;
    margin-bottom: 1rem;
}

.system-label {
    font-family: 'Share Tech', sans-serif;
    font-weight: 400;
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6b5f80;
    margin-bottom: 2rem;
}

/* Card Flip */
.card-flip-container {
    perspective: 1200px;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-flip-container:hover .card-inner,
.card-flip-container.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
}

.card-front {
    background: #f7f4fb;
    box-shadow: 0 8px 32px rgba(45,38,64,0.08);
}

.card-back {
    background: #ede3f7;
    transform: rotateY(180deg);
    box-shadow: 0 8px 32px rgba(45,38,64,0.08);
}

.card-label {
    font-family: 'Share Tech', sans-serif;
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6b5f80;
    margin-top: 0.75rem;
}

.card-brief {
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-size: 0.85rem;
    color: #6b5f80;
    margin-top: 0.25rem;
}

.card-body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #2d2640;
    text-align: center;
}

/* Panel 1 specific */
.init-content {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

#card-init {
    width: 320px;
    height: 200px;
    margin-top: 2rem;
}

/* Panel 2: Topology */
.topology-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(1.5rem, 3vw, 3rem);
    width: 100%;
    max-width: 800px;
}

.card-topo {
    width: 100%;
    height: 220px;
}

/* Panel 3: Signals */
.signals-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(1.5rem, 3vw, 3rem);
    width: 100%;
    max-width: 900px;
}

.card-signal {
    width: 100%;
    height: 200px;
}

.signal-front {
    background: linear-gradient(135deg, #f7f4fb 0%, #fce4d8 100%);
}

/* Panel 4: Modules */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(1.5rem, 3vw, 3rem);
    width: 100%;
    max-width: 700px;
}

.card-module {
    width: 100%;
    height: 220px;
}

/* Panel 5: Terminus */
.terminus-content {
    justify-content: center;
}

.terminus-title {
    font-size: clamp(1.8rem, 4vw, 3.2rem);
}

.terminus-contact {
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-size: 1rem;
    color: #6b5f80;
    margin-top: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .topology-grid,
    .signals-row {
        grid-template-columns: 1fr;
        max-width: 320px;
    }

    .modules-grid {
        grid-template-columns: 1fr;
        max-width: 320px;
    }

    .card-topo,
    .card-signal,
    .card-module {
        height: 200px;
    }

    #card-init {
        width: 280px;
    }
}
