/* ============================================
   TRANSACTOLOGY.XYZ - Experimental Laboratory
   ============================================ */

:root {
    --bg-deep: #0d1117;
    --surface: rgba(255,255,255,0.06);
    --text-primary: #e6edf3;
    --accent-aqua: #a8d8ea;
    --accent-lavender: #aa96da;
    --accent-mint: #7ec8a0;
    --accent-peach: #f0b67f;
    --glow-cyan: #58d1c9;
}

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

html {
    scroll-behavior: smooth;
    background: var(--bg-deep);
}

body {
    font-family: 'Nunito', sans-serif;
    color: var(--text-primary);
    background: var(--bg-deep);
    overflow-x: hidden;
    line-height: 1.7;
}

/* === Background Particles === */
#particles-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.2;
}

.p1  { width: 3px; height: 3px; background: var(--accent-aqua);     top: 8%;  left: 12%; animation: drift1 18s linear infinite; }
.p2  { width: 2px; height: 2px; background: var(--accent-lavender); top: 15%; left: 78%; animation: drift2 22s linear infinite; }
.p3  { width: 4px; height: 4px; background: var(--accent-mint);     top: 25%; left: 45%; animation: drift3 16s linear infinite; }
.p4  { width: 2px; height: 2px; background: var(--accent-peach);    top: 35%; left: 90%; animation: drift1 20s linear infinite reverse; }
.p5  { width: 3px; height: 3px; background: var(--glow-cyan);       top: 50%; left: 20%; animation: drift2 24s linear infinite; }
.p6  { width: 2px; height: 2px; background: var(--accent-aqua);     top: 60%; left: 65%; animation: drift3 19s linear infinite reverse; }
.p7  { width: 4px; height: 4px; background: var(--accent-lavender); top: 72%; left: 35%; animation: drift1 21s linear infinite; }
.p8  { width: 3px; height: 3px; background: var(--accent-mint);     top: 80%; left: 80%; animation: drift2 17s linear infinite reverse; }
.p9  { width: 2px; height: 2px; background: var(--accent-peach);    top: 90%; left: 10%; animation: drift3 23s linear infinite; }
.p10 { width: 3px; height: 3px; background: var(--glow-cyan);       top: 5%;  left: 55%; animation: drift1 25s linear infinite reverse; }
.p11 { width: 2px; height: 2px; background: var(--accent-aqua);     top: 42%; left: 5%;  animation: drift2 20s linear infinite; }
.p12 { width: 3px; height: 3px; background: var(--accent-lavender); top: 18%; left: 30%; animation: drift3 18s linear infinite reverse; }
.p13 { width: 4px; height: 4px; background: var(--accent-mint);     top: 65%; left: 50%; animation: drift1 22s linear infinite; }
.p14 { width: 2px; height: 2px; background: var(--accent-peach);    top: 78%; left: 15%; animation: drift2 19s linear infinite reverse; }
.p15 { width: 3px; height: 3px; background: var(--glow-cyan);       top: 30%; left: 72%; animation: drift3 21s linear infinite; }
.p16 { width: 2px; height: 2px; background: var(--accent-aqua);     top: 55%; left: 88%; animation: drift1 17s linear infinite reverse; }
.p17 { width: 3px; height: 3px; background: var(--accent-lavender); top: 85%; left: 42%; animation: drift2 24s linear infinite; }
.p18 { width: 4px; height: 4px; background: var(--accent-mint);     top: 12%; left: 60%; animation: drift3 20s linear infinite reverse; }
.p19 { width: 2px; height: 2px; background: var(--accent-peach);    top: 48%; left: 28%; animation: drift1 23s linear infinite; }
.p20 { width: 3px; height: 3px; background: var(--glow-cyan);       top: 95%; left: 68%; animation: drift2 16s linear infinite reverse; }

@keyframes drift1 {
    0%   { transform: translate(0, 0); }
    25%  { transform: translate(30px, -20px); }
    50%  { transform: translate(-15px, 25px); }
    75%  { transform: translate(20px, 10px); }
    100% { transform: translate(0, 0); }
}

@keyframes drift2 {
    0%   { transform: translate(0, 0); }
    25%  { transform: translate(-25px, 15px); }
    50%  { transform: translate(20px, -30px); }
    75%  { transform: translate(-10px, -15px); }
    100% { transform: translate(0, 0); }
}

@keyframes drift3 {
    0%   { transform: translate(0, 0); }
    25%  { transform: translate(15px, 30px); }
    50%  { transform: translate(-25px, -10px); }
    75%  { transform: translate(10px, -25px); }
    100% { transform: translate(0, 0); }
}

/* === Pipeline SVG === */
#pipeline-svg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 2s ease;
}

#pipeline-svg.visible {
    opacity: 1;
}

#pipeline-inner {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 3s ease;
}

#pipeline-svg.drawn #pipeline-inner {
    stroke-dashoffset: 0;
}

/* === Traveling Dots === */
#traveling-dots {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 1s ease 3s;
}

#traveling-dots.active {
    opacity: 1;
}

.travel-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    filter: blur(1px);
}

.dot-aqua { background: var(--accent-aqua); animation: travelPath 8s linear infinite; }
.dot-lavender { background: var(--accent-lavender); animation: travelPath 8s linear infinite 2.6s; }
.dot-mint { background: var(--accent-mint); animation: travelPath 8s linear infinite 5.3s; }

@keyframes travelPath {
    0%   { top: 0%;  left: 50%; }
    15%  { top: 15%; left: 42%; }
    30%  { top: 30%; left: 35%; }
    45%  { top: 45%; left: 55%; }
    60%  { top: 60%; left: 40%; }
    75%  { top: 75%; left: 50%; }
    90%  { top: 88%; left: 50%; }
    100% { top: 100%; left: 50%; }
}

