/* simulai.org - Bioluminescent Computation */

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

:root {
    --deep-black: #040d1a;
    --ocean-dark: #061224;
    --ocean-mid: #0b1d3a;
    --ocean-layer: #0f2847;
    --cyan-primary: #4dd0e1;
    --cyan-bright: #18ffff;
    --coral-accent: #ff6e40;
    --foam-light: #e0f7fa;
    --foam-mid: #a0e4f1;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--deep-black);
    color: var(--foam-light);
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Bubble Field */
#bubble-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(77, 208, 225, 0.3), rgba(77, 208, 225, 0.05));
    border: 1px solid rgba(77, 208, 225, 0.2);
    animation: bubble-rise linear infinite;
}

@keyframes bubble-rise {
    0% {
        transform: translateY(100vh) scale(0.5);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

/* Zones */
.zone {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    padding: 4rem 2rem;
}

.zone-content {
    max-width: 900px;
    text-align: center;
}

/* Zone 1: Surface */
#zone-surface {
    background: linear-gradient(180deg, var(--ocean-dark) 0%, var(--ocean-mid) 100%);
    overflow: hidden;
}

.hero-title {
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    font-size: clamp(3rem, 8vw, 7rem);
    color: var(--foam-light);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    animation: title-glow 4s ease-in-out infinite alternate;
}

.hero-title .accent {
    color: var(--cyan-bright);
    text-shadow: 0 0 30px rgba(24, 255, 255, 0.5), 0 0 60px rgba(24, 255, 255, 0.3);
}

@keyframes title-glow {
    0% { text-shadow: 0 0 20px rgba(77, 208, 225, 0.2); }
    100% { text-shadow: 0 0 40px rgba(77, 208, 225, 0.4), 0 0 80px rgba(77, 208, 225, 0.1); }
}

.hero-subtitle {
    font-family: 'Quicksand', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: var(--foam-mid);
    letter-spacing: 0.3em;
    text-transform: lowercase;
    margin-bottom: 3rem;
}

.depth-indicator {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    font-family: 'Overpass Mono', monospace;
    font-size: 0.85rem;
    color: var(--cyan-primary);
    opacity: 0.7;
    padding: 0.5rem 1.5rem;
    border: 1px solid rgba(77, 208, 225, 0.3);
    border-radius: 30px;
}

.depth-label {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 300;
}

.depth-value {
    font-weight: 600;
}

.surface-waves {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: linear-gradient(180deg, transparent, var(--ocean-mid));
    opacity: 0.5;
}

/* Zone 2: Descent */
#zone-descent {
    background: linear-gradient(180deg, var(--ocean-mid) 0%, var(--deep-black) 100%);
}

.zone-header {
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    color: var(--cyan-primary);
    margin-bottom: 3rem;
    text-transform: lowercase;
}

.organism-cluster {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.organism {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.organism-body {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    position: relative;
    animation: organism-pulse 3s ease-in-out infinite;
}

.organism-1 .organism-body {
    background: radial-gradient(circle, var(--cyan-bright), transparent);
    box-shadow: 0 0 40px rgba(24, 255, 255, 0.4), inset 0 0 20px rgba(24, 255, 255, 0.2);
    animation-delay: 0s;
}

.organism-2 .organism-body {
    background: radial-gradient(circle, var(--coral-accent), transparent);
    box-shadow: 0 0 40px rgba(255, 110, 64, 0.4), inset 0 0 20px rgba(255, 110, 64, 0.2);
    animation-delay: 1s;
}

.organism-3 .organism-body {
    background: radial-gradient(circle, var(--cyan-primary), transparent);
    box-shadow: 0 0 40px rgba(77, 208, 225, 0.4), inset 0 0 20px rgba(77, 208, 225, 0.2);
    animation-delay: 2s;
}

@keyframes organism-pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 1; }
}

.organism-label {
    font-family: 'Overpass Mono', monospace;
    font-size: 0.75rem;
    color: var(--foam-mid);
    letter-spacing: 0.1em;
    text-transform: lowercase;
}

