/* ======================================================= */
/* FADE-IN */
.fade-in {
    opacity: 0;
    animation: fadeIn 1.8s ease-out forwards;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px);}
    to   { opacity: 1; transform: translateY(0);}
}

/* ======================================================= */
/* COLLAPSIBLE SECTIONS */
.collapse-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.5s ease;
    z-index: 10;
}
.collapse-content.open {
    max-height: 2000px;
    opacity: 1;
}

/* ======================================================= */
/* NODE BUTTONS */
.node-btn,
.vine-btn,
.card-vine a {
    position: relative;
    z-index: 20; /* ensures always clickable */
    cursor: pointer;
    border-radius: 9999px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}
.node-btn.green {
    background: #0f9d58;
    color: #e0ffe0;
}
.node-btn.green:hover {
    background: #1ed760;
    transform: scale(1.1);
    box-shadow: 0 0 12px #00ff99aa;
}

/* ======================================================= */
/* NODE BLOOM */
.node-bloom {
    transition: all 0.4s ease;
    z-index: 15;
}
.node-bloom:hover {
    transform: scale(1.3);
    box-shadow: 0 0 30px #00ff99aa;
}

/* ======================================================= */
/* VINE CONNECTORS */
.vine {
    stroke: #0f9d58;
    stroke-width: 3;
    fill: none;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: growVine 1s forwards;
    stroke-linecap: round;
    stroke-linejoin: round;
}
@keyframes growVine {
    to { stroke-dashoffset: 0; }
}

/* ======================================================= */
/* LAYER NODES (GPU Aurora) */
.layer-node {
    border-radius: 9999px;
    width: 1.5rem;
    height: 1.5rem;
    position: absolute;
    animation: pulse 2s infinite, auroraShimmer 5s ease infinite;
    background: linear-gradient(90deg,#7f5af0,#00a6fb,#0f9d58);
    background-size: 300% 300%;
}
@keyframes pulse {
    0%,100% { transform: scale(1); }
    50%     { transform: scale(1.2); }
}
@keyframes auroraShimmer {
    0%   { background-position:0% 50%; }
    50%  { background-position:100% 50%; }
    100% { background-position:0% 50%; }
}

/* ======================================================= */
/* PARTICLES */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #1ed760;
    opacity: 0.8;
    pointer-events: none;
    animation: particleFlow 2s linear infinite;
}
@keyframes particleFlow {
    0%   { transform: translate(0,0); opacity: 0.8; }
    50%  { opacity: 0.5; }
    100% { transform: translate(var(--dx),var(--dy)); opacity: 0; }
}

/* ======================================================= */
/* COLLAPSE CONTENT TEXT */
.collapse-content p {
    color: #0f9d58;
    font-family: "Inter", "Fira Code", monospace;
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: center;
    margin: 0.25rem 0;
    max-width: 24rem;
}

/* ======================================================= */
/* SEMANTIC PULSE LINES */
.semantic-pulse {
    position: absolute;
    top: -10px;
    left: 50%;
    width: 2px;
    height: 40px;
    background: #7ee787;
    transform: translateX(-50%);
    opacity: 1;
    animation: semanticPulseAnim 0.8s ease-out forwards;
}
@keyframes semanticPulseAnim {
    0%   { opacity: 1; height: 20px; }
    100% { opacity: 0; height: 140px; }
}

/* ======================================================= */
/* VINE PULSE EFFECT */
.vine-pulse-green {
    animation: vinePulse 2.4s infinite ease-in-out;
}
@keyframes vinePulse {
    0%   { box-shadow: 0 0 10px #0f9d58, 0 0 20px #0f9d58; transform: scale(1); }
    50%  { box-shadow: 0 0 25px #0f9d58, 0 0 45px #0f9d58; transform: scale(1.015); }
    100% { box-shadow: 0 0 10px #0f9d58, 0 0 20px #0f9d58; transform: scale(1); }
}

/* ======================================================= */
/* NEURAL GRID BACKGROUND */
.animate-grid {
    background-image: linear-gradient(90deg, rgba(126,231,135,0.4) 1px, transparent 1px),
                      linear-gradient(rgba(126,231,135,0.4) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: gridMove 8s linear infinite;
    position: absolute;
    z-index: 0;
}
@keyframes gridMove {
    0%   { background-position: 0 0; }
    100% { background-position: 100px 100px; }
}

/* ======================================================= */
/* VINE CARD */
.card-vine {
    position: relative;
    z-index: 15;
}
.card-vine::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 1rem;
    border: 1px solid rgba(126,231,135,0.3);
    animation: vinePulse 3.5s ease-in-out infinite;
}

/* SEMANTIC LINES */
.semantic-lines {
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, transparent, rgba(126,231,135,0.7));
    transition: width 0.4s ease;
    margin-bottom: 12px;
}
.card-vine:hover .semantic-lines {
    width: 100%;
}

/* ======================================================= */
/* TOP CTA VINE PULSE */
.animate-vinePulse {
    animation: pulseCTA 2s ease-in-out infinite;
}
@keyframes pulseCTA {
    0%,100% { box-shadow: 0 0 8px #0f9d58, 0 0 20px rgba(15,157,88,0.4); }
    50%     { box-shadow: 0 0 16px #0f9d58, 0 0 40px rgba(15,157,88,0.7); }
}

/* ======================================================= */
/* GPU BLOOM CORE (FLOATING TOP FINISHER) */
.bloom-core {
    width: 130px;
    height: 130px;
    border-radius: 9999px;
    background: radial-gradient(circle,#1ed760,#0f9d58,#003300);
    filter: blur(0px);
    animation: bloomPulse 4s ease-in-out infinite;
    box-shadow: 0 8px 30px rgba(30,215,96,0.18);
    margin: 0 auto;
    position: relative;
    z-index: 5; /* below buttons but above grid */
    pointer-events: none; /* does not block clicks */
}
@keyframes bloomPulse {
    0%,100% { filter: blur(4px) brightness(1.1); transform: scale(1); }
    50%     { filter: blur(14px) brightness(1.5); transform: scale(1.05); }
}