/* === Sections === */
.section-full {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem;
    z-index: 5;
}

/* === Viewport Slide (Hero) === */
#viewport-slide {
    min-height: 100vh;
}

.central-blob {
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 1s ease 0.3s, transform 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s;
}

.central-blob.visible {
    opacity: 1;
    transform: scale(1);
}

.blob-svg {
    width: 120px;
    height: 120px;
    animation: blobPulse 4s ease-in-out infinite;
}

@keyframes blobPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

.display-title {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin-top: 2rem;
    text-align: center;
}

.display-title .letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.display-title .letter.visible {
    opacity: 1;
    transform: translateY(0);
}

.subtitle-mono {
    font-family: 'Overpass Mono', monospace;
    font-size: clamp(0.7rem, 0.85vw, 0.85rem);
    color: var(--accent-lavender);
    margin-top: 1rem;
    text-align: center;
    min-height: 1.4em;
}

/* === Floating Labels === */
.floating-label {
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.label-tag {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-aqua);
    background: rgba(168, 216, 234, 0.08);
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    border: 1px solid rgba(168, 216, 234, 0.15);
}

/* === Specimen Chambers === */
.specimen-chamber {
    background: var(--surface);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 32px;
    border: 1px solid rgba(255,255,255,0.08);
    padding: 3rem;
    max-width: 800px;
    width: 100%;
    position: relative;
    box-shadow:
        inset 0 0 0 1px rgba(168,216,234,0.05),
        0 8px 32px rgba(0,0,0,0.3);
    display: flex;
    gap: 2rem;
}

.chamber-content {
    flex: 1;
}

.chamber-title {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.chamber-text {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
    font-weight: 400;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 1.2rem;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.chamber-text.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* === Orbiting Blobs === */
.orbiting-blobs {
    position: relative;
    width: 180px;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

.orbit-blob {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.orbit-blob svg {
    width: 60px;
    height: 60px;
}

.ob1 { animation: floatBlob 6s ease-in-out infinite; }
.ob2 { animation: floatBlob 6s ease-in-out infinite 1.5s; }
.ob3 { animation: floatBlob 6s ease-in-out infinite 3s; }
.ob4 { animation: floatBlob 6s ease-in-out infinite 4.5s; }

@keyframes floatBlob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.micro-label {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-lavender);
    opacity: 0.7;
}

/* === Section Title Outside === */
.section-title-outside {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 3rem;
    text-align: center;
}

/* === Bento Grid === */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1000px;
    width: 100%;
}

.specimen-slide {
    background: var(--surface);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
    box-shadow:
        inset 0 0 0 1px rgba(168,216,234,0.05),
        0 8px 32px rgba(0,0,0,0.3);
    opacity: 0;
    transform: translateY(20px) scale(0.95);
}

.specimen-slide.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.specimen-slide:hover {
    transform: scale(1.04);
    box-shadow:
        inset 0 0 0 1px rgba(168,216,234,0.1),
        0 12px 48px rgba(0,0,0,0.4);
}

.slide-blob {
    width: 80px;
    height: 80px;
}

.slide-title {
    font-family: 'Nunito', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
}

.slide-desc {
    font-family: 'Nunito', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-primary);
    opacity: 0.75;
    line-height: 1.6;
}

.specimen-id {
    font-family: 'Overpass Mono', monospace;
    font-size: 0.7rem;
    color: var(--accent-lavender);
    opacity: 0.5;
}

/* === Network === */
.network-container {
    max-width: 900px;
    width: 100%;
    text-align: center;
}

#network-svg {
    width: 100%;
    max-height: 500px;
}

.net-node {
    opacity: 0;
    transform-origin: center;
    transition: opacity 0.6s ease, r 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.net-node.bounced {
    opacity: 1;
}

.net-line {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    transition: stroke-dashoffset 1.5s ease;
}

.net-line.drawn {
    stroke-dashoffset: 0;
}

.network-caption {
    font-family: 'Nunito', sans-serif;
    font-size: 0.95rem;
    color: var(--text-primary);
    opacity: 0.6;
    margin-top: 2rem;
    font-style: italic;
}

/* === Petri Dish === */
#petri-dish {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.petri-circle {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: var(--surface);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 80px rgba(168,216,234,0.1), 0 0 40px rgba(170,150,218,0.08);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 1s ease, transform 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.petri-circle.revealed {
    opacity: 1;
    transform: scale(1);
}

.petri-aurora {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        var(--accent-aqua),
        var(--accent-lavender),
        var(--accent-mint),
        var(--accent-peach),
        var(--glow-cyan),
        var(--accent-aqua)
    );
    opacity: 0.15;
    animation: auroraRotate 12s linear infinite;
    filter: blur(40px);
}

@keyframes auroraRotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

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

.petri-domain {
    font-family: 'Nunito', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
}

.petri-sub {
    font-family: 'Overpass Mono', monospace;
    font-size: 0.7rem;
    color: var(--accent-lavender);
    margin-top: 0.5rem;
    opacity: 0.7;
}

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

    .specimen-chamber {
        flex-direction: column;
        padding: 2rem;
    }

    .orbiting-blobs {
        flex-direction: row;
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
    }

    .petri-circle {
        width: 240px;
        height: 240px;
    }

    .petri-domain {
        font-size: 1.3rem;
    }

    #pipeline-svg {
        display: none;
    }

    #traveling-dots {
        display: none;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