.zone-description {
    font-size: clamp(0.95rem, 1.5vw, 1.15rem);
    color: var(--foam-mid);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Zone 3: Colony */
#zone-colony {
    background: var(--deep-black);
}

.colony-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin-top: 2rem;
}

.colony-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    border-radius: 50%;
    aspect-ratio: 1;
    justify-content: center;
    transition: transform 0.6s ease;
    cursor: default;
}

.colony-node:hover {
    transform: scale(1.1);
}

.node-core {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--cyan-primary), transparent);
    box-shadow: 0 0 30px rgba(77, 208, 225, 0.5);
    animation: node-breathe 4s ease-in-out infinite;
}

.colony-node[data-pulse="1"] .node-core { animation-delay: 0s; }
.colony-node[data-pulse="2"] .node-core { animation-delay: 0.7s; }
.colony-node[data-pulse="3"] .node-core { animation-delay: 1.4s; }
.colony-node[data-pulse="4"] .node-core { animation-delay: 2.1s; }
.colony-node[data-pulse="5"] .node-core { animation-delay: 2.8s; }
.colony-node[data-pulse="6"] .node-core { animation-delay: 3.5s; }

@keyframes node-breathe {
    0%, 100% { transform: scale(0.8); opacity: 0.6; box-shadow: 0 0 20px rgba(77, 208, 225, 0.3); }
    50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 50px rgba(77, 208, 225, 0.7); }
}

.node-label {
    font-family: 'Overpass Mono', monospace;
    font-size: 0.7rem;
    color: var(--cyan-primary);
    letter-spacing: 0.15em;
    text-transform: lowercase;
}

/* Zone 4: Abyss */
#zone-abyss {
    background: linear-gradient(180deg, var(--deep-black) 0%, #020810 100%);
}

.abyss-terminal {
    background: rgba(6, 18, 36, 0.8);
    border: 1px solid rgba(77, 208, 225, 0.2);
    border-radius: 12px;
    padding: 2rem;
    text-align: left;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.terminal-line {
    font-family: 'Overpass Mono', monospace;
    font-size: 0.85rem;
    color: var(--cyan-primary);
    margin-bottom: 0.8rem;
    opacity: 0;
    animation: terminal-appear 0.5s forwards;
}

.terminal-line:nth-child(1) { animation-delay: 0.5s; }
.terminal-line:nth-child(2) { animation-delay: 1.5s; }
.terminal-line:nth-child(3) { animation-delay: 2.5s; }
.terminal-line:nth-child(4) { animation-delay: 3.5s; }
.terminal-line:nth-child(5) { animation-delay: 4.5s; }

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

.terminal-prompt {
    color: var(--coral-accent);
}

.terminal-line.blink .terminal-text {
    animation: cursor-blink 1s step-end infinite;
}

@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.abyss-message {
    font-family: 'Quicksand', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--foam-mid);
    font-style: italic;
    opacity: 0.8;
}

/* Zone 5: Return */
#zone-return {
    background: linear-gradient(180deg, #020810 0%, var(--ocean-dark) 100%);
}

.return-message {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--foam-mid);
    margin-bottom: 3rem;
    line-height: 1.8;
}

.cta-bubble {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(77, 208, 225, 0.3), rgba(77, 208, 225, 0.05));
    border: 2px solid rgba(77, 208, 225, 0.4);
    cursor: pointer;
    transition: all 0.6s ease;
    animation: cta-float 6s ease-in-out infinite;
}

.cta-bubble:hover {
    transform: scale(1.1);
    border-color: var(--cyan-bright);
    box-shadow: 0 0 60px rgba(24, 255, 255, 0.4);
}

@keyframes cta-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.cta-text {
    font-family: 'Overpass Mono', monospace;
    font-size: 0.8rem;
    color: var(--cyan-bright);
    letter-spacing: 0.1em;
    text-transform: lowercase;
}

/* Responsive */
@media (max-width: 768px) {
    .colony-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .organism-cluster {
        gap: 2rem;
    }

    .organism-body {
        width: 70px;
        height: 70px;
    }
}
