/* miris-project.net - Jewel-Tone Creative Constellation */

:root {
    --void-bg: #0d0b1e;
    --surface: #1a1335;
    --emerald: #2dd4a8;
    --ruby: #e03e6b;
    --sapphire: #3b82f6;
    --amber: #f5a623;
    --text-primary: #e8e0f0;
    --text-secondary: #9b8fad;
}

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

html {
    scroll-behavior: auto;
}

body {
    background: var(--void-bg);
    color: var(--text-primary);
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.7;
    letter-spacing: 0.01em;
    overflow-x: hidden;
    min-height: 600vh;
}

/* Background Canvas */
#bgCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

/* Grid Whispers */
#gridWhispers {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(232, 224, 240, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(232, 224, 240, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* Connection Lines SVG */
.connection-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
}

/* Floating Elements Container */
#floatingElements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 3;
    pointer-events: none;
}

/* Constellation Navigation */
.constellation-nav {
    position: fixed;
    top: 30px;
    left: 30px;
    z-index: 100;
    width: 180px;
    height: 200px;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.constellation-nav.visible {
    opacity: 1;
}

.constellation-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.constellation-line {
    stroke: var(--text-secondary);
    stroke-width: 1;
    stroke-dasharray: 4 4;
    opacity: 0.4;
    stroke-dashoffset: 0;
    animation: dashFlow 8s linear infinite;
}

@keyframes dashFlow {
    to { stroke-dashoffset: -24; }
}

.nav-node {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--surface);
    border: 1.5px solid var(--text-secondary);
    cursor: pointer;
    z-index: 101;
    transition: border-color 0.3s, background 0.3s;
}

.nav-node:hover {
    border-color: var(--emerald);
    background: rgba(45, 212, 168, 0.15);
}

.nav-node.active {
    border-color: var(--emerald);
    background: rgba(45, 212, 168, 0.25);
}

.node-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid var(--emerald);
    opacity: 0;
}

.nav-node.active .node-pulse {
    animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    100% { transform: translate(-50%, -50%) scale(3); opacity: 0; }
}

/* Zones */
.zone {
    position: relative;
    z-index: 2;
}

/* Zone 1: The Void */
.zone-void {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.void-content {
    text-align: center;
    position: relative;
    z-index: 5;
}

.site-title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 200;
    font-size: clamp(2.6rem, 7vw, 5rem);
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(20px);
}

.site-title.revealed {
    opacity: 1;
    transform: translateY(0);
    font-weight: 700;
}

.site-tagline {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(0.9rem, 1.4vw, 1.2rem);
    color: var(--text-secondary);
    margin-top: 1.2rem;
    letter-spacing: 0.02em;
    opacity: 0;
    transform: translateY(15px);
}

.site-tagline.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Scatter Clusters */
.scatter-cluster {
    position: absolute;
    pointer-events: none;
}

.scatter-dot {
    position: absolute;
    border-radius: 50%;
    transition: transform 0.3s;
}

.scatter-dot:hover {
    transform: scale(1.5);
}

.cluster-1 { top: 20%; left: 15%; }
.cluster-2 { top: 35%; right: 20%; }
.cluster-3 { bottom: 30%; left: 25%; }
.cluster-4 { bottom: 20%; right: 15%; }
.cluster-5 { top: 45%; left: 50%; }

/* Panels */
.panel {
    position: relative;
    background: rgba(26, 19, 53, 0.92);
    border: 1px solid rgba(155, 143, 173, 0.2);
    border-radius: 8px;
    padding: 2.5rem;
    max-width: 520px;
    margin-bottom: 8vh;
    opacity: 0;
    transform: translateX(80px) translateY(30px);
    backdrop-filter: blur(12px);
}

.panel.visible {
    opacity: 1;
    transform: translateX(0) translateY(0);
}

.panel-right {
    margin-left: auto;
    margin-right: 8vw;
}

.panel-left {
    margin-left: 8vw;
    margin-right: auto;
    transform: translateX(-80px) translateY(30px);
}

.panel-left.visible {
    transform: translateX(0) translateY(0);
}

.panel-1 { border-color: rgba(45, 212, 168, 0.3); }
.panel-2 { border-color: rgba(224, 62, 107, 0.3); }
.panel-3 { border-color: rgba(59, 130, 246, 0.3); }
.panel-4 { border-color: rgba(245, 166, 35, 0.3); }
.panel-5 { border-color: rgba(224, 62, 107, 0.3); }
.panel-6 { border-color: rgba(59, 130, 246, 0.3); }

.panel-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 1rem;
}

.panel-1 .panel-label { color: var(--emerald); }
.panel-2 .panel-label { color: var(--ruby); }
.panel-3 .panel-label { color: var(--sapphire); }
.panel-4 .panel-label { color: var(--amber); }
.panel-5 .panel-label { color: var(--ruby); }
.panel-6 .panel-label { color: var(--sapphire); }

.panel-title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.panel-text {
    color: var(--text-primary);
    opacity: 0.85;
    line-height: 1.75;
}

.panel-geo {
    margin-top: 1.5rem;
}

.geo-composition {
    width: 100%;
    max-width: 200px;
    height: auto;
}

/* Orbital Rings */
.orbital-ring {
    position: absolute;
    width: 60px;
    height: 60px;
    top: -10px;
    right: -10px;
}

.ring-1 { animation: orbitSpin 30s linear infinite; }
.ring-2 { animation: orbitSpin 45s linear infinite reverse; }
.ring-3 { animation: orbitSpin 60s linear infinite; }

@keyframes orbitSpin {
    to { transform: rotate(360deg); }
}

/* Data Paintings */
.data-painting {
    width: 100%;
    max-width: 400px;
    height: auto;
    margin-top: 1.5rem;
}

.data-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 2s ease;
}

.panel.visible .data-path {
    stroke-dashoffset: 0;
}

/* Zone 2: Workshop */
.zone-workshop {
    min-height: 150vh;
    padding: 10vh 0;
    position: relative;
}

/* Zone 3: Data Garden */
.zone-datagarden {
    min-height: 150vh;
    padding: 10vh 0;
    position: relative;
}

/* Zone 4: Constellation */
.zone-constellation {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.constellation-content {
    max-width: 700px;
    padding: 0 2rem;
    text-align: center;
    position: relative;
    z-index: 5;
}

.philosophy-text {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 300;
    font-size: clamp(1.4rem, 3vw, 2rem);
    line-height: 1.6;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.highlight-emerald {
    color: var(--emerald);
    transition: color 0.6s;
}

.highlight-ruby {
    color: var(--ruby);
    transition: color 0.6s;
}

.highlight-sapphire {
    color: var(--sapphire);
    transition: color 0.6s;
}

/* Constellation Orbitals */
.constellation-orbital {
    position: absolute;
    pointer-events: none;
}

.orbit-a {
    width: 200px;
    height: 200px;
    top: 15%;
    left: 10%;
    animation: orbitSpin 30s linear infinite;
}

.orbit-b {
    width: 150px;
    height: 150px;
    bottom: 20%;
    right: 12%;
    animation: orbitSpin 45s linear infinite reverse;
}

.orbit-c {
    width: 120px;
    height: 120px;
    top: 25%;
    right: 20%;
    animation: orbitSpin 60s linear infinite;
}

.orbit-d {
    width: 100px;
    height: 100px;
    bottom: 30%;
    left: 15%;
    animation: orbitSpin 35s linear infinite reverse;
}

/* Zone 5: Signal */
.zone-signal {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.signal-content {
    text-align: center;
    position: relative;
    z-index: 5;
}

.signal-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.signal-link {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-decoration: none;
    color: var(--emerald);
    margin-bottom: 4rem;
}

.signal-line {
    display: block;
    width: 60px;
    height: 2px;
    background: var(--emerald);
    animation: signalPulse 2s ease-in-out infinite;
}

@keyframes signalPulse {
    0%, 100% { opacity: 0.4; transform: scaleX(0.8); }
    50% { opacity: 1; transform: scaleX(1); }
}

.signal-address {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1rem, 2vw, 1.4rem);
    font-weight: 500;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.signal-domain {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: -0.03em;
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(20px);
}

.signal-domain.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Floating Gems */
.floating-gem {
    position: fixed;
    width: 12px;
    height: 12px;
    transform: rotate(45deg);
    opacity: 0.2;
    pointer-events: none;
    z-index: 2;
}

.gem-1 { top: 20%; left: 80%; background: linear-gradient(135deg, var(--emerald), var(--sapphire)); }
.gem-2 { top: 50%; left: 10%; background: linear-gradient(135deg, var(--ruby), var(--amber)); }
.gem-3 { top: 70%; left: 85%; background: linear-gradient(135deg, var(--sapphire), var(--emerald)); }
.gem-4 { top: 30%; left: 5%; background: linear-gradient(135deg, var(--amber), var(--ruby)); }
.gem-5 { top: 80%; left: 40%; background: linear-gradient(135deg, var(--emerald), var(--amber)); }
.gem-6 { top: 15%; left: 60%; background: linear-gradient(135deg, var(--ruby), var(--sapphire)); }

/* Mini Graphs */
.mini-graph {
    position: fixed;
    width: 80px;
    height: 40px;
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.8s;
}

.mini-graph.visible {
    opacity: 1;
}

.mini-graph-1 { top: 25%; right: 5%; }
.mini-graph-2 { top: 55%; left: 3%; }
.mini-graph-3 { top: 75%; right: 8%; }

/* Responsive */
@media (max-width: 768px) {
    .constellation-nav {
        top: 15px;
        left: 15px;
        transform: scale(0.7);
        transform-origin: top left;
    }

    .panel {
        max-width: 90vw;
        margin-left: 5vw !important;
        margin-right: 5vw !important;
        padding: 1.8rem;
    }

    .panel-right, .panel-left {
        margin-left: 5vw !important;
        margin-right: 5vw !important;
    }

    .constellation-content {
        padding: 0 1.5rem;
    }

    .signal-line {
        width: 30px;
    }

    .floating-gem {
        display: none;
    }
}
